netlink messages

2007-06-11 Thread martin f krafft
x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x

Re: Setting the encoding in the basic auth header

2007-06-11 Thread Martin v. Löwis
e "no". They don't use Latin-1, instead, they use Unicode and just drop the row byte, sending only the cell byte (independent on whether the input was Latin-1). RFC 2617 specifies userid as *TEXT, without ever specifying what TEXT is. Most likely, the authors of that specifi

Re: Setting the encoding in the basic auth header

2007-06-11 Thread Martin v. Löwis
-ASCII characters must be MIME-header-encoded. So 0BA4 should be encoded as '=?utf-8?b?4K6k?=', according to the specification. No browser currently implements that. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: In C extension .pyd, sizeof INT64 = 4?

2007-06-12 Thread Martin v. Lo
nd it isn't predefined by Python. So it must be something that you have defined, and apparently incorrectly. How did you define it? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: In C extension .pyd, sizeof INT64 = 4?

2007-06-12 Thread Martin v. Löwis
type. More generally: always use the type documented in http://docs.python.org/api/arg-parsing.html Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Serialization across languages?

2007-06-14 Thread Martin v. Löwis
s for Python, PHP, and Perl. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Subprocess Not Working on Solaris

2007-06-16 Thread Martin v. Löwis
, line 1, in > File "/usr/local/lib/python2.5/subprocess.py", line 401, in > import select > ImportError: No module named select > " The select module should certainly be present on Solaris. If it isn't, something went wrong in the installation. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing UTF-8 into USC-2 and vice versa (newbie :-) )

2007-06-17 Thread Martin v. Löwis
etters, that's different: For example, for u'\xf6', the UCS-2 representation (big-endian) is '00F6', for UTF-8, it is 'C3B6'. For u'\u20AC', the UCS-2 is '20AC', the UTF-8 is 'E282AC' (i.e. three bytes). You should use Unicode objects in your program always, and encode to or from UCS-2 or UTF-8 only when interfacing with the network/database. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Comparing UTF-8 into USC-2 and vice versa (newbie :-) )

2007-06-17 Thread Martin v. Löwis
Tzury schrieb: > Yet, > 'utf_16_be' is not 'ucs-2'. That's not true. They are virtually identical. > How would I get ucs-2 encoding and decoding functionality with python? Use the UTF-16 codec. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: XMLRPC and SSL

2007-06-18 Thread Martin v. Löwis
d to httplib.HTTPSConnection (i.e. keyfile= and cert_file=). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python/C API bug (multithreading)

2007-06-19 Thread Martin v. Löwis
> Is there any simple way to fix this damned bug?? Sure: just fixed your damned code!! Regards, Marttin -- http://mail.python.org/mailman/listinfo/python-list

Re: determine 32 or 64 bit architecture with python 2.2

2007-06-19 Thread Martin v. Löwis
or AIX and Solaris. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: determine 32 or 64 bit architecture with python 2.2

2007-06-19 Thread Martin v. Löwis
ntioned, sys.maxint is just fine: AIX and Solaris both use LP64, and Windows is 32-bit only for Python 2.2. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: ARM cross compile - one last problem

2007-06-19 Thread Martin v. Löwis
t Linux on ARM also uses ELF, so dynamic lookup of symbols from the executable should be possible. Do "nm -D --defined-only python" to see whether the symbols are in the *dynamic* symbol table. If not, use the proper linker flag to make them so. Regards, Martin -- http://mail.python.org

Re: Changing the names of python keywords and functions

2007-06-21 Thread Martin v. Löwis
ammar/Grammar. You need to edit this file, then recompile. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: import mysteries

2007-06-21 Thread Martin v. Löwis
x27;) Exception raised: Traceback (most recent call last): File "doctest.py", line 1248, in __run compileflags, 1) in test.globs File "", line 1, in ? html = HTML(''' NameError: name 'HTML' is not defined Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Changing the names of python keywords and functions

2007-06-21 Thread Martin v. Löwis
Python keywords. So he should make them additional in the grammar, too. It is entirely beyond me *why* the OP wants to do that, but changing the compiler would be the proper way of implementing that change. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Internationalised email subjects

2007-06-21 Thread Martin v. Löwis
4. Explicitly encode it, such as h = Header(u'(Some Chinese characters inserted here'.encode('GB2312'), 'GB2312') If you are *not* inserting the characters from the Python source code directly, go back to my original question: What are the characters encoded in? HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Error while installing Python2.5.1

2007-06-21 Thread Martin v. Löwis
he DVD cover, open it, and remove the DVD. Push the "open" button on your DVD drive, put the DVD into the tray, and put the "open" button again. When done, ask for further instructions. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib interpretation of URL with ".."

2007-06-23 Thread Martin v. Löwis
f the URI is missing and certain path # components ("." and "..") have a special meaning when, and only when, # interpreting a relative path. Notice the "and only when": the browsers who modify above URL before sending it seem to be in clear violation of RFC 2396. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: C API: passing by reference

2007-06-23 Thread Martin v. Löwis
y the variable in the caller. When you show what precisely you want to achieve, it should be easy to say how to do that in C. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: socket on cygwin python

2007-06-24 Thread Martin v. Löwis
not acceptable, recompile Python for Cygwin to use WinSock2. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-24 Thread Martin v. Löwis
revent is a malicious user getting at your data, or spreading a virus through your files, then chroot is perfectly adequate. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python SVN down?

2007-06-25 Thread Martin v. Löwis
> It _is_ down. Probably server maintenance. No, it's a bug. For some reason, the server restart after log rotation failed. I'm uncertain why - the manual restart right now worked without problems. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-25 Thread Martin v. Löwis
- as in "root directory"). The "jailed" process can perform all networking that a similarly-privileged process outside the jail could. To prevent network access, you would need additional system features, as the ones provided by SELinux. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-25 Thread Martin v. Löwis
d be easy to break out of). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Internals and complexity of types, containers and algorithms

2007-06-25 Thread Martin v. Löwis
ess > in C/C++ I use an array[64] or bigger of int or char for the pieces. > What data structure or type would be useful in Python when the > performance ist most important? Is it list or string or an array > from a library or what else? Depends on whether and how you want to modify th

Re: Output XML buffer?

2007-06-25 Thread Martin v. Löwis
eant to ask "Can I make it write an XML prolog, and if so, how?", then the anwser is: use an output encoding different from utf-8 or us-ascii. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Chroot Jail Not Secure for Sandboxing Python?

2007-06-26 Thread Martin v. Löwis
ave to be root. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Internals and complexity of types, containers and algorithms

2007-06-26 Thread Martin v. Löwis
Paul Rubin schrieb: > "Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> Amortized O(1) for inserting into lists. > > I think you mean amortized O(1) for appending to lists. Indeed so; insertion is O(n). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: 16bit hash

2007-06-27 Thread Martin v. Löwis
which produce some output values only for a finite number of inputs) So: what are your input data, and what is the distribution among them? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: glob.glob standardization

2007-06-27 Thread Martin v. Löwis
> Don't you think it would be more convenient for glob.glob to return > file names only in any case, like os.listdir do? No. Use glob.glob1 if you want a list of files. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: 16bit hash

2007-06-28 Thread Martin v. Löwis
,..] > > ie a bunch of lists of strings which are eventually joined together and > written out with a template to make the postscript definition. And the UniqueID should be unique within this file, right? Why don't you just use a serial number then? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: 16bit hash

2007-06-28 Thread Martin v. Löwis
ll glyphs. However, it seems that today's printers have advanced caching, making the mechanism irrelevant. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-28 Thread Martin v. Löwis
; """ > > I have set python.exe to run under admin but that do not fix the problem. > > Any ideas ? 193 means ERROR_BAD_EXE_FORMAT. Could it be that you are using a 32-bit extension DLL? How precisely did you "install" wx 2.8? Did you rebuild it from source? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-28 Thread Martin v. Löwis
eed back the fixes you make to the respective authors of the open source software. Notice that you won't just need a 64-bit version of wxpython, but also such versions of all underlying libraries wxpython happens to be build on. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Vista 64 + Python2.5 + wxpython 28 issue

2007-06-29 Thread Martin v. Löwis
> There was no need for me to use 64 so I have switched back to 32 and works > fine. > > Python is not ready for the 64 world yet ;) It's a matter of standpoint. 64 bit is not ready for the world, yet. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to uninstall packages

2007-07-01 Thread Martin v. Löwis
is is clean depending on the package being installed; a package may perform additional actions which don't get recorded in the --record option; in such a case, you need to study setup.py and find out what these additional actions are and how to revert them. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: shelve crashing under Win ME

2007-07-01 Thread Martin v. Löwis
ng the dbm directly to shelve.Shelf. It's probably slower than bsddb, however, updating a single key should be faster than pickling an entire dictionary. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python app as a Display Manager

2007-07-01 Thread Martin v. Löwis
ff-topic for comp.lang.python; please ask on comp.windows.x instead. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: object references/memory access

2007-07-01 Thread Martin v. Löwis
hat it takes. No, it's not Python that fails to support that - it's the operating system. See above for solutions that avoid one such copying in the first place. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: object references/memory access

2007-07-01 Thread Martin v. Löwis
> b) use a single Python server (possibly shared with the database >process), and connect this to Apache through the >reverse proxy protocol. Following up to myself: Instead of using a reverse proxy, you can also implement the FastCGI protocol in the server. Regards, Martin

Re: object references/memory access

2007-07-01 Thread Martin v. Löwis
operating system selects an arbitrary one for the next request. That process returns from accept, so for the next incoming connection, one of the remaining processes will be selected. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: object references/memory access

2007-07-01 Thread Martin v. Löwis
830 which means I can transmit 8.3MB in 76ms, which is a lot less than 15s. My guess is that you sum up the incoming data with total_data += received_data That is O(n**2). Regards, Martin import socket,time,cStringIO t1 = time.time() s = socket.socket() s.connect(('localhost&#

Re: unicode

2007-07-01 Thread Martin v. Löwis
te). For a backslash, Python could have generated \x5c or \134 as well, which are all different spellings of "backslash in a string literal". Python chose the most legible one, which is the double-backslash. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode

2007-07-01 Thread Martin v. Löwis
> ooops. I mean is that the same as print calling > u_str.encode(sys.stdout.encoding)? Almost. It's rather u_str.encode(sys.stdout.encoding or sys.getdefaultencoding()) (in case sys.stdout.encoding isn't set) Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: object references/memory access

2007-07-02 Thread Martin v. Löwis
ll run at their "top speed". Of course, for two processes running at a single CPU, the top speed won't be the MIPs of a single processor, as they have to share the CPU. So when you say it leads to very poor throughput, I ask: compared to what alternative? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: object references/memory access

2007-07-03 Thread Martin v. Löwis
forth and back between consumer and producer is the overhead for context switching, which is typically negligible, compared to everything else that is going on. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: import mysteries

2007-07-03 Thread Martin v. Löwis
ame _ into the __builtins__. Apparently, the trac code relies on that. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: login http://cheeseshop.python.org/pypi broken ?

2007-07-04 Thread Martin v. Löwis
gert schrieb: > tried reseting password but i can not login anymore to upload my new > source code ? Please try again. It was a misconfiguration which should be fixed now. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Writing a read only attribute

2007-07-06 Thread Martin v. Löwis
ct you run into other problems trying to do so. To change root.tk.call, you need to modify the implementation of the _tkinter module. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode problem

2007-07-07 Thread Martin v. Löwis
Python codec certainly never would do such a thing. Are you sure it was latin-1 and \x27, and not windows-1252 and \x92? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: PyXML not installing?

2007-07-09 Thread Martin v. Löwis
mingw32" to > setup.py. > > It gives me the above error message. Any way to fix this? Do what the message tells you. Either install Visual Studio 2003, or MingW32. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Error when trying to write unicode xml to zipfile

2007-07-10 Thread Martin v. Löwis
oding= parameter in toxml(). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Implementaion of random.shuffle

2007-07-16 Thread Martin v. Löwis
>> 2**19937 being a really huge number, it's impossible to exhaust the >> Mersenne twister by running it in sequence. > > "Impossible"? Unfeasible. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Interpreting os.lstat()

2007-07-19 Thread Martin v. Löwis
> (a) Running 'stat' is *not the same* as a system call. Why do you say that? It is *exactly* the same, at least on a POSIX system (on Windows, there is no stat, so the implementation has to map that to several system calls). Regards, Martin -- http://mail.python.org/mailman/li

Re: Interpreting os.lstat()

2007-07-20 Thread Martin v. Löwis
and os.lstat; entirely unlike libraries in other languages that attempt to also change the programming API in the process of wrapping the system API. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Interpreting os.lstat()

2007-07-21 Thread Martin v. Löwis
on. Now it's all clear. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting dict keys

2007-07-22 Thread Martin v. Löwis
appen when written into a single line. My guess would be that methods are particularly puzzling, more so than functions (which make it somewhat more obvious that they entirely wrap their arguments, and are entitled to return whatever they want to). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode and __repr__()

2007-04-19 Thread Martin v. Löwis
Martin Drautzburg schrieb: > I am using UTF-8 and assembling the string expression > manually works okay and the umlaute appear correctly in the browser (so > I could probably write my own serializer and it would work). That's what you should do. Or you can use one that peopl

Re: Better dict of dicts

2007-04-19 Thread Martin v. Löwis
ing". You may want to use the builtin intern function, or your can come up with your own interning: interns = {} def local_intern(s): return interns.setdefault(s, s) Then, instead of a[k1][k2] = value do a[local_intern(k1)][local_intern(k2)] = value then all strings occur only once as keys, as long as the interns dictionary isn't cleared. > Any ideas? HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Better dict of dicts

2007-04-19 Thread Martin v. Löwis
d operation, as that won't affect the keys stored in the dictionary. However, performing the lookup with the interned key gives you speed back, as then dictionary lookup won't need to compare the tuples, but will find that the search key is identical to the stored key, so the keys

Re: Python's handling of unicode surrogates

2007-04-19 Thread Martin v. Löwis
rds, Martin (*) I don't fully understand your proposal. You say that you want "gaps in [the string's] index", but I'm not sure what that means. If you have a surrogate pair on index 4, would it mean that s[5] does not exist, or would it mean that s[5] is the character foll

Re: Python's handling of unicode surrogates

2007-04-20 Thread Martin v. Löwis
ding acceptance (in comparison). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: service for file monitoring

2007-04-20 Thread Martin v. Löwis
> functions so that i can monitor the whole filesystem but at lesser > expense of cpu n memory On Windows W2k+, you can use the USN journal: http://msdn2.microsoft.com/en-us/library/aa364586.aspx You may have to use ctypes or write an extension module to access that journal. Regards, Ma

Re: python style guide inconsistencies

2007-04-22 Thread Martin v. Löwis
se (such as ConfigParser or StringIO). I can personally accept that as a necessary evil, although I would prefer if all modules were lower case. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's handling of unicode surrogates

2007-04-22 Thread Martin v. Löwis
put (input methods). As Python has no "native" GUI library, we currently defer that main challenge to external libraries already. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's handling of unicode surrogates

2007-04-22 Thread Martin v. Löwis
lements level 3, as it is capable of representing all Unicode characters (but, of course, so does Python 1.5.2, if you put UTF-8 into byte strings). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python style guide inconsistencies

2007-04-22 Thread Martin v. Löwis
> I have the impression that tradition will change in 3.0 and your preference > realized. > Wrong? or have you not been following? I have not been following, so this might be the case. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: conditional print statement ?

2007-04-25 Thread Martin v. Löwis
statement, > especially I dislike the redundancy "Datafile.readline()". d=Datafile.readline() if Print_info: print d It's still two lines, but only has a single call to .readline(). HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Coding conventions for class names

2007-04-26 Thread Martin v. Löwis
common to either apply the conventions for functions to them, or the conventions for classes. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-26 Thread Martin v. Löwis
gorithm. For small blocks, glibc releases topmost memory through sbrk when it gets more than M_TRIM_THRESHOLD bytes (defaults to 128kiB as well). This algorithm isn't used when MORECORE_CANNOT_TRIM is defined, which it would only on systems where sbrk does not support negative arguments. Rega

Re: Python not giving free memory back to the os get's me in real problems ...

2007-04-26 Thread Martin v. Löwis
most likely, references to objects which you should release in order to be able to reuse the memory. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Command-line option equiv of PYTHONPATH

2007-04-26 Thread Martin v. Löwis
lent command-line option to the python binary or a > command-line version of PYTHONPATH? To rephrase James Stroud's remark: The equivalent to #/usr/bin/perl -I TEXT is #/usr/bin/python import sys sys.path.append(path_to_my_modules) TEXT HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Command-line option equiv of PYTHONPATH

2007-04-27 Thread Martin v. Löwis
>> Why not just modify sys.path within the actual script? > > Maybe because he has multiple versions of modules he wants to test his > script against. See the original post: 'I can use it as "#!/usr/bin/perl -I"' so clearly his intention is modify the script.

Re: building _tkinter module with .NET 2005?

2007-04-27 Thread Martin v. Löwis
rosoft Visual Studio .NET 2003" and "Microsoft Visual Studio 2005". I.e. the .NET particle was only present with the 2003 release; the common abbreviation is "VS", not ".NET". Indeed "a newer version of .NET" would commonly refer to a version of the Microsoft

Re: Tracebacks for `exec`ed code?

2007-04-29 Thread Martin v. Löwis
ow the line of source code > below it, like it would for an exception in a physical file. Is this > possible? Yes. You will need to print the traceback yourself; see traceback.print_tb for an example. Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Asynchronous XML-RPC client library?

2007-04-29 Thread Martin v. Löwis
framework that you currently use. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are functions atomic?

2007-05-01 Thread Martin v. Löwis
ions > atomic before I shoot myself in the foot;-) Function objects were not copyable because they were immutable. For an immutable object, a copy cannot reasonably be distinguished from the original object. See copy.py, around line 105. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are functions atomic?

2007-05-01 Thread Martin v. Löwis
the present > ummutable copy symantics? The answer is really really simple. The implementation of copy predates mutability. When the copy code was written, functions *were* immutable. When functions became mutable, the copy code was not changed, and nobody noticed or complained. Regards,

Re: Why are functions atomic?

2007-05-02 Thread Martin v. Löwis
ibuteError: 'function' object has no attribute 'value' py> foo.value=100 py> foo.value 100 Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Why are functions atomic?

2007-05-02 Thread Martin v. Löwis
Likely scenario, but not true. Interesting. I (clearly) missed that part of the defaultdict discussion (that was a long thread). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Tcl-tk 8.5?

2007-05-02 Thread Martin v. Löwis
ly for binary releases. If you compile Python yourself, you are free to integrate Python with Tcl 8.5a4 if you so desire. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: hp 11.11 64 bit python 2.5 build gets error "import site failed"

2007-05-02 Thread Martin v. Löwis
e of ival? - where does that number come from? The first two questions are best answered with a C debugger. Depending on the answer, the third question may nor may not need an answer. Good luck, Martin P.S. If you are asking in the more abstract sense "why is that happening to me?", th

Re: How to check if a string is empty in python?

2007-05-02 Thread Martin v. Löwis
[EMAIL PROTECTED] schrieb: > How to check if a string is empty in python? > if(s == "") ?? Exactly so. "not s" works as well. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: hp 11.11 64 bit python 2.5 build gets error "import site failed"

2007-05-03 Thread Martin v. Löwis
error message? That error is never produced in Python. Instead, it may print an OverflowError with signed integer is greater than maximum (i.e. no period, no "the"). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: hp 11.11 64 bit python 2.5 build gets error "import site failed"

2007-05-03 Thread Martin v. Löwis
caller of convertsimple is, and what line of Python code precisely was triggering that call. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python regular expressions just ain't PCRE

2007-05-05 Thread Martin v. Löwis
ributed *yet*. Do you have plans for such features in re? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: FIXED: [EMAIL PROTECTED]

2007-05-06 Thread Martin v. Löwis
't know how to fix it, but if you retry, it should work. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Did you read about that?

2007-05-06 Thread Martin P. Hellwig
Dustan wrote: > On May 6, 8:20 am, Steven D'Aprano > <[EMAIL PROTECTED]> wrote: >> On Sun, 06 May 2007 04:53:23 -0700, Dustan wrote: >>> SPAM! >>> SPAM! >>> SPAM! >>> SPAM! >>> SPAM! >>> SPAM! >>> SPAM! >>> SPAM! >> Gosh, you think so? I'm glad we had you around to tell us, otherwise we >> might ha

Re: getmtime differs between Py2.5 and Py2.4

2007-05-07 Thread Martin v. Löwis
> Is this a bug? Why don't you read the responses posted earlier? John Machin replied (in <[EMAIL PROTECTED]>) that you are mistaken: There is NO difference between the outcome of os.path.getmtime between Py2.5 and Py2.4. It always did return UTC, and always will. Regards, M

Re: getmtime differs between Py2.5 and Py2.4

2007-05-07 Thread Martin v. Löwis
t;> import os >>> os.path.getmtime(r"c:\temp\test_os.diff") 1175704875.1825342 Is your file system FAT, by any chance? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: getmtime differs between Py2.5 and Py2.4

2007-05-08 Thread Martin v. Löwis
h the system reports the correct time stamp, the CRT will return the wrong one. Python 2.5 fixes this, bypassing the CRT. So yes: the time stamps returned in 2.4 and 2.5 may differ. But still: they were always UTC, and always will be. It's just that 2.4 had a bug which 2.5 has fixed. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: getmtime differs between Py2.5 and Py2.4

2007-05-08 Thread Martin v. Löwis
, the UTC time reported by 2.4 may have been off by one hour (it wasn't local time - just off by one hour). This was due to DST issues. They have been fixed in 2.5, which now reports the correct UTC value. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Windows, subprocess.Popen & encodage

2007-05-08 Thread Martin v. Löwis
ytes. However, the two system code pages (OEM CP and ANSI CP) are not so easy to tell apart. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Another easy pair of questions

2007-05-08 Thread Martin v. Löwis
> In a python Tk shell in Windows, what is the equivalent of unix's pwd? os.getcwd() > In a python Tk shell in Windows, is there an easy way to reoeat an > earlier command, similar to Tcl/Tk's hist? Press the cursor-up key. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about file handles and windows handles @ Windows Operating Systems

2007-05-08 Thread Martin v. Löwis
> Are there any function to get windows handle of file which is already > opened with built-in file-function. mscvrt.get_osfhandle HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 error

2007-05-08 Thread Martin v. Löwis
e one for whom it is failing: What does "file /usr/local/psql/lib/libpq.so.5" say? > The postgreSQL lib is in ld.so.conf and ldconfig has been run: > > What is wrong? So what does "/sbin/ldconfig -p" say, when run as the user for whom it is failing? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: how to refer to partial list, slice is too slow?

2007-05-10 Thread Martin v. Lo
= [1,2,3,4,5,6,7,8,9,0] py> b = itertools.islice(a, 7) py> b py> b.next() 1 py> b.next() 2 py> b.next() 3 py> b.next() 4 py> b.next() 5 py> b.next() 6 py> b.next() 7 py> b.next() Traceback (most recent call last): File "", line 1, in ? StopIteration HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: SQLObject 0.9.0

2007-05-10 Thread Martin v. Löwis
s spam, but I guess the author is willing to take that risk. Martin -- http://mail.python.org/mailman/listinfo/python-list

<    22   23   24   25   26   27   28   29   30   31   >