Loading ...
Sorry, an error occurred while loading the content.

Re: [Cheetahtemplate-discuss] Cheetah 0.9.9b1

Expand Messages
  • Ian Bicking
    Well, I had put it in the back of my mind, but there s a bad bug in cheetah-compile. The importing (with -w) doesn t work at all with directories and files of
    Message 1 of 5 , Dec 5, 2001
    • 0 Attachment
      Well, I had put it in the back of my mind, but there's a bad bug in
      cheetah-compile. The importing (with -w) doesn't work at all with
      directories and files of the same name in different directories.

      I'm not quite sure what to do about it. I played around with some other
      different solutions (like __import__, using imp, etc) and they were
      broken in other ways.

      On Wed, 2001-12-05 at 13:35, Tavis Rudd wrote:
      > Hi,
      > I'd like to release 0.9.9b1 later today. Are there any more bug
      > reports or things that need tidying up before then?
      >
      > Tavis
      > p.s.
      > Are there any Tetex installation gurus out there? I upgraded my
      > system and can't get latex working now so I'm having difficulty
      > compiling the Cheetah docs.
      >
      > I installed tetex from the latest stable tarball, ran texconfig, and
      > then it said this:
      >
      > tavis@lucy: ~/Cheetah/docs/users_guide_src > make
      > /home/tavis/tmp/Python-2.2b1/Doc/tools/mkhowto --ps users_guide.tex
      > +++
      > TEXINPUTS=/home/tavis/Cheetah/docs/users_guide_src:/home/tavis/tmp/Python-2.2b1/Doc/paper-letter:/home/tavis/tmp/Python-2.2b1/Doc/texinputs:::::::/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
      > +++ latex users_guide
      > *** Session transcript and error messages are in
      > /home/tavis/Cheetah/docs/users_guide_src/users_guide.how.
      > *** Exited with status 1.
      > The relevant lines from the transcript are:
      > ------------------------------------------------------------------------
      > +++ latex users_guide
      > This is TeX, Version 3.14159 (Web2C 7.3.1)
      > I can't find the format file `latex.fmt'!
      >
      > _______________________________________________
      > Cheetahtemplate-discuss mailing list
      > Cheetahtemplate-discuss@...
      > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      >



      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Ian Bicking
      ... All generating of HTML *has* to be done after compiling, due to the possibility of interrelation (inheritance or inclusion). ... Yes, that would work,
      Message 2 of 5 , Dec 5, 2001
      • 0 Attachment
        On Wed, 2001-12-05 at 14:11, Tavis Rudd wrote:
        > On Wednesday 05 December 2001 10:43, Ian Bicking wrote:
        > > Well, I had put it in the back of my mind, but there's a bad bug in
        > > cheetah-compile. The importing (with -w) doesn't work at all with
        > > directories and files of the same name in different directories.
        >
        > That will definitely need fixing. Can we move that -w stuff into a
        > subclass or a container class? It seems a little brittle to me for
        > other reasons. One being that it assumes the output will be written
        > to .html files.
        >
        > I think the general flow of cheetah-compile should be:
        > 1- process the command line args and figure out what to do
        > 2- generate a complete list of files to operate on
        > 3- do what it is being told to do with each file
        >
        > At the moment steps 2 and 3 are muddled up. And step 3 could be
        > refactored better. Instead of compiling and writing the compiled
        > code to a module in a single method there should be a separate method
        > for each. That way we can customize what happens to the compiled code
        > (printing to stdout, etc.).

        All generating of HTML *has* to be done after compiling, due to the
        possibility of interrelation (inheritance or inclusion).

        > I'll do this now.
        >
        > > I'm not quite sure what to do about it. I played around with some
        > > other different solutions (like __import__, using imp, etc) and
        > > they were broken in other ways.
        >
        > I think there's an easier way to deal with this. Every Cheetah
        > generated module can be run from the command line. They print their
        > template output to stdout. Thus, all we need to do is
        > os.popen("python " + moduleFileName ) on each generated module,
        > capture the output and do what we want with it. Of course this will
        > only work if PYTHONPATH is setup properly and the templates don't
        > rely too much on WebKit. Would that work?

        Yes, that would work, though it would be slower. I was hoping there was
        a way around that... there should be. Dynamic importing in Python is
        such a pain in the ass... maybe we should mention that in our paper :)
        But it should be possible.

        Ian



        _______________________________________________
        Cheetahtemplate-discuss mailing list
        Cheetahtemplate-discuss@...
        https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
      • Tavis Rudd
        Hi, I d like to release 0.9.9b1 later today. Are there any more bug reports or things that need tidying up before then? Tavis p.s. Are there any Tetex
        Message 3 of 5 , Dec 5, 2001
        • 0 Attachment
          Hi,
          I'd like to release 0.9.9b1 later today. Are there any more bug
          reports or things that need tidying up before then?

          Tavis
          p.s.
          Are there any Tetex installation gurus out there? I upgraded my
          system and can't get latex working now so I'm having difficulty
          compiling the Cheetah docs.

          I installed tetex from the latest stable tarball, ran texconfig, and
          then it said this:

          tavis@lucy: ~/Cheetah/docs/users_guide_src > make
          /home/tavis/tmp/Python-2.2b1/Doc/tools/mkhowto --ps users_guide.tex
          +++
          TEXINPUTS=/home/tavis/Cheetah/docs/users_guide_src:/home/tavis/tmp/Python-2.2b1/Doc/paper-letter:/home/tavis/tmp/Python-2.2b1/Doc/texinputs:::::::/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX:/home/tavis/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX
          +++ latex users_guide
          *** Session transcript and error messages are in
          /home/tavis/Cheetah/docs/users_guide_src/users_guide.how.
          *** Exited with status 1.
          The relevant lines from the transcript are:
          ------------------------------------------------------------------------
          +++ latex users_guide
          This is TeX, Version 3.14159 (Web2C 7.3.1)
          I can't find the format file `latex.fmt'!

          _______________________________________________
          Cheetahtemplate-discuss mailing list
          Cheetahtemplate-discuss@...
          https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
        • Tavis Rudd
          ... That will definitely need fixing. Can we move that -w stuff into a subclass or a container class? It seems a little brittle to me for other reasons. One
          Message 4 of 5 , Dec 5, 2001
          • 0 Attachment
            On Wednesday 05 December 2001 10:43, Ian Bicking wrote:
            > Well, I had put it in the back of my mind, but there's a bad bug in
            > cheetah-compile. The importing (with -w) doesn't work at all with
            > directories and files of the same name in different directories.

            That will definitely need fixing. Can we move that -w stuff into a
            subclass or a container class? It seems a little brittle to me for
            other reasons. One being that it assumes the output will be written
            to .html files.

            I think the general flow of cheetah-compile should be:
            1- process the command line args and figure out what to do
            2- generate a complete list of files to operate on
            3- do what it is being told to do with each file

            At the moment steps 2 and 3 are muddled up. And step 3 could be
            refactored better. Instead of compiling and writing the compiled
            code to a module in a single method there should be a separate method
            for each. That way we can customize what happens to the compiled code
            (printing to stdout, etc.).

            I'll do this now.

            > I'm not quite sure what to do about it. I played around with some
            > other different solutions (like __import__, using imp, etc) and
            > they were broken in other ways.

            I think there's an easier way to deal with this. Every Cheetah
            generated module can be run from the command line. They print their
            template output to stdout. Thus, all we need to do is
            os.popen("python " + moduleFileName ) on each generated module,
            capture the output and do what we want with it. Of course this will
            only work if PYTHONPATH is setup properly and the templates don't
            rely too much on WebKit. Would that work?


            _______________________________________________
            Cheetahtemplate-discuss mailing list
            Cheetahtemplate-discuss@...
            https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
          • Tavis Rudd
            ... I ve finished my refactoring. Do you have time to tidy up CheetahCompile._generate() method later today? ... Well things would be much easier if we
            Message 5 of 5 , Dec 5, 2001
            • 0 Attachment
              On Wednesday 05 December 2001 11:13, Ian Bicking wrote:
              > > I think there's an easier way to deal with this. Every Cheetah
              > > generated module can be run from the command line. They print
              > > their template output to stdout. Thus, all we need to do is
              > > os.popen("python " + moduleFileName ) on each generated module,
              > > capture the output and do what we want with it. Of course this
              > > will only work if PYTHONPATH is setup properly and the templates
              > > don't rely too much on WebKit. Would that work?

              I've finished my refactoring. Do you have time to tidy up
              CheetahCompile._generate() method later today?

              > Yes, that would work, though it would be slower. I was hoping
              > there was a way around that... there should be. Dynamic importing
              > in Python is such a pain in the ass... maybe we should mention that
              > in our paper :) But it should be possible.

              Well things would be much easier if we assumed that the cheetah
              directory tree being compiled is in fact a Python package with
              __init__.py files at every level. If you were in /home/ian/cheetah
              and your template tree was in ./myApp then you should be able to run
              "cheetah-compile -Rw myApp" and have it work properly.

              _______________________________________________
              Cheetahtemplate-discuss mailing list
              Cheetahtemplate-discuss@...
              https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
            Your message has been successfully submitted and would be delivered to recipients shortly.