general coding issues - coding style...
calmar
mac at calmar.ws
Tue Feb 21 05:36:03 EST 2006
On 2006-02-20, JW <John-Whitlock at ieee.org> wrote:
Hi JW,
> About this line:
> 1585 if sys.path[0][-12:] == "\library.zip": #for py2exe
>
> pl... suggested:
> if sys.path[0].endswith( "\\library.zip" ):
>
>
> print "\\library.zip"
>
Yeah, I have two backslashes, but thaks for pointing out.
> If you don't use the double backslash, you'll eventually have a
> problem, especially in Windows, which unfortunately uses the backslash
> as a directory seperator. You might also want to look at os.sep and
> the os.path.* functions, if you are interested in making your code work
> on different platforms.
Yeah, I will use the os.sep variable, that's a good idea
thanks a lot,
calmar
--
calmar
(o_ It rocks: LINUX + Command-Line-Interface
//\
V_/_ http://www.calmar.ws
More information about the Python-list
mailing list