Re: Convert xml symbol notation

2007-04-07 Thread Martin v. Löwis
want to unescape references, you can use the code in http://effbot.org/zone/re-sub.htm HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Understanding Python's interpreter

2007-04-07 Thread Martin v. Löwis
o write a > little more code to make an integer such as 0xff into '\0\0\0\377' than > it would need to just print the integer. Well, unless there's already a > python function that does just that and I didn't know about. It's was > just an example on how writtin

Re: Custom Python Runtime

2007-04-07 Thread Martin v. Löwis
s/*. If you eliminate the copy_reg references from os.py, you can also drop copy_reg. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Convert xml symbol notation

2007-04-07 Thread Martin v. Löwis
nts? > > Try the htmlentitydefs module. That won't help: this is a character reference, not an entity reference. htmlentitydefs only contains the definitions of entities. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: 1 Thread = 3 interpreter launched ???

2007-04-07 Thread Martin v. Löwis
they consume 12000kB together. Instead, they consume 4172kB together, as all data are shared across all threads. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom Python Runtime

2007-04-07 Thread Martin v. Löwis
tainly change from release to release). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode problem

2007-04-08 Thread Martin v. Löwis
getwriter('utf-8')(sys.stdout) Make sure that you then that *all* strings that you print are Unicode strings. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode problem

2007-04-09 Thread Martin v. Löwis
go away than being enhanced. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Custom Python Runtime

2007-04-10 Thread Martin v. Löwis
r dynamic embedding of pythonxy.dll, no. > 4. Are the registry entries necessary? No. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: XML-RPC SSL and client side certs?

2007-04-11 Thread Martin v. Löwis
ty as the original user. In turn, it's not easy to forward the identity of the authenticated user, either: even though Apache will know who he is, it has no way of telling on the forwarded request. So you would have to use CGI or mod_python in this case. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: troubles building python 2.5 on Windows XP x64 Windows Server 2003 sp1 Platform SDK

2007-04-11 Thread Martin v. Löwis
003 1. Install vsextcomp 2. open VS 2003 3. open the project files in PCbuild 4. select the AMD64 target 5. run build HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: help building debug .pyd files

2007-04-11 Thread Martin v. Löwis
.5, you don't have to hunt around anymore for all these add-on libraries: they are all checked into the Python subversion repository (of course, earlier releases would give precise URLs, too, except that the hosting sites would sometimes break these URLs). Regards, Martin -- http://mail.pyth

Re: odd unicode error

2007-04-12 Thread Martin v. Löwis
ory with file names in it that cannot be converted to Unicode strings, using the file system encoding. If you can't fix the file system, you have to make search_path a byte string. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Portably generating infinity and NaN

2007-04-12 Thread Martin v. Löwis
ension module (for example, numarray.ieeespecial will do > it). Use the struct module to pack/unpack a double value. On an IEEE 754 system, this should work - on a non-IEEE-754 system, it's not clear that +/-inf and NaN actually exist. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: How to copy a file on Windows while preserving permissions

2007-04-12 Thread Martin v. Löwis
file for backup, then use BackupRead/BackupWrite. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: compiling modules with VS 2008 for python 2.4 prepared with Visual Studio 2003

2007-04-12 Thread Martin v. Löwis
svcr8.dll, whereas Python is linked with mscvr71.dll; Microsoft does not support mixing CRTs. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Portably generating infinity and NaN

2007-04-13 Thread Martin v. Löwis
> (Note the absence of a demonstration on Windows.) Can't the above be > blessed as the One True Way and wormed around in floatmodule.c for those > platforms where float'ing "NaN" or "Inf" doesn't currently work? How would you do the worming-around?

Re: Portably generating infinity and NaN

2007-04-13 Thread Martin v. Löwis
ary already supports strtod("inf") and even if you then special-case Windows - what do you do with platforms where neither approach works? In short, I cannot think of a way to do that portably on all platforms in C. If there was such a way, it probably would have been implemented long

Re: nonstandard XML character entities?

2007-04-14 Thread Martin v. Löwis
ively, you can implement a skippedEntity callback in the SAX content handler. In ElementTree, the XMLTreeBuilder has an attribute entity which is a dictionary used to map entity names in entity references to their definitions. Whether you can make the parser download the DTD itself, I don't know. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: tuples, index method, Python's design

2007-04-14 Thread Martin v. Löwis
istency, the .index method should be removed from lists, as well, IMO. If you find yourself doing a linear search, something is wrong. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Feature Request: Explicit variable declarations

2007-04-14 Thread Martin v. Löwis
bal variables and object attributes. I think there is a fairly low chance that such a request will be considered. It's a big change (implementation-wise, and documentation-wise), and likely controversial. So one would have to write a PEP first (see PEP 1 for details). Regards, Martin -- http://m

Re: Python Feature Request: Allow changing base of member indices to 1

2007-04-14 Thread Martin v. Löwis
e this code: option base import sys print sys.path[1] So should the be 0-based (because path is in module sys), or should it be one-based (because the access occurs in a module that uses 1-indexing)? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Feature Request: (?) Group all file-directory-related stdlib functions in one place

2007-04-14 Thread Martin v. Löwis
r clarification. > Please see PEP 355. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: compiling modules with VS 2008 for python 2.4 prepared with Visual Studio 2003

2007-04-14 Thread Martin v. Löwis
r8.dll. You either would have to create a import library for mscvr71.dll by hand, or you have to copy one from VS 2003 (breaking its license). Regards, Martin P.S. Why does the subject say "VS 2008", anyway? That product has not been released yet, and Microsoft is still hoping that it w

Re: Python and SSL

2007-04-16 Thread Martin v. Löwis
gt; By looking at the code I notice that pyopenssl package is used and > that a certificate file is required. Why do I need to use pyopenssl > and how do I generate the cert file? You can generate certificate files using the openssl command line tool; see the openssl documentation for details. M

Re: C++ extension problem

2007-04-16 Thread Martin v. Löwis
Tuple(args, "O!", SillyStringType, &o)) HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ extension problem

2007-04-17 Thread Martin v. Löwis
specific error message is printed, you would have to debug what values are passed on the stack at what point. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode data - accessing codepoints > FFFF on narrow python builts

2007-04-18 Thread Martin v. Löwis
e also for wider codepoints. See PEP 261. This is by design. > Currently, I'm using a kind of parallel database for some unicode > ranges above , but I don't think, this is the most effective way. Just use a wide Unicode build instead. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: uninstall python2.5 on debian

2007-09-22 Thread Martin v. Löwis
es that have 2.5 in their name, plus any links to them. In /lib, it's python2.5. In /include, it's python2.5. Plus a few things that I probably forgot. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with VC8 on x64 Vista

2007-09-22 Thread Martin v. Löwis
> 1>py_dyn_test.obj : error LNK2001: unresolved external symbol > _Py_NoneStruct Could it be that py_dyn_test.obj is a x86 (not AMD64) object file? Run dumpbin. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: unicode categories -- regex

2007-09-22 Thread Martin v. Löwis
gt; Creating this expression is fairly expensive, however, once compiled, it has a compact representation in memory, and matching it is efficient. Contributions to support categories directly in re are welcome. Look at the relevant Unicode recommendation on how to do that. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Building Python with VC8 on x64 Vista

2007-09-24 Thread Martin v. Löwis
> It doesn't look like these are x86, though. Ok. Can you then check symbol lists also?: undefined symbols in the object file, and defined symbols in the library, wrt. PyExc_IndexError (say). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-09-28 Thread Martin v. Löwis
u. > But how can I tell my Python program to trust my SSL certificate? Why do you want to tell it that? The SSL module will trust *any* server certificate, no need to tell it explicitly which ones to trust. > When I tried before I received the error 503 That must be an independent

Re: marshal bug?

2007-09-28 Thread Martin v. Löwis
marshal.c Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-09-28 Thread Martin v. Löwis
> I heard that python 2.6 will include full "server-side SSL > support" (whatever this means). > Is it true? Yes, that's true. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-09-29 Thread Martin v. Löwis
his server certificate. I was not proposing any judgment on whether that's a good thing or not. In fact, I have no idea whether security was of any concern to the OP. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.5 and 3gb switch

2007-09-29 Thread Martin v. Löwis
an exception, does it crash, does it erase your hard disk? I'm not aware of a 3gb Python build, but you should be able to build it yourself. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: python 2.5 and 3gb switch

2007-09-29 Thread Martin v. Löwis
n that is 3gb enabled as well I'm not so sure about that, with your description right now. There might be other reasons that cause that error (but they are hard to guess as still still don't know exactly what the error is). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-10-01 Thread Martin v. Löwis
>> No, as Martin points out, Python trusts EVERY certificate, which of >> course misses the whole point of certificates. Whatever is making >> your program fail is something different. > > Paul, are you sure for 100%. It is hard to belive. Not sure how many confirmations

Re: Python and SSL

2007-10-01 Thread Martin v. Löwis
a HTTP error, not an SSL one (unless he made up that error code, of course). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: gui toolkits: the real story? (Tkinter, PyGTK, etc.)

2007-10-02 Thread Martin v. Löwis
itory? What's Tk's secret weapon? The trick is very simple. Tkinter just *doesn't* get much focus. Very few of the core developers actively work on it; I do so only once every two years or so to merge all the patches that get contributed. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-10-02 Thread Martin v. Löwis
o maintain a list of root CAs, and what code does it execute to find out that a certificate is not in this list? Are you sure this is related to Python at all? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-10-03 Thread Martin v. Löwis
ceive an error. What error do you receive precisely? Please copy it literally from the terminal, don't rephrase it. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and SSL

2007-10-03 Thread Martin v. Löwis
hat does it mean? Technically, it means that OpenSSL does not support the version of the SSL protocol that the proxy uses. Practically, it more likely means that the proxy does not use SSL at all at the port you are connecting to. What host/port are you connecting to? Regards, Martin -- http:/

Re: toprettyxml messes up with whitespaces

2007-10-03 Thread Martin v. Löwis
hat is definitely simplistic. CDATA has no significance on formatting. > Should I file this as a bug to be solved? I have my workaround now, > but I read online that more people seem to have ran into this. Feel free to come up with a patch. It is questionable whether a bug report will help; there is a good chance that it stays open for several years. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Command-line does work when scheduled

2007-10-05 Thread Martin P. Hellwig
Jim wrote: > On Sep 30, 6:16 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: >> On Sun, 30 Sep 2007 07:42:56 -0700, Jim <[EMAIL PROTECTED]> >> declaimed the following in comp.lang.python: >> >>> What else could be wrong? >>> Thanks, >> Possibly those associations are only defined for your

Re: Python SVN down?

2007-10-11 Thread Martin v. Löwis
> Are all the real ( ;-) ) developers using ssh+svn and not noticing > this? As Terry said, some noticed. But yes, many use svn+ssh, plus we live in different time zones, so we may be asleep when it breaks. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: unicodedata implementation - categories

2007-10-14 Thread Martin v. Löwis
Java, I recommend to use java.lang.Character.getType. If that returns java.lang.Character.UNASSIGNED, return "Cn". Regards Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Build Python 2.5 against Tk 8.5

2007-10-16 Thread Martin v. Löwis
> I'd like to experiment with Tk 8.5 (now in beta) in my Python > application, but Python 2.5 requires Tk 8.4.x. Why do you say that? AFAIK, that's not the case. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Build Python 2.5 against Tk 8.5

2007-10-16 Thread Martin v. Löwis
ter.c does *not* hard-code Tk 8.4. As you refer to _tkinter.so, it appears you are talking about a precompiled version - did you try to build Python yourself? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ version of the C Python API?

2007-10-21 Thread Martin v. Löwis
ll prototypes, and it was specifically cleaned up (ten years ago) to work with C++. This API does not make use of many of the C++ features, including classes, templates, or overloading. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ version of the C Python API?

2007-10-21 Thread Martin v. Löwis
n C API available. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ version of the C Python API?

2007-10-21 Thread Martin v. Löwis
ode. > You also mentioned that there are "multiple C++ wrappers arround the > Python C API Available"... could you provide names for a few of the > popular ones? The most popular ones are Boost.Python, CXX, and PySTL. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: C++ version of the C Python API?

2007-10-22 Thread Martin v. Löwis
ong the core properties of object-orientation. The C API (although not these three functions) also supports inheritance, which is the core property missing in the previous list. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Building sparc64 32/64-bit Python

2007-10-22 Thread Martin v. Löwis
4, the byte code files may be different from the byte code files on Sparc, if the source code contains integer literals above 2**31. Such literals would be marshaled as TYPE_LONG (l) on Sparc32, but as TYPE_INT64 (I) on Sparc64. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: japanese encoding iso-2022-jp in python vs. perl

2007-10-23 Thread Martin v. Löwis
ith Python 2.4.4 on Debian). What Python version are you using, and what is the precise string that you want to encode? (use "print repr(var)" to report that exact value) HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Root element name not declared

2007-10-23 Thread Martin v. Löwis
ameter Entity (PE), not as an element. Look for definitions that start with then the name of the root element would not be MyMessage, but Envelope. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python on Intel A110?

2007-10-23 Thread Martin v. Löwis
> Will the "stock" Windows version of Python install on a Samsung Q1U-EL > UMPC running Vista and with an Intel A110 processor? Certainly. This is an Pentium M class processor; the Python binaries will run on any Pentium-or-better processor (probably actually 486-or-better).

Re: strange transliteration in win32com.client

2007-10-23 Thread Martin v. Löwis
disk. In addition, Windows considers V:foo as a relative path; relative to the current directory on drive V. So V:foo is a short-hand for V:\foo, which, as a Python string, reads 'V:\\foo'. As you have the director '\risk oversight' specified (which starts with CR), the full normal

Re: Test for a unicode string

2007-10-24 Thread Martin v. Löwis
string Notice that you get a *decoding* error, so you are not testing Unicode characters, but byte strings. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode raw string containing \u

2007-10-28 Thread Martin v. Löwis
that they still interpret \u escapes. And yes, your notation is one way to get what you want; another is u"\\"+r"universe", although I'm unsure whether that meets your requirements. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: simple question on dictionary usage

2007-10-28 Thread Martin v. Löwis
vious, > I'm a recovering perl programmer. Ok, I now see why you can appreciate the comprehension-based one :-) Again, much of Python's strength comes from it being readable. Simple is better than complex, and sparse is better than dense, and readability counts (import this). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Is the subprocess module thread-safe?

2007-10-28 Thread Martin v. Löwis
e of the functions that don't return one in the first place, the module itself will wait for the child processes "regularly". Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Proxying downloads

2007-10-30 Thread Martin Sand Christensen
nts has finished downloading or not, where the file is located etc. This way you can also, for the sake of persistence, keep partially downloaded files separate from the completely downloaded files, as per a previous suggestion, so that you won't start serving half files after a crash, an

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-30 Thread Martin v. Löwis
t when setup.py runs, _tkinter will get built automatically. If you don't have the header files of Tk installed, no amount of fiddling with setup.py, or getting alternative sources of tkinter, will actually get you a _tkinter module. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: why did these companies choose Tcl over Python

2007-10-30 Thread Martin v. Löwis
en uncertain). So at that time, Tcl would have been the obvious (because only) choice. Now these products are stuck with Tcl, and redoing all the work (including the existing extension modules!) in a different programming language would be a lot of work. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-31 Thread Martin v. Löwis
> however make still complains of the non existance of the the Tcl/Tk > libs and/or headers So where it tk.h located? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python bug tracker now secret?

2007-10-31 Thread Martin v. Löwis
> I don't know why they chose to make the sf tracker private. Maybe that > was the only way to remove write access. That, plus removing it means that people won't browse outdated information. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python bug tracker now secret?

2007-10-31 Thread Martin v. Löwis
> There are bug reports in the SourceForge tracker that aren't in the > "bugs.python.org" tracker, so that move was botched. Which one in particular? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-31 Thread Martin v. Löwis
al try and > locate the file names it's failing on I'm at a loss to see where to go > next. tk.h is searched-for in detect_tkinter. Check whether tklib, tcllib, tcl_includes and tk_includes all get set. This should take only a single print statement. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python bug tracker now secret?

2007-10-31 Thread Martin v. Löwis
I believe most people had little or no problems finding the new bug tracker, in particular if they had seen the announcement. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-31 Thread Martin v. Löwis
None, if yes, report what it returns. Otherwise, annotate compiler.find_library_file. Print compiler.find_library_file to see what specific function it is; likely something in unixccompiler.py. If so, print out shared, dylib, static, and os.path.exists of each one. HTH, Martin -- http://mail.py

Re: _tkinter installation in python 2.5 on mandriva with a default 2.4

2007-10-31 Thread Martin v. Löwis
> but no tcllib !!! > perhaps that's the problem? Did I assume that it was installed by the > tk mandriva module ? I see. I would have never guessed that you can manage to install Tk but not Tcl on Mandriva... Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: new style class

2007-11-02 Thread Martin Sand Christensen
ds has never been a good way of getting things done. :-) Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Copy database with python..

2007-11-02 Thread Martin Sand Christensen
distinct impression that you're trying to replace simple shell scripting with Python. While it's possible, you're probably making things much more complicated than they need to be. Unless you're actually doing something with all that data of yours, don't use Pyth

Re: Copy database with python..

2007-11-02 Thread Martin Sand Christensen
.execute() is for executing SQL commands, and this is not an SQL command, but rather a shell command. Abandoned> And how can i copy the database with python ? Note: The Abandoned> database's size is 200 GB If you want to do this from Python, run it as a separate process. Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils and ctypes

2007-01-09 Thread Martin v. Löwis
My main concern with ctypes is that you have to duplicate information from the header files, which is error-prone, especially when the header files may change (either across versions or across target systems). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamic library loading, missing symbols

2007-01-09 Thread Martin v. Löwis
does the symbol visibility (hidden/internal/protected). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: dynamic library loading, missing symbols

2007-01-10 Thread Martin v. Löwis
through the Python documentation to see if > they offer any work arounds to this problem. There is sys.setdlopenflags, but I would use it with caution. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 install on Gentoo Linux: failed dmb and _tkinter

2007-01-10 Thread Martin v. Löwis
root root 906285 Jan 10 16:08 > /usr/local/lib/libtk8.4.so > > I need Tkinter for sure, and I'll like to have dbm. > How should I proceed? Did you add /usr/local/lib to /etc/ld.so.conf? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5 install on Gentoo Linux: failed dmb and _tkinter

2007-01-12 Thread Martin v. Löwis
Sorin Schwimmer schrieb: >> Did you add /usr/local/lib to /etc/ld.so.conf? > > It's there It is it also listed with "ldconfig -p"? Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: XLM prolgoue

2007-01-17 Thread Martin v. Löwis
fscked schrieb: > How do I go about creating the XML prologue like I want it to be? print " % (version, encoding) Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: Would a Dutch speaker please check this wiki page please?

2007-01-18 Thread Martin P. Hellwig
Stef Mientki wrote: > [EMAIL PROTECTED] wrote: >> Got a note about a new page on the Python Wiki: >> >>> "Wade" == Wade McDaniel <[EMAIL PROTECTED]> writes: >> >> http://wiki.python.org/moin/Selcuk_Altun >> >> I suspect it's junk since it doesn't seem to mention Python and the >> website >

Re: Would a Dutch speaker please check this wiki page please?

2007-01-18 Thread Martin P. Hellwig
Stef Mientki wrote: > [EMAIL PROTECTED] wrote: >> Got a note about a new page on the Python Wiki: >> >>> "Wade" == Wade McDaniel <[EMAIL PROTECTED]> writes: >> >> http://wiki.python.org/moin/Selcuk_Altun >> >> I suspect it's junk since it doesn't seem to mention Python and the >> website >

Re: Memory Management in Embedded Python

2007-01-18 Thread Martin v. Löwis
ing object, and passes that to method_x. Creating a string object does indeed create a copy. The string object will be refcounted, so it exists as long as there is a reference to it. Likely (unless the method_x implementation somehow stores the string), it gets deallocated before PyObject_Call returns. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

How to comment code?

2007-01-19 Thread Martin P. Hellwig
Hi all, I've been toying with python for about two years now. Not every day, just when I encounter something in my job (sysadmin) repetitively dull. The amazing thing is that like any other language (natural or not) learning it more gives you power to express your thoughts better and create som

Re: PQueue and Python 2.5

2007-01-20 Thread Martin v. Löwis
Mem_DEL(pqp) should read PyObject_DEL(pqp), as the object was allocated with PyObject_NEW. Because this was a common error once, Python up to 2.4 detected that error and silently corrected it (at some runtime cost); Python 2.5 now has removed this work-around. I'll contact the author. Regards,

Re: A solution to the MSVCRT vs MSVCR71 problem?

2007-01-20 Thread Martin v. Löwis
is msvcr71.dll. The "Licensee Software" is "a software application product developed by you that adds significant and primary functionality to the Redistributables", i.e. python25.dll. IANAL; this is not legal advise. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: A solution to the MSVCRT vs MSVCR71 problem?

2007-01-21 Thread Martin v. Löwis
or different types, or even may not exist > anymore. Actually, the libraries *are* binary-compatible (on the ABI level). You just can't mix two libraries in a single program easily. > (And what about any symbol exported by ordinal?) That doesn't happen for msvcrt, as the import l

Re: A solution to the MSVCRT vs MSVCR71 problem?

2007-01-21 Thread Martin v. Löwis
ince they started to support 32-bit code. So if you had problems, they might have had a different source. It's a different thing for the C++ libraries, though. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: A solution to the MSVCRT vs MSVCR71 problem?

2007-01-21 Thread Martin v. Löwis
vary across compilers, even if all these compilers implement C99. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: mmap caching

2007-01-21 Thread Martin v. Löwis
e are several values that can be called "memory usage" (such as the size of the committed address space, the working set size, etc); you don't mention which of these values grows several hundreds MB. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: mmap caching

2007-01-21 Thread Martin v. Löwis
gt; anyway). As a starting point, try understanding better what is really happening. Turn on "Virtual Memory Size" in "View/Select Columns" also, and perhaps a few additional counters as well. Also take a look at the "Commit Charge", which takes into account swap fi

Re: mmap caching

2007-01-22 Thread Martin v. Löwis
all). You need to display the virtual address space in the task manager to determine how much address space the application is using. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: mmap caching

2007-01-22 Thread Martin v. Löwis
its swap file (because of other activities in the system), so Python occasionally manages to exhaust the swap file, through regular allocations (memory-mapped files don't contribute to swap file usage, as they have their own disk-backing, namely in the file being mapped). Regards, Martin -- ht

Re: Building extensions with vc8

2007-01-22 Thread Martin v. Löwis
lf with VS 2005, you should be able to build extension modules as well with distutils, by setting MSSdk and DISTUTILS_USE_SDK appropriately. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: What's the reverse of Py_BuildValue("u#" ?

2007-01-23 Thread Martin v. Löwis
ring_Check(obj)) { // would this be true for any string >type? >... >} >if(PyFloat_Check(obj)) { >... > with a switch? Not easily. Also, PyString_Check is true only for the byte string type (and its subtypes). Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: raise UnicodeError, "label too long"

2007-01-24 Thread Martin v. Löwis
e links extracted from the page I get this error. > > This is bad, since some links do contain strings with non-ascii > characters. Please try answering the exact question that Marc asked: what is an example for unicode string that triggers the exception? Regards, Martin -- http://mail

Re: raise UnicodeError, "label too long"

2007-01-24 Thread Martin v. Löwis
t;wikipedia.org".encode("idna") 'wikipedia.org' The exception is certainly misleading; I'll have to find out whether there is a bug beyond that (i.e. whether host names with empty labels should be accepted). Regards, martin -- http://mail.python.org/mailman/listinfo/python-list

Re: New vs Old Style Python Classes in C Extensions?

2007-01-27 Thread Martin v. Löwis
dn't be able to call Context.__init__(): that should raise a type error, indicating that an object is needed for the method __init__. That should hold whether Context is a new-style or an old-style class. HTH, Martin -- http://mail.python.org/mailman/listinfo/python-list

<    24   25   26   27   28   29   30   31   32   33   >