[Tutor] subprocess/files help

Essah Mitges e_mitges at hotmail.com
Thu Jun 11 00:29:22 CEST 2009


game runs fine out of the WODDS.py it when I start it from the menu lies the problemup-1.png is the first pic file used in the program so I'm guessing that all of the imported files from data have a problem if i took away up-1 up-2 would start a problem then side-1 and so on

________________________________
> From: srilyk at gmail.com
> Date: Wed, 10 Jun 2009 17:16:43 -0500
> Subject: Re: [Tutor] subprocess/files help
> To: e_mitges at hotmail.com
> CC: tutor at python.org
>
> On Wed, Jun 10, 2009 at 4:21 PM, Essah Mitges> 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 applicable.
>
>
> http://www.communitymx.com/content/article.cfm?cid=230ad
>
> HTH
>
>

_________________________________________________________________
Internet explorer 8 lets you browse the web faster.
http://go.microsoft.com/?linkid=9655582


More information about the Tutor mailing list