[Top][All Lists]

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

Re: [Gnumed-devel] hacks

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

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

>     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 ?

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

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