Hello
a recent change in leoTest
+ # 2010/03/05: set the current directory so that importing
leo.core.whatever works.
+ leoDir = g.os_path_finalize_join(g.app.loadDir,'..','..')
+ os.chdir(leoDir)
solved the problem of importing leo.core but, also introduced new
problems with tests that rely on current dir == path to leo file.
In order to solve the first problem of importing leo.core I have
created leo.pth file with the path to leoDir and stored it in site-
packages.
Maybe it would be better to add leoDir to environment before running
new process. Something like this:
leoDir = g.os_path_finalize_join(g.app.loadDir,'..','..')
env = dict(os.environ)
env['PYTHONPATH'] = env.get('PYTHONPATH', '')+';'+leoDir
os.spawnve(os.P_NOWAIT,sys.executable,args,env)
At least this works on my machine.
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.