|
From: Kevin A. <al...@se...> - 2001-12-27 03:18:41
|
I fixed the path handling in the __init__ method of PythonCardApp (model.py)
for loading resource files other than the default and I added an example of
this using an alternative resource file to the SourceForgeTracker sample:
app = model.PythonCardApp(Tracker, 'SourceForgeTracker.original.rsrc.py')
If the default layout for the SourceForgeTracker doesn't look good on your
system, then you can uncomment the line above in the sample and use the
alternative resource. Remember, that the normal behavior is to take the base
name of the main app such as "SourceForgeTracker" and append a ".rsrc.py" to
find the default resource file, but there is flexibility in how the loading
is handled.
Here's an example of how you could load different resource files based on
the OS platform.
if os.sys.platform[:3] == 'win':
app = model.PythonCardApp(Tracker)
else:
# Linux, Mac, etc.
app = model.PythonCardApp(Tracker,
'SourceForgeTracker.original.rsrc.py')
You could even have different main classes for different platforms or to use
while you're experimenting with different versions of your code.
ka
|