Re: attach to process by pid?

2011-03-11 Thread John Nagle
ays to do that, both on the same machine and across a network. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: send function keys to a legacy DOS program

2011-03-19 Thread John Nagle
software emulator for an x86 machine running DOS. So you can go into the emulator and connect to the "keyboard" or "screen" from another program. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: reimport module every n seconds

2011-03-20 Thread John Nagle
"re.compile", not when .pyc files are generated. You can call "re.compile" on strings read from an external source without loading a new module. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib2 - not returning page expected after post

2011-03-23 Thread John Nagle
On 3/23/2011 5:14 AM, David Feyo wrote: I'm trying to automate reverse-ip lookups on domaintools.com. Sign up for their API. They charge the same as for web lookups. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: "in house" pypi?

2011-03-24 Thread John Nagle
roval process, and can be downloaded and installed in a standard way. "easy_install" generally isn't easy. It has some built-in assumptions about where things are stored, assumptions which often don't hold true. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Non-deterministic output

2011-03-29 Thread John Nagle
u're using. If you're stil stuck, give us the list of non-Python modules you're importing, directly or indirectly. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Get USB ID of a serial port through pyserial?

2011-03-30 Thread John Nagle
#x27;s out there. Is there a way to get that info portably? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: ValueError: need more than 2 values to unpack

2011-04-01 Thread John Nagle
t) = errorentry # try to unpack except ValueError as message : # unpack failed raise(ValueError("%s: bogus entry in 'errors': %s" % (message, repr(errorentry ... John Nagl

Re: Python CPU

2011-04-01 Thread John Nagle
xternal devices in Python is useful.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Extracting "true" words

2011-04-01 Thread John Nagle
(See "http://www.dokidoki6.com/00_index1.html";. Caution, excessively cute.) Each ideograph is a "word", of course. Parse this into words: ★12/25/2009★ 6%DOKIDOKI VISUAL FILE vol.4を公開しました。 アルバムの上部で再生操作、下部でサムネイルがご覧いただけます。 John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: a basic bytecode to machine code compiler

2011-04-02 Thread John Nagle
onfiguration. Now freeze the code." At that moment, all the global analysis and compiling takes place. This allows getting rid of the GIL and getting real performance out of multithread CPUs. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CPU

2011-04-03 Thread John Nagle
th the hardware tagging helping with dispatch. But it probably wouldn't help all that much. It didn't in the LISP machines. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CPU

2011-04-03 Thread John Nagle
PU with a separate return point stack with a depth of 20. Big mistake. (All of this is irrelevant to Python, though. Most of Python's speed problems come from spending too much time looking up attributes and functions in dictionaries.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python CPU

2011-04-04 Thread John Nagle
On 4/4/2011 12:47 AM, Gregory Ewing wrote: John Nagle wrote: A tagged machine might make Python faster. You could have unboxed ints and floats, yet still allow values of other types, with the hardware tagging helping with dispatch. But it probably wouldn't help all that much. It didn

Re: is python 3 better than python 2?

2011-04-05 Thread John Nagle
e out of the hundred-odd Unicode character sets is going to be foreign,) and generally internationalized data processing. Well, actually Unicode support went in back around Python 2.4. In 3.x, ASCII strings went away, but that was more of a removal. John

feedparser vs. network errors - something remembers that net was down.

2011-04-07 Thread John Nagle
IOError("of network or news source failure") is raised. Looking in feedeparser.py, "parse" calls "_open_resource", which, after much fooling around, builds a urllib2 request, builds an "opener" via urllib2, and calls its "open" method. So I'm not see

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-10 Thread John Nagle
ork" (if you're on a *nix machine). See http://pythonwise.blogspot.com/2009/04/pmap.html for example ;) Unless you have a performance problem, don't bother with shared memory. If you have a performance problem, Python is probably the wrong tool for the job anyway.

Re: Multiprocessing, shared memory vs. pickled copies

2011-04-11 Thread John Nagle
On 4/10/2011 3:29 PM, sturlamolden wrote: On 10 apr, 18:27, John Nagle wrote: Unless you have a performance problem, don't bother with shared memory. If you have a performance problem, Python is probably the wrong tool for the job anyway. Then why does Python h

Re: Do UART require data structure/format for serial communication?

2011-04-11 Thread John Nagle
either end restarting, and the other end failing to respond. All those things happen frequently with serial ports. What do you want to do? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Postmortem on Unladen Swallow

2011-04-13 Thread John Nagle
There's a postmortem on the failure of Unladen Swallow by one of the developers at: http://qinsb.blogspot.com/2011/03/unladen-swallow-retrospective.html John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Equivalent code to the bool() built-in function

2011-04-18 Thread John Nagle
s a bit array). C, which originally lacked a "bool" type, got it wrong. So did Python. Java is in the middle, with an isolated "boolean" type but a system that allows casts. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Groups in regular expressions don't repeat as expected

2011-04-20 Thread John Nagle
g/library/re.html "If a group is contained in a part of the pattern that matched multiple times, the last match is returned." That's kind of lame, though. I'd expect that there would be some way to retrieve all matches. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Groups in regular expressions don't repeat as expected

2011-04-20 Thread John Nagle
On 4/20/2011 12:23 PM, Neil Cerutti wrote: On 2011-04-20, John Nagle wrote: Here's something that surprised me about Python regular expressions. krex = re.compile(r"^([a-z])+$") s = "abcdef" ms = krex.match(s) ms.groups() ('f',) The parentheses indicate a

Re: dictionary size changed during iteration

2011-04-21 Thread John Nagle
ys() does return a unique list. Each call to "keys()" returns a new list object unconnected to the dictionary from which the keys were extracted. But someone may have decided in a later version to return a generator, as an optimization. Did that happen?

Re: Groups in regular expressions don't repeat as expected

2011-04-24 Thread John Nagle
On 4/21/2011 6:16 AM, Neil Cerutti wrote: On 2011-04-20, John Nagle wrote: Findall does something a bit different. It returns a list of matches of the entire pattern, not repeats of groups within the pattern. Consider a regular expression for matching domain names: kre

Re: strange use of %s

2011-04-25 Thread John Nagle
E with wildcards at the beginning can't use indices. So this is very slow for large tables. Don't worry about having MySQL do the CONCAT. That happens once during query parsing here, because all the arguments to CONCAT are defined in the statement. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Composition instead of inheritance

2011-04-28 Thread John Nagle
uctors and ownership tend not to be too important in Python, because storage management is automatic. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-04 Thread John Nagle
er >>> 1 is (1+1-1) True >>> 10 is (10+1-1) False That's a quirk of CPython's boxed number implementation. All integers are boxed, but there's a set of canned objects for small integers. CPython's range for this is -5 to +256, incidentally. That's visible through the "is" operator. Arguably, it should not be. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: What other languages use the same data model as Python?

2011-05-04 Thread John Nagle
On 5/4/2011 5:46 PM, harrismh777 wrote: John Nagle wrote: Arguably, Python should not allow "is" or "id()" on immutable objects. The programmer shouldn't be able to tell when the system decides to optimize an immutable. "is" is more of a problem than "i

Re: What other languages use the same data model as Python?

2011-05-05 Thread John Nagle
On 5/5/2011 3:06 AM, Gregory Ewing wrote: John Nagle wrote: A reasonable compromise would be that "is" is treated as "==" on immutable objects. That wouldn't work for tuples, which can contain references to other objects that are not immutable. Such tuples are

Re: What other languages use the same data model as Python?

2011-05-05 Thread John Nagle
On 5/5/2011 6:59 AM, Steven D'Aprano wrote: On Thu, 05 May 2011 21:48:20 +1000, Chris Angelico wrote: On Thu, May 5, 2011 at 9:44 PM, Mel wrote: John Nagle wrote: On 5/4/2011 5:46 PM, harrismh777 wrote: Or, as stated earlier, Python should not allow 'is' on immutable ob

Re: Python Developers with 5 years of experience

2011-05-12 Thread John Nagle
58, CGE Colony First Street Tuticorin - 628003 Tamilnadu Phone no: 91 461 4005333 / 3290473 Fax No: 91 461 4001473 Email : cont...@jjcpl.net John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: English Idiom in Unix: Directory Recursively

2011-05-18 Thread John Nagle
folder", or "subdirectory". John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Needed: Real-world examples for Python's Cooperative Multiple Inheritance

2011-05-18 Thread John Nagle
hould not be used in production code. Generalizing multiple inheritance from a tree to a directed acyclic graph is usually a mistake. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: hash values and equality

2011-05-21 Thread John Nagle
of a lack that Python doesn't have user-defined immutable objects. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie question about SQLite + Python and twitter

2011-05-26 Thread John Nagle
writing a spam program for Twitter. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Python's super() considered super!

2011-05-27 Thread John Nagle
lue. That's the kind of thinking which leads to [1,2] * 2 returning [1,2,1,2] John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: GIL in alternative implementations

2011-05-28 Thread John Nagle
ng if there's a pointer to it anywhere. This was all worked out for LISP and SELF decades ago. Python allows patching code while the code is executing. This implies a sizable performance penalty, and causes incredible complexity in PyPy. John Nagle

Re: float("nan") in set or as key

2011-05-28 Thread John Nagle
not (a == b) a != b will always return the same results if exceptions are raised for unordered comparison results. Also, exactly one of a = b a < b a > b is always true - something sorts tend to assume. If you get an unordered comparison exception,

Re: float("nan") in set or as key

2011-05-29 Thread John Nagle
idn't overflow somewhere during the computation. If, within the computation, there are branches based on ordered comparisons, and those don't raise an exception when the comparison result is unordered, you can reach the end of the computation with valid-looking but wrong values.

feedparser hanging after I/O error

2011-06-01 Thread John Nagle
thon 2.6.3.7 (ActiveState) on Linux, on an EeePC 2G Surf. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: float("nan") in set or as key

2011-06-02 Thread John Nagle
st mode"; the latter doesn't support FPU exceptions but does support NaNs. Many game machines and GPUs don't have full IEEE floating point. Some don't have exceptions. Others don't have full INF/NaN semantics. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

py2exe crashes on simple program

2016-07-04 Thread John Nagle
ime.py", line 426, in build_archive assert mod.__file__.endswith(EXTENSION_SUFFIXES[0]) AssertionError Python 3.5.2 / Win7 / AMD64. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: py2exe crashes on simple program

2016-07-05 Thread John Nagle
flow.com/questions/32963057/is-there-a-py2exe-version-thats-compatible-with-python-3-5 cx_freeze has been suggested as an alternative, but its own documents indicate it's only been tested through Python 3.4. Someone reported success with a development version. I guess people don't create Python executables much. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

input vs. readline

2016-07-08 Thread John Nagle
ross-version (Python 2.7, 3.x), and doesn't do "readline" processing? (No, I don't want to use signals, a GUI, etc. This is simulating a serial input device while logging messages appear. It's a debug facility to be able to type input in the console window.) John Nagle -- https://mail.python.org/mailman/listinfo/python-list

SSLsocket.getpeercert - request to return ALL the fields of the certificate.

2014-11-12 Thread John Nagle
me', 'Illinois'),), (('localityName', 'Chicago'),), (('streetAddress', '135 S La Salle St'),), (('organizationName', 'Bank of America Corporation'),), (('organizationalUnitName', 'Network Infrastructure'),), (('commonName', 'www.bankofamerica.com'),)), 'subjectAltName': (('DNS', 'mobile.bankofamerica.com'), ('DNS', 'www.bankofamerica.com')), 'version': 3} How about just returning ALL the remaining fields and finishing the job? Thanks. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Python 2.7.9, 3.4.2 won't verify SSL cert for "verisign.com"

2015-02-16 Thread John Nagle
st Network'),), (('organizationalUnitName', u'(c) 2006 VeriSign, Inc. - For authorized use only'),), (('commonName', u'VeriSign Class 3 Public Primary Certification Authority - G5'),))} Firefox is happy with that cert. The serial number of the root cert

Re: Python 2.7.9, 3.4.2 won't verify SSL cert for "verisign.com"

2015-02-17 Thread John Nagle
#x27;t pass detailed OpenSSL error codes through in exceptions. The Python exception text is "[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581).", which is a generic message for most OpenSSL errors. John Nagle On 2/17/2015 12:00 AM,

Re: Python 2.7.9, 3.4.2 won't verify SSL cert for "verisign.com"

2015-02-17 Thread John Nagle
am: http://www.animats.com/private/sslbug Please try that and let me know what happens on other platforms. Works with Python 2.7.9 or 3.x. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Python FTP timeout value not effective

2013-09-02 Thread John Nagle
ed to be 20 seconds, and I increased it to 60. It didn't help. This isn't an OS problem. The above traceback was on a Linux system. On Windows 7, it fails with "URLError: " But in both cases, the command line FTP client will work, after a consistent 20 second delay before the login prompt. So the Python timeout parameter isn't working. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Applying 4x4 transformation to 3-element vector with numpy

2013-10-08 Thread John Nagle
? John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Applying 4x4 transformation to 3-element vector with numpy

2013-10-08 Thread John Nagle
On 10/8/2013 10:36 PM, Christian Gollwitzer wrote: > Dear John, > > Am 09.10.13 07:28, schrieb John Nagle: >> This is the basic transformation of 3D graphics. Take >> a 3D point, make it 4D by adding a 1 on the end, multiply >> by a transformation matrix to

What version of glibc is Python using?

2013-10-11 Thread John Nagle
2 ('glibc', '2.7') That version of glibc is from October 2007. Where are these ancient versions coming from? They're way out of sync with the GCC version. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: What version of glibc is Python using?

2013-10-12 Thread John Nagle
On 10/11/2013 11:50 PM, Christian Gollwitzer wrote: > Am 12.10.13 08:34, schrieb John Nagle: >> I'm trying to find out which version of glibc Python is using. >> I need a fix that went into glibc 2.10 back in 2009. >> (http://udrepper.livejournal.com/20948.html) >>

Re: What version of glibc is Python using?

2013-10-13 Thread John Nagle
s.python.org/issue928297 The result under GenToo is bogus: http://archives.gentoo.org/gentoo-user/msg_b676eccb5fc00cb051b7423db1b5a9f7.xml There are several programs which fetch this info and display it, or send it in with crash reports, but I haven't found any that actually use the result for anything. I'd suggest deprecating it and documenting that. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: What version of glibc is Python using?

2013-10-13 Thread John Nagle
e that this function has intimate knowledge of how different libc versions add symbols to the executable is probably only usable for executables compiled using gcc" isn't even a sentence. The documentation needs to be updated. Please submit a patch. John

Re: web scraping

2013-10-13 Thread John Nagle
, President or General Manager >> 4. Email address of number 3 above >> 5. Phone number of dealership If you really want that data, and aren't just hacking, buy it. There are data brokers that will sell it to you. D&B, FindTheCompany, Infot, etc. Sounds like you want

Re: Python was designed (was Re: Multi-threading in Python vs Java)

2013-10-14 Thread John Nagle
reter like CPython. These make many compile time optimizations hard. At any time, any thread can monkey-patch any code, object, or variable in any other thread. The ability for anything to use "setattr()" on anything carries a high performance price. That's part of why Unladen Swall

Re: PID tuning.

2013-10-15 Thread John Nagle
; > Is this related to Python? What is “PID tuning”, and what have you > tried already? See "http://sts.bwk.tue.nl/7y500/readers/.%5CInstellingenRegelaars_ExtraStof.pdf"; You might also try the OpenHRP3 forums. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Complex literals (was Re: I am never going to complain about Python again)

2013-10-15 Thread John Nagle
r velocity to get angular position, quaternions are the way to go. If you want to understand all this, there's a good writeup in one of the Graphics Gems books. Unlike complex numbers, these quaternions are always unit vectors. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Front-end to GCC

2013-10-22 Thread John Nagle
calls of "strcmp (x->identifier, "Int")". A performance win over CPython is unlikely. Compare Shed Skin, which tries to infer the type of Python objects so it can generate efficient type-specific C++ code. That's much harder to do, and has trouble with very dynamic code, but what comes out is fast. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Front-end to GCC

2013-10-23 Thread John Nagle
On 10/23/2013 12:25 AM, Philip Herron wrote: > On Wednesday, 23 October 2013 07:48:41 UTC+1, John Nagle wrote: >> On 10/20/2013 3:10 PM, victorgarcia...@gmail.com wrote: >> >>> On Sunday, October 20, 2013 3:56:46 PM UTC-2, Philip Herron >>> wrote: > Nagle re

Re: Global Variable In Multiprocessing

2013-10-23 Thread John Nagle
tent of all messages sent to or from this > e-mail > address. Messages sent to or from this e-mail address may be stored on the > Infosys e-mail system. > ***INFOSYS End of Disclaimer INFOSYS*** Because of the above restriction, we are unable to repl

Re: Python Front-end to GCC

2013-10-26 Thread John Nagle
usually done in debug mode only, and is sometimes causes programs with bugs to behave differently when built in debug vs. release mode. Sigh. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Show off your Python chops and compete with others

2013-11-06 Thread John Nagle
le are at >> different skills. And recruiters use MetaBright to find outrageously skilled >> job candidates. With tracking cookies blocked, you get 0 points. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread John Nagle
e stdin and stdout come from "sys", "sys.stdin.buffer" is valid. That fixes the ""str" does not support the buffer interface error." But now I get the pickle error "Ran out of input" on the process child side. Probably because there's a

Re: Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread John Nagle
On 3/12/2015 2:56 PM, Cameron Simpson wrote: > On 12Mar2015 12:55, John Nagle wrote: >> I have working code from Python 2 which uses "pickle" to talk to a >> subprocess via stdin/stdio. I'm trying to make that work in Python >> 3. First, the subprocess Python

Re: Python3 "pickle" vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-12 Thread John Nagle
On 3/12/2015 5:18 PM, John Nagle wrote: > On 3/12/2015 2:56 PM, Cameron Simpson wrote: >> On 12Mar2015 12:55, John Nagle wrote: >>> I have working code from Python 2 which uses "pickle" to talk to a >>> subprocess via stdin/stdio. I'm trying to make that

Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread John Nagle
sing four library bugs and filing bug reports on all of them. Workarounds are known for two of the problems. I can't deploy the Python 3 version on the servers yet. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread John Nagle
on 3 comes from having to switch packages because the Python 2 package didn't make it to Python 3. All the bugs I'm discussing reflect forced package changes or upgrades. None were voluntary on my part. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2 to 3 conversion - embrace the pain

2015-03-15 Thread John Nagle
On 3/14/2015 1:00 AM, Marko Rauhamaa wrote: > John Nagle : >> I'm approaching the end of converting a large system from Python 2 >> to Python 3. Here's why you don't want to do this. > > A nice report, thanks. Shows that the slowness of Python 3 adoption i

Re: Python 2 to 3 conversion - embrace the pain

2015-03-17 Thread John Nagle
t reproduces the bug on a tiny snippet of HTML, and that's been uploaded to the BS4 issues tracker. I don't have a workaround for that. All this has cost me about two weeks of work so far. The "everything is just fine" comments are not helpful. Denial is not a river in Egypt. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Workaround for BeautifulSoup/HTML5parser bug

2015-03-21 Thread John Nagle
ix the bug. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread John Nagle
but pip3 doesn't know that. There's "wsgiref", which looks more promising, but has a different interface. That's not what the Python documentation recommends as the first choice, but it's a standard module. I keep thinking I'm almost done with Python 3 hell, but

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread John Nagle
On 3/29/2015 1:19 PM, John Nagle wrote: > On 3/29/2015 12:11 PM, Ben Finney wrote: >> John Nagle writes: >> >>> The Python 3 documentation at >>> https://docs.python.org/3/howto/webservers.html >>> >>> recommends "flup" >> >>

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread John Nagle
of which don't work. Incidentally, in my last report, I reported problems with BS4, PyMySQL, and Pickle. I now have workarounds for all of those, but not fixes. The bug reports I listed last time contain the workaround code. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 lack of support for fcgi/wsgi.

2015-03-30 Thread John Nagle
On 3/29/2015 7:11 PM, John Nagle wrote: > Meanwhile, I've found two more variants on "flup" > > https://pypi.python.org/pypi/flipflop > https://pypi.python.org/pypi/flup6 > > All of these are descended from the original "flup" code base

Re: PC locks up with list operations

2011-09-15 Thread John Nagle
ock, and a lock preventing freeing a file cache page is set. Arguably, paging to disk is obsolete. RAM is too cheap and disk is too slow. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Why do closures do this?

2011-09-16 Thread John Nagle
tries not to do that, although there are rare cases when it has to, like this one. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about 'iterable cursors'

2011-11-06 Thread John Nagle
ostgres. If almost all transactions are SELECTs, performance may not be too bad, but if there are INSERT and UPDATE transactions on the same table, performance will be awful. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: all() is slow?

2011-11-09 Thread John Nagle
On 11/7/2011 1:00 PM, OKB (not okblacke) wrote: I noticed this (Python 2.6.5 on Windows XP): CPython is slow. It's a naive interpreter. There's almost no optimization during compilation. Try PyPy or Shed Skin. John Nagle -- http://mail.

MySQLdb for Python 2.7.2 for Windows 32 bit?

2011-12-15 Thread John Nagle
ware and adware has appeared on major sites. CNet was heavily criticized for bundling NMap with adware on "download.com") John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Make a small function thread safe

2011-12-16 Thread John Nagle
run(t): with lock: shared_container.append(t.name <http://t.name>) the `with-statement` will call lock.acquire() and lock.release(). And, importantly, if you leave the "with" via an exception, the lock will be unlocked. John Nagle --

Python install regression test fail

2011-12-17 Thread John Nagle
r the test.) test_site test test_site crashed -- : [Errno 13] Permission denied: '/var/www/vhosts/sitetruth.com/.local' (That looks like a bug in the test suite. It shouldn't be storing into the user's home directory.) John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: python philosophical question - strong vs duck typing

2012-01-08 Thread John Nagle
interpreter, and allows things that are easy for such an implementation but very tough to optimize. An example is the ability to store into the variables of a module from outside it, and even from another thread. Every attempt to get rid of the Global Interpreter Lock has hit that problem. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Error Importing MySQLdb

2012-01-08 Thread John Nagle
/chaos.weblogs.us/archives/327 John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: python philosophical question - strong vs duck typing

2012-01-13 Thread John Nagle
On 1/9/2012 2:45 AM, Robert Kern wrote: On 1/9/12 5:35 AM, John Nagle wrote: Python has some serious problems that preclude optimization. Basically, the language is designed to be run by a naive (non-optimizing) interpreter, and allows things that are easy for such an implementation but very

Installing Python on CentOS 6 - a big pain

2012-01-18 Thread John Nagle
ne operation. Python does not "just work". I should be able to command "yum install python27". (And not clobber the Python 2.6 that comes with CentOS.) This sort of thing is why Python is losing market share. John Nagle -- ht

Please don't use "setuptools", the "rotten .egg" install system.

2012-01-18 Thread John Nagle
-standard, it has to be installed before installing other things. In particular, if you're using somepython setup.py install don't require setuptools. Setuptools isn't doing anything for anybody at that point. "egg" files are usually more trouble than t

Re: Please don't use "setuptools", the "rotten .egg" install system.

2012-01-19 Thread John Nagle
On 1/19/2012 12:56 AM, Lele Gaifax wrote: John Nagle writes: "egg" files are usually more trouble than they're worth. I find it really funny you say so, just after another thread where you proved yourself unable to come up with a working Python environment lacking an already

Unhelpful traceback

2013-03-06 Thread John Nagle
(zipelt.filename,"r") as infd : self.dofilecsv(infile, infd) This works for data records that are pure ASCII, but as soon as some non-ASCII character comes through, it fails. Where is the error being generated? I'm not seeing any place where there's a conversion to ASCII. Not even a print. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Unhelpful traceback

2013-03-07 Thread John Nagle
On 3/7/2013 5:10 AM, Dave Angel wrote: > On 03/07/2013 01:33 AM, John Nagle wrote: >> Here's a traceback that's not helping: >> > > A bit more context would be helpful. Starting with Python version. Sorry, Python 2.7. > > If that isn't enough, t

Re: Unhelpful traceback

2013-03-07 Thread John Nagle
On 3/7/2013 5:10 AM, Dave Angel wrote: > On 03/07/2013 01:33 AM, John Nagle wrote: >> >> "infdraw" is a stream from the zip module, create like this: >> >> with inzip.open(zipelt.filename,"r") as infd : > > You probably nee

Re: Unhelpful traceback

2013-03-07 Thread John Nagle
On 3/7/2013 10:42 AM, John Nagle wrote: > On 3/7/2013 5:10 AM, Dave Angel wrote: >> On 03/07/2013 01:33 AM, John Nagle wrote: >>> Here's a traceback that's not helping: >>> >> >> A bit more context would be helpful. Starting with Python version. &g

Distributing a Python program hell

2013-04-03 Thread John Nagle
.gz file. Then "setup.py install") Download "BaudotRSS" from SourceForge. (ZIP file, put in your chosen directory for this program.) Run: python baudotrss.py --help I'm thinking of switching to Go. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting USB volume serial number from inserted device on OSX

2013-04-04 Thread John Nagle
ng". That would be useful to have as a portable function for all USB devices. Serial port devices are particularly annoying, because their port number is somewhat random when there's more than one, and changes on hot-plugging. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Obtaining SSL certificate info from SSL object - BUG?

2006-10-23 Thread John Nagle
eturn lists, not strings. That would resolve the ambiguity. ASN.1 is a representation for lists, and hammering those lists into strings loses information. Is there a workaround for this? Without rebuilding Python and becoming incompatible? John Nagle Animats -- http://mail.python.org/mailman/listinfo/python-list

Re: Obtaining SSL certificate info from SSL object - BUG?

2006-10-24 Thread John Nagle
Donn Cave wrote: > In article <[EMAIL PROTECTED]>, > John Nagle <[EMAIL PROTECTED]> wrote: > > >> The Python SSL object offers two methods from obtaining >>the info from an SSL certificate, "server()" and "issuer()". >>The actua

Re: Obtaining SSL certificate info from SSL object - BUG?

2006-10-24 Thread John Nagle
Paul Rubin wrote: > John Nagle <[EMAIL PROTECTED]> writes: > >>The reason this now matters is that new "high assurance" certs, >>the ones that tell you how much a site can be trusted, are now being >>deployed, > > > Oh my, I hadn't heard a

Re: Obtaining SSL certificate info from SSL object - BUG?

2006-10-26 Thread John Nagle
Michael Ströder wrote: > John Nagle wrote: > >>The Python SSL object offers two methods from obtaining >>the info from an SSL certificate, "server()" and "issuer()". >>The actual values in the certificate are a series of name/value >>pair

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