Multiple files

Benjamin Kaplan benjamin.kaplan at
Sun Oct 18 04:05:53 CEST 2009

On Sat, Oct 17, 2009 at 9:58 PM, Someone Something <fordhaivat at> wrote:
> I was trying to write a program with just one class and it was working fine.
> Then, I seperated that class into two different files and made the objects
> and called the methods in a third ( Now, when I use
> the command:
> python
> Nothing prints. I think its only interpreting (the objects are
> declared in
> How can I fix this?

Python is a scripting language that compiles files as needed. You
don't need to declare every module you're using Run only the script
you need.


When the script is run, the current directory is automatically added
to the python path, the list of directories python looks through for
modules (stored in sys.path). When python sees "import client", it
looks through that path for and then compiles it if it's not
already been compiled.
> --

More information about the Python-list mailing list