From: Kevin A. <al...@ya...> - 2005-03-30 18:07:36
|
I've revised the internationalResourceName function in model.py to support platform-specific resource files as well as language and country specific names. You don't have to use platform-specific files, but it is an option for those that want to tweak a static layout for each platform. For example, using the -l (log) option under Windows on my system, I get the following DEBUG output which shows the possible valid resource filenames and the order they are searched for. Valid platform prefixes are: win, gtk, mac. DEBUG: : Wed Mar 30 09:54:22 2005: default: ('en_US', 'cp1252') DEBUG: : Wed Mar 30 09:54:22 2005: en US DEBUG: : Wed Mar 30 09:54:22 2005: ['minimal.win.en_US.rsrc.py', 'minimal.win.en.rsrc.py', 'minimal.en_US.rsrc.py', 'minimal.en.rsrc.py', 'minimal.win.rsrc.py', 'minimal.rsrc.py'] __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 |
From: <bra...@om...> - 2005-04-05 18:23:00
|
Thanks, Kevin. I hope to test out this feature sometime in the coming week. Kevin Altis wrote on 03/30/2005 12:07:09 PM: > I've revised the internationalResourceName function in > model.py to support platform-specific resource files > as well as language and country specific names. You > don't have to use platform-specific files, but it is > an option for those that want to tweak a static layout > for each platform. > > For example, using the -l (log) option under Windows > on my system, I get the following DEBUG output which > shows the possible valid resource filenames and the > order they are searched for. Valid platform prefixes > are: win, gtk, mac. > > DEBUG: : Wed Mar 30 09:54:22 2005: default: ('en_US', > 'cp1252') > DEBUG: : Wed Mar 30 09:54:22 2005: en US > DEBUG: : Wed Mar 30 09:54:22 2005: > ['minimal.win.en_US.rsrc.py', > 'minimal.win.en.rsrc.py', 'minimal.en_US.rsrc.py', > 'minimal.en.rsrc.py', 'minimal.win.rsrc.py', 'minimal.rsrc.py'] > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - Find what you need with new enhanced search. > http://info.mail.yahoo.com/mail_250 > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Pythoncard-users mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythoncard-users |
From: Kevin A. <al...@se...> - 2005-04-05 18:35:46
|
On Apr 5, 2005, at 11:22 AM, bra...@om... wrote: > > > Thanks, Kevin. I hope to test out this feature sometime in the coming > week. > > Kevin Altis wrote on 03/30/2005 12:07:09 PM: > > > I've revised the internationalResourceName function in > > model.py to support platform-specific resource files > > as well as language and country specific names. You > > don't have to use platform-specific files, but it is > > an option for those that want to tweak a static layout > > for each platform. > > > > For example, using the -l (log) option under Windows > > on my system, I get the following DEBUG output which > > shows the possible valid resource filenames and the > > order they are searched for. Valid platform prefixes > > are: win, gtk, mac. > > > > DEBUG: : Wed Mar 30 09:54:22 2005: default: ('en_US', > > 'cp1252') > > DEBUG: : Wed Mar 30 09:54:22 2005: en US > > DEBUG: : Wed Mar 30 09:54:22 2005: > > ['minimal.win.en_US.rsrc.py', > > 'minimal.win.en.rsrc.py', 'minimal.en_US.rsrc.py', > > 'minimal.en.rsrc.py', 'minimal.win.rsrc.py', 'minimal.rsrc.py'] > When I post a change like this it means that the code in the CVS repository changed and will be in the next release distribution. If you want to stay current with changes and test before the next release you need to work off of a copy of PythonCard from the SF CVS repository. The next release is not scheduled until sometime in May, after I get back from the UK. ka |
From: <bra...@om...> - 2005-04-05 19:04:28
|
"Kevin Altis" <al...@se...> wrote on 04/05/2005 01:35:41 PM: > When I post a change like this it means that the code in the CVS > repository changed and will be in the next release distribution. If you > want to stay current with changes and test before the next release you > need to work off of a copy of PythonCard from the SF CVS repository. > > The next release is not scheduled until sometime in May, after I get > back from the UK. Ok, I downloaded from CVS into a special directory (separate from my Mac's /Library/Python/2.3 directory). So, if I add this to my sys.path, so as to import the CVS copy of PythonCard, I should be able to start using platform-specific resource filenames and PythonCard will automatically detect the platform and select the correct resource file? Thanks! |
From: Kevin A. <al...@se...> - 2005-04-05 19:18:41
|
On Apr 5, 2005, at 12:03 PM, bra...@om... wrote: > > "Kevin Altis" <al...@se...> wrote on 04/05/2005 01:35:41 PM: > > > When I post a change like this it means that the code in the CVS > > repository changed and will be in the next release distribution. If > you > > want to stay current with changes and test before the next release > you > > need to work off of a copy of PythonCard from the SF CVS repository. > > > > The next release is not scheduled until sometime in May, after I get > > back from the UK. > > Ok, I downloaded from CVS into a special directory (separate from my > Mac's /Library/Python/2.3 directory). So, if I add this to my > sys.path, so as to import the CVS copy of PythonCard, I should be able > to start using platform-specific resource filenames and PythonCard > will automatically detect the platform and select the correct resource > file? > Create a PYTHONPATH environment variable and set it to the special directory which holds the PythonCard directory. Python will search in the PYTHONPATH before the standard lib dirs. On the Mac, you'll want to create an environment.plist file so that the PYTHONPATH is used regardless of whether you're running from the Terminal or Finder, since on the Mac those are considered different as far as how environment variables are found. The file will look something like this, substitute your own username for "username" below. You only need the CVS_RSH key if you do CVS checkins for some package. The environment.plist is a leftover from the Next days of OS X, IIRC ;-) If you search on Google you should find more about PYTHONPATH and environment.plist. Also, I think the file needs to end in linefeeds (Unix) not carriage returns (Mac Finder) and yes it is annoying that Apple brought that legacy of classic Mac into Mac OS X. If you run your application with one of the debug options like -d you can check the About dialog to make sure you have the right versions of Python, wxPython, and PythonCard. The PythonCard version number in CVS is 0.8.2. cat ~/.MacOSX/environment.plist <?xml version="1.0 encoding="UTF-8"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="0.9"> <dict> <key>CVS_RSH</key> <string>ssh</string> <key>PYTHONPATH</key> <string>/Users/username/python</string> </dict> </plist> ka |
From: <bra...@om...> - 2005-04-05 20:09:15
|
Kevin Altis wrote on 04/05/2005 02:18:38 PM: > Create a PYTHONPATH environment variable and set it to the special > directory which holds the PythonCard directory. Python will search in > the PYTHONPATH before the standard lib dirs. Your examples and others that turned up on a Google search use "/Users/username/python" as the PYTHONPATH. That seems to imply that PythonCard should be dumped directly into said directory, so that import PythonCard statements will find it. However, if I download using CVS into this directory, it dumps a lot of other stuff into the same place, including the folders CVS and CVSROOT. Will this create CVS problems if I start downloading other Python packages into this directory using CVS? Also, I'm curious how to start making use of the new platform-specific resource file feature. Do these just automagically work under PythonCard .82 as long as the resource files have the special naming convention examples from your original posting? > ['minimal.win.en_US.rsrc.py', > 'minimal.win.en.rsrc.py', 'minimal.en_US.rsrc.py', > 'minimal.en.rsrc.py', 'minimal.win.rsrc.py', 'minimal.rsrc.py'] |