Re: utf-8 read/write file
Benjamin wrote: On Oct 8, 12:49 pm, Bruno [EMAIL PROTECTED] wrote: Hi! I have big .txt file which i want to read, process and write to another .txt file. I have done script for that, but im having problem with croatian characters (Š,Đ,Ž,Č,Ć). Can you show us what you have so far? How can I read/write from/to file in utf-8 encoding? import codecs data = codecs.open(my-utf8-file.txt).read() I read file with fileinput.input. thanks I have tried with codecs, but when i use encoding=utf-8 i get this error on word : život Traceback (most recent call last): File C:\Users\Administrator\Desktop\getcontent.py, line 43, in module encoding=utf-8).readlines() File C:\Python25\Lib\codecs.py, line 626, in readlines return self.reader.readlines(sizehint) File C:\Python25\Lib\codecs.py, line 535, in readlines data = self.read() File C:\Python25\Lib\codecs.py, line 424, in read newchars, decodedbytes = self.decode(data, self.errors) UnicodeDecodeError: 'utf8' codec can't decode byte 0x9e in position 0: unexpected code byte i just need to read from file1.txt, process (its simple text processing) some words and write them to file2.txt without loss of croatian characters. (šđžčć) -- http://mail.python.org/mailman/listinfo/python-list
Re: distributing apps without the Python source?
On 8 Okt, 23:50, James Mills [EMAIL PROTECTED] wrote: I must point out though that if your client is paranoid for intellectual property reasons (ie: protecting his assets), then you should be aware that even if you can decompile a Python compiled module (or a compiled java class), it's generally pretty useless in this form to any would-be-thief. I beg to differ on the usefulness of the decompiled code: Python bytecode is pretty high-level stuff, and it doesn't leave that much to the imagination. It may not give you nice source code, but if you want answers to questions on how some mechanism in the code works, decompyle does a reasonable job. Decompiling/Disassembling never gets you the original source code back. True, but that's not always what you want, anyway. Some more opinions on the subject can be found here: http://wiki.python.org/moin/HowDoYouProtectSource Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: utf-8 read/write file
Hi, What is the encoding of the file1 you're reading from? I just ran tests on my machine (OS X) with both python2.5 and 2.6 and was able to read from a file containing: život je lep The file is UTF-8 encoded. data = open(test.txt).read() data '\xc5\xbeivot je lep.' f = open(test2.txt, wb) f.write(data) f.close() mac-alex:~ alex$ file test.txt test.txt: UTF-8 Unicode text, with no line terminators mac-alex:~ alex$ file test2.txt test2.txt: UTF-8 Unicode text, with no line terminators mac-alex:~ alex$ Files test.txt and test2.txt are identical. Regards, alex. 2008/10/8 gigs [EMAIL PROTECTED]: Benjamin wrote: On Oct 8, 12:49 pm, Bruno [EMAIL PROTECTED] wrote: Hi! I have big .txt file which i want to read, process and write to another .txt file. I have done script for that, but im having problem with croatian characters (Š,Đ,Ž,Č,Ć). Can you show us what you have so far? How can I read/write from/to file in utf-8 encoding? import codecs data = codecs.open(my-utf8-file.txt).read() I read file with fileinput.input. thanks I have tried with codecs, but when i use encoding=utf-8 i get this error on word : život Traceback (most recent call last): File C:\Users\Administrator\Desktop\getcontent.py, line 43, in module encoding=utf-8).readlines() File C:\Python25\Lib\codecs.py, line 626, in readlines return self.reader.readlines(sizehint) File C:\Python25\Lib\codecs.py, line 535, in readlines data = self.read() File C:\Python25\Lib\codecs.py, line 424, in read newchars, decodedbytes = self.decode(data, self.errors) UnicodeDecodeError: 'utf8' codec can't decode byte 0x9e in position 0: unexpected code byte i just need to read from file1.txt, process (its simple text processing) some words and write them to file2.txt without loss of croatian characters. (šđžčć) -- http://mail.python.org/mailman/listinfo/python-list -- a lex 13 x -- http://mail.python.org/mailman/listinfo/python-list
Re: ssh problem using paramiko?
sa6113 wrote: I couldn't find any good source for download Openssh on the net? Would you please introduce a URL for download that? http://www.openssh.org/ would be my first port of call. regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list
Re: utf-8 read/write file
On Oct 8, 5:55 pm, gigs [EMAIL PROTECTED] wrote: Benjamin wrote: On Oct 8, 12:49 pm, Bruno [EMAIL PROTECTED] wrote: Hi! I have big .txt file which i want to read, process and write to another .txt file. I have done script for that, but im having problem with croatian characters (©,Ð,®,È,Æ). UnicodeDecodeError: 'utf8' codec can't decode byte 0x9e in position 0: unexpected code byte Are you sure you have UTF-8 data? I guess your file is encoded in CP1250 or CP1252; in both of these charsets 0x9e represents LATIN SMALL LETTER Z WITH CARON. Kent -- http://mail.python.org/mailman/listinfo/python-list
Re: ssh problem using paramiko?
Diez B. Roggisch wrote: sa6113 wrote: I couldn't find any good source for download Openssh on the net? Would you please introduce a URL for download that? http://www.vapor.com/amtelnet/ it supports only SSHv1, but I guess that's ok. No, you really don't want to use SSHv1. Amtelnet won't do, it's an SSH *server* the OP needs, I understand. Why not openssh.org? regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC http://www.holdenweb.com/ -- http://mail.python.org/mailman/listinfo/python-list
split a list based on a predicate
Hi! Is there a functional way to do this? I have an array [0,1,2,3,0,1,2,2,3] and I want the first chunk of non-decreasing values from this array (eg: In this case I want [0,1,2,3]) Thanks, Rajanikanth -- http://mail.python.org/mailman/listinfo/python-list
A question about funcation parameter and self defined object
Hi, I defined a class called vec3 which contains x, y, z and in another function, I tried to call a function which takes a vec3 as a parameter, but it seems that parameter is passed as a generic object and I can not access x , y, z in my vec3. Could anyone help me with that? class vec3: def __init__(self, x_ = 0.0, y_ = 0.0, z_ = 0.0): self.x = x_ self.y = y_ self.z = z_ class mat4: def translation( traV = vec3() ): tranM.rowLst[index][0] = traV.x AttributeError: 'NoneType' object has no attribute 'x' Could anyone help me how to turn the traV as type of vec3() instead of NoneType object? Thanks a lot, Wei -- http://mail.python.org/mailman/listinfo/python-list
Re: split a list based on a predicate
Is there a functional way to do this? I have an array [0,1,2,3,0,1,2,2,3] and I want the first chunk of non-decreasing values from this array (eg: In this case I want [0,1,2,3]) Sounds like a use for a generator wrapper: def monotonic(iterator): i = iter(iterator) prev = i.next() yield prev while True: this = i.next() if prev = this: yield this prev = this else: break lst1 = [0,1,2,3,0,1,2,2,3] lst2 = [0,1,2,3,3,0,1,2,2,3] print list(monotonic(lst1)) [0,1,2,3] print list(monotonic(lst2)) [0,1,2,3,3] Adjust the = to depending on your needs (my lst2 condition probes that edge) -tkc -- http://mail.python.org/mailman/listinfo/python-list
Re: split a list based on a predicate
Rajanikanth Jammalamadaka: Is there a functional way to do this? I have an array [0,1,2,3,0,1,2,2,3] and I want the first chunk of non-decreasing values from this array (eg: In this case I want [0,1,2,3]) In Python sometimes the best way to write the code isn't functional, this is readable code: s = [3,1,2,3,0,1,2,2,3,3,2] it = iter(s) prec = it.next() #fix this if it can be empty groups = [[prec]] for x in it: if x prec: groups.append([]) groups[-1].append(x) prec = x print groups Output: [[3], [1, 2, 3], [0, 1, 2, 2, 3, 3], [2]] If you want more fancy code you may use something like this: class Infinite: def __cmp__(self, other): return 0 if isinstance(other, Infinite) else 1 infinite = Infinite() it = iter(s) prec = infinite groups = [] for x in it: if x prec: groups.append([]) groups[-1].append(x) prec = x print groups If you really want functional code you may try to use groupby(). bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list
Re: If an OS was to be written in Python, how'w it look?
James Mills wrote: I've just checked out the darcs repository and converted it to Mercurial. I'm going to have a bit of a play wiht it... Anyone interested in this ? I'll be interested to hear of any developments. -- http://mail.python.org/mailman/listinfo/python-list
Re: distributing apps without the Python source?
In message [EMAIL PROTECTED], Joe Strout wrote: We have a client who's paranoid about distributing the Python source to his commercial app. Commercial is not synonymous with closed source. If he wanted to keep the source closed, Python was a poor choice. You could redo it in C or C++, and charge the client appropriately* for all the extra time and effort etc. *i.e. lots -- http://mail.python.org/mailman/listinfo/python-list
Re: how to get the thighest bit position in big integers?
Terry Reedy wrote: str.find is an historical anomaly that should not be copied. It was(is?) a wrapper for C's string find function. C routinely uses -1 to mean None for functions statically typed to return ints. The Python version logically should return None and usually does for other functions. Although Guido has defended it on the grounds that it can be inconvenient having a function that returns different types under different circumstances. Also it discourages making the mistake of treating the return value as a boolean. -- Greg -- http://mail.python.org/mailman/listinfo/python-list
Safe eval of insecure strings containing Python data structures?
I would like to parse arbitrary insecure text string containing nested Python data structures in eval-compatible form: # For example, given a config.txt such as: { 'my_atom' : 1.20, 'my_dict' : { 2:50 , 'hi':'mom'}, 'my_list' : [ (1,2,3), [4.5,6.9], 'foo', 0 ] } # I would like to do something like this: empty_space = {'__builtins__' : {}} try: config = eval(open(config.txt).read(), empty_space, empty_space) except: config = {} print config # But I know for certain that the above approach is NOT secure since object attributes can still be accessed... So is there an equally convenient yet secure alternative available for parsing strings containing Python data structure definitions? Thanks in advance for any pointers! Cheers, Warren -- http://mail.python.org/mailman/listinfo/python-list
Re: A question about funcation parameter and self defined object
On Wed, Oct 8, 2008 at 4:36 PM, Wei Guo [EMAIL PROTECTED] wrote: Hi, I defined a class called vec3 which contains x, y, z and in another function, I tried to call a function which takes a vec3 as a parameter, but it seems that parameter is passed as a generic object and I can not access x , y, z in my vec3. Could anyone help me with that? Being dynamically typed, Python has no notion of variables having types, so the object isn't being passed as a generic object, you're getting what really is a generic object value of type NoneType, which means the value of traV is indeed None, not vec3(). class vec3: def __init__(self, x_ = 0.0, y_ = 0.0, z_ = 0.0): self.x = x_ self.y = y_ self.z = z_ class mat4: def translation( traV = vec3() ): tranM.rowLst[index][0] = traV.x AttributeError: 'NoneType' object has no attribute 'x' This code is perfectly fine. See below. Could anyone help me how to turn the traV as type of vec3() instead of NoneType object? That's not what's happening. It's not like traV is being cast to NoneType thus making x inaccessible, as that's not even possible to express in Python. What's happening is something is calling translation() with None as an argument, and of course None (the value the caller provided for traV) has no attribute 'x', hence the error. So, check the full exception traceback and see who's calling translation() and how the argument being passed to it got to be None. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com Thanks a lot, Wei -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Safe eval of insecure strings containing Python data structures?
On Wed, Oct 8, 2008 at 5:34 PM, Warren DeLano [EMAIL PROTECTED] wrote: I would like to parse arbitrary insecure text string containing nested Python data structures in eval-compatible form: # For example, given a config.txt such as: { 'my_atom' : 1.20, 'my_dict' : { 2:50 , 'hi':'mom'}, 'my_list' : [ (1,2,3), [4.5,6.9], 'foo', 0 ] } # I would like to do something like this: empty_space = {'__builtins__' : {}} try: config = eval(open(config.txt).read(), empty_space, empty_space) except: config = {} print config # But I know for certain that the above approach is NOT secure since object attributes can still be accessed... So is there an equally convenient yet secure alternative available for parsing strings containing Python data structure definitions? Assuming the data structures are sufficiently basic, i.e. no class instanciations, you can just use the json (AKA simplejson) library to deserialize the data in the string. Python and JSON conveniently happen to share the same syntax for literals (except for booleans IIRC). Also, if this is your program's config file, you might consider changing it to INI-format and using ConfigParser (http://www.python.org/doc/2.5.2/lib/module-ConfigParser.html) instead. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com Thanks in advance for any pointers! Cheers, Warren -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Google Advanced Urls - Free
Hello -- http://mail.python.org/mailman/listinfo/python-list
xtube - Free
xtube . . . ***CLICK HERE http://vids247.cn/xtube * . . . . . . . . . . . . xtube -- http://mail.python.org/mailman/listinfo/python-list
google urls - Free
http://news.meta.ua/redirect.php?url=vids247.cn/zoo tube 365 com http://news.meta.ua/redirect.php?url=vids247.cn/zootube365 com http://news.meta.ua/redirect.php?url=vids247.cn/www zootube365 http://news.meta.ua/redirect.php?url=vids247.cn/zooskool http://news.meta.ua/redirect.php?url=vids247.cn/animalssex http://news.meta.ua/redirect.php?url=vids247.cn/girls fucking animals http://news.meta.ua/redirect.php?url=vids247.cn/girls fucking dogs http://news.meta.ua/redirect.php?url=vids247.cn/women fucking dogs http://news.meta.ua/redirect.php?url=vids247.cn/girls fucking horses http://news.meta.ua/redirect.php?url=vids247.cn/dogfuck http://news.meta.ua/redirect.php?url=vids247.cn/sextube com http://news.meta.ua/redirect.php?url=vids247.cn/tila tequila nude http://news.meta.ua/redirect.php?url=vids247.cn/miley cyrus nude http://news.meta.ua/redirect.php?url=vids247.cn/miley cyrus naked http://news.meta.ua/redirect.php?url=vids247.cn/brenda song nude http://news.meta.ua/redirect.php?url=vids247.cn/robbs celebrity oops http://news.meta.ua/redirect.php?url=vids247.cn/john cena naked http://news.meta.ua/redirect.php?url=vids247.cn/miley cyrus upskirt http://news.meta.ua/redirect.php?url=vids247.cn/emma watson upskirt http://news.meta.ua/redirect.php?url=vids247.cn/keezmovies http://news.meta.ua/redirect.php?url=vids247.cn/sunporno http://news.meta.ua/redirect.php?url=vids247.cn/qporno http://news.meta.ua/redirect.php?url=vids247.cn/dreammovies http://news.meta.ua/redirect.php?url=vids247.cn/xxxtube http://news.meta.ua/redirect.php?url=vids247.cn/xxxstash -- http://mail.python.org/mailman/listinfo/python-list
google urls - Free
http://news.meta.ua/redirect.php?url=vids247.cn/zoo-tube-247-com http://news.meta.ua/redirect.php?url=vids247.cn/zootube247-com http://news.meta.ua/redirect.php?url=vids247.cn/www-zootube247 http://news.meta.ua/redirect.php?url=vids247.cn/zooskool http://news.meta.ua/redirect.php?url=vids247.cn/animalssex http://news.meta.ua/redirect.php?url=vids247.cn/girls-fucking-animals http://news.meta.ua/redirect.php?url=vids247.cn/girls-fucking-dogs http://news.meta.ua/redirect.php?url=vids247.cn/women-fucking-dogs http://news.meta.ua/redirect.php?url=vids247.cn/girls-fucking-horses http://news.meta.ua/redirect.php?url=vids247.cn/dogfuck http://news.meta.ua/redirect.php?url=vids247.cn/sextube-com http://news.meta.ua/redirect.php?url=vids247.cn/tila-tequila-nude http://news.meta.ua/redirect.php?url=vids247.cn/miley-cyrus-nude http://news.meta.ua/redirect.php?url=vids247.cn/miley-cyrus-naked http://news.meta.ua/redirect.php?url=vids247.cn/brenda-song-nude http://news.meta.ua/redirect.php?url=vids247.cn/robbs-celebrity-oops http://news.meta.ua/redirect.php?url=vids247.cn/john-cena-naked http://news.meta.ua/redirect.php?url=vids247.cn/miley-cyrus-upskirt http://news.meta.ua/redirect.php?url=vids247.cn/emma-watson-upskirt http://news.meta.ua/redirect.php?url=vids247.cn/keezmovies http://news.meta.ua/redirect.php?url=vids247.cn/sunporno http://news.meta.ua/redirect.php?url=vids247.cn/qporno http://news.meta.ua/redirect.php?url=vids247.cn/dreammovies http://news.meta.ua/redirect.php?url=vids247.cn/xxxtube http://news.meta.ua/redirect.php?url=vids247.cn/xxxstash -- http://mail.python.org/mailman/listinfo/python-list
Re: Porn Addiction Solutions?
On Oct 8, 3:07 pm, [EMAIL PROTECTED] wrote: Help, I'm addicted to porn. I've been spending a lot of time downloading hardcore porn and masturbating to it. It's ruining my life. I just found out that one of these sites somehow hacked my card and rang up $5K in charges which they won't even refund me. Even with that I haven't stopped my habit and it's only getting worse. How can I end this addiction? Any suggestions? Yes, get some professional help instead of trolling random groups with a different email account once a year or so [1]. [1] http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/787cc101ed764687/842a8031dbeca8ec?rnum=1q=porn+addiction_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2F787cc101ed764687%2F9a366c6fa44c0b3d%3Flnk%3Dgst%26q%3Dporn%2Baddiction%26#doc_842a8031dbeca8ec -- http://mail.python.org/mailman/listinfo/python-list
Re: Safe eval of insecure strings containing Python data structures?
On Oct 8, 8:34 pm, Warren DeLano [EMAIL PROTECTED] wrote: I would like to parse arbitrary insecure text string containing nested Python data structures in eval-compatible form: # For example, given a config.txt such as: { 'my_atom' : 1.20, 'my_dict' : { 2:50 , 'hi':'mom'}, 'my_list' : [ (1,2,3), [4.5,6.9], 'foo', 0 ] } # I would like to do something like this: empty_space = {'__builtins__' : {}} try: config = eval(open(config.txt).read(), empty_space, empty_space) except: config = {} print config # But I know for certain that the above approach is NOT secure since object attributes can still be accessed... So is there an equally convenient yet secure alternative available for parsing strings containing Python data structure definitions? Thanks in advance for any pointers! This topic comes up every other month or so in this list, so if you had taken a minute to search for python safe eval or a variation thereof in your favorite search engine, you'd get more than enough pointers. George -- http://mail.python.org/mailman/listinfo/python-list
Re: A question about funcation parameter and self defined object
Hi Chris, Thanks a lot for reply, you are right. I want to use this method as a static method as: translation = staticmethod( translation ) I think that here the built in function pass None. So we can not pass any self defined object for static method? Best regards, Wei On Wed, Oct 8, 2008 at 5:50 PM, Chris Rebert [EMAIL PROTECTED] wrote: On Wed, Oct 8, 2008 at 4:36 PM, Wei Guo [EMAIL PROTECTED] wrote: Hi, I defined a class called vec3 which contains x, y, z and in another function, I tried to call a function which takes a vec3 as a parameter, but it seems that parameter is passed as a generic object and I can not access x , y, z in my vec3. Could anyone help me with that? Being dynamically typed, Python has no notion of variables having types, so the object isn't being passed as a generic object, you're getting what really is a generic object value of type NoneType, which means the value of traV is indeed None, not vec3(). class vec3: def __init__(self, x_ = 0.0, y_ = 0.0, z_ = 0.0): self.x = x_ self.y = y_ self.z = z_ class mat4: def translation( traV = vec3() ): tranM.rowLst[index][0] = traV.x AttributeError: 'NoneType' object has no attribute 'x' This code is perfectly fine. See below. Could anyone help me how to turn the traV as type of vec3() instead of NoneType object? That's not what's happening. It's not like traV is being cast to NoneType thus making x inaccessible, as that's not even possible to express in Python. What's happening is something is calling translation() with None as an argument, and of course None (the value the caller provided for traV) has no attribute 'x', hence the error. So, check the full exception traceback and see who's calling translation() and how the argument being passed to it got to be None. Cheers, Chris -- Follow the path of the Iguana... http://rebertia.com Thanks a lot, Wei -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Safe eval of insecure strings containing Python data structures?
Warren DeLano [EMAIL PROTECTED] writes: I would like to parse arbitrary insecure text string containing nested Python data structures in eval-compatible form: It sounds like you want the ‘json’ library, new in Python 2.6 URL:http://www.python.org/doc/current/library/json. It's intended for serialising and deserialising text streams for *data only* (not executable code). # But I know for certain that the above approach is NOT secure since object attributes can still be accessed... More generally, you should never execute (via eval, exec, or whatever) *any* instruction from an untrusted path; especially not arbitrary data from an input stream. -- \ “A hundred times every day I remind myself that […] I must | `\ exert myself in order to give in the same measure as I have | _o__)received and am still receiving” —Albert Einstein | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list
wxPython binaries for Python 2.6
Hi All, A set of wxPython binaries for Python 2.6 on Win32, Win64 and Mac OS X are now available at http://wxpython.org/download.php What is wxPython? - wxPython is a GUI toolkit for the Python programming language. It allows Python programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Python extension module that wraps the GUI components of the popular wxWidgets cross platform library, which is written in C++. wxPython is a cross-platform toolkit. This means that the same program will usually run on multiple platforms without modifications. Currently supported platforms are 32-bit and 64-bit Microsoft Windows, most Linux or other Unix-like systems using GTK2, and Mac OS X 10.4+. In most cases the native widgets are used on each platform to provide a 100% native look and feel for the application. -- Robin Dunn Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython! -- http://mail.python.org/mailman/listinfo/python-list
Re: Using subprocess module to launch a shell shell script that itself forks a process
En Wed, 08 Oct 2008 15:24:39 -0300, Samuel A. Falvo II [EMAIL PROTECTED] escribió: On Oct 7, 6:23 pm, Gabriel Genellina [EMAIL PROTECTED] wrote: you set stdin=PIPE - is your java process expecting some input? you're not writing anything to stdin. It does not expect input from stdin. However, this does not affect any OTHER scripts or commands I run. But it *does* affect how subprocess handles the child process internally. Let's remember to look at the objective facts: for shell scripts that launch child processes of their own, Python hangs. For all other types of commands, it works 100% as expected. Don't conclude too fast... I've tested a variant (using a Perl script as a replacement instead of a Java program), and it worked fine: log [EMAIL PROTECTED]:~$ cat foo.sh #!/bin/sh perl foo.pl echo End of foo.sh [EMAIL PROTECTED]:~$ cat foo.pl #!/usr/bin/perl for ($i=5; $i0; $i--) { print $i seconds remaining...\n; sleep(1); } print End of foo.pl\n; [EMAIL PROTECTED]:~$ cat foo.py #!/usr/bin/python2.5 import subprocess command = ./foo.sh p = subprocess.Popen(command, shell=True, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True ) print py: before p.communicate output = p.communicate()[0] print py: after p.communicate print py: returncode=,p.returncode print py: read,len(output),bytes print py: output=, repr(output) print py: End of foo.py [EMAIL PROTECTED]:~$ ./foo.py py: before p.communicate py: after p.communicate py: returncode= 0 py: read 143 bytes py: output= 'End of foo.sh\n5 seconds remaining...\n4 seconds remaining...\n3 seconds remaining...\n2 seconds remaining...\n1 seconds remaining...\nEnd of foo.pl\n' py: End of foo.py [EMAIL PROTECTED]:~$ uname -a Linux debian 2.6.18-4-486 #1 Mon Mar 26 16:39:10 UTC 2007 i686 GNU/Linux [EMAIL PROTECTED]:~$ /log This was tested both with python 2.4.4 and 2.5.2 I don't think it's a Python problem, but something related to java and how it handles stdin/stdout. Try with another program. But, my question now is, WHY is this an issue? If the launched process doesn't read from its stdin, why would it block? Several reasons - the child process might send enough text to stderr to fill its buffer, and if the parent process doesn't read from the other end of the pipe, the child blocks. That's why I suggested to use communicate instead of stdout.read() - it takes care of such cases. The only thing I can think of is that the JVM's stdout is tied to the shell script's stdout, because that's the only way it can remain open upon the termination of the child process. I suppose, at this point, the next place to look is in shell script syntax to find out how to detach the JVM from the script's process group. Can't you redirect to a file instead? java foo.jar /tmp/foo.log 21 -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list
Re: python for *nix system admins
On Sat, Sep 27, 2008 at 4:05 AM, Lars Stavholm [EMAIL PROTECTED] wrote: Hi All, I'm new to this list and hoping that this is not off-topic. If it is, please point me in the right direction. I seem to recollect a python module or library for *nix sysadmins, but I can't for the life of me find it again. The module (or library) somehow added unix command capabilities to the python language. It seemed like a lesser known, perhaps new, python library or module. Any input or ideas appreciated /Lars Stavholm -- http://mail.python.org/mailman/listinfo/python-list Here is a talk.really good. http://specialkevin.com/?p=83 -- http://mail.python.org/mailman/listinfo/python-list
Re: SMTPlib inside function, extra tab
Thank you Tino. I appreciate the help. Duh! Anything inside is preformatted text. I have tabs inside my preformatted text (without even thinking because it looks more normal because of the indent). I removed them and voila! def send_mail(fromaddress,tolist,msgsubj,messagebody): import smtplib SERVER = mymailserver.mydomain.com message = \ From: %s To: %s Subject: %s %s % (fromaddress, , .join(tolist),msgsubj, messagebody) print message server = smtplib.SMTP(SERVER) server.set_debuglevel(1) server.sendmail(fromaddress, tolist, message) server.quit() --Joshua -- http://mail.python.org/mailman/listinfo/python-list
Re: Array of dict or lists or ....?
Pat wrote: I can't figure out how to set up a Python data structure to read in data that looks something like this (albeit somewhat simplified and contrived): States Counties Schools Classes Max Allowed Students Current enrolled Students Nebraska, Wabash, Newville, Math, 20, 0 Nebraska, Wabash, Newville, Gym, 400, 0 Nebraska, Tingo, Newfille, Gym, 400, 0 Ohio, Dinger, OldSchool, English, 10, 0 With each line I read in, I would create a hash entry and increment the number of enrolled students. You might want something like this: import collections, functools int_dict = functools.partial(collections.defaultdict, int) curr = functools.partial(collections.defaultdict, int) # builds a dict-maker where t = curr(); t['name'] += 1 works for depth in range(4): # add a layer with a default of the preceding type curr = functools.partial(collections.defaultdict, curr) base = curr() # actually make one base['Nebraska']['Wabash']['Newville']['Math']['max'] = 20 base['Nebraska']['Wabash']['Newville']['Math']['curr'] += 1 base['Nebraska']['Wabash']['Newville']['Math']['curr'] 1 base['Nebraska']['Wabash']['Newville']['English']['curr'] 0 --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list
Re: A question about funcation parameter and self defined object
Wei Guo wrote: Hi Chris, Thanks a lot for reply, you are right. I want to use this method as a static method as: translation = staticmethod( translation ) static methods are mostly useless in Python. Just put the definition of translation outside of any class. -- http://mail.python.org/mailman/listinfo/python-list
inspect bug
Hi all, Found this bug. It's in 2.6, too bad. Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright, credits or license for more information. import inspect type( inspect.getargvalues( inspect.currentframe() ) ) type 'tuple' Docs say: inspect.getargvalues(frame) ... Changed in version 2.6: Returns a named tuple ArgInfo(args, varargs, keywords, locals). The code defines an ArgInfo type, but doesn't instantiate it in the return, as shown here: return args, varargs, varkw, frame.f_locals -- http://mail.python.org/mailman/listinfo/python-list
inspect feature
Hello, The 'inspect' module has this method: inspect.getargvalues(frame) It takes a frame and returns the parameters used to call it, including the locals as defined in the frame, as shown. def f( a, b, d= None, *c, **e ): ... import inspect ... return inspect.getargvalues( inspect.currentframe() ) ... f( 0, 1, 'abc', 'def', ( 3, 2 ), h= 'ghi' ) (['a', 'b', 'd'], 'c', 'e', {'a': 0, 'c': ('def', (3, 2)), 'b': 1, 'e': {'h': 'g hi'}, 'd': 'abc', 'inspect': module 'inspect' from 'C:\Programs \Python26\lib\in spect.pyc'}) However, if you wanted a decorator that examines the parameters to a function, you're out of luck. By the time you have a frame, you're already in the function. Perhaps it would not be as common as something like 'join' for example, or even the rest of the functions in 'inspect', but do you think something similar to 'getargvalues' that accepted a function and an argument list, and returned a dictionary mapping parameters to values, could be useful? -- http://mail.python.org/mailman/listinfo/python-list
Re: MRO inconsistency: why?
On Oct 8, 9:09 pm, Ravi [EMAIL PROTECTED] wrote: Why the following code gives inconsistent method resolution order error: snip If you want to know all the nitty-gritty details about the MRO (including the reason for the error you get) you should read this: http://www.python.org/download/releases/2.3/mro/ HTH, M. Simionato -- http://mail.python.org/mailman/listinfo/python-list
Re: Porn Addiction Solutions?
On Wed, 8 Oct 2008 12:30:09 -0700 (PDT), [EMAIL PROTECTED] wrote: snip You can conquer this thing. Let us know how you make out. Regards, Mike Now I finally know why this thing is called usenet. Most useful post ever. Matt -- http://mail.python.org/mailman/listinfo/python-list
Re: Safe eval of insecure strings containing Python data structures?
On Oct 8, 7:34 pm, Warren DeLano [EMAIL PROTECTED] wrote: I would like to parse arbitrary insecure text string containing nested Python data structures in eval-compatible form: ... # But I know for certain that the above approach is NOT secure since object attributes can still be accessed... So is there an equally convenient yet secure alternative available for parsing strings containing Python data structure definitions? Thanks in advance for any pointers! Cheers, Warren As mentioned, I don't know if everything has been tried or how secure what attempts have been. I haven't seen this one: Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win 32 Type help, copyright, credits or license for more information. del __builtins__ a= [ x for x in (1).__class__.__bases__[0].__subclasses__() if x.__name__== 'file' ][ 0 ] a type 'file' a('abc.txt','w') Traceback (most recent call last): File stdin, line 1, in module IOError: file() constructor not accessible in restricted mode import os Traceback (most recent call last): File stdin, line 1, in module ImportError: __import__ not found So, at least one of the newsgroup favorites is gone. Take a shot though! Maybe a variant would be sufficient. No warranty. -- http://mail.python.org/mailman/listinfo/python-list
Re: how to get the thighest bit position in big integers?
greg wrote: Terry Reedy wrote: str.find is an historical anomaly that should not be copied. It was(is?) a wrapper for C's string find function. C routinely uses -1 to mean None for functions statically typed to return ints. The Python version logically should return None and usually does for other functions. I consider str.find to be an anomaly in two senses. First, it is the only function/method I can think of that directly duplicates another function/method by replace raising an exception with returning an error indicator. Some developers wanted to drop it from 3.0, and I too wish it had been. We get along fine without list.find and a whole slew of other such duplicates that one could think of. Second, it is the only function/method I can think of that follows the Unix/C convention of using '-1' as an error/exception/no-can-do indicator. When it is so used, it is not really an int, but an error indication represented as an int because there is no other choice. In Python, there is another choice -- None -- which is used routinely, including its use as the default return when there is nothing else to return. Although Guido has defended it on the grounds that it can be inconvenient having a function that returns different types under different circumstances. Also it discourages making the mistake of treating the return value as a boolean. I consider this backwards. Since -1 is a legal index in Python (unlike some other languages) as well as a legal int, returning -1 allows if not encourages the mistake of treating the fake return value as if it were a real value. Returning None would completely prevent any use of the error indicator other than to test it, which is the only thing one should be able to do with it. It should not be usable as an index or number in further calculations. I consider it a principle that error indicators that are returned rather than raised should be an illegal-to-use value if not a different type. As for convenience, if s.find(t) is None: is as easily to write (and clearer to read) as if s.find(t) == -1:. As far as I can see, different return types are only an issue, if at all, if values of both types are to be used in further calculations. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list
Re: Porn Addiction Solutions?
[EMAIL PROTECTED] wrote: Help, I'm addicted to porn. I've been spending a lot of time downloading hardcore porn and masturbating to it. It's ruining my life. I just found out that one of these sites somehow hacked my card and rang up $5K in charges which they won't even refund me. Even with that I haven't stopped my habit and it's only getting worse. How can I end this addiction? Any suggestions? try xnxx.com, at least you won't have to pay for anything or deal with malware. -- http://mail.python.org/mailman/listinfo/python-list
Re: how to get the thighest bit position in big integers?
On Oct 8, 7:21 pm, greg [EMAIL PROTECTED] wrote: Terry Reedy wrote: str.find is an historical anomaly that should not be copied. It was(is?) a wrapper for C's string find function. C routinely uses -1 to mean None for functions statically typed to return ints. The Python version logically should return None and usually does for other functions. ... [I]t can be inconvenient having a function that returns different types under different circumstances. ... No. It has precedent and there is no cost to convenience in pure Python. Perhaps you are passing the result straight to a C extension, and parsing it straight to integer, but I can't attest to how common that use case is. -- http://mail.python.org/mailman/listinfo/python-list
RE: Safe eval of insecure strings containing Python data structures?
JSON rocks! Thanks everyone. Ben wrote: More generally, you should never execute (via eval, exec, or whatever) *any* instruction from an untrusted path; especially not arbitrary data from an input stream. Wow, for the record, I completely disagree with this point of view: Today's web apps wouldn't exist without safe forms of untrusted eval/exec (Javascript anyone?). Such dogma is appropriate when dealing with the CPython VM, but not as a general principle. Rocket fuel may be dangerous, but you ain't shooting the moon without it! Cheers, Warren -- http://mail.python.org/mailman/listinfo/python-list
Re: Safe eval of insecure strings containing Python data structures?
On Thu, Oct 9, 2008 at 2:26 PM, Warren DeLano [EMAIL PROTECTED] wrote: JSON rocks! Thanks everyone. Yes it does :) Ben wrote: More generally, you should never execute (via eval, exec, or whatever) *any* instruction from an untrusted path; especially not arbitrary data from an input stream. I second this. Wow, for the record, I completely disagree with this point of view: Today's web apps wouldn't exist without safe forms of untrusted eval/exec (Javascript anyone?). Such dogma is appropriate when dealing with the CPython VM, but not as a general principle. It's far better to use Data Structures rather than Programming Constructs to represent and transmit your data. Rocket fuel may be dangerous, but you ain't shooting the moon without it! Do we trust fuel from untrusted sources ? cheers James -- -- -- Problems are solved by method -- http://mail.python.org/mailman/listinfo/python-list
Re: re : do something in time interval
In message [EMAIL PROTECTED], Hendrik van Rooyen wrote: import time while True: end_time = time.time() + 5 while time.time() end_time: do_the_in_between_stuff() do_the_every_five_second_stuff() Maybe I'm dense, but ... where do you stop the busy-waiting? -- http://mail.python.org/mailman/listinfo/python-list
Re: Porn Addiction Solutions?
[EMAIL PROTECTED] wrote: Help, I'm addicted to porn. I've been spending a lot of time downloading hardcore porn and masturbating to it. It's ruining my life. I just found out that one of these sites somehow hacked my card and rang up $5K in charges which they won't even refund me. Even with that I haven't stopped my habit and it's only getting worse. How can I end this addiction? Any suggestions? Hi, they didn't hack your account, you gave it to them. if they're unauthorized charges (not you subscribed to expensive porn sites and now don't to pay, or you didn't bother to cancel your subscription) contest them -- http://mail.python.org/mailman/listinfo/python-list
Re: Porn Addiction Solutions?
On Oct 8, 2:07 pm, [EMAIL PROTECTED] wrote: Help, I'm addicted to porn. I've been spending a lot of time downloading hardcore porn and masturbating to it. It's ruining my life. I just found out that one of these sites somehow hacked my card and rang up $5K in charges which they won't even refund me. Even with that I haven't stopped my habit and it's only getting worse. How can I end this addiction? Any suggestions? Do you want ideas for strategies for contending with it? Do you want to talk? Do you want ideas for other places to find people to talk to? -- http://mail.python.org/mailman/listinfo/python-list
[issue4064] distutils.util.get_platform() is wrong for universal builds on macosx
Ronald Oussoren [EMAIL PROTECTED] added the comment: On 7 Oct, 2008, at 22:13, Martin v. Löwis wrote: Martin v. Löwis [EMAIL PROTECTED] added the comment: Somewhere along the way the calculation of the architecture string got messed up, resulting in the current situation. That is, the current situation is not as designed by the original author of the universal binary support code. Ok, what *is* the desired way of naming architectures on that system? Is that documented somewhere? It is not documented anywhere but in the code, but this is the intended behaviour: * A single architecture build (what you would build on any other unix platform) uses the architecture string of the architecture it was build for (that is, i386, ppc, x86_64 or ppc64) * A 32-bit universal build uses fat as the architecture string, regardless of the architecture of the machine we're running on. As an exception: OS X 10.3.9 machines are treated as if we're on a single architecture build because the compiler on that platform doesn't support building fat binaries. * A 4-way universal build (that is, including all architectures supported by OSX) uses universal as the architecture string. We (Bob Ippolitto and I) had some discussion about the architecture strings when we were working on support for universal binaries and rejected my initial suggestion of using i386,ppc instead of fat because that would be unwieldy. Ronald ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4064 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4064] distutils.util.get_platform() is wrong for universal builds on macosx
Martin v. Löwis [EMAIL PROTECTED] added the comment: It is not documented anywhere but in the code These also appear in file names of bdist commands, right? So I think it should be documented. We (Bob Ippolitto and I) had some discussion about the architecture strings when we were working on support for universal binaries and rejected my initial suggestion of using i386,ppc instead of fat because that would be unwieldy. OK. I wonder how you will call fat 64-bit binaries (i.e. ppc64 and amd64), but I can live with that semantics as long as it's documented (I actually question that it is documented in the code. If somebody would put -arch Itanium in her CFLAGS, which might be supported in 10.9, it would infer that the architecture is fat). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4064 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4072] build_py support for lib2to3 is stale
Martin v. Löwis [EMAIL PROTECTED] added the comment: Here is a patch. I also include a test case, which is intended to go into the Demo directory. -- keywords: +patch Added file: http://bugs.python.org/file11744/build_py.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4072] build_py support for lib2to3 is stale
Changes by Martin v. Löwis [EMAIL PROTECTED]: -- keywords: +needs review Added file: http://bugs.python.org/file11745/test2to3.tar.gz ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4063] sphinx: make all-pdf does not exist.
Thomas Guettler [EMAIL PROTECTED] added the comment: Dear georg, I am sorry that I wasted your time. Yes, I ignored the part '..in that directory'. I couldn't find a way to close this ticket, also I am logging in. Do you need special privileges for this? Nevertheless, thank you for Sphinx. Thomas ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4063 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4063] sphinx: make all-pdf does not exist.
Georg Brandl [EMAIL PROTECTED] added the comment: Yes, closing tickets (and changing metadata like priority) is only possible for developers. -- status: pending - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4063 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit)
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Running help() or mktemp() causes _getfullpathname to be called with the whole system path (791 characters) I am not sure to understand. Do you mean the whole PATH environment variable? I doubt that it is passed to _getfullpathname. Or do you have very long paths for one directory? the TEMP environment variable, for example? I'd be curious to see its value. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1597850] Cross compiling patches for MINGW
rwmjones [EMAIL PROTECTED] added the comment: Just to clarify, in the MinGW case we are interested in: build = Fedora Linux, usually i386 or x86-64 (but not always) host = Windows i386 We can, to a limited extent, run the host binaries on the build system, using Wine (the Windows emulator). This doesn't always work, and in any case is usually regarded as the wrong thing to do because Wine is a very large and complicated build dependency which requires, amongst other things, a working X server. Also since Wine doesn't run on anything which is not x86-like, if we have to run Wine during the build then we cannot cross-compile from other Fedora build systems, specifically ppc and sparc. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1597850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4068] Backport fix for issue 3312
Gerhard Häring [EMAIL PROTECTED] added the comment: Thanks, committed in revision 66843. -- status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4068 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1597850] Cross compiling patches for MINGW
Roumen Petrov [EMAIL PROTECTED] added the comment: Hi rwmjones, Please, could you test patch from issue3871 - python modules are build as setup.py is run from python found on the build system. So I don't expect issue with ppc and sparc. Minor issue is pgen.exe - work around touch grammar files. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1597850 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header
STINNER Victor [EMAIL PROTECTED] added the comment: More fun will arise when my Windows terminal (encoding=cp1252) will try to display Chinese characters. Let's pretend this is yet another issue. I tried the patch using a script with unicode characters (character not representable in ISO-8859-1 like polish characters ł and Ł). Result in an UTF-8 terminal (my default locale): Traceback (most recent call last): File unicode.py, line 2, in module raise ValueError(unicode: Łł) ValueError: unicode: Łł = correct Result in an ISO-8859-1 terminal (I changed the encoding in my Konsole configuration): Traceback (most recent call last): File unicode.py, line 2, in module raise ValueError(unicode: \u0141\u0142) ValueError: unicode: \u0141\u0142 = correct Why does it work? It's because PyErr_Display() uses sys.stderr instead of sys.stdout and sys.stderr uses a different unicode error mechanism: import sys sys.stdout.errors 'strict' sys.stderr.errors 'backslashreplace' Which is a great idea :-) You can try on Windows using the new attached file unicode.py. Added file: http://bugs.python.org/file11746/unicode.py ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header
Changes by STINNER Victor [EMAIL PROTECTED]: Added file: http://bugs.python.org/file11748/traceback_unicode-5.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4072] build_py support for lib2to3 is stale
Mark Hammond [EMAIL PROTECTED] added the comment: r=me - thanks. -- keywords: -needs review resolution: - accepted ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4075] Use WCHAR variant of OutputDebugString
New submission from Ulrich Eckhardt [EMAIL PROTECTED]: The attached patch converts the call to OutputDebugString() with a 'TCHAR' parameter (which boils down to a 'char') to one using a 'WCHAR' parameter, allowing the code to be compiled under MS Windows CE, which doesn't have the 'char' version. -- components: Windows files: Python-OutputDebugStringW.0.patch keywords: patch messages: 74527 nosy: eckhardt severity: normal status: open title: Use WCHAR variant of OutputDebugString type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file11749/Python-OutputDebugStringW.0.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit)
Jason Day [EMAIL PROTECTED] added the comment: I am not sure to understand. Do you mean the whole PATH environment variable? I doubt that it is passed to _getfullpathname. Or do you have very long paths for one directory? the TEMP environment variable, for example? I'd be curious to see its value. I don't have it offhand, but it was the whole PATH environment variable, complete with semicolons. That's probably the *real* bug. Whatever was passing that into abspath didn't seem to mind getting back an empty string (although that may have been further processed in the function, I didn't follow past the call to _getfullpathname). And one decision problem... What should we do when too long str is passed to ntpath._getfullpathname? Report overflow error? Or convert to unicode and retry with GetFullPathNameW? Hmm abspath should be able to be called with str or unicode of arbitrary lengths. Consumers of it shouldn't have to be concerned with the platform implementation when it can be smoothed over by the module. Whether this is done in abspath or _getfullpathname probably isn't too important, since end-users generally shouldn't be calling _getfullpathname, directly. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11747/traceback_unicode-5.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header
Changes by STINNER Victor [EMAIL PROTECTED]: Removed file: http://bugs.python.org/file11736/traceback_unicode-4.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header
STINNER Victor [EMAIL PROTECTED] added the comment: @amaury: Oops, yes, I introduced a refleak in the version 4 with the PyUnicode_Check(). Instead of just moved Py_(X)RECREF(lineobj);, I could not not resist to refactor the code to remove one more indentation level (I prefer if (...) return; instead of if (...) { very long block; }). Changes in version 5: - rename 'namebuf' buffer to 'buf', it's used for the filename and to display the indentation space (strcpy(buf, ' ');). - move Py_DECREF(fob); at the end of the GetLine loop - return on lineobj error I think that the new version is easier to read than the current code because they are few indentation and no more local variables (if (...) { local var; ... }) Added file: http://bugs.python.org/file11747/traceback_unicode-5.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4076] Cannot build non-framework tkinter Python on Mac OS X.5
New submission from Dan OD [EMAIL PROTECTED]: On a Mac running OS X 10.5: As per previous releases, I have set up _tkinter in Modules/Setup.dist with a unix X11 Tcl/Tk build variables. I then run ./configure make This builds _tkinter with (wrongly) the Mac Tcl framework (ie not X11) building '_tkinter' extension gcc-4.2 -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict- prototypes -DWITH_APPINIT=1 - I/System/Library/Frameworks/Tcl.framework/Headers - I/System/Library/Frameworks/Tcl.framework/Versions/Current/PrivateHeader s -I/System/Library/Frameworks/Tk.framework/Headers - I/System/Library/Frameworks/Tk.framework/Versions/Current/PrivateHeaders -I/usr/X11R6/include -I. -I/Users/djo35/src/Python-3.0rc1/./Include -I. -IInclude -I./Include -I/usr/local/include -I/Users/djo35/src/Python- 3.0rc1/Include -I/Users/djo35/src/Python-3.0rc1 -c /Users/djo35/src/Python-3.0rc1/Modules/_tkinter.c -o build/temp.macosx- 10.3-i386-3.0/Users/djo35/src/Python-3.0rc1/Modules/_tkinter.o - framework Tk I would like this to build a unix tkinter.so - is this possible? I can't find a reference in the 3k documentation. Thanks, Dan -- components: Build messages: 74528 nosy: indiedan severity: normal status: open title: Cannot build non-framework tkinter Python on Mac OS X.5 type: behavior versions: Python 3.0 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4076 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4075] Use WCHAR variant of OutputDebugString
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The alloca() function should be avoided here: the function may be called in extreme conditions, like stack overflow. I suggest to use a small static buffer (50 chars?), and call OutputDebugStringW in a loop. -- nosy: +amaury.forgeotdarc ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit)
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: I don't have it offhand, but it was the whole PATH environment variable, complete with semicolons. That's probably the *real* bug. Indeed. Do you happen to have the complete traceback of the failing tempfile.mktemp() call? I don't see where it can use the PATH environment variable. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4077] Py_FatalError cleanup patch
New submission from Ulrich Eckhardt [EMAIL PROTECTED]: This patch does two things: * It removes trailing newlines from the arguments given to Py_FatalError() because a trailing newline is already added automatically. * It fixes the declaration in ffi.c to take a 'const char*'. -- components: None files: Python-FatalError-no-newline.0.patch keywords: patch messages: 74531 nosy: eckhardt severity: normal status: open title: Py_FatalError cleanup patch type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file11750/Python-FatalError-no-newline.0.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3288] float.as_integer_ratio method is not documented
Georg Brandl [EMAIL PROTECTED] added the comment: Would be nice, yes. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4056] :Class: causes exception
Georg Brandl [EMAIL PROTECTED] added the comment: [Sphinx issues are now tracked at http://code.google.com/p/sphinx -- moved the issue there.] -- resolution: - duplicate status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4056 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3909] Building PDF documentation from tex files
Georg Brandl [EMAIL PROTECTED] added the comment: OK, no problem. I should have thought about that sooner. Happy TeXing :) -- resolution: - works for me status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3909 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4077] Py_FatalError cleanup patch
Changes by Amaury Forgeot d'Arc [EMAIL PROTECTED]: -- assignee: - amaury.forgeotdarc keywords: +easy nosy: +amaury.forgeotdarc ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4077 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4055] Documentation on website is missing section numbers
Georg Brandl [EMAIL PROTECTED] added the comment: I disagree that missing section numbers are a severe usability hit. Especially in the context that the new docs are constantly updated, there's no telling when section numbers will shift, misleading those who only navigate by section number. In contrast, a link is persistent and usually also quicker to get to. That said, I acknowledge the wish for section numbers, and there is an issue entry about it in the tracker for the Sphinx project, which is used to build the new docs, at http://code.google.com/p/sphinx. Closing this one as duplicate. -- resolution: - duplicate status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4055 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: The code is indeed easier to follow. I don't have any more remark, thanks to you perseverance! Now, is there some unit test we could provide? #2384 depends on this issue, it should be easy to extract a small test case. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4059] sqlite3 docs incomplete
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, committed as r66854. -- resolution: - fixed status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4059 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4058] markup in What's New in 2.6
Georg Brandl [EMAIL PROTECTED] added the comment: Thanks, committed as r66855. -- resolution: - accepted status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4058 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3975] PyTraceBack_Print() doesn't respect # coding: xxx header
STINNER Victor [EMAIL PROTECTED] added the comment: My patch for #2384 contains a testcase which require #3975 and #2384 to be fixed (you have to apply both patches to test it). ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3975 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4078] asyncore fixes are not backwards compatible
New submission from Sidnei da Silva [EMAIL PROTECTED]: I am working on getting Zope to run (or at least, start) with Python 2.6. It actually starts right now after applying some patches, which is amazing on itself, but it dies right away due to changes in asyncore that break Zope's internal version of medusa. I've opened a bug against Zope on Launchpad, but someone suggested that it might actually be a bug in python, in the sense that it changed asyncore in a backwards-incompatible way. I wouldn't go that far, since I think it's more likely that Zope's version of medusa is poking into asyncore internals instead. Here's the bug, for reference: https://bugs.launchpad.net/zope2/+bug/280020 I suspect a change similar to this will need to be applied to medusa: http://codereview.appspot.com/744/diff/1/23 I'm puzzled though as to why the change is incompatible. I would have expected at least some kind of deprecation warning on Python 2.5. Either way, if you think the issue needs to be fixed in medusa feel free to close this bug. -- components: Library (Lib) messages: 74540 nosy: sidnei severity: normal status: open title: asyncore fixes are not backwards compatible type: behavior versions: Python 2.6 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4078] asyncore fixes are not backwards compatible
Changes by Giampaolo Rodola' [EMAIL PROTECTED]: -- nosy: +giampaolo.rodola, josiah.carlson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4079] new urllib2.Request 'timeout' attribute needs to have a default
New submission from Sidnei da Silva [EMAIL PROTECTED]: 'urllib2' has introduced a configurable 'timeout' setting by assigning to the 'timeout' attribute of the urllib2.Request object. However the implementation is flawed: - the 'timeout' attribute is set in OpenerDirector.open() and nowhere else - if someone overrides OpenerDirector.open() (btw: mechanize does this), then the 'timeout' attribute will never be set, breaking other parts of the code which require the 'timeout' attribute to be present. A simple workaround for this would be to do one or more of: a) define the 'timeout' attribute as socket._GLOBAL_DEFAULT_TIMEOUT at class-level b) initialize the 'timeout' attribute on urllib2.Request.__init__() -- components: Library (Lib) messages: 74541 nosy: sidnei severity: normal status: open title: new urllib2.Request 'timeout' attribute needs to have a default type: behavior versions: Python 2.6 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4079 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4075] Use WCHAR variant of OutputDebugString
Martin v. Löwis [EMAIL PROTECTED] added the comment: I agree that a static buffer should be used. I think calling it in a loop is overkill. Instead, if an overrun occurs, adding (truncated) should be good enough. I could find only a single caller that doesn't pass a static string (_Py_NegativeRefcount), where I think 50 characters are still plenty. -- nosy: +loewis ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4075 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3935] bisect insort C implementation ignores methods on list subclasses
Georg Brandl [EMAIL PROTECTED] added the comment: OK, committed as r66856, should get merged to 3.0 soon. -- status: open - closed ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3935 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4017] IDLE 2.6 broken on OSX (Leopard)
Leo M [EMAIL PROTECTED] added the comment: Hello. First time here, beginner at Python. I have verified that the Google tip link in the previous to fix IDLE works for me. Post in question: ** [Kevin's post of 6.Oct, 02:58] You can avoid this problem by building Python yourself and putting /Library/Frameworks first on the search path for Tcl/Tk. Look in setup.py in the source code, around line 1438 (in the 'detect_tkinter_darwin' function), and either comment out /System/Library or put it underneath /Library/Frameworks. This is what the official build from Python.org should do--look first in /Library/Frameworks and then fall back on /System/Library/Frameworks. I'm not sure why it doesn't. ** In setup.py, I simply put /Library/Frameworks/ first as outlined above, and then did a config-make-install of the Framework version of Python. IDLE now does not silently fail now, but runs as 'expected'. -Leo Marihart Python Newb, Somewhat more experienced shell guy -- nosy: +leoofborg ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4017 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4080] pyunit - display time of each test case - patch
New submission from Pawel Prokop [EMAIL PROTECTED]: I've needed to measure each unit test running time to measure the performance changing of each functionality that every test case tests. Latest version of pyunit has only displayed summary running time of the suite, so I've implemented small enhancement to unittest.py that (in verbose mode) shows time of each test case run. Maybe that would be usefull for anybody else? -- components: None files: pyunit_time.patch keywords: patch messages: 74545 nosy: pprokop severity: normal status: open title: pyunit - display time of each test case - patch type: feature request versions: 3rd party Added file: http://bugs.python.org/file11751/pyunit_time.patch ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4080 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4072] build_py support for lib2to3 is stale
Benjamin Peterson [EMAIL PROTECTED] added the comment: The options dictionary only supports the print_function as of now, and that's default by false anyway. -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4072 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3714] nntplib module broken by str to unicode conversion
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- priority: critical - release blocker ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3714 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3725] telnetlib module broken by str to unicode conversion
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- priority: critical - release blocker ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3725 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3727] poplib module broken by str to unicode conversionhttp://bugs.python.org/issue3727
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- priority: - release blocker title: poplib module broken by str to unicode conversion - poplib module broken by str to unicode conversionhttp://bugs.python.org/issue3727 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3727] poplib module broken by str to unicode conversion
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- title: poplib module broken by str to unicode conversionhttp://bugs.python.org/issue3727 - poplib module broken by str to unicode conversion ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3727 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4078] asyncore fixes are not backwards compatible
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- assignee: - josiahcarlson nosy: +josiahcarlson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4078] asyncore fixes are not backwards compatible
Josiah Carlson [EMAIL PROTECTED] added the comment: Zope's medusa was relying on internal details of asyncore (the ac_out_buffer attribute), which is no longer applicable. It also seems as though much of medusa itself borrows from asynchat.async_chat, which suggests that it should subclass there. -- resolution: - wont fix ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1028088] Cookies without values are silently ignored (by design?)
Andres Riancho [EMAIL PROTECTED] added the comment: The RFC I'm talking about is: http://www.ietf.org/rfc/rfc2109.txt ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1028088 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4071] ntpath.abspath fails for long str paths
Changes by Jason Day [EMAIL PROTECTED]: -- title: ntpath.abspath can fail on Win Server 2008 (64-bit) - ntpath.abspath fails for long str paths ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4071] ntpath.abspath can fail on Win Server 2008 (64-bit)
Jason Day [EMAIL PROTECTED] added the comment: Indeed. Do you happen to have the complete traceback of the failing tempfile.mktemp() call? I don't see where it can use the PATH environment variable. The problem was that somehow, on our systems, the TEMP environmental variable had been copied over with PATH. Most likely some batch file tried to store a copy of PATH, without realizing the significance of TEMP. [groan] Anyway, I still think that it's a bug that abspath() can't be called with a perfectly good str path, because of limitations with the windows api. I edited the bug title to reflect the actual bug. The str path length could be checked and upgraded to the Unicode version, if necessary (or try again with the unicode version, in the case of an exception). I think it's important to ensure that when abspath() is called with str, it returns str, even if it was upgraded to the unicode call. -- title: ntpath.abspath fails for long str paths - ntpath.abspath can fail on Win Server 2008 (64-bit) ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4071 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3994] import fixer misses some symbols
Nick Edds [EMAIL PROTECTED] added the comment: The problem is that fix_imports doesn't look at matches that are nested within matches. So the _winreg.OpenKey part gets fixed, but the _winreg.HKEY_LOCAL_MACHINE does not because it is nested within the other node. I didn't make fix_imports so I don't know what the intention was for not matching nested matches. When I removed that restriction, the fixer works as expected. It also does not cause any of 2to3's tests to fail nor does it have a noticeable impact on 2to3's runtime, so I'm tempted to say that this is the fix to make, but I don't want to commit to it until I've heard from it's author about it. I added Collin to the Nosy List, so hopefully he can comment on the reasoning behind the restriction. -- nosy: +collinwinter ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3994 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4081] Error copying directory to _static in Sphinx
New submission from Tim Delaney [EMAIL PROTECTED]: If there is a directory to be copied to _static, Sphinx first attempts to delete any directory by the same name in the _static directory. See attached sphinx_static_exc.txt for the exception. The simplest fix is to change the call (line 595, Sphinx 0.4.2) to:: shutil.rmtree(targetname) to:: shutil.rmtree(targetname, ignore_errors=True) It would also be preferable if instead of blindly doing rmtree/copytree, only updated files be copied to _static. -- assignee: georg.brandl components: Documentation tools (Sphinx) files: sphinx_static_exc.txt messages: 74551 nosy: georg.brandl, tcdelaney severity: normal status: open title: Error copying directory to _static in Sphinx type: crash Added file: http://bugs.python.org/file11752/sphinx_static_exc.txt ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4081] Error copying directory to _static in Sphinx
Tim Delaney [EMAIL PROTECTED] added the comment: Oops - didn't complete my thought. The issue is that if the directory does not already exist, the attached exception is raised. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4081 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1284316] Win32: Security problem with default installation directory
Changes by Mark Hammond [EMAIL PROTECTED]: -- nosy: +mhammond ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue1284316 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4082] python2.6 -m site doesn't run site._script() any more
New submission from Christian Heimes [EMAIL PROTECTED]: python2.6 -m site used to print some status information to the console. python3.0 -m site and python2.5 -m site are still working as expected. An initial debug session showed that the site module isn't imported a second time under the name __main__. I suspect a regression in runpy or related code. -- components: Library (Lib) messages: 74553 nosy: christian.heimes priority: normal severity: normal status: open title: python2.6 -m site doesn't run site._script() any more versions: Python 2.6, Python 2.7 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4082] python2.6 -m site doesn't run site._script() any more
Changes by Christian Heimes [EMAIL PROTECTED]: -- type: - behavior ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4082] python2.6 -m site doesn't run site._script() any more
Benjamin Peterson [EMAIL PROTECTED] added the comment: I concur with the Christian's analysis: $ python2.6 -m site $ python2.6 -S -m site [output] -- nosy: +benjamin.peterson ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4082] python2.6 -m site doesn't run site._script() any more
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- nosy: +ncoghlan ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4082 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3001] RLock's are SLOW
Hugh Gibson [EMAIL PROTECTED] added the comment: I doubt subclassability of RLock matters but who knows, people do code things. I've recently done this to implement potential deadlock detection. I keep a record of the sequences of acquired locks, find unique sequences, then check for conflicts between each sequence. There's not much overhead and it highlighted some potential deadlocks where lock A and B were acquired AB in one route through code and BA in another route. The algorithm is a simplified version of that used in Linux - see http://www.mjmwired.net/kernel/Documentation/lockdep-design.txt Hugh -- nosy: +hgibson50 ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3001 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com