gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] gnumed.py hacks


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] gnumed.py hacks
Date: Sat, 21 Feb 2004 00:33:25 +0100
User-agent: Mutt/1.3.22.1i

> I was bored today so I started looking into some gnumed code.
LOL

>     appPath = get_base_dir()
>     if appPath is None:
>                sys.exit("CRITICAL ERROR: Cannot determine base path.")
> 
>     # manually extend our module search path
>     sys.path.append(os.path.join(appPath, 'wxpython'))
>     sys.path.append(os.path.join(appPath, 'python-common'))
>     sys.path.append(os.path.join(appPath, 'business'))
> 
> This seems like a hack.
It pretty much is (albeit well established)

> This should only be done for CVS gnumed:
And there's your reason why it exists.

> -get_parent_dir()
> -append it to PYTHONPATH
> -done
Sounds fair.

> In a Linux distribution or Windows installation:
                                     ^^^^^^^^^^^^
Key word. We don't have any installation yet.

> -do nothing, modules should all be found because they should somewhere 
> within sys.path already
That sounds about right.

> -each directory should have an __init__ file to make it a module
This makes me interested. Can you explain that a bit more ?

> -import modules by doing import wxpython.gmMacro, or import 
> python-common.gmDrugView, etc...
I start thinking there is merit in this.

> Please any comments if you have time?
Can you expand some more on the directory/__init__ thing. What
structural changes to the directory layout would you propose ?

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

[Prev in Thread] Current Thread [Next in Thread]