RE: Mysterious xml.sax Encoding Exception

2008-02-02 Thread Peck, Jon
Yes, the characters were from the 0-127 ascii block but encoded as utf-16, so there is a null byte with each nonzero character. I.e., \x00?\x00x\x00m\x00l\x00 Here is something weird I found while experimenting with ElementTree with this same XML string. Consider the same XML as a Python Unic

RE: Finding the Process Path

2005-10-03 Thread Peck, Jon
through the interpreter, of course Python is what I get from sys.executable. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steve Holden Sent: Monday, October 03, 2005 9:26 AM To: python-list@python.org Subject: Re: Finding the Process Path Peck, Jon

RE: Finding the Process Path

2005-10-03 Thread Peck, Jon
ssor etc. distutils.sysconfig.get_makefile_filename( ) Benji York wrote: > Peck, Jon wrote: > > I have Python code running in an application, and I would like to find > > the full path of the process executable where it is running. > > Like this? > > >>> import sys > >>> sys.ex

Finding the Process Path

2005-10-03 Thread Peck, Jon
I have Python code running in an application, and I would like to find the full path of the process executable where it is running.  I can do this with win32api.GetModuleFileName(0) on Windows, but I would like a solution that uses only standard modules and works cross platform.  Any sugges

NaN Vs None

2005-09-23 Thread Peck, Jon
In choosing a way to represent a value of "no information" for a float, would it be better to use NaN or None?  None has the advantage of standard behavior across platforms, but NaN seems to propagate more easily – at least on Windows. For example,   NaN+1 = NaN but None+1 raises an e