"env" parameter to "popen" won't accept Unicode on Windows - minor Unicode bug

2008-01-14 Thread John Nagle
ot;env" parameter have to be ASCII, not Unicode, even though Windows fully supports Unicode in CreateProcess. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Is there some Python function that searches "sys.path" for a module?

2008-01-14 Thread John Nagle
odule named on the Python command line. Is that correct? Thanks. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "env" parameter to "popen" won't accept Unicode on Windows - minor Unicode bug

2008-01-14 Thread John Nagle
Benjamin wrote: > On Jan 14, 6:26 pm, Bjoern Schliessmann [EMAIL PROTECTED]> wrote: >> John Nagle wrote: >>> It turns out that the strings in the "env" parameter have to be >>> ASCII, not Unicode, even though Windows fully supports Unicode in >>> C

Re: Is there some Python function that searches "sys.path" for a module?

2008-01-14 Thread John Nagle
Miki wrote: > http://docs.python.org/lib/module-imp.html Ah. "imp.find_module". I was looking in "sys" and path-related places. Thanks. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there some Python function that searches "sys.path" for a module?

2008-01-14 Thread John Nagle
instance. I need its path so I can start it in a subprocess. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "env" parameter to "popen" won't accept Unicode on Windows - minor Unicode bug

2008-01-15 Thread John Nagle
Diez B. Roggisch wrote: > John Nagle wrote: > >> Benjamin wrote: >>> On Jan 14, 6:26 pm, Bjoern Schliessmann >> [EMAIL PROTECTED]> wrote: >>>> John Nagle wrote: >>>>> It turns out that the strings in the "env" parameter have

Re: "env" parameter to "popen" won't accept Unicode on Windows -minor Unicode bug

2008-01-15 Thread John Nagle
nicode. The DOS/Win16/Win9x family did not. But they did have CreateProcess. So the current code will handle Win9x, but not Unicode. When do we drop support for Win9x? It probably has to happen in Python 3K, since that's Unicode-everywhere. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-17 Thread John Nagle
oad" reaches an end of file, it properly raises EOFError. So it's OK to do "load" after "load" until EOFerror is raised. "pickle" and "cPickle" seem to be interchangeable in this application, so that works. It's a useful way to talk to a subprocess, but you need to know all the issues above to make it work. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-17 Thread John Nagle
Irmen de Jong wrote: > Christian Heimes wrote: >> John Nagle wrote: >>> It's possible to use "pickle" for interprocess communication over >>> pipes, but it's not straightforward. >> >> IIRC the processing module uses pickle for IPC. May

Re: Cannot catch _mysql_exceptions.OperationalError

2008-01-17 Thread John Nagle
code if errorcode == kmysqlduplicateentry : # if dup on insert ... deal with duplicate entry If Django has a problem, you'll have to take that up with them. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-18 Thread John Nagle
John Nagle wrote: > Irmen de Jong wrote: >> Christian Heimes wrote: >>> John Nagle wrote: >>>> It's possible to use "pickle" for interprocess communication over >>>> pipes, but it's not straightforward. Another "gotcha".

Re: [python] How to detect a remote webpage is accessible? (in HTTP)

2008-01-18 Thread John Nagle
ader info. Don't read the content at all. Setting the socket timeout will shorten the timeout when the requested domain won't respond at all. But if the remote host opens an HTTP connection, then sends nothing, the socket timeout is ineffective and you wait for a while. This is rare,

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-18 Thread John Nagle
Carl Banks wrote: > On Jan 17, 2:28 pm, John Nagle <[EMAIL PROTECTED]> wrote: > >> It's also necessary to call Pickle's "clear_memo" before each "dump" >> call, since objects might change between successive "dump" calls. >>

Re: Using "pickle" for interprocess communication - some notes and things that ought to be documented.

2008-01-19 Thread John Nagle
Paul Boddie wrote: > Unlike your approach, pprocess employs the fork system call. Unfortunately, that's not portable. Python's "fork()" is "Availability: Macintosh, Unix." I would have preferred to use "fork()".

Is there a portable way to tell if data is available on a pipe?

2008-01-20 Thread John Nagle
ke to avoid having a thread to manage each pipe, but if I have to, so be it. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Is there a portable way to tell if data is available on a pipe?

2008-01-21 Thread John Nagle
Scott David Daniels wrote: > John Nagle wrote: >>I need some way to find out if a pipe has data available for >> a read without blocking if it does not. > ... >> I'd like to avoid having a thread to manage each pipe, but if I >> have to, so be it. > >

Re: Sorting Large File (Code/Performance)

2008-01-24 Thread John Nagle
2. Please check. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Testing whether something is of type Exception

2008-01-24 Thread John Nagle
How can I tell whether an object is of type Exception? At least in Python 2.4, "Exception" is an old-style class, and the "type" of Exception objects is "instance". Clearly "repr" knows; it returns:

Re: Sorting Large File (Code/Performance)

2008-01-24 Thread John Nagle
elf. Fan out the incoming file into one file for each first letter, sort each subfile, merge the results. With DRAM at $64 for 4GB, I'd suggest just getting more memory and using a standard in-memory sort. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting Large File (Code/Performance)

2008-01-24 Thread John Nagle
Paul Rubin wrote: > John Nagle <[EMAIL PROTECTED]> writes: >> - Get enough memory to do the sort with an in-memory sort, like >> UNIX "sort" or Python's "sort" function. > > Unix sort does external sorting when needed. Ah, someone

Portably killing/signalling another process not supported?

2008-01-26 Thread John Nagle
nonportable workarounds (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/347462) but no portable solution. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Portably killing/signalling another process not supported?

2008-01-26 Thread John Nagle
Christian Heimes wrote: > John Nagle wrote: >> There doesn't seem to be any way to portably kill another process >> in Python. "os.kill" is Mac/Unix only. The "signal" module only lets >> you send signals to the current process. And the "s

Re: optional static typing for Python

2008-01-28 Thread John Nagle
tion they see. Enforced, it makes it possible to start getting serious about optimizing compilers for Python, like Shed Skin. Shed Skin can usually figure out typing within a module, but across module boundaries, some help is needed if you want to push optimization from run time to compile time. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Standardization: Wikipedia entry

2008-01-29 Thread John Nagle
than CPython), and none of them are close to being usable. Letting the author of one implementation control the language discourages other implementations. Submitting Python 2.5 to ISO/ANSI might be a good idea. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Standardization: Wikipedia entry

2008-01-31 Thread John Nagle
Colin J. Williams wrote: > John Nagle wrote: >> Paddy wrote: >>> I would value the opinion of fellow Pythoneers who have also >>> contributed to Wikipedia, on the issue of "Is Python Standardized". >>> Specifically in the context of this

"ping" not reconnecting in Python MySQLdb client interface

2008-02-03 Thread John Nagle
tive to TurboGears: http://trac.turbogears.org/ticket/872 I suspect that MySQL has auto-reconnect turned off, but doesn't document this. (MySQL 5 on Fedora Core) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "ping" not reconnecting in Python MySQLdb client interface

2008-02-03 Thread John Nagle
o valid database handle db = MySQLdb.connect(...) # connect to database which is a bit ugly. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

MySQLdb: commit before cursor close, or after?

2008-02-04 Thread John Nagle
me discussions of this in blogs, but nobody really seems to know. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Very weird behavior in MySQLdb "execute"

2008-02-04 Thread John Nagle
This has me completely mystified. Some SELECT operations performed through MySQLdb produce different results than with the MySQL graphical client. This failed on a Linux server running Python 2.5, and I can reproduce it on a Windows client running Python 2.4. Both are running MySQL 2.5. The

Re: Very weird behavior in MySQLdb "execute"

2008-02-04 Thread John Nagle
Carsten Haese wrote: > On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: >> Restarting the MySQL instance changes the database. The entry "google.com" >> disappears, and is replaced by "www.google.com". This must indicate a >> hanging >> tr

Re: MySQLdb: commit before cursor close, or after?

2008-02-04 Thread John Nagle
it makes sense to close the cursor before committing. That frees up the connection for the next command. But I'm not sure, and I have a bug that seems to be related to a transaction not committing properly. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Must COMMIT after SELECT (was: Very weird behavior in MySQLdb "execute")

2008-02-05 Thread John Nagle
Steve Holden wrote: > John Nagle wrote: >> Carsten Haese wrote: >>> On Mon, 2008-02-04 at 11:30 -0800, John Nagle wrote: >>>> Restarting the MySQL instance changes the database. The entry >>>> "google.com" >>>> disappears, and is r

Re: future multi-threading for-loops

2008-02-05 Thread John Nagle
hings you do after solving the problems of being 10x-30x slower than C. The real optimization trick for Python is figuring out at compile time what might change at run time, and what won't be. Then all the things that can't change can be hard-bound during compilation. Shed Ski

Re: Very weird behavior in MySQLdb "execute"

2008-02-05 Thread John Nagle
Paul Boddie wrote: > On 4 Feb, 20:30, John Nagle <[EMAIL PROTECTED]> wrote: >>This has me completely mystified. Some SELECT operations performed >> through >> MySQLdb produce different results than with the MySQL graphical client. >> This failed on a Linux

Re: Why not a Python compiler?

2008-02-05 Thread John Nagle
voiding huge numbers of unnecessary lookups and yielding a considerable speedup. It's necessary to provide for the late-binding case to keep the dynamism of the language, but late-binding everything kills performance. Shed Skin has restrictions like that, but Shed Skin is being developed by

Re: Turn off ZeroDivisionError?

2008-02-14 Thread John Nagle
ions. On x86, with some difficulty, you can turn an FPU exception into a C++ exception using Microsoft's compilers. But that's not portable. x86 has exact exceptions, but most other superscalar machines (PowerPC, Alpha, if anybody cares) do not. For Python, I'd suggest throwing

Re: What's "the standard" for code docs?

2008-02-15 Thread John Nagle
Preston Landers wrote: > Hey guys and gals. What are all the cool kids using these days to > document their code? HTML. Text-only docs are so last-cen. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Threads vs. continuations

2008-02-19 Thread John Nagle
uot;vertical interval tasks", and similar hacks to work around the lack of one.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Why must implementing Python be hard unlike Scheme?

2008-02-21 Thread John Nagle
x27;t even have to allocate storage during compile time. The run-time environment is a tree of hashes. The resulting implementation will be slow, but then, so is CPython. Too much time goes into hash lookups. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Article of interest: Python pros/cons for the enterprise

2008-02-21 Thread John Nagle
3 are always compiled to hard machine code, and Java can be. (GCC offers that option.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Handling locked db tables...

2008-02-21 Thread John Nagle
or per database connection. The MySQLdb API makes it look like you can have multiple cursors, but that doesn't actually work. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

What does this bogus code in urlparse do?

2008-02-25 Thread John Nagle
nts in URLs, which are generally ignored. But it also does something with commas, and it's not clear why. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Data aggregation

2008-03-06 Thread John Nagle
vedranp wrote: > I would like to avoid the step of taking data out from database in > order to process it. You can probably do this entirely within SQL. Most SQL databases, including MySQL, will let you put the result of a SELECT into a new table. John

Re: What c.l.py's opinions about Soft Exception?

2008-03-09 Thread John Nagle
blem. In the rare cases that it is needed, it can be implemented with callbacks. It doesn't require a language extension. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

getattr/setattr still ASCII-only, not Unicode - blows up SGMLlib from BeautifulSoup

2008-03-13 Thread John Nagle
f, 'end_' + tag) UnicodeEncodeError: 'ascii' codec can't encode character u'\xae' in position 46: ordinal not in range(128) Should attributes be restricted to ASCII, or is this a bug? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: getattr/setattr still ASCII-only, not Unicode - blows up SGMLlib from BeautifulSoup

2008-03-13 Thread John Nagle
John Machin wrote: > On Mar 14, 5:38 am, John Nagle <[EMAIL PROTECTED]> wrote: >>Just noticed, again, that getattr/setattr are ASCII-only, and don't >> support >> Unicode. >> >>SGMLlib blows up because of this when faced with a Unicode end tag:

Re: Do any of you recommend Python as a first programming language?

2008-03-22 Thread John Nagle
here's no sign of footnotes or references to prior work. The notation doesn't seem to do anything not previously possible; it's just different. Back when I was doing program verification work, we used to refer to stuff like that as the "logic of the month club".

Testing for an empty dictionary in Python

2008-03-23 Thread John Nagle
What's the cheapest way to test for an empty dictionary in Python? if len(dict.keys() > 0) : is expensive for large dictionaries, and makes loops O(N^2). John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Testing for an empty dictionary in Python

2008-03-23 Thread John Nagle
Brian Lane wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > John Nagle wrote: >>What's the cheapest way to test for an empty dictionary in Python? >> >> if len(dict.keys()) : >> >> is expensiv

Re: Testing for an empty dictionary in Python - documented?

2008-03-23 Thread John Nagle
Bryan Olson wrote: > D'Arcy J.M. Cain wrote: >> John Nagle wrote: >>>What's the cheapest way to test for an empty dictionary in Python? > >> Try this: >> >> if dict: > > D'Arcy is right; that's the way to go. I'll a

Re: "Soup Strainer" for ElementSoup?

2008-03-24 Thread John Nagle
the graph cycle free. So the memory is recovered by reference count update as soon as you let go of the head of the tree. That helps with the garbage problem. What are you parsing? If you're parsing well-formed XML, BeautifulSoup is overkill. If you're parsing real-world HTML, E

Re: dynamically created names / simple problem

2008-03-25 Thread John Nagle
idgetfn def callwidgetbyname(self, widgetname, args) self.widgets[widgetname](*args) The only reason to use attributes is when you want to allow the use of the notation objectinstance.attributename If you're only going to get the attributes with getattr, they don't need to be attributes. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Beta testers needed for a high performance Python application server

2008-03-26 Thread John Nagle
l at which it recognizes other files. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Beta testers needed for a high performance Python application server

2008-03-26 Thread John Nagle
Paul Rubin wrote: > John Nagle <[EMAIL PROTECTED]> writes: >> Fast cgi is a good technology, but it's not well documented or >> well supported. For some reason, the Apache people don't like it. >> It used to be part of the Apache distribution, but that

Some notes on a high-performance Python application.

2008-03-26 Thread John Nagle
over pipes. M2Crypto isn't used much. We've spent much time finding and dealing with problems in the components. Yet all this works quite well. Does anyone else architect their systems like this? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Some notes on a high-performance Python application.

2008-03-26 Thread John Nagle
Heiko Wundram wrote: > Am Mittwoch, 26. März 2008 18:54:29 schrieb Michael Ströder: >> Heiko Wundram wrote: >>> Am Mittwoch, 26. März 2008 17:33:43 schrieb John Nagle: > I didn't say it was unusual or frowned upon (and I was also taught this at > uni > IIRC a

Can Python serial support run at 45.45 baud?

2009-02-14 Thread John Nagle
rly all the way down into Windows? And what about Linux, where the "stty" interface is quite different? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Python serial support run at 45.45 baud?

2009-02-14 Thread John Nagle
Grant Edwards wrote: On 2009-02-14, John Nagle wrote: Can Python's serial port support be made to run at 45.45 baud, the old "60 speed" Teletype machine speed? If your hardware and OS supports it, Python can be made to support it. OK, tried to open the port, using Pyt

Re: Can Python serial support run at 45.45 baud?

2009-02-14 Thread John Nagle
John Nagle wrote: OK, tried to open the port, using Python 2.6, latest PySerial and PyWin32: ser = serial.Serial(port, baudrate=baud, bytesize=serial.FIVEBITS, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_TWO) ValueError: Cannot configure port

Re: Can Python serial support run at 45.45 baud?

2009-02-14 Thread John Nagle
MRAB wrote: John Nagle wrote: [snip] So the correct combination, 5 bits with 1.5 stop bits, isn't supported in Python. 1 stop bit will not physically work on Baudot teletypes; the main camshaft doesn't come around fast enough. (Yes, there's an actual mechanical reason fo

PySerial "write" should accept "bytearray"

2009-02-14 Thread John Nagle
w, and "read" functions should return a "bytearray". John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Python serial support run at 45.45 baud?

2009-02-14 Thread John Nagle
Roy Smith wrote: In article <49970ce7$0$1665$742ec...@news.sonic.net>, John Nagle wrote: At the hardware level, there's a clock rate, a counter, and a divisor, so arbitrary baud rates can be set. Is that really true of modern hardware? The last time I looked at serial po

"Byte" type?

2009-02-14 Thread John Nagle
n32 >>> xx = b'x' >>> repr(xx) "'x'" >>> repr(xx[0]) "'x'" >>> repr(xx[0][0]) "'x'" >>> But that's not what "repr" indicates. The bytearray element is apparently being promoted to "bytes" as soon as it comes out of the array. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "Byte" type?

2009-02-15 Thread John Nagle
understand the mindset, but the documentation needs to be improved. Right now, we have a few PEPs and the 2.6 "New features" article, but no comprehensive documentation. The relationship between "str", "unicode", "bytearray", "array.array('B')", and integers, and how this changes from version to version of Python, needs to be made clearer, or conversion to 2.6/3.0 will not happen rapidly. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Can Python serial support run at 45.45 baud?

2009-02-15 Thread John Nagle
John Nagle wrote: MRAB wrote: John Nagle wrote: [snip] So the correct combination, 5 bits with 1.5 stop bits, isn't supported in Python. 1 stop bit will not physically work on Baudot teletypes; the main camshaft doesn't come around fast enough. (Yes, there's an actual mechan

Re: "Byte" type?

2009-02-15 Thread John Nagle
Benjamin Kaplan wrote: On Sun, Feb 15, 2009 at 11:57 AM, John Nagle wrote: Benjamin Peterson wrote: Because b'x' is NOT a bytearray. It is a bytes object. When you actually use a bytearray, it behaves like you expect. type(b'x') type(bytearray(b'x'))

Re: "Byte" type?

2009-02-15 Thread John Nagle
Benjamin Kaplan wrote: On Sun, Feb 15, 2009 at 11:57 AM, John Nagle wrote: Benjamin Peterson wrote: Because b'x' is NOT a bytearray. It is a bytes object. When you actually use a bytearray, it behaves like you expect. type(b'x') type(bytearray(b'x'))

Re: "Byte" type?

2009-02-20 Thread John Nagle
Steve Holden wrote: John Nagle wrote: Benjamin Kaplan wrote: On Sun, Feb 15, 2009 at 11:57 AM, John Nagle wrote: ...Re "bytes" not behaving as documented in 2.6: That's indeed how Python 2.6 works. But that's not how PEP 3137 says it's supposed to work.

Re: "Byte" type?

2009-02-21 Thread John Nagle
Steve Holden wrote: John Nagle wrote: Steve Holden wrote: John Nagle wrote: Benjamin Kaplan wrote: On Sun, Feb 15, 2009 at 11:57 AM, John Nagle wrote: ...Re "bytes" not behaving as documented in 2.6: That's indeed how Python 2.6 works. But that's not how PEP 313

Unexpected long pyserial read delay on Windows

2009-02-22 Thread John Nagle
win32.py around line 88, and don't see any nonzero timeout parameters being fed to Windows when "timeout=None". Checking the Microsoft documentation, at http://msdn.microsoft.com/en-us/library/aa363190(VS.85).aspx feeding all zeroes into the COMMTIMEOUT structure should result in no a

Re: Unexpected long pyserial read delay on Windows

2009-02-22 Thread John Nagle
Grant Edwards wrote: On 2009-02-22, John Nagle wrote: I've been using PySerial on Windows (Win2000, amusingly) to drive a Baudot teletype at 45.45 baud. Input and output work, but there's a delay of about 1 second (!) on the input side between receiving a character and reporting

Re: redirecting stdout/err to mysql table

2008-11-23 Thread John Nagle
mply using SqlAlchemy instead of direct MySQLDb module). John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "as" keyword woes

2008-12-04 Thread John Nagle
Warren DeLano wrote: Why was it necessary to make "as" a reserved keyword? Embrace the pain. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: HARD REAL TIME PYTHON

2008-10-11 Thread John Nagle
NX) so you can be sure there won't be any paging. Then make sure you've gotten rid of anything unwanted running in the background (always a headache on Windows), and crank up the priority of your real-time task. And put in a hardware stall timer.

Re: Python HTML parser chokes on UTF-8 input

2008-10-17 Thread John Nagle
cover that the rest of the file has a non-ASCII encoding, and restart the parse from the beginning. BeautifulSoup has the machinery for that. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Passing a memory address (pointer) to an extension?

2008-10-22 Thread John Nagle
stem, lockups, and/or terrible performance. And none of the usual debugging tools for Python will help you. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Will MySQLdb, the Python shim, be supported for Python 2.6 or 3.x?

2008-11-17 Thread John Nagle
MySQLdb, the Python shim for MySQL, still supports Python only to Python 2.5. See "http://sourceforge.net/projects/mysql-python";. Are there any plans to support Python 2.6 or 3.x? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: mySQL problems

2008-11-17 Thread John Nagle
ntly, either there's a network problem, or the server has inadequate socket or MySQL resources configured. Do a SHOW PROCESSLIST on the server to see what it's doing. You may have clients which are keeping idle connections open and tying up server resources. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Will MySQLdb, the Python shim, be supported for Python 2.6 or 3.x?

2008-11-18 Thread John Nagle
Alia Khouri wrote: John Nagle wrote: MySQLdb, the Python shim for MySQL, still supports Python only to Python 2.5. See "http://sourceforge.net/projects/mysql-python";. Are there any plans to support Python 2.6 or 3.x? Are you running windows? If so, check the forums of the g

Re: Will MySQLdb, the Python shim, be supported for Python 2.6 or 3.x?

2008-11-19 Thread John Nagle
Alia Khouri wrote: John Nagle wrote: Whoever did the port somehow created a dependency on the Intel math library, "libguide40.dll" and "libmmd.dll". That shouldn't be needed in the MySQL Python shim. It's not freely distributable, either; you have to buy th

Re: Problem with writing fast UDP server

2008-11-20 Thread John Nagle
received. I wonder if there is a kind of setting for socket to allow no delays? Is the program CPU-bound? If so, CPython is too slow for what you want to do. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Official definition of call-by-value (Re: Finding the instance reference...)

2008-11-20 Thread John Nagle
eference parameter, and name parameters. For assignment, ":=" specified a value assignment, and ":-" specified a reference assignment. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "Byte" type?

2009-02-23 Thread John Nagle
g. Adding bytes as a separate type would have complicated a lot of things. Regards, Martin No, it's broken. PEP 3137 says one thing, and the 2.6 implementation does something else. So code written for 2.6 won't be ready for 3.0. This defeats the supposed point of 2.6.

Re: What's so wrong about execfile?

2009-03-02 Thread John Nagle
embedded Python code. Now there's an example of exactly what exec and eval shouldn't be used for. You don't put general-purpose execution mechanisms into your web site template system. That's just asking for trouble. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing/Crawler Questions..

2009-03-04 Thread John Nagle
tml";. I'm not sure how you're handling this. The Javascript actually has to be run before you get anything. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing/Crawler Questions..

2009-03-05 Thread John Nagle
u're looking for based on the XPath functions. This could be due to an error in the parsing, or it could be due to an admin changing the site (removing/adding courses etc...) What URLs are you looking at? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing/Crawler Questions - solution

2009-03-05 Thread John Nagle
Leadership Laboratory II", "section_title":{}, "description":{}, "notes":{}, "type":"Lec", "units":"1", "spaces_available":"30", "number_registered":"2", "wait_qty":"0", &quo

Re: Python3 on the Web

2009-03-05 Thread John Nagle
It's a useful option if you're doing something that doesn't work like a typical web application. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "/a" is not "/a" ?

2009-03-06 Thread John Nagle
ected error to do so. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Should I use stackless python or threads?

2009-03-07 Thread John Nagle
outputting various forms of installations in a particular directory structure, e.g. /pxe-installs, /iso-install, /dd-installs, etc... If this is under Windows, there's a Windows function to monitor a directory for changes. This is far more efficient than polling.

Re: Indentations and future evolution of languages

2009-03-10 Thread John Nagle
d be detected and treated as a syntax error. (Whether to use tabs or spaces is a religious argument, but mixing them is clearly wrong, and results in non-visible bugs. CPython should enforce that.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Rough draft: Proposed format specifier for a thousands separator

2009-03-13 Thread John Nagle
In COBOL, one writes PICTURE $999,999,999.99 which is is way ahead of most of the later approaches. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

PyWin32 for Python 3.x

2009-03-14 Thread John Nagle
Any idea when PyWin32 will be available for Python 3.x? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Integer arithmetic in hardware descriptions

2009-03-14 Thread John Nagle
casual about integer overflow that nobody cared about this level of correctness. Today, of course, "buffer overflows" are a way of life. This is really off topic for the group. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: PyWin32 for Python 3.x

2009-03-15 Thread John Nagle
Tim Golden wrote: John Nagle wrote: Any idea when PyWin32 will be available for Python 3.x? John Nagle Release 213 is out already: http://sourceforge.net/project/showfiles.php?group_id=78018&package_id=79063&release_id=661475 I think it's still considered

Re: PyWin32 for Python 3.x

2009-03-15 Thread John Nagle
Tim Golden wrote: John Nagle wrote: That "wizard" won't even install unless Python 3.0 is "in the registry", which apparently means "installed as the default Python". No, it just means "installed somewhere". I have 6 different versions of Pyth

Re: PyWin32 for Python 3.x

2009-03-15 Thread John Nagle
Tim Golden wrote: John Nagle wrote: Well, of some other packages I use: MySQLdb: "Python versions 2.3-2.5 are supported." Ref: http://sourceforge.net/projects/mysql-python M2Crypto: Latest version is for Python 2.6. Ref: http://chandlerproject.org/bin/vie

Re: garbage collection / cyclic references

2009-03-21 Thread John Nagle
systems, where you have objects with pointers going in many directions, yet object destruction has substantial side effects. Python originally had only reference counting, and didn't have weak pointers. If weak pointers had gone in before the garbage collector, Python might have gone in this direction. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

RSS feed issues, or how to read each item exactly once

2009-03-21 Thread John Nagle
he higher priority story may disappear from a later feed cycle, and the old story may come back. So you can't actually trust those fields, and have to back them up with checks of your own if you want exactly one copy of each item. It's something that "feedparser" should per

Re: Async serial communication/threads sharing data

2009-03-24 Thread John Nagle
omatic back pressure? Do Linux sockets have back pressure? Yes, and yes. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

<    2   3   4   5   6   7   8   9   10   11   >