Re: What extended ASCII character set uses 0x9D?

2017-08-18 Thread John Nagle
On 08/17/2017 05:53 PM, Chris Angelico wrote: On Fri, Aug 18, 2017 at 10:30 AM, John Nagle <na...@animats.com> wrote: On 08/17/2017 05:14 PM, John Nagle wrote: I'm cleaning up some data which has text description fields from multiple sources. A few more cases: bytearray(b'\xe5\x8

Re: What extended ASCII character set uses 0x9D?

2017-08-18 Thread John Nagle
e lower casing algorithm, that's a reasonable assumption. Thanks for looking at this, everyone. If a string won't parse as either UTF-8 or Windows-1252, I'm just going to convert the bogus stuff to the Unicode replacement character. I might remove 0x9d chars, since that never seems to affect r

Re: What extended ASCII character set uses 0x9D?

2017-08-17 Thread John Nagle
On 08/17/2017 05:53 PM, Chris Angelico wrote:> On Fri, Aug 18, 2017 at 10:30 AM, John Nagle <na...@animats.com> wrote: >> On 08/17/2017 05:14 PM, John Nagle wrote: >>> I'm cleaning up some data which has text description fields from >>> mult

Re: What extended ASCII character set uses 0x9D?

2017-08-17 Thread John Nagle
On 08/17/2017 05:14 PM, John Nagle wrote: > I'm cleaning up some data which has text description fields from > multiple sources. A few more cases: bytearray(b'miguel \xe3\x81ngel santos') bytearray(b'lidija kmeti\xe4\x8d') bytearray(b'\xe5\x81ukasz zmywaczyk') bytearray(b'M\x81\x81\xf

What extended ASCII character set uses 0x9D?

2017-08-17 Thread John Nagle
a\\"\x9d Each time' That just converts 0x9d in the input to 0x9d in Unicode. That's "Operating System Command" (the "Windows" key?) That's clearly wrong; some kind of quote was intended. Any ideas? John Nagle -- https://mail.python.org/mailman/listinfo/python-list

[issue24954] No way to generate or parse timezone as produced by datetime.isoformat()

2017-07-27 Thread John Nagle
John Nagle added the comment: As the original author of the predecessor bug report (issue 15873) in 2012, I would suggest that there's too much bikeshedding here. I filed this bug because there was no usable ISO8601 date parser available. PyPi contained four slightly different buggy ones

Unicode support in Python 2.7.8 - 16 bit

2017-03-07 Thread John Nagle
rejects "u" Unicode string constants and has other problems in the MySQL area.) John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Who still supports recent Python on shared hosting

2017-03-05 Thread John Nagle
I have to sysadmin, just a small shared hosting account. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

[issue28756] robotfileparser always uses default Python user-agent

2016-11-20 Thread John Nagle
John Nagle added the comment: (That's from a subclass I wrote. As a change to RobotFileParser, __init__ should start like this.) def __init__(self, url='', user_agent=None): self.user_agent = user_agent# save user agent

[issue28756] robotfileparser always uses default Python user-agent

2016-11-20 Thread John Nagle
John Nagle added the comment: Suggest adding a user_agent optional parameter, as shown here: def __init__(self, url='', user_agent=None): urllib.robotparser.RobotFileParser.__init__(self, url) # init parent self.user_agent = user_agent# save user agent

[issue28756] robotfileparser always uses default Python user-agent

2016-11-20 Thread John Nagle
New submission from John Nagle: urllib.robotparser.RobotFileParser always uses the default Python user agent. This agent is now blacklisted by many sites, and it's not possible to read the robots.txt file at all. -- components: Library (Lib) messages: 281314 nosy: nagle priority

input vs. readline

2016-07-08 Thread John Nagle
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

Re: py2exe crashes on simple program

2016-07-05 Thread John Nagle
on-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

py2exe crashes on simple program

2016-07-04 Thread John Nagle
ld_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

[issue27065] robotparser user agent considered hostile by mod_security rules.

2016-05-19 Thread John Nagle
New submission from John Nagle: "robotparser" uses the default Python user agent when reading the "robots.txt" file, and there's no parameter for changing that. Unfortunately, the "mod_security" add-on for Apache web server, when used with the standard OWASP ru

[issue24985] Python install test fails - OpenSSL - "dh key too small"

2015-09-02 Thread John Nagle
New submission from John Nagle: Installing Python 3.4.3 on a new CentOS Linux release 7.1.1503 server. Started with source tarball, did usual ./configure; make; make test SSL test fails with "dh key too small". See below. OpenSSL has recently been modified to reject short

[issue23843] ssl.wrap_socket doesn't handle virtual TLS hosts

2015-04-02 Thread John Nagle
John Nagle added the comment: I'm using wrap_socket because I want to read the details of a server's SSL certificate. Starting from Python 3.2, it can be more flexible to use SSLContext.wrap_socket() instead does not convey that ssl.wrap_socket() will fail to connect to some servers

[issue23843] ssl.wrap_socket doesn't handle virtual TLS hosts

2015-04-01 Thread John Nagle
New submission from John Nagle: ssl.wrap_socket() always uses the SSL certificate associated with the raw IP address, rather than using the server_host feature of TLS. Even when wrap_socket is used before calling connect(port, host), the host parameter isn't used by TLS. To get proper TLS

[issue23588] Errno conflicts in ssl.SSLError

2015-04-01 Thread John Nagle
John Nagle added the comment: If SSL error reporting is getting some attention, something should be done to provide better text messages for the SSL errors. All certificate verify exceptions return the string certificate verify failed (_ssl.c:581). The line number in _ssl.c

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. PyPi also has fcgi-python (Python 2.6

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

2015-03-29 Thread John Nagle
. 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

Python 3 lack of support for fcgi/wsgi.

2015-03-29 Thread John Nagle
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 then I get screwed by Python 3 again. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

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 na...@animats.com writes: The Python 3 documentation at https://docs.python.org/3/howto/webservers.html recommends flup I disagree. In a section where it describes FastCGI, it presents a tiny

Workaround for BeautifulSoup/HTML5parser bug

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

[issue23736] make test on clean py3 install on CentOS 6.2 - 2 tests fail

2015-03-21 Thread John Nagle
New submission from John Nagle: Installing Python 3.4.2 on CentOS 6. Clean install. Using procedure in README file: ./configure make make test 2 tests fail in make test The first one is because the FTP client test is trying to test against a site that is long gone, the Digital Equipment

Re: Python 2 to 3 conversion - embrace the pain

2015-03-18 Thread John Nagle
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

[issue23655] Memory corruption using pickle over pipe to subprocess

2015-03-15 Thread John Nagle
John Nagle added the comment: More info: the problem is on the unpickle side. If I use _Unpickle and Pickle, so the unpickle side is in Python, but the pickle side is in C, no problem. If I use Unpickle and _Pickle, so the unpickle side is C, crashes

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 na...@animats.com: 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 is not only social inertia

Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread John Nagle
. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

[issue23655] Memory corruption using pickle over pipe to subprocess

2015-03-13 Thread John Nagle
John Nagle added the comment: minimize you data - that's a big job here. Where are the tests for pickle? Is there one that talks to a subprocess over a pipe? Maybe I can adapt that. -- ___ Python tracker rep...@bugs.python.org http

[issue23655] Memory corruption using pickle over pipe to subprocess

2015-03-13 Thread John Nagle
John Nagle added the comment: Or just use pickle._Pickler instead of pickle.Pickler and like (implementation detail!). Tried that. Changed my own code as follows: 25a26 71,72c72,73 self.reader = pickle.Unpickler(self.proc.stdout)# set up reader self.writer

Re: Python 2 to 3 conversion - embrace the pain

2015-03-13 Thread John Nagle
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: Python3 pickle vs. stdin/stdout - unable to get clean byte streams in Python 3

2015-03-13 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 na...@animats.com 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. I'm starting

[issue23655] Memory corruption using pickle over pipe to subprocess

2015-03-13 Thread John Nagle
New submission from John Nagle: I'm porting a large, working system from Python 2 to Python 3, using six, so the same code works with both. One part of the system works a lot like the multiprocessing module, but predates it. It launches child processes with Popen and talks to them using

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

2015-03-12 Thread John Nagle
interface error. But now I get the pickle error Ran out of input on the process child side. Probably because there's a str/bytes incompatibility somewhere. So how do I get clean binary byte streams between parent and child process? John Nagle -- https://mail.python.org

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 na...@animats.com 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 is invoked with the -d

[issue9679] unicode DNS names in urllib, urlopen

2015-03-06 Thread John Nagle
John Nagle added the comment: Three years later, I'm converting to Python 3. Did this get fixed in Python 3? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9679

[issue23476] SSL cert verify fail for www.verisign.com

2015-03-05 Thread John Nagle
John Nagle added the comment: Will this be applied to the Python 2.7.9 library as well? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23476

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-20 Thread John Nagle
John Nagle added the comment: The fix in Ubuntu was to the Ubuntu certificate store, which is a directory tree with one cert per file, with lots of symbolic links with names based on hashes to express dependencies. Python's SSL isn't using that. Python is taking in one big text file of SSL

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-17 Thread John Nagle
John Nagle added the comment: Add cert file for testing. Source of this file is http://curl.haxx.se/ca/cacert.pem -- Added file: http://bugs.python.org/file38166/cacert.pem ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23476

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

2015-02-17 Thread John Nagle
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, Laura Creighton wrote: I've seen something like this: The requests module http://docs.python

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

2015-02-17 Thread John Nagle
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

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-17 Thread John Nagle
John Nagle added the comment: To try this with the OpenSSL command line client, use this shell command: openssl s_client -connect www.verisign.com:443 -CAfile cacert.pem This provides more detailed error messages than Python provides. verify error:num=20:unable to get local issuer

[issue23476] SSL cert verify fail for www.verisign.com

2015-02-17 Thread John Nagle
New submission from John Nagle: SSL certificate verification fails for www.verisign.com when using the cert list from Firefox. Other sites (google.com, python.org) verify fine. This may be related to a known, and fixed, OpenSSL bug. See: http://rt.openssl.org/Ticket/Display.html?id=2732user

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

2015-02-16 Thread John Nagle
ssl.OPENSSL_VERSION from Python, I get OpenSSL 1.0.1j 15 Oct 2014. That's an OK version. Something about that cert is unacceptable to the Python SSL module, but what? CERTIFICATE VERIFY FAILED doesn't tell me enough to diagnose the problem. John Nagle -- https://mail.python.org

[issue20916] ssl.enum_certificates() will not return all certificates trusted by Windows

2015-02-11 Thread John Nagle
John Nagle added the comment: Amusingly, I'm getting this failure on verisign.com on Windows 7 with Python 2.7.9: HTTP error - [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)..) The current Verisign root cert (Class 3 public) is, indeed, not in the Windows 7 cert

[issue22873] Re: SSLsocket.getpeercert - return ALL the fields of the certificate.

2014-11-14 Thread John Nagle
New submission from John Nagle: In each revision of getpeercert, a few more fields are returned. Python 3.2 added issuer and notBefore. Python 3.4 added crlDistributionPoints, caIssuers, and OCSP URLS. But some fields still aren't returned. I happen to need CertificatePolicies, which is how

[issue22873] Re: SSLsocket.getpeercert - return ALL the fields of the certificate.

2014-11-14 Thread John Nagle
John Nagle added the comment: May be a duplicate of Issue 204679: ssl.getpeercert() should include extensions http://bugs.python.org/issue20469 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22873

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

2014-11-12 Thread John Nagle
} How about just returning ALL the remaining fields and finishing the job? Thanks. 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
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

Re: Python Front-end to GCC

2013-10-26 Thread John Nagle
in debug vs. release mode. Sigh. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Front-end to GCC

2013-10-23 Thread John Nagle
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 replies: Documentation can be found http

Re: Global Variable In Multiprocessing

2013-10-23 Thread John Nagle
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 reply to your question. John Nagle SiteTruth

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

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

2013-10-15 Thread John Nagle
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 was designed (was Re: Multi-threading in Python vs Java)

2013-10-14 Thread John Nagle
, 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 Swallow failed and why PyPy development is so slow. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: What version of glibc is Python using?

2013-10-13 Thread John Nagle
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
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 Nagle -- https://mail.python.org/mailman/listinfo/python-list

Re: web scraping

2013-10-13 Thread John Nagle
If you really want that data, and aren't just hacking, buy it. There are data brokers that will sell it to you. DB, FindTheCompany, Infot, etc. Sounds like you want to spam. Don't. John Nagle -- https://mail.python.org/mailman/listinfo/python-list

What version of glibc is Python using?

2013-10-12 Thread John Nagle
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) So I try the recommended way to do

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

2013-10-09 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 get a new 4-element vector, discard

Applying 4x4 transformation to 3-element vector with numpy

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

[issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter

2013-09-14 Thread John Nagle
John Nagle added the comment: The server operator at the US Securities and Exchange Commission writes to me: There was a DNS issue that affected the availability of FTP at night. We believe it is resolved. Please let us know if you encounter any further problems. Thanks, SEC Webmaster. So

Python FTP timeout value not effective

2013-09-02 Thread John Nagle
has failed to respond 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

[issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter

2013-09-02 Thread John Nagle
New submission from John Nagle: urllib2.open for an FTP url does not obey the timeout parameter. Attached test program times out on FTP open after 21 seconds, even though the specified timeout is 60 seconds. Timing is consistent; times have ranged from 21.03 to 21.05 seconds. Python

[issue18907] urllib2.open FTP open times out at 20 secs despite timeout parameter

2013-09-02 Thread John Nagle
John Nagle added the comment: Reproduced problem in Python 3.3 (Win32). Error message there is: Open of ftp://ftp.sec.gov/edgar/daily-index failed after 21.08 seconds: urlopen error ftp error: TimeoutError(10060, 'A connection attempt failed because the connected party did not properly

Re: [RELEASED] Python 2.7.5

2013-06-03 Thread John Nagle
, 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: Getting USB volume serial number from inserted device on OSX

2013-04-04 Thread John Nagle
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

Distributing a Python program hell

2013-04-03 Thread John Nagle
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: 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, then please give the whole context, such as where

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 need a 'rb' rather than 'r', since the file is not ASCII. self.dofilecsv

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. Sorry, Python 2.7. The trouble comes from here

Unhelpful traceback

2013-03-06 Thread John Nagle
a conversion to ASCII. Not even a print. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

[issue15873] datetime cannot parse ISO 8601 dates and times

2012-09-09 Thread John Nagle
John Nagle added the comment: For what parts of ISO 8601 to accept, there's a standard: RFC3339, Date and Time on the Internet: Timestamps. See section 5.6: date-fullyear = 4DIGIT date-month = 2DIGIT ; 01-12 date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based

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 Simple module to parse ISO 8601 dates iso8601.py 0.1dev

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

2012-09-06 Thread John Nagle
. 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 na...@animats.com 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 checked to see how I did

[issue15873] datetime cannot parse ISO 8601 dates and times

2012-09-06 Thread John Nagle
New submission from John Nagle: The datetime module has support for output to a string of dates and times in ISO 8601 format (2012-09-09T18:00:00-07:00), with the object method isoformat([sep]). But there's no support for parsing such strings. A string to datetime class method should

[issue15873] datetime cannot parse ISO 8601 dates and times

2012-09-06 Thread John Nagle
John Nagle added the comment: Re: %z format is supported. That's platform-specific; the actual parsing is delegated to the C library. It's not in Python 2.7 / Win32: ValueError: 'z' is a bad directive in format '%Y-%m-%dT%H:%M:%S%z' It really shouldn't be platform-specific; the underlying

Re: python 6 compilation failure on RHEL

2012-08-20 Thread John Nagle
/trunk/googleclient/geo/earth_enterprise/src/third_party/python/python2.6-disable-old-modules.patch so if you apply that patch to the setup.py file for Python 2.6, that ought to help. You might be better off building Python 2.7, but you asked about 2.6. John Nagle

Re: On-topic: alternate Python implementations

2012-08-07 Thread John Nagle
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

Re: Implicit conversion to boolean in if and while statements

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

Re: How to safely maintain a status file

2012-07-09 Thread John Nagle
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: Socket code not executing properly in a thread (Windows)

2012-07-07 Thread John Nagle
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: simpler increment of time values?

2012-07-05 Thread John Nagle
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: when normal parallel computations in CPython will be implemented at last?

2012-07-02 Thread John Nagle
-Pythonic. 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
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
port? John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Internationalized domain names not working with URLopen

2012-06-13 Thread John Nagle
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 tried it, though

[issue9679] unicode DNS names in urllib, urlopen

2012-06-13 Thread John Nagle
John Nagle na...@users.sourceforge.net added the comment: A IRI library is not needed to fix this problem. It's already fixed in the sockets library and the http library. We just need consistency in urllib2. urllib2 functions which take a url parameter should apply encodings.idna.ToASCII

[issue9679] unicode DNS names in urllib, urlopen

2012-06-13 Thread John Nagle
John Nagle na...@users.sourceforge.net added the comment: The current convention is that domains go into DNS lookup as punycode, and the port, query, and fragment fields of the URL are encoded with percent-escapes. See http://lists.w3.org/Archives/Public/ietf-http-wg/2011OctDec/0155.html

Re: sqlite INSERT performance

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

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. John Nagle -- http

Re: escaping/encoding/formatting in python

2012-05-23 Thread John Nagle
. 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. John Nagle

Re: serial module

2012-05-22 Thread John Nagle
about it. John Nagle -- http://mail.python.org/mailman/listinfo/python-list

Re: serial module

2012-05-22 Thread John Nagle
been much simpler if the USB Consortium had defined a USB class for these devices, as they did for keyboards, mice, etc. However, this is not the original poster's problem. 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
. Using the file 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

  1   2   3   4   5   6   7   8   9   10   >