On Fri, Oct 9, 2009 at 2:59 PM, Christopher Arndt <[email protected]>wrote:

>
> Dan Arbogast schrieb:
>
> >         Added the print command and here is what comes out:
> >
> >         /home/darbogast/python/oligo_1.1/oligo/oligo/commands.pyc
>
> You said, you had quickstarted the project, so where did this
> "commands.pyc" file come from? Did you copy files from another project
> in there? Or wasn't the project so fresh after all?
>
> >     I see the project directory has both a command.pyc file and a
> >     commands.pyc file.  For a test I renamed the commands.pyc file to
> >     commands.pycxxx and the error went away and the site works again.
> >     But, command.pyc and commands.pyc are entirely different files, so
> >     I'm trying to access what I lost when taking the commands.pyc out of
> >     the picture.
>
>
> *.pyc files are "compiled" versions of *.py files. Compiled not in the
> sense of C-code-to-assembler but Python-bytecode. When Python imports a
> module, it will look for a file with a .py ending. It will also look for
> a file with the same basename and a .pyc ending. If the first file is
> not there, or if the second file is newer can can be loaded, it will
> assume that this the compiled version of the .py file. If the file is
> older, can not be loaded or is missing, Python loads the .py file,
> compiles it on-the-fly and, if it is able to, saves the compiled
> bytecode to a file with the same basename and a .pyc ending.
>
> In your case you probably quickstarted your project, copied over the
> files from an old project (including the *.pyc files), deleted the
> commands.py file, but left the commands.pyc there, right?
>
> Are you fairly new to Python? Maybe taking some time to explore the
> crooks and nannies of the language would be in order. The newsgroup
> comp.lang.python.tutor is an excellent resource for this.
>
>
> Chris
>

Both the .py and the .pyc files are there, and both the "commands.py" and
"commands.pyc" were renamed to take them out of the picture.  I only
reported the .pyc name change, sorry about that.  It's not the issue.

Yes, I did copy over files from my old project, but only the .py files (not
the .pyc files) and the old project does not have either a "command.py" or a
"commands.py" in the same directory as they showed up in the new
quickstarted directory, so I don't see any way they were copied over.

Dan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to