[Tutor] subprocess/files help

Wayne srilyk at gmail.com
Thu Jun 11 00:16:43 CEST 2009

On Wed, Jun 10, 2009 at 4:21 PM, Essah Mitges <e_mitges at hotmail.com> wrote:

> The problem I am have now is that once my game is initiated from the menu
> file the modules that are with cannot import the imagesthe folder looks like
> thisWODDS    data        All images and sound for game    gamelib
>  Objects        Utilities        ___init___    WODDS.py
> Png error file attachedAny one know the code in subprocesses to fix this

The problem has nothing to do with subprocess (and in the future please
combine your questions into one email). As I mentioned before it's
specifically looking for a file "data/up-1.png" which either doesn't exist
or permissions are wrong.

Remember, relative paths are not absolute.

On *nix, /home/user/file/image.jpg is an absolute reference. No matter where
you execute a program it will be able to find it. On Windows you would see
something like C:\Documents and Settings\Users\MyGuy\MyFile\image.jpg

A relative path would be, as the name suggests, relative. files/image.jpg
will access a different location on the disk depending on where you are.
Take a look at this that specifically deals with web programming but is

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090610/3998f34e/attachment.htm>

More information about the Tutor mailing list