problems with compiling and finding modules
Steven Hodgen
steven at twitch.net
Mon Apr 28 02:41:47 EDT 2003
Hello,
I'm currently learning Python and am having a couple of problems.
I use a programmer's editor called "Visual SlickEdit". I'm trying to set
it up to work with Python. So, how do I get it to compile a python file.
I can't seem to find a command line method for either compiling a .py file
to a .pyc file or even just do a syntax check for finding errors in the
editor. I found a file called py_compile, but this just seems to add a
function called compile which I can execute from the interpreter but not
the command line. The file compileall, will compile everything in
directory or entire tree, but not just a single file. I would asume there
must be a way short of writing my own single file compile script. I
understand I'm going to have to do something like:
python compile_command myfile.py
but what do I put in for compile_command?
Also, how do I change the working directory from within IDLE? If I open my
.py file from the Windows Explorer using a right click and choose 'Edit
with IDLE', everything works fine, but if I 'Open...' a .py file from
within IDLE, it can't find modules I import from. I assume this is because
it isn't in the current directory.
Thanks!
--Steven
steven at twitch.net
More information about the Python-list
mailing list