[issue23910] C implementation of namedtuple (WIP)

2015-04-10 Thread Joe Jevnik
Joe Jevnik added the comment: Ideally, namedtuple is used to make your code cleaner, using magic indecies is less clear than using a named index in a lot of cases. Because namedtuple is mainly to make the code more readable, I don't think that it should have an impact on the runtime

[issue23910] C implementation of namedtuple (WIP)

2015-04-10 Thread Joe Jevnik
Joe Jevnik added the comment: would the idea be to deprecate namedtuple in favor of a public structseq that is exposed through collections, or change structseq to fit the namedtuple API? -- ___ Python tracker rep...@bugs.python.org http

Re: beautifulSoup 4.1

2015-04-04 Thread Joe Farro
Could use zip: tds = iter(soup('td')) for abbr, defn in zip(tds, tds): print abbr.get_text(), defn.get_text() -- https://mail.python.org/mailman/listinfo/python-list

[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))

2014-12-16 Thread Joe Cabrera
Joe Cabrera added the comment: This is an error wrapping coming from requests. https://github.com/kennethreitz/requests/issues/2364 The Requests team has concluded they can do nothing about this error, I believe the next step up is the python httplib library

[issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(''''))

2014-12-15 Thread Joe Cabrera
New submission from Joe Cabrera: ConnectionError: ('Connection aborted.', BadStatusLine()) This error can also occur on Linux and Windows, a more descriptive error messages would be useful for people trying to debug their code. -- assignee: docs@python components: Documentation

[issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph

2014-11-19 Thread Joe Julian
Changes by Joe Julian jjul...@io.com: -- nosy: +Joe.Julian ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21963 ___ ___ Python-bugs-list mailing

[issue21963] 2.7.8 backport of Issue1856 (avoid daemon thread problems at shutdown) breaks ceph

2014-11-19 Thread Joe Julian
Joe Julian added the comment: I suspect the underlying problem is that the fix expects the daemon threads to hit a point where they try to acquire the GIL and that's not going to happen with these librados threads; they stay in librados

[issue22105] Idle: Hang during File Save As

2014-08-04 Thread Joe Gaspard
Joe Gaspard added the comment: Today the memory problem repeated, and I was ale to get more info: While displaying results of program execution in IDLE, two memory problem pop-ups were displayed. Selecting recovery activate buttons did not help. The lower right Ln count was 5,xxx,xxx

[issue22105] Idle: Hang during File Save As

2014-08-03 Thread Joe Gaspard
Joe Gaspard added the comment: Thanks Terry. As best I can recall was trying to save a .py while IDLE and the '.py file were both open, but definitely not a 'Library' file. I did try to save the IDLE window display once, and it may have been this time. My programs have been much smaller

[issue22105] Hang during File Save As

2014-07-29 Thread Joe Gaspard
New submission from Joe Gaspard: Python 3.4.1 hang while trying to save a file on 29 July 2014 5Pm. The computer was a DIY i7/WIN7-64 bit/INTEL DZ87KLT-75 Motherboard (w/ Intel i7-4770-K 3.5 GHz processor). IDLE was operating on G:\python.exe 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014 10:45

[issue21887] Python3 can't detect Tcl

2014-06-30 Thread Joe Borg
New submission from Joe Borg: Trying to configure 3.4.1 on Cent OS 6.4. I have built Tcl and Tk, using the prefix /scratch/root. I can confirm the builds with: $ find /scratch/root/ -name tcl.h /scratch/root/include/tcl.h $ find /scratch/root/ -name tk.h /scratch/root/include/tk.h

[issue21887] Python3 can't detect Tcl/Tk 8.6.1

2014-06-30 Thread Joe Borg
Changes by Joe Borg cyborg101...@gmail.com: -- title: Python3 can't detect Tcl - Python3 can't detect Tcl/Tk 8.6.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21887

[issue21481] Argpase Namespace object methods __eq__ and __ne__ raise TypeError when comparing to None

2014-05-12 Thread Joe Borg
New submission from Joe Borg: See example: import argparse a = argparse.ArgumentParser() b = a.parse_args([]) if b != None: ... print hey File stdin, line 2 print hey ^ SyntaxError: invalid syntax if b != None: ... print(hey) ... Traceback (most

[issue21482] get_versions() in cygwinccomiler.py cannot return correct gcc version

2014-05-12 Thread Joe Chan
New submission from Joe Chan: cannot return correct gcc version if the path name contains space. Suggest to change to: $ diff -rupN cygwinccompiler.py.original cygwinccompiler.py --- cygwinccompiler.py.original 2014-05-12 23:54:01.296303800 +0800 +++ cygwinccompiler.py 2014-05-12 23:59

[issue21481] Argpase Namespace object methods __eq__ and __ne__ raise TypeError when comparing to None

2014-05-12 Thread Joe Borg
Joe Borg added the comment: I believe this comes from doing vars(None). But why would this be happening if Namespace is empty. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21481

[issue21482] get_versions() in cygwinccomiler.py cannot return correct gcc version

2014-05-12 Thread Joe Chan
Joe Chan added the comment: better to parenthesis all three exes[gcc, ld and dllwrap] with %s to better support path names that contain non-alphanumeric characters. $ diff -rupN cygwinccompiler.py.original cygwinccompiler.py --- cygwinccompiler.py.original 2014-05-12 23:54:01.296303800 +0800

[issue21482] get_versions() in cygwinccomiler.py cannot return correct gcc version

2014-05-12 Thread Joe Chan
Joe Chan added the comment: To prevent system crashes, I have to exclude msvc runtime library $ diff -rupN cygwinccompiler.py.original cygwinccompiler.py --- cygwinccompiler.py.original 2014-05-12 23:54:01.296303800 +0800 +++ cygwinccompiler.py 2014-05-13 02:59:37.870414900 +0800 @@ -341,7

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Joe Button
Joe Button added the comment: Forgive my unfamiliarity with python's development process, but, what is happening with this? Is there any chance of this enhancement making it into the python libs? What would need to happen? Thanks. -- nosy: +Joeboy

[issue4913] wave.py: add writesamples() and readsamples()

2014-04-22 Thread Joe Button
Joe Button added the comment: On quickly looking at this, the immediate issue seems to me to be that there is no patch, as I understand the term. If it would be helpful I can look at turning the code in the attached files into a patch against default and ensure the tests pass (but not right

Re: Python Unicode handling wins again -- mostly

2013-12-02 Thread joe
How would a grapheme library work? Basic cluster combination, or would implementing other algorithms (line break, normalizing to a canonical form) be necessary? How do people use grapheme clusters in non-rendering situations? Or here's perhaps here's a better question: does anyone know any

Re: Python GUI?

2013-09-13 Thread Joe Junior
part of coding. Nor the fun part. Joe -- https://mail.python.org/mailman/listinfo/python-list

Re: Python GUI?

2013-09-13 Thread Joe Junior
graphical toolkits forces you to use them. And if you like debugging, GUI is not the main dish! Try networking and concurrent programming, loads and loads of fun! Of course, that's lots of other unnecessary time consuming stuff you can do. You just have to use your imagination. Joe -- https

Re: better and user friendly IDE recommended?

2013-09-12 Thread Joe Junior
spend a lot more time as a programmer (big emphasis on lot) reading, thinking and designing then writing code. So I find a good navigation tool more important. My solution/suggestion for python: emacs (in cua-mode for me) with Jedi. Joe -- https://mail.python.org/mailman/listinfo/python-list

Re: user interfaces python3.x

2013-09-02 Thread Joe Junior
. The examples Steven cited like GTK and Qt are libraries that provides it. The word Interface means a lot of things in programming. -- Joe -- http://mail.python.org/mailman/listinfo/python-list

Re: user interfaces python3.x

2013-09-02 Thread Joe Junior
On 2 September 2013 14:30, Joel Goldstick joel.goldst...@gmail.com wrote: On Mon, Sep 2, 2013 at 1:16 PM, Joe Junior joe.fbs.jun...@gmail.com wrote: On 2 September 2013 14:00, Paul Rice lfcpaulr...@gmail.com wrote: I know that most of my time will be writing . I dont think i specified very

Re: Interface and duck typing woes

2013-08-29 Thread Joe Junior
Well, the main reason for me asking this question here was because of the Java/C#/Whatever developer in me craving for an Interface for the container's items, and I noticed that I'm not alone in this. But I was actually expecting the We're all consenting adults, here, I guess I just needed the

Re: Interface and duck typing woes

2013-08-29 Thread Joe Junior
On 29 August 2013 10:07, Chris Angelico ros...@gmail.com wrote: Hmm. l don't know of any good articles off-hand. But what I'm talking about is simply developing the skill of reading exceptions, plus a few simple things like knowing where it's appropriate to catch-and-log; sometimes, what that

Interface and duck typing woes

2013-08-28 Thread Joe Junior
typing, but should I check if hasattr() and callable() before adding to the container? What is the pythonic way to deal with it? Am I worrying too much ;-)? Thanks, Joe -- http://mail.python.org/mailman/listinfo/python-list

[issue18868] Python3 unbuffered stdin

2013-08-28 Thread Joe Borg
New submission from Joe Borg: I'm in need of an unbuffered stdin for Python3. Using the '-u' flag worked fine in Python2. But, it seems, Python3's stdin is always buffered; as seen in http://bugs.python.org/issue4705. This is not always desirable. For example: #!/bin/python3 import os

[issue18868] Python3 unbuffered stdin

2013-08-28 Thread Joe Borg
Changes by Joe Borg cyborg101...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18868 ___ ___ Python-bugs-list

[issue4705] python3.0 -u: unbuffered stdout

2013-08-26 Thread Joe Borg
Joe Borg added the comment: Can I confirm this is still in the trunk? I have 3.3.2 and am suffering from the fact that `-u` isn't setting stdin to unbuffered. I'm have to run a flush every command, which is awful. -- nosy: +Joe.Borg, georg.brandl versions: +Python 3.2, Python 3.3

[issue18789] XML Vunerability Table Unclear

2013-08-20 Thread Joe Tennies
New submission from Joe Tennies: EASY This is an issue with the 2.x and 3.x documentation. http://docs.python.org/3.2/library/xml.html#xml-vulnerabilities http://docs.python.org/dev/library/xml.html#xml-vulnerabilities http://docs.python.org/2/library/xml.html#xml-vulnerabilities This section

Re: Class hierarchy problem

2013-08-06 Thread Joe Junior
On Tue, Aug 6, 2013 at 12:36 PM, BrJohan brjo...@gmail.com wrote: On 06/08/2013 16:02, Chris Angelico wrote: My classhierarchy is like a multilevel tree where each non-leaf node (class) is given knowledge about its nearest subclasses and their 'capacities'. So, my idea is to let the 'upper'

[issue17989] ElementTree.Element broken attribute setting

2013-05-19 Thread Joe Stuart
Joe Stuart added the comment: Looks like a typo in arbitrary. AttributeError: Can't set arbitraty attributes on Element -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17989

[issue17989] ElementTree.Element broken attribute setting

2013-05-17 Thread Joe Stuart
Joe Stuart added the comment: It looks like it's being called from the c extension. I would think it should still throw an exception though? e = etree.Element e.ham = 1 Traceback (most recent call last): File stdin, line 1, in module TypeError: can't set attributes of built-in/extension

[issue17989] ElementTree.Element broken attribute setting

2013-05-17 Thread Joe Stuart
Joe Stuart added the comment: At the end of ElementTree all of the c accelerators are being imported and it looks like only XMLParser is being used. Here is a patch that only imports XMLParser. -- keywords: +patch Added file: http://bugs.python.org/file30298/ElementTree.patch

[issue17989] ElementTree.Element broken attribute setting

2013-05-17 Thread Joe Stuart
Changes by Joe Stuart joe.stu...@gmail.com: Removed file: http://bugs.python.org/file30298/ElementTree.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17989

[issue17989] ElementTree.Element broken attribute setting

2013-05-17 Thread Joe Stuart
Joe Stuart added the comment: This patch should fix the issue of the classes being overwritten by the c accelerated ones. -- Added file: http://bugs.python.org/file30300/ElementTree.patch ___ Python tracker rep...@bugs.python.org http

[issue17989] ElementTree.Element broken attribute setting

2013-05-17 Thread Joe Stuart
Changes by Joe Stuart joe.stu...@gmail.com: Removed file: http://bugs.python.org/file30300/ElementTree.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17989

[issue17989] ElementTree.Element broken attribute setting

2013-05-17 Thread Joe Stuart
Joe Stuart added the comment: Forgot to update the XMLParser() assignment. -- Added file: http://bugs.python.org/file30301/ElementTree.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17989

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-15 Thread Mr. Joe
On Wed, May 15, 2013 at 12:15 PM, dieter die...@handshake.de wrote: If Python would automatically redecorate overridden methods in a derived class, I would have no control over the process. What if I need the undecorated method or a differently decorated method (an uncached or

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-14 Thread Mr. Joe
Sorry for digging this old topic back. I see that my 'property' does not play well with polymorphic code comment generated some controversy. So here's something in my defense: Here's the link to stackoveflow topic I am talking about:

Differences of != operator behavior in python3 and python2 [ bug? ]

2013-05-12 Thread Mr. Joe
I seem to stumble upon a situation where != operator misbehaves in python2.x. Not sure if it's my misunderstanding or a bug in python implementation. Here's a demo code to reproduce the behavior - # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function class

Re: Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-03 Thread Mr. Joe
Thanks for clearing up. Developers of python should address this issue, in my opinion. 3.4/3.5 maybe, but better late than never. Recently, I've been beaten back for using some exotic features of python. One is this[ Took me hours to get to the bottom ]. The other one is 'property' decorator. I

Debugging difficulty in python with __getattr__, decorated properties and AttributeError.

2013-05-02 Thread Mr. Joe
Is there any way to raise the original exception that made the call to __getattr__? I seem to stumble upon a problem where multi-layered attribute failure gets obscured due to use of __getattr__. Here's a dummy code to demonstrate my problems: import traceback class BackupAlphabet(object):

[issue17344] checking size of size_t... configure: error:

2013-03-22 Thread Joe Hsiao
Joe Hsiao added the comment: Thanks, Ned. What you suggested is working. Apologize not seeing the Mac folder. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17344

[issue17344] checking size of size_t... configure: error:

2013-03-21 Thread Joe Hsiao
Joe Hsiao added the comment: I was brought here by google searching for the same issue. My system is MAC OSX 10.6.8 with gcc version 4.2.1. I downloaded Python-2.7.3 and used the following configure command: /configure --enable-framework --enable-universalsdk --with-universal-archs=intel

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
New submission from Joe Borg: If I want to use imp to find some load modules, I have to do it in quite an unpythonic way: name = os file, pathname, description = imp.find_module(name) imp.load_module(name, file, pathname, description) Can there not be a better way to pass the tuple

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
Joe Borg added the comment: Thanks for the swift feedback guys, if this is deprecated (i.e. not being carried to Python 3) then close the bug; I'll look at `importlib` and see if it carries the same problem. -- type: behavior - ___ Python tracker

[issue17321] Better way to pass objects between imp.find_module() and imp.load_module()

2013-02-28 Thread Joe Borg
Joe Borg added the comment: Hi Brett, I missed the fact that it's deprecated as it's not mentioned in the 2.* docs http://docs.python.org/2/library/imp.html. I can see it is in the 3.*. Thanks for the feedback. -- ___ Python tracker rep

[issue16767] Cannot install Python 2.7 in Wine 1.4.1

2012-12-24 Thread Joe Borg
New submission from Joe Borg: Trying to install Python 2.7 (in particular) under Wine 1.4.1, but keep getting the Installer has ended prematurely error. I've also tried with 2.6 and 3.2 and different versions of wine; same error. Also tried with winetricks; again, same error. I've used

Compiler Error for build Python -3.3.0 (Suggestions)

2012-10-22 Thread Joe Davis
The version of Python I have on my old Solaris boxes is old and isn't supported and dosn't have all the modules that I need.I have downloaded the new 3.3 version and have been trying to compile it and have no luck: After running the ./configure command I run make and it gives me the

[issue14457] Unattended Install doesn't populate registry

2012-05-10 Thread Joe Eaves
Joe Eaves jinux.all...@googlemail.com added the comment: There is an old bug report against 2.5 which dealt with a very similar problem, maybe the answers are the same? http://bugs.python.org/issue4567 Basically the location in the registry has changed from HKLM to HKCU. Here is the last

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-24 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Great to hear, Alexander. Thanks for reviewing! Is it also possible to get the pyhton2.7 version one in? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10941

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-23 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: The one you tried is the old patch. Here are the two new patches. Use these: Python 2: issue10941_python2.diff Python 3: issue10941_python3.diff -- ___ Python tracker rep...@bugs.python.org http

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-20 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: OK, fixed patch to apply cleanly to current code. BTW, this is only for python3. Is it still appropriate to patch python2? And if so, what is the correct code repo to check out for that? -- versions: +Python 3.4 Added file: http

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-20 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: I have now included a patch for 2.7. Here are the two latest patches: Python 2: issue10941_python2.diff Python 3: issue10941_python3.diff -- Added file: http://bugs.python.org/file25297/issue10941_python2.diff

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-18 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: It's been over a year since any activity on this bug, and it is still in the patch review stage. Any news? Anything else I can provide to help to get this moved to the next stage? Thanks

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-18 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Ah. I figured that one of the Python devs would be who would review it. Is this the normal path for bugs? Not to question the process, but I find it surprising, since I would think that it would cause a lot of bugs to stall out. Also, I had

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-18 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Thanks!! :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10941 ___ ___ Python-bugs-list

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2012-04-18 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: David, I understand - thanks for the details. Hopefully I can return the favor and review one in the future. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10941

[issue14354] Crash in _ctypes_alloc_callback

2012-03-20 Thread Joe Rumsey
Joe Rumsey pyt...@rumsey.org added the comment: It's maybe not directly relevant to fixing this, but I worked around it on the project where this came up by redefining dice as (c_int * 4) and col as (c_uint8 * 3) in the union, then using ctypes.cast to get those as pointers to the actual

[issue14354] Crash in _ctypes_alloc_callback

2012-03-17 Thread Joe Rumsey
New submission from Joe Rumsey pyt...@rumsey.org: I have reproduced this crash in Apple's default 2.7.1 python, and in 2.7.3 built from source myself. But only in release mode. If I rebuild 2.7.3 in debug, the crash goes away. The attached file reproduces the issue, which has to do

[issue14354] Crash in _ctypes_alloc_callback

2012-03-17 Thread Joe Rumsey
Joe Rumsey pyt...@rumsey.org added the comment: I just built python 3.2.2 from source, and reproduced the issue there as well. Same location. Here's the slightly more informative stack trace from my release-with-symbols 3.2.2 build: #0 _ctypes_alloc_callback (callable=0x7fff5fbfef20

[issue14354] Crash in _ctypes_alloc_callback

2012-03-17 Thread Joe Rumsey
Joe Rumsey pyt...@rumsey.org added the comment: Thanks for that. This does seem to be the case. I rebuilt with CC=gcc-4.2 and my short sample and the full library I took it from both work fine. -- ___ Python tracker rep...@bugs.python.org http

Re: OT: Entitlements [was Re: Python usage numbers]

2012-02-18 Thread random joe
On Feb 18, 12:34 pm, Rick Johnson rantingrickjohn...@gmail.com wrote: Louie-the-loose-screw Said: I'll give you $15 if you'll give me $15! $15 dolla too beau coup! 5 dolla each! -- http://mail.python.org/mailman/listinfo/python-list

Re: Help with python-list archives

2012-01-06 Thread random joe
On Jan 6, 1:41 am, Ian Kelly ian.g.ke...@gmail.com wrote: One could also avoid creating the intermediate file by using a StringIO to keep it in memory instead: Yes StringIO is perfect for this. Many thanks to all who replied. -- http://mail.python.org/mailman/listinfo/python-list

Help with python-list archives

2012-01-05 Thread random joe
Hi. I am new to python and wanted to search the python-list archives for answers to my many questions but i can't seem to get the archive files to uncompressed? What gives? From what i understand they are gzip files so i assumed the gzip module would work, but no! The best i could do was to get a

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 5:39 pm, Miki Tebeka miki.teb...@gmail.com wrote: Is the Google groups search not good enough? That works but i would like to do some regexes and set up some defaults. Also, can you give an example of the code and an input file? Sure. Take the most recent file as example. 2012 -

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 6:10 pm, Ian Kelly ian.g.ke...@gmail.com wrote: Interesting.  I tried this on a Linux system using both gunzip and your code, and both worked fine to extract that file.  I also tried your code on a Windows system, and I get the same result that you do. This appears to be a bug in the

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 7:27 pm, MRAB pyt...@mrabarnett.plus.com wrote: I've found that if I gunzip it twice (gunzip it and then gunzip the result) using the gzip module I get the text file. On a windows machine? If so, can you post a code snippet please? Thanks --

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 9:00 pm, MRAB pyt...@mrabarnett.plus.com wrote: On 06/01/2012 02:14, random joe wrote: On Jan 5, 7:27 pm, MRABpyt...@mrabarnett.plus.com  wrote:  I've found that if I gunzip it twice (gunzip it and then gunzip the  result) using the gzip module I get the text file

Re: Help with python-list archives

2012-01-05 Thread random joe
On Jan 5, 10:01 pm, random joe pywi...@gmail.com wrote: On Jan 5, 9:00 pm, MRAB pyt...@mrabarnett.plus.com wrote: import gzip in_file = gzip.open(rC:\2012-January.txt.gz) out_file = open(rC:\2012-January.txt.tmp, wb) out_file.write(in_file.read()) in_file.close() out_file.close

Re: Design Pattern and Python: Any book recommendation? Your view?

2011-11-04 Thread Joe Riopel
On Fri, Nov 4, 2011 at 8:28 AM, John Roth johnro...@gmail.com wrote: The first is that if you use TDD (Test Driven Development) and refactor relentlessly to remove duplication, most of the basic design patterns will emerge naturally from the code as you work. I agree, and there is a pretty

Re: import os or import os.path

2011-09-06 Thread Joe Riopel
On Tue, Sep 6, 2011 at 5:25 PM, Jabba Laci jabba.l...@gmail.com wrote: Hi, If I want to use the 'os.path' module, it's enought to import 'os': import os if os.path.isfile('/usr/bin/bash'):    print 'got it' In other source codes I noticed that people write 'import os.path' in this case.

[issue12739] read stuck with multithreading and simultaneous subprocess.Popen

2011-08-11 Thread Joe Hu
New submission from Joe Hu sapika...@gmail.com: When multiple threads create child processes simultaneously and redirect their stdout using subprocess.Popen, at least one thread will stuck on reading the stdout after its child process exited, until all other processes are also exited

[issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error

2011-06-20 Thread Joe Shaw
New submission from Joe Shaw js...@itasoftware.com: Start a non-SSL server on port 2525: $ python -m smtpd -n -c DebuggingServer localhost:2525 In another terminal, fire up a python interpreter and run the following code: import smtplib s = smtplib.SMTP_SSL(localhost, 2525

[issue12378] smtplib.SMTP_SSL leaks socket connections on SSL error

2011-06-20 Thread Joe Shaw
Joe Shaw js...@itasoftware.com added the comment: From some experimentation, closing the underlying socket isn't enough. You also need to close the SSL socket, so you'd need to do something like: new_socket = socket.create_connection((host, port), timeout) ssl_socket = ssl.wrap_socket

Determine attributes of calling method

2011-06-03 Thread Joe
for your help! Joe -- http://mail.python.org/mailman/listinfo/python-list

if statement on lenght of a list

2011-05-17 Thread Joe Leonardo
'YAY!' If I pass: breakLine([]) I get: YAY! I expect: You must pass a list that contains 19 fields. If I print len(value) I get: 0 What is going on here? Thanks! [cid:image001.png@01CC148A.3C0C1950] Joe Leonardo | Business Intelligence Analyst | DataLogixhttp://www.datalogix.com

Re: FBI wants public help solving encrypted notes from murder mystery

2011-04-02 Thread Joe Snodgrass
On Apr 1, 10:54 am, David Bernier david...@videotron.ca wrote: haha doh wrote: On Mar 31, 3:15 pm, Joe Snodgrassjoe.s...@yahoo.com  wrote: [...] As to which crime was being committed, I'm going with numbers running or loan sharking.  There's no reason for any crook to keep any record

Re: FBI wants public help solving encrypted notes from murder mystery

2011-03-31 Thread Joe Snodgrass
On Mar 30, 10:18 pm, Stretto stre...@nowhere.com wrote: Joe Snodgrass joe.s...@yahoo.com wrote in message news:c37e8e0b-a825-4ac5-9886-8828ab1fa...@x8g2000prh.googlegroups.com... FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI

FBI wants public help solving encrypted notes from murder mystery

2011-03-30 Thread Joe Snodgrass
FBI cryptanalysis hasn’t decrypted notes from 1999 murder mystery http://tinyurl.com/4d56zsz The FBI is seeking the public's help in breaking the encrypted code found in two notes discovered on the body of a murdered man in 1999. The FBI says that officers in St. Louis, Missouri discovered the

Re: Validating Command Line Options

2011-03-23 Thread Joe Riopel
On Wed, Mar 23, 2011 at 10:10 AM, T misceveryth...@gmail.com wrote: For a Python script with multiple command line options, what is the best way to go about validating that only certain options are used together?  For example, say -s, -t, and -v are all valid options, but should never be used

adodbapi integer parameters and MS Access

2011-03-13 Thread Joe
Here is my environment: Windows 7 x64 SP1 Python 3.2 adodbapi 2.4.2 MS Access Although the above environment is what I am currently using I have encountered this same problem with Python 3.1.1. It is not a problem with Python 2.x. The problem is as follows: If you are using a select

[issue10939] imaplib: Internaldate2tuple raises KeyError parsing month and does not work with negative TZ offset due to bytes/str issues

2011-01-29 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Good catch on the test. Note that for issue 10941, we'll want a new non-timezone-dependent test case that can catch the DST-related problem. I'll post a new patch to issue 10941 now and describe this some more

[issue10939] imaplib: Internaldate2tuple raises KeyError parsing month and does not work with negative TZ offset due to bytes/str issues

2011-01-29 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Alexander, looks like you hit a weirdness in the Europe/London timezone for dates before 31-Oct-1971, as if DST was in effect even in winter. And the fail of the test is caused by the same bug that causes issue 10941: the use of mktime

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2011-01-29 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Here is a new patch that adds a test to the tests committed for issue 10939. This new test case is needed to trigger the DST issue. This test is not timezone-dependent (in the sense that one does not have to have a specific timezone set

[issue10939] imaplib: Internaldate2tuple raises KeyError parsing month and does not work with negative TZ offset due to bytes/str issues

2011-01-29 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: More info on the Europe/London near the epoch thing (there is no weirdness in the tz stuff - it's just issue 10941 causing the test to fail)... I looked at the sources for the tz data, and here is the definition for Europe/London: # Zone NAME

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2011-01-29 Thread Joe Peterson
Changes by Joe Peterson j...@skyrush.com: Removed file: http://bugs.python.org/file20613/issue10941.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10941

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2011-01-29 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: I like the idea of adding the decorator. New patch added. -- Added file: http://bugs.python.org/file20615/issue10941.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10941

[issue10941] imaplib: Internaldate2tuple produces wrong result if date is near a DST change

2011-01-29 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: [just carrying over some info from issue 10939 that is related to this issue] Here is another manifestation of this issue, related to the local time assumption, but not to DST, per se: Here is the definition for Europe/London in the unix tz

[issue10947] imaplib: Internaldate2tuple and ParseFlags require (and latter returns) bytes arrays; should allow/return str

2011-01-28 Thread Joe Peterson
Changes by Joe Peterson j...@skyrush.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10947 ___ ___ Python-bugs-list

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-28 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Also, isn't day supposed to be space- rather than 0- padded? This is not clear to me. RFC2822 (referenced from RFC3501 for internal date) discusses date formats, but as used in the header. In this case, day is specified as ([FWS] 1*2DIGIT

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-28 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Our messages crossed... :) Hm, I see that in RFC 3501, as well (which obsoletes 2060). But... I wonder: does (SP DIGIT) / 2DIGIT mean that 1 and 01 are both OK? It seems ambiguous to me. I still don't see why major IMAP servers

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-28 Thread Joe Peterson
Changes by Joe Peterson j...@skyrush.com: Removed file: http://bugs.python.org/file20557/imaplib_Time2Internaldate_locale_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11024

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-28 Thread Joe Peterson
Joe Peterson j...@skyrush.com added the comment: Here's a new patch. I would still like to discuss the leading space vs. leading zero issue, but I have reverted to using a leading space in this patch - fewer changes that way. The long line is also fixed (sorry about that - yes, long lines

[issue10939] imaplib: Internaldate2tuple raises KeyError parsing month and does not work with negative TZ offset due to bytes/str issues

2011-01-28 Thread Joe Peterson
Changes by Joe Peterson j...@skyrush.com: Removed file: http://bugs.python.org/file20444/imaplib_Internaldate2tuple_bytes_fixes_python32.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10939

[issue11024] imaplib: Time2Internaldate() returns localized strings

2011-01-28 Thread Joe Peterson
Changes by Joe Peterson j...@skyrush.com: Removed file: http://bugs.python.org/file20587/imaplib_Time2Internaldate_locale_fix.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11024

[issue10939] imaplib: Internaldate2tuple raises KeyError parsing month and does not work with negative TZ offset due to bytes/str issues

2011-01-28 Thread Joe Peterson
Changes by Joe Peterson j...@skyrush.com: Added file: http://bugs.python.org/file20588/imaplib_Internaldate2tuple_bytes_fixes_python32.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10939

<    1   2   3   4   5   6   7   8   9   >