[Tutor] file locations

Kent Johnson kent37 at tds.net
Mon Nov 24 22:43:42 CET 2008

On Mon, Nov 24, 2008 at 2:10 PM, Jeff Peery <jeffpeery at yahoo.com> wrote:
> Hello,
> I have a wxapp from which I would like to execute another wxapp. the 'child'
> wxapp is located in a sub directory of the 'parent' wxapp. The problem I'm
> having is that I execute the child app from the parent app and it cannot
> find the modules/images/files etc that it needs because it is looking in the
> parents directory location and not its own. I want to keep the child wxapp
> in its own sub directory for organizational

If the child app is being run in a separate process, then specify the
child dir as the working dir of the process. For example if you are
using subprocess.Popen() use the cwd parameter.

If the child app is imported and run in the parent process, then you
need to add the child dir to sys.path, and not have any duplicate
module names between the parent and child directories.


More information about the Tutor mailing list