pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Wiki

RunningInCorrectDirectory

      
Search:  
 
 
sections
RunningInCorrectDirectory
Usage:
Discussion:
Problem:
Way to go:
Other considerations:
Parting shots:

RunningInCorrectDirectory

Usage:

Discussion:

Problem:

Way to go:

Other considerations:

Parting shots:

Note that the python docs are unclear (or the info is buried somewhere) as the exact circumstances in wich sys.argv[0] nor __file__ will not convey the info we want to extract. Also, from that blurriness, it is unclear if one is better than the other.

For your information, the old recipe (using sys.argv[0]) was used in magicor http://www.pygame.org/projects/21/313/?release_id=596 from a year an a half, no problems.

Sorry if this is too long, but I want to state clearly the problems so as new recipes can cover ar least the same that an older. As a matter of example, the old recipe (not writen by me) handled the two (three?) first problems, a later recipe, the one that I am replacing, forget to adress the item 1 in Problems. So, please, if you want to improve the recipe, do test if the new code cover more, and make explicit comments about what more it covers. The only addition to the older recipe code is the termination when a reliable appdir can not be built, and it was motivated by some misleading bug reports in pyweek6.

spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Aug 26, 2014

Aug 22, 2014

Aug 21, 2014


Aug 19, 2014

Aug 18, 2014

Aug 2, 2014


Jul 28, 2014

Jul 22, 2014

Jul 21, 2014

Jul 20, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)