[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Font Error



Dnia Sat, May 24, 2003 at 09:04:04AM -0700, Pete Shinners pisze:

>i usually use a nugget of code like this..
>
>    import sys, os
>    gamepath = os.path.dirname(os.path.abspath(sys.argv[0]))
>    os.chdir(gamepath)
>
>this will set the current working directory to the same place as the 
>script that was run. regardless of how the script was initially started.

Also, you can specify font file name with path included.

-- 
Jarek Zgoda
Registered Linux User #-1
http://www.zgoda.biz/|JID:zgoda@jabber.atman.pl|http://zgoda.jogger.pl/