Re: [RELEASED] Python 2.7.5

2013-06-03 Thread John Nagle
language, with different libraries, and lots of things that still don't work. Many old applications will never be converted. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Why has python3 been created as a seperate language where there is still python2.7 ?

2012-06-26 Thread John Nagle
st has some users. OurSQL has a different API than MySQLdb, and isn't quite ready for prime time yet. That's why I'm still on Python 2.7. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: PySerial could not open port COM4: [Error 5] Access is denied - please help

2012-06-26 Thread John Nagle
e four serial ports. Is some device emulating a serial port? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: when "normal" parallel computations in CPython will be implemented at last?

2012-07-02 Thread John Nagle
ct only at well-defined points. That's un-Pythonic. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: simpler increment of time values?

2012-07-05 Thread John Nagle
. Adding a datetime.time to a datetime.timedelta isn't that useful. It would have to return a value error if the result crossed a day boundary. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Socket code not executing properly in a thread (Windows)

2012-07-07 Thread John Nagle
the last one. Google Voice isn't a very good SMS gateway. I used to use it, but switched to Twilio (which costs, but works) two years ago. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: How to safely maintain a status file

2012-07-09 Thread John Nagle
all the crawler processes lose their database connections, abort, and are restarted. This allows multiple servers to coordinate through one database. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Implicit conversion to boolean in if and while statements

2012-07-17 Thread John Nagle
the same problem, for exactly the same reason - boolean types were an afterthought there, too. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: On-topic: alternate Python implementations

2012-08-06 Thread John Nagle
en code does something unexpected to other code, the backup interpreter is used to get control out of the trouble spot so that the JIT compiler can then recompile the code. (I think; I've read the paper but haven't looked at the internals.) This is hard to implement and hard to get right. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: python 6 compilation failure on RHEL

2012-08-20 Thread John Nagle
t ought to help. You might be better off building Python 2.7, but you asked about 2.6. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Parsing ISO date/time strings - where did the parser go?

2012-09-06 Thread John Nagle
pages/pdate says: "Unfortunately there is no easy way to parse full ISO 8601 dates using the Python standard library." It looks like this was taken out of "xml" at some point, but not moved into "datetime". John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Parsing ISO date/time strings - where did the parser go?

2012-09-06 Thread John Nagle
On 9/6/2012 12:51 PM, Paul Rubin wrote: > John Nagle writes: >> There's an iso8601 module on PyPi, but it's abandoned; it hasn't been >> updated since 2007 and has many outstanding issues. > > Hmm, I have some code that uses ISO date/time strings and just c

Re: Parsing ISO date/time strings - where did the parser go?

2012-09-08 Thread John Nagle
On 9/8/2012 5:20 PM, John Gleeson wrote: > > On 2012-09-06, at 2:34 PM, John Nagle wrote: >> Yes, it should. There's no shortage of implementations. >> PyPi has four. Each has some defect. >> >> PyPi offers: >> >> iso8601 0.1.4 Simpl

Re: search google with python

2012-01-25 Thread John Nagle
s an API, but you have to ask to use it. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Where to put data

2012-01-27 Thread John Nagle
ve some modules which contain nothing but big constants, written by a program in Python format. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Killing threads, and os.system()

2012-02-03 Thread John Nagle
e of subprocesses where, in other languages, you'd use threads. Of course, you load a new copy of the interpreter in each thread, so this bloats memory usage. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: MySQLdb not allowing hyphen

2012-02-08 Thread John Nagle
You are doing it wrong. Do NOT use the "%" operator when putting SQL queries together. Let "cursor.execute" fill them in. It knows how to escape special characters in the input fields, which will fix your bug and prevent SQL injection. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: changing sys.path

2012-02-08 Thread John Nagle
t sys first. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Common LISP-style closures with Python

2012-02-09 Thread John Nagle
;s new language. Rust doesn't have the "spaghetti stack" needed to implement closures, so it has more limited closure semantics. It's more like some of the C add-ons for closures, but sounder. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: frozendict

2012-02-10 Thread John Nagle
antics. They've made some progress. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: frozendict

2012-02-13 Thread John Nagle
On 2/10/2012 9:52 PM, 8 Dihedral wrote: 在 2012年2月11日星期六UTC+8上午2时57分34秒,John Nagle写道: On 2/10/2012 10:14 AM, Nathan Rice wrote: Lets also not forget that knowing an object is immutable lets you do a lot of optimizations; it can be inlined, it is safe to convert to a contiguous block of

Re: Looking for PyPi 2.0...

2012-02-15 Thread John Nagle
is just a collection of links). They have packaging standards (PyPi does not.) CPAN tends not to be full of low-quality modules that do roughly the same thing. If you want to find a Python module, Google is more useful than PyPi. John Nagle -- http

Re: Script randomly exits for seemingly no reason with strange traceback

2012-02-15 Thread John Nagle
t the error message you're getting. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

"Decoding unicode is not supported" in unusual situation

2012-03-07 Thread John Nagle
n the WSDL is provided without class generation." I think that somewhere in "suds", they subclass the "unicode" type. That's almost too cute. The proper test is isinstance(s,unicode) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "Decoding unicode is not supported" in unusual situation

2012-03-07 Thread John Nagle
de", or catch the undocumented TypeError exception afterward. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "Decoding unicode is not supported" in unusual situation

2012-03-08 Thread John Nagle
s is all different in Python 3.x, where "str" is Unicode and "bytes" really are a distinct type. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

PyUSB available for current versions of Windows?

2012-03-09 Thread John Nagle
es before installing." Does this include the keyboard and mouse? They also warn "The device driver can not be easily removed from the system." John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "Decoding unicode is not supported" in unusual situation

2012-03-09 Thread John Nagle
" of "bytes" should require an encoding. But because of the bytes/str ambiguity in Python 2.6/2.7, the behavior couldn't be type-based. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "Decoding unicode is not supported" in unusual situation

2012-03-10 Thread John Nagle
On 3/9/2012 4:57 PM, Steven D'Aprano wrote: On Fri, 09 Mar 2012 10:11:58 -0800, John Nagle wrote: This demonstrates a gross confusion about both Unicode and Python. John, I honestly don't mean to be rude here, but if you actually believe that (rather than merely expressing yourself poo

html5lib not thread safe. Is the Python SAX library thread-safe?

2012-03-11 Thread John Nagle
that. But html5lib calls the XML SAX parser. Is that thread-safe? Or is there more trouble down at the bottom? (I run a multi-threaded web crawler, and currently use BeautifulSoup, which is thread safe, although dated. I'm looking at converting to html5lib.)

Re: html5lib not thread safe. Is the Python SAX library thread-safe?

2012-03-11 Thread John Nagle
On 3/11/2012 2:45 PM, Cameron Simpson wrote: On 11Mar2012 13:30, John Nagle wrote: | "html5lib" is apparently not thread safe. | (see "http://code.google.com/p/html5lib/issues/detail?id=189";) | Looking at the code, I've only found about three problems. | They'

Re: html5lib not thread safe. Is the Python SAX library thread-safe?

2012-03-12 Thread John Nagle
On 3/12/2012 3:05 AM, Stefan Behnel wrote: John Nagle, 11.03.2012 21:30: "html5lib" is apparently not thread safe. (see "http://code.google.com/p/html5lib/issues/detail?id=189";) Looking at the code, I've only found about three problems. They're all the usu

Re: are int, float, long, double, side-effects of computer engineering?

2012-03-13 Thread John Nagle
ot;http://www.youtube.com/watch?v=5lHqEwk7YHs";) (A test with a heavy object: "http://www.youtube.com/watch?v=-DaWIHc1VLY";. Most physics engines don't do heavy objects well. Everything looks too light. We call this the "boink problem.") John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Enchancement suggestion for argparse: intuit type from default

2012-03-14 Thread John Nagle
;, type=int, default=100) Does this seem like a reasonable enhancement to argparse? default=None presents some problems. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Does anyone actually use PyPy in production?

2012-03-16 Thread John Nagle
Does anyone run PyPy in production? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

2012-03-17 Thread John Nagle
can create a dict full of function names and lambdas, but it's clunky looking. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib.urlretrieve never returns???

2012-03-20 Thread John Nagle
to negotiate a SSL connection results in the SSL protocol reaching a point where the host end is supposed to finish the handshake, but it doesn't. The odds are against this being the problem. I see problems like that in maybe 1 in 100,000 URLs. John Nag

Re: Fetching data from a HTML file

2012-03-24 Thread John Nagle
On 3/23/2012 10:12 PM, Jon Clements wrote: ROBOT Framework Would people please stop using robotic names for things that aren't robots? Thank you. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "convert" string to bytes without changing data (encoding)

2012-03-28 Thread John Nagle
h the ascii portions and keep anything else unchanged. So why let the data get into a "str" type at all? Do everything end to end with "bytes" or "bytearray" types. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Will MySQL ever be supported for Python 3.x?

2012-03-30 Thread John Nagle
from other sources. (http://www.lfd.uci.edu/~gohlke/pythonlibs/) But those are just blind builds; they haven't been debugged. MySQL Connector (http://forge.mysql.com/projects/project.php?id=302) is still pre-alpha. John Nagle -- http://mail.python.org/ma

Re: Will MySQL ever be supported for Python 3.x?

2012-03-30 Thread John Nagle
, with the parameters expressed differently. It's a good approach, but very incompatible. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

getaddrinfo NXDOMAIN exploit - please test on CentOS 6 64-bit

2012-03-31 Thread John Nagle
set up their DNS to exploit this. And, of course, it has nothing to do with browser toolbars. This is at a much lower level. If you can make this happen, report back the CentOS version and the library version, please. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: getaddrinfo NXDOMAIN exploit - please test on CentOS 6 64-bit

2012-03-31 Thread John Nagle
On 3/31/2012 9:26 PM, Owen Jacobson wrote: On 2012-03-31 22:58:45 +, John Nagle said: Some versions of CentOS 6 seem to have a potential getaddrinfo exploit. See To test, try this from a command line: ping example If it fails, good. If it returns pings from "example.com"

Re: [OT] getaddrinfo NXDOMAIN exploit - please test on CentOS 6 64-bit

2012-04-01 Thread John Nagle
On 4/1/2012 9:26 AM, Michael Torrie wrote: On 03/31/2012 04:58 PM, John Nagle wrote: If you can make this happen, report back the CentOS version and the library version, please. CentOS release 6.2 (Final) glibc-2.12-1.47.el6_2.9.x86_64 example does not ping example.com does not resolve to

Re: Will MySQL ever be supported for Python 3.x?

2012-04-01 Thread John Nagle
On 3/31/2012 10:54 PM, Tim Roberts wrote: John Nagle wrote: On 3/30/2012 2:32 PM, Irmen de Jong wrote: Try Oursql instead http://packages.python.org/oursql/ "oursql is a new set of MySQL bindings for python 2.4+, including python 3.x" Not even close to being compatible wit

Re: getaddrinfo NXDOMAIN exploit - please test on CentOS 6 64-bit

2012-04-02 Thread John Nagle
On 4/1/2012 1:41 PM, John Nagle wrote: On 4/1/2012 9:26 AM, Michael Torrie wrote: On 03/31/2012 04:58 PM, John Nagle wrote: Removed all "search" and "domain" entries from /etc/resolve.conf It's a design bug in glibc. I just submitted a bug report. http:

Re: Best way to structure data for efficient searching

2012-04-03 Thread John Nagle
ed on the index sizes, how to do the join. All of these approaches are roughly O(N log N), which beats the O(N^2) approach you have now. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: getaddrinfo NXDOMAIN exploit - please test on CentOS 6 64-bit

2012-04-04 Thread John Nagle
On 4/2/2012 6:53 PM, John Nagle wrote: On 4/1/2012 1:41 PM, John Nagle wrote: On 4/1/2012 9:26 AM, Michael Torrie wrote: On 03/31/2012 04:58 PM, John Nagle wrote: Removed all "search" and "domain" entries from /etc/resolve.conf It's a design bug in glibc. I ju

Re: Python Gotcha's?

2012-04-07 Thread John Nagle
ion. This can stall servers. 9. Some libraries aren't thread-safe. Guess which ones. 10. Python 3 isn't upward compatible with Python 2. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Gotcha's?

2012-04-08 Thread John Nagle
is method to support more appropriate behavior if needed." A related "gotcha" is knowing that "urllib" sucks and you should use "urllib2". John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Donald E. Knuth in Python, cont'd

2012-04-11 Thread John Nagle
t on the EDVAC", for background on how things work down at the bottom. But they're no longer essential desk references for most programmers. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: python module development workflow

2012-04-12 Thread John Nagle
works. Don't use the "rotten egg" distribution system. (http://packages.python.org/distribute/easy_install.html) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Deep merge two dicts?

2012-04-12 Thread John Nagle
On 4/12/2012 10:41 AM, Roy Smith wrote: Is there a simple way to deep merge two dicts? I'm looking for Perl's Hash::Merge (http://search.cpan.org/~dmuey/Hash-Merge-0.12/Merge.pm) in Python. def dmerge(a, b) : for k in a : v = a[k] if isinstance(v, dict) and k in b:

Re: why () is () and [] is [] work in other way?

2012-04-22 Thread John Nagle
s, like "None". You can't assign to None, but you can assign to True, usually with unwanted results. It's not clear why True and False weren't locked down when None was.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: global vars across modules

2012-04-22 Thread John Nagle
ings in everything in the other module, which often results in a name clash. Just do import file_1 and, if desired localnamefora = file_1.a John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: why () is () and [] is [] work in other way?

2012-04-22 Thread John Nagle
On 4/22/2012 3:17 PM, John Roth wrote: On Sunday, April 22, 2012 1:43:36 PM UTC-6, John Nagle wrote: On 4/20/2012 9:34 PM, john.tant...@gmail.com wrote: On Friday, April 20, 2012 12:34:46 PM UTC-7, Rotwang wrote: I believe it says somewhere in the Python docs that it's undefine

Re: why () is () and [] is [] work in other way?

2012-04-23 Thread John Nagle
On 4/22/2012 9:34 PM, Steven D'Aprano wrote: On Sun, 22 Apr 2012 12:43:36 -0700, John Nagle wrote: On 4/20/2012 9:34 PM, john.tant...@gmail.com wrote: On Friday, April 20, 2012 12:34:46 PM UTC-7, Rotwang wrote: I believe it says somewhere in the Python docs that it's und

Re: why () is () and [] is [] work in other way?

2012-04-25 Thread John Nagle
t; have to force the creation of a temporary boxed object? The concept of "object" vs. the implementation of objects is one reason you don't necessarily want to expose the implementation. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: why () is () and [] is [] work in other way?

2012-04-26 Thread John Nagle
On 4/26/2012 4:45 AM, Adam Skutt wrote: On Apr 26, 1:48 am, John Nagle wrote: On 4/25/2012 5:01 PM, Steven D'Aprano wrote: On Wed, 25 Apr 2012 13:49:24 -0700, Adam Skutt wrote: Though, maybe it's better to use a different keyword than 'is' though, due to the plain Eng

CPython thread starvation

2012-04-27 Thread John Nagle
re copies of the Python interpreter. The threads are usually I/O bound, but when they hit unusually long web pages, they go compute-bound during parsing.) Setting "sys.setcheckinterval" from the default to 1 seems to have little effect. This is on Windows 7.

Re: CPython thread starvation

2012-04-27 Thread John Nagle
On 4/27/2012 6:25 PM, Adam Skutt wrote: On Apr 27, 2:54 pm, John Nagle wrote: I have a multi-threaded CPython program, which has up to four threads. One thread is simply a wait loop monitoring the other three and waiting for them to finish, so it can give them more work to do. When the

Re: CPython thread starvation

2012-04-27 Thread John Nagle
On 4/27/2012 9:20 PM, Paul Rubin wrote: John Nagle writes: The code that stored them looked them up with "getaddrinfo()", and did this while a lock was set. Don't do that!! Added a local cache in the program to prevent this. Performance much improved. Better to r

Re: CPython thread starvation

2012-04-27 Thread John Nagle
On 4/27/2012 9:55 PM, Paul Rubin wrote: John Nagle writes: I may do that to prevent the stall. But the real problem was all those DNS requests. Parallizing them wouldn't help much when it took hours to grind through them all. True dat. But building a DNS cache into the applic

Re: CPython thread starvation

2012-04-29 Thread John Nagle
ot;Know who you're dealing with" system, SiteTruth.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: why () is () and [] is [] work in other way?

2012-04-29 Thread John Nagle
r than Ada, which requires it, few languages handle such exceptions as language level exceptions. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a directory structure and modifying files automatically in Python

2012-04-30 Thread John Nagle
data storage. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python SOAP library

2012-05-02 Thread John Nagle
edorahosted.org/suds/ John Nagle -- http://mail.python.org/mailman/listinfo/python-list

"

2012-05-03 Thread John Nagle
An HTML page for a major site (http://www.chase.com) has some incorrect HTML. It contains

Re: key/value store optimized for disk storage

2012-05-06 Thread John Nagle
That's awful. There's no point in compressing six characters with zlib. Zlib has a minimum overhead of 11 bytes. You just made the data bigger. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a directory structure and modifying files automatically in Python

2012-05-07 Thread John Nagle
system for a million item db is ridiculous even for prototyping. Right. Steve Bellovin wrote that back when UNIX didn't have any database programs, let alone free ones. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a directory structure and modifying files automatically in Python

2012-05-07 Thread John Nagle
On 5/7/2012 9:09 PM, Steve Howell wrote: On May 7, 8:46 pm, John Nagle wrote: On 5/6/2012 9:59 PM, Paul Rubin wrote: Javierwrites: Or not... Using directories may be a way to do rapid prototyping, and check quickly how things are going internally, without needing to resort to complex

Re: serial module

2012-05-22 Thread John Nagle
9,200 baud is enough for you, don't worry about it. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: serial module

2012-05-22 Thread John Nagle
On 5/22/2012 2:07 PM, Paul Rubin wrote: John Nagle writes: If a device is registered as /dev/ttyUSBnn, one would hope that the Linux USB insertion event handler, which assigns that name, determined that the device was a serial port emulator. Unfortunately, the USB standard device classes

Re: escaping/encoding/formatting in python

2012-05-23 Thread John Nagle
ase of the first. For a quoted alternative to regular expression syntax, see SNOBOL or Icon. SNOBOL allows naming patterns, and those patterns can then be used as components of other patterns. SNOBOL is obsolete, but that approach produced much more readable code.

Re: Email Id Verification

2012-05-24 Thread John Nagle
It matches anything that looks like a mail user name followed by an @ followed by anything that looks more or less like a domain name. The domain name must contain at least one ".", and cannot end with a ".", which is not strictly correct but usually works.

Re: sqlite INSERT performance

2012-05-30 Thread John Nagle
able, you may be approaching the problem incorrectly. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Internationalized domain names not working with URLopen

2012-06-12 Thread John Nagle
ters in position 0-5: ordinal not in range(128) >>> The HTTP library is trying to put the URL in the header as ASCII. Why isn't "urllib2" handling that? What does "urllib2" want? Percent escapes? Punycode? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Internationalized domain names not working with URLopen

2012-06-13 Thread John Nagle
On 6/12/2012 11:42 PM, Andrew Berg wrote: On 6/13/2012 1:17 AM, John Nagle wrote: What does "urllib2" want? Percent escapes? Punycode? Looks like Punycode is the correct answer: https://en.wikipedia.org/wiki/Internationalized_domain_name#ToASCII_and_ToUnicode I haven't t

Re: feedparser hanging after I/O error

2011-06-03 Thread John Nagle
On 6/2/2011 4:40 AM, xDog Walker wrote: On Wednesday 2011 June 01 10:34, John Nagle wrote: I have a program which uses "feedparser". It occasionally hangs when the network connection has been lost, and remains hung after the network connection is restored. My solution is to downloa

Re: Function declarations ?

2011-06-13 Thread John Nagle
that's what "hoisted" means in this context.. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: those darn exceptions

2011-06-27 Thread John Nagle
hich usually should cause termination or fairly drastic recovery action) and normal external events (which have to be routinely handled.) It's quite possible to get a OSError on "os.kill()" for a number of legitimate reasons. The target process may have exited since the PID was obtai

Re: How to import data from MySQL db into excel sheet

2011-06-30 Thread John Nagle
s not necessary. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: What Programing Language are the Largest Website Written In?

2011-07-22 Thread John Nagle
efore Google bought it, was in Python. But it's since been rewritten. All the stuff that actually handles video is, of course in C/C++. The load of handling the video dwarfs the user interface load. Wikipedia is indeed written in PHP. John Nagle --

Re: Is there a way to customise math.sqrt(x) for some x?

2011-07-23 Thread John Nagle
"if" is un-Pythonic. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: I am fed up with Python GUI toolkits...

2011-07-24 Thread John Nagle
ernal dependencies, though (different dependencies for each platform, so it requires a lot to be cross-platform). It still uses Tcl/Tk stuff, which is un-Pythonic. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Complex sort on big files

2011-08-09 Thread John Nagle
al product) but few people need them. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: 'Use-Once' Variables and Linear Objects

2011-08-12 Thread John Nagle
his is mostly a curiosity. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: try... except with unknown error types

2011-08-20 Thread John Nagle
re program bugs, like references to undefined class members. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Error when deleting and reimporting subpackages

2011-08-22 Thread John Nagle
because the nose testing framework does exactly this kind of thing when loading test modules, causing some very confusing errors and failures. Is this behavior expected? It's undefined behavior. You're dealing with CPython implementation semantics, not Python language semantics.

Re: try... except with unknown error types

2011-08-31 Thread John Nagle
27;s also possible to get UnicodeError from URL operations. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

SSL module needs issuer information

2011-09-03 Thread John Nagle
With the latest flaps about phony cert issuers, it's worth having issuer info available. It was available in the old M2Crypto module, but not in the current Python SSL module. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Did MySQL support ever make it to Python 3.x?

2011-03-01 Thread John Nagle
t's not being used heavily yet, and users are reporting bugs like "broken pipe" errors. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: how to read the last line of a huge file???

2011-03-05 Thread John Nagle
or CR, both of which are the same in ASCII and UTF-8. Copy the bytes forward from that point into an array of bytes, then apply the appropriate codec. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Extending dict (dict's) to allow for multidimensional dictionary

2011-03-05 Thread John Nagle
yway? You can use a tuple as a subscript: d[1,'abc',40] = 'dummy' Also, at some point, it's time to use a database. If you find yourself writing those "dictionaries" to files, or trying to look up everything with "abc" in the second subscript,

Re: having both dynamic and static variables

2011-03-05 Thread John Nagle
ng, hoisting out of loops, compile time arithmetic, unboxing, etc. Ordinarily, Python compilers have to assume that any variable can be changed at any time from another thread, requiring worst-case code for everything. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: having both dynamic and static variables

2011-03-05 Thread John Nagle
ither inefficient, with a lookup for every use (CPython) or really, really complicated, involving just-in-time compilers, invalidation, recompilation, and a backup interpreter for when things get ugly (PyPy). John Nagle -- http://mail.python.org/mailman/listinfo/p

Re: multiprocessing module in async db query

2011-03-08 Thread John Nagle
t;Streaming" out to a network connection while still reading from the database is undesirable. If you're doing really big SELECTs, consider using LIMIT and OFFSET in SQL to break them up into smaller bites. Especially if the user is paging through the results.

Re: Passing Functions

2011-03-11 Thread John Nagle
variables. You need class Node: def __init__(self) : self.distFromSource = infinity self.previous = invalid_node self.visited = False John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Compile time evaluation of dictionaries

2011-03-11 Thread John Nagle
CPython barely evaluates anything at compile time. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating a very simple revision system for photos in python

2011-03-11 Thread John Nagle
e owner of those files. You need to say what goes into a build of a game, or a revision of a manufactured product. You also need really good tools to show the differences between revisions. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

  1   2   3   4   5   6   7   8   9   10   >