[ANN] Leipzig Python User Group - Meeting, April 13, 2010, 08:00pm

2010-04-10 Thread Stefan Schwarzer
=== Leipzig Python User Group === We will meet on Tuesday, April 13, 8:00 pm at the training center of Python Academy in Leipzig, Germany ( http://www.python-academy.com/center/find.html ). We will evaluate the booth we had at the Chemnitzer Linuxtage and plan improvements for next year. Food

[RELEASED] 2.7 beta 1

2010-04-10 Thread Benjamin Peterson
On behalf of the Python development team, I'm merry to announce the first beta release of Python 2.7. Python 2.7 is scheduled (by Guido and Python-dev) to be the last major version in the 2.x series. Though more major releases have not been absolutely ruled out, it's likely that the 2.7 release

Re: Python Line Intersection

2010-04-10 Thread Mark Tolonen
Chris Rebert c...@rebertia.com wrote in message news:y2o50697b2c1004091304u627d99bfj44ad56fa76a3c...@mail.gmail.com... On Fri, Apr 9, 2010 at 11:43 AM, John Nagle na...@animats.com wrote: Chris Rebert wrote: On Fri, Apr 9, 2010 at 8:04 AM, Peyman Askari peter_peyman_...@yahoo.ca wrote:

Re: Python Line Intersection

2010-04-10 Thread Lie Ryan
On 04/10/10 16:24, Mark Tolonen wrote: Chris Rebert c...@rebertia.com wrote in message news:y2o50697b2c1004091304u627d99bfj44ad56fa76a3c...@mail.gmail.com... On Fri, Apr 9, 2010 at 11:43 AM, John Nagle na...@animats.com wrote: Chris Rebert wrote: On Fri, Apr 9, 2010 at 8:04 AM, Peyman

Re: Striving for PEP-8 compliance

2010-04-10 Thread Lawrence D'Oliveiro
In message 18988a53-e88f-4abf- a83a-314b16653...@x12g2000yqx.googlegroups.com, Patrick Maupin wrote: I want nothing to do with any programmer who would mis-indent their code. But what happens when you’re trying to reconcile two different indentation conventions? In Python, there can be

Re: Striving for PEP-8 compliance

2010-04-10 Thread Lawrence D'Oliveiro
In message hpokef$gv...@reader1.panix.com, Grant Edwards wrote: On 2010-04-10, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message hpoh5j$35...@reader1.panix.com, Grant Edwards wrote: Anybody who invents another brace-delimited language should be beaten. You always end

Re: How to read file during module import?

2010-04-10 Thread Dave Angel
Jeremy wrote: I have a module that, when loaded, reads and parses a supporting file. The supporting file contains all the data for the module and the function that reads/parses the file sets up the data structure for the module. How can I locate the file during the import statement. The

Re: Pythonic list reordering

2010-04-10 Thread Kent Engström
Ben Racine i3enha...@gmail.com writes: I have a list... ['dir_0_error.dat', 'dir_120_error.dat', 'dir_30_error.dat', 'dir_330_error.dat'] I want to sort it based upon the numerical value only. Does someone have an elegant solution to this? I use code like the hack below to sort

tv channels all over the world USA TV CHANNELS PAKISTANI TV CHANNELS INDIAN TV CHANNELS UK TV CHANNELS BRAZIL TV CHANNELS CANADA TV CHANNELS DANW TV GEO TV SAMA TV AAJ TV ON htt

2010-04-10 Thread Naeem
tv channels all over the world USA TV CHANNELS PAKISTANI TV CHANNELS INDIAN TV CHANNELS UK TV CHANNELS BRAZIL TV CHANNELS CANADA TV CHANNELS DANW TV GEO TV SAMA TV AAJ TV ON http://all-time-tv.blogspot.com/GREECE TV CHANNELS BELGIUM TV CHANNELS SWEDEN TV CHANNELS RUSSIAN TV CHANNELS CHINA

Re: Performance of list vs. set equality operations

2010-04-10 Thread Stefan Behnel
Steven D'Aprano, 08.04.2010 03:41: On Wed, 07 Apr 2010 10:55:10 -0700, Raymond Hettinger wrote: [Gustavo Nare] In other words: The more different elements two collections have, the faster it is to compare them as sets. And as a consequence, the more equivalent elements two collections have,

Re: Striving for PEP-8 compliance

2010-04-10 Thread Ben Finney
I'm interested that you are holding what appear to be contradictory arguments, and don't seem to apply each one to the other. Let me take the latest expressions of these and show how they can apply equally in either direction: Lawrence D'Oliveiro l...@geek-central.gen.new_zealand writes: But

Re: Striving for PEP-8 compliance

2010-04-10 Thread Grant Edwards
On 2010-04-10, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message hpokef$gv...@reader1.panix.com, Grant Edwards wrote: On 2010-04-10, Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote: In message hpoh5j$35...@reader1.panix.com, Grant Edwards wrote: Anybody

Re: python as pen and paper substitute

2010-04-10 Thread Manuel Graune
Michael Torrie torr...@gmail.com writes: Did you look at the link to Owen Taylor's reinteract program? I think it's closer to what you want than any other thing mentioned here, with the exception that it's a standalone GTK (graphical) app. Yes, I did. And I think this program is a great

Re: braceless and semicolonless

2010-04-10 Thread CHEN Guang
Hi Peter, In PythoidC, I handled C header files (and other C files for INCLUDE) with Python regular expression (RE). First, I use the following RE to break C header files or C files into pieces sepRE=_re.compile(r'\; | \{ | \} | // | /\* | \*/ | \r?\n',_re.VERBOSE) Then, I carefully designed a

On Class namespaces, calling methods

2010-04-10 Thread vsoler
Still learning python, especially OOP. While testing classes, I sometimes think of them as ordinary containers of values and functions (methods). That is, values and functions can be grouped together inside namespaces calles classes. class Uno: a=1 def m(): print mouse Say that

Re: Clearing memory (namespace) before running code

2010-04-10 Thread vsoler
On Mar 21, 5:18 pm, Jon Clements jon...@googlemail.com wrote: On 21 Mar, 15:02, vsoler vicente.so...@gmail.com wrote: Hi, Is there a way to erase/delete/clear memory before a piece of code is run? Otherwise, the objects of the previous run are re-usable, and may bring confusion to

ANN: obfuscate 0.2.2

2010-04-10 Thread Steven D'Aprano
I am pleased to announce the first stable release of obfuscate, version 0.2.2. http://pypi.python.org/pypi/obfuscate/ obfuscate is a pure-Python module providing classical encryption algorithms suitable for obfuscating and unobfuscating text. This is a maintenance release of back-end and API

Re: On Class namespaces, calling methods

2010-04-10 Thread Duncan Booth
vsoler vicente.so...@gmail.com wrote: I get the following error message: TypeError: m() takes no arguments (1 given) Since I have not created any instances of Uno, there is no self object, and I do not understand what object is supplied to the function call. Could anybody explain

Re: On Class namespaces, calling methods

2010-04-10 Thread Alex Hall
On 4/10/10, vsoler vicente.so...@gmail.com wrote: Still learning python, especially OOP. While testing classes, I sometimes think of them as ordinary containers of values and functions (methods). That is, values and functions can be grouped together inside namespaces calles classes. class

Re: Pythonic list reordering

2010-04-10 Thread alex23
On Apr 9, 8:52 am, Ben Racine i3enha...@gmail.com wrote: I have a list... ['dir_0_error.dat', 'dir_120_error.dat', 'dir_30_error.dat', 'dir_330_error.dat'] I want to sort it based upon the numerical value only. Does someone have an elegant solution to this? This approach doesn't rely on

Re: Pythonic list reordering

2010-04-10 Thread MRAB
alex23 wrote: On Apr 9, 8:52 am, Ben Racine i3enha...@gmail.com wrote: I have a list... ['dir_0_error.dat', 'dir_120_error.dat', 'dir_30_error.dat', 'dir_330_error.dat'] I want to sort it based upon the numerical value only. Does someone have an elegant solution to this? This approach

Re: On Class namespaces, calling methods

2010-04-10 Thread vsoler
On Apr 10, 4:46 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: vsoler vicente.so...@gmail.com wrote: I get the following error message:      TypeError: m() takes no arguments (1 given) Since I have not created any instances of Uno, there is no self object, and I do not understand

Re: On Class namespaces, calling methods

2010-04-10 Thread vsoler
On Apr 10, 4:46 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: vsoler vicente.so...@gmail.com wrote: I get the following error message:      TypeError: m() takes no arguments (1 given) Since I have not created any instances of Uno, there is no self object, and I do not understand

Re: Pythonic list reordering

2010-04-10 Thread alex23
MRAB pyt...@mrabarnett.plus.com wrote: The string module still exists in Python 3.x, but the string functions which have been superseded by string methods have been removed. Awesome, thanks for the heads up. -- http://mail.python.org/mailman/listinfo/python-list

Re: On Class namespaces, calling methods

2010-04-10 Thread Laszlo Nagy
class Uno: a=1 def m(): print mouse Say that I have this silly class. While I can then write print Uno.a I cannot write Uno.m() I get the following error message: TypeError: m() takes no arguments (1 given) As a workaround, use this pattern: class

Re: Python and Regular Expressions

2010-04-10 Thread Neil Cerutti
On 2010-04-08, Richard Lamboj richard.lam...@bilcom.at wrote: If someone knows good links to this thema, or can explain how parsers should/could work, please post it, or explain it. Thanks for the Informations and the Help! I liked Crenshaw's Let's Build a Compiler!. It's pretty trivial to

Re: Striving for PEP-8 compliance

2010-04-10 Thread Patrick Maupin
On Apr 10, 5:10 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message 18988a53-e88f-4abf- a83a-314b16653...@x12g2000yqx.googlegroups.com, Patrick Maupin wrote: I want nothing to do with any programmer who would mis-indent their code. But what happens when you’re

Re: On Class namespaces, calling methods

2010-04-10 Thread vsoler
On Apr 10, 5:28 pm, Laszlo Nagy gand...@shopzeus.com wrote: class Uno:     a=1     def m():         print mouse Say that I have this silly class. While I can then write       print Uno.a I cannot write       Uno.m() I get the following error message:      TypeError: m()

Re: On Class namespaces, calling methods

2010-04-10 Thread Patrick Maupin
On Apr 10, 9:26 am, vsoler vicente.so...@gmail.com wrote: class Uno:     a=1     def m():         print mouse ... I cannot write       Uno.m() By default (at least in Python 2.x), Python will pass any function which is accessed through getattr on class or instance (usually called a

finding objects in a piece of functional code ?

2010-04-10 Thread Stef Mientki
hello, I would like to translate some functional description into some standard class object, so it can be used as a basic building brick into a larger piece of code. Suppose the functional description is: Name = 'Test_Function' Out = 3 * In That's all I would like to write. So it should be

Tempering Client Expectations (OT)

2010-04-10 Thread Victor Subervi
Hi; I'm working with my first client where I've developed a custom script. I way underbid the project and I ate that as part of my learning experience. We outlined as precisely as I knew how what functionality was needed. Then he went to input data and lo and behold he needed more functionality. I

Re: Python and Regular Expressions

2010-04-10 Thread Patrick Maupin
On Apr 8, 5:13 am, Nobody nob...@nowhere.com wrote: On Wed, 07 Apr 2010 18:25:36 -0700, Patrick Maupin wrote: Regular expressions != Parsers True, but lots of parsers *use* regular expressions in their tokenizers.  In fact, if you have a pure Python parser, you can often get huge

Re: On Class namespaces, calling methods

2010-04-10 Thread Duncan Booth
vsoler vicente.so...@gmail.com wrote: On Apr 10, 4:46 pm, Duncan Booth duncan.bo...@invalid.invalid wrote: vsoler vicente.so...@gmail.com wrote: I get the following error message:      TypeError: m() takes no arguments (1 given) snip Which version of Python are you using? Python 2.6

Re: Python and Regular Expressions

2010-04-10 Thread Neil Cerutti
On 2010-04-10, Patrick Maupin pmau...@gmail.com wrote: Trust me, I already knew that. But what you just wrote is a much more useful thing to tell the OP than Every time someone tries to parse nested structures using regular expressions, Jamie Zawinski kills a puppy which is what I was

KARACHI UNIVERSITY Centers of BSc (Pass) 1st/2nd year Computer Science Practical Examination 2009 KARACHI UNIVERSITY DATE SHEET B.COM BA / B.SC MA / M.SC FA / F.SC. METRIC BOARD ON http

2010-04-10 Thread saima81
KARACHI UNIVERSITY Centers of BSc (Pass) 1st/2nd year Computer Science Practical Examination 2009 KARACHI UNIVERSITY DATE SHEET B.COM BA / B.SC MA / M.SC FA / F.SC. METRIC BOARD ON http://interface-edu-pk.blogspot.com/ KARACHI UNIVERSITY Centers of BSc (Pass) 1st/2nd year Computer

Re: Cleanup guarantees?

2010-04-10 Thread Alf P. Steinbach
* Gabriel Genellina: En Fri, 09 Apr 2010 01:13:37 -0300, Alf P. Steinbach al...@start.no escribió: code language=Py3 import urllib.request # urlopen import codecs # getreader import sys # stderr def text_stream_from( url, encoding ): text_reader =

file events using fsevents for mac

2010-04-10 Thread gmail
Hi Everyone, I m using python3 for my application and i need to capture file events using fsevents. Is ter anyone knows to access fsevents in python3. thanks for help in advance rgds mathan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Regular Expressions

2010-04-10 Thread Patrick Maupin
On Apr 10, 11:35 am, Neil Cerutti ne...@norwich.edu wrote: On 2010-04-10, Patrick Maupin pmau...@gmail.com wrote: as Pyparsing.  Which is all well and good, except then the OP will download pyparsing, take a look, realize that it uses regexps under the hood, and possibly be very confused.

Re: Automatic import ?

2010-04-10 Thread Aahz
In article 4bac361d$0$8840$c3e8...@news.astraweb.com, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Thu, 25 Mar 2010 18:03:58 -0700, C. B. wrote: from mymodule import AAA from mymodule import BBB a = AAA(BBB())) But, as there is no case where AAA can be used without

Re: Classes as namespaces?

2010-04-10 Thread Aahz
In article hoihgt$p6...@reader1.panix.com, kj no.em...@please.post wrote: What's the word on using classes as namespaces? E.g. class _cfg(object): spam = 1 jambon = 3 huevos = 2 breakfast = (_cfg.spam, _cfg.jambon, _cfg.huevos) There is one gotcha associated with using classes

Re: Python and Regular Expressions

2010-04-10 Thread Stefan Behnel
Patrick Maupin, 10.04.2010 19:11: On Apr 10, 11:35 am, Neil Ceruttine...@norwich.edu wrote: On 2010-04-10, Patrick Maupinpmau...@gmail.com wrote: as Pyparsing. Which is all well and good, except then the OP will download pyparsing, take a look, realize that it uses regexps under the hood,

[RELEASED] 2.7 beta 1

2010-04-10 Thread Benjamin Peterson
On behalf of the Python development team, I'm merry to announce the first beta release of Python 2.7. Python 2.7 is scheduled (by Guido and Python-dev) to be the last major version in the 2.x series. Though more major releases have not been absolutely ruled out, it's likely that the 2.7 release

Re: Tempering Client Expectations (OT)

2010-04-10 Thread Tim Chase
On 04/10/2010 11:10 AM, Victor Subervi wrote: Hi; I'm working with my first client where I've developed a custom script. I way underbid the project and I ate that as part of my learning experience. We outlined as precisely as I knew how what functionality was needed. Then he went to input data

bps coordinate identification

2010-04-10 Thread Luis Quesada
Dear all, Given a gps coordinate, I would like to find out the country the coordinate belongs to. I wonder whether there is a python library that offers this capability... Thanks in advance for any pointer. Cheers, Luis PS: I am already aware of basemap but it seems we cannot answer this type

Re: The Regex Story

2010-04-10 Thread Dotan Cohen
Unreasonable phobia to regex is just as much harmful as overuse of it. Agreed. I did not mean to sound as if I am against the use of regular expressions. -- Dotan Cohen http://bido.com http://what-is-what.com -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: obfuscate 0.2.2

2010-04-10 Thread Paul Rubin
Steven D'Aprano st...@remove-this-cybersource.com.au writes: DISCLAIMER: obfuscate is not cryptographically strong, and should not be used where high security is required. Certainly no one should never use obfuscate's rot13 function for high security. Use at least double-rot13 instead, or

Re: [Python-Dev] [RELEASED] 2.7 beta 1

2010-04-10 Thread average
On behalf of the Python development team, I'm merry to announce the first beta release of Python 2.7. Python 2.7 is scheduled (by Guido and Python-dev) to be the last major version in the 2.x series.  Though more major releases have not been absolutely ruled out, it's likely that the 2.7

Re: [Python-Dev] [RELEASED] 2.7 beta 1

2010-04-10 Thread Melton Low
On Sat, Apr 10, 2010 at 4:13 PM, average dreamingforw...@gmail.com wrote: On behalf of the Python development team, I'm merry to announce the first beta release of Python 2.7. Python 2.7 is scheduled (by Guido and Python-dev) to be the last major version in the 2.x series. Though

Re: [Python-Dev] [RELEASED] 2.7 beta 1

2010-04-10 Thread Michael Ströder
average wrote: On behalf of the Python development team, I'm merry to announce the first beta release of Python 2.7. Python 2.7 is scheduled (by Guido and Python-dev) to be the last major version in the 2.x series. Though more major releases have not been absolutely ruled out, it's

Re: [RELEASED] 2.7 beta 1

2010-04-10 Thread Mensanator
On Apr 10, 5:45 pm, Michael Ströder mich...@stroeder.com wrote: average wrote: On behalf of the Python development team, I'm merry to announce the first beta release of Python 2.7. Python 2.7 is scheduled (by Guido and Python-dev) to be the last major version in the 2.x series.  

Re: [RELEASED] 2.7 beta 1

2010-04-10 Thread Chris Rebert
On Sat, Apr 10, 2010 at 4:47 PM, Mensanator mensana...@aol.com wrote: On Apr 10, 5:45 pm, Michael Ströder mich...@stroeder.com wrote: average wrote: On behalf of the Python development team, I'm merry to announce the first beta release of Python 2.7. Python 2.7 is scheduled (by Guido

Re: Python and Regular Expressions

2010-04-10 Thread Ethan Furman
Stefan Behnel wrote: Patrick Maupin, 10.04.2010 19:11: On Apr 10, 11:35 am, Neil Ceruttine...@norwich.edu wrote: On 2010-04-10, Patrick Maupinpmau...@gmail.com wrote: as Pyparsing. Which is all well and good, except then the OP will download pyparsing, take a look, realize that it uses

Re: On Class namespaces, calling methods

2010-04-10 Thread Steven D'Aprano
On Sat, 10 Apr 2010 16:35:29 +, Duncan Booth wrote: Anyway, the moral is never, ever to use old-style classes in Python 2.x. You will get weird and unexpected results. That's a bit strong. They're only weird and unexpected if you're not expecting them and don't understand them. Why are

Re: ANN: obfuscate 0.2.2

2010-04-10 Thread Steven D'Aprano
On Sat, 10 Apr 2010 13:34:17 -0700, Paul Rubin wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: DISCLAIMER: obfuscate is not cryptographically strong, and should not be used where high security is required. Certainly no one should never use obfuscate's rot13 function for

Re: Python and Regular Expressions

2010-04-10 Thread Steven D'Aprano
On Sat, 10 Apr 2010 10:11:07 -0700, Patrick Maupin wrote: On Apr 10, 11:35 am, Neil Cerutti ne...@norwich.edu wrote: On 2010-04-10, Patrick Maupin pmau...@gmail.com wrote: as Pyparsing.  Which is all well and good, except then the OP will download pyparsing, take a look, realize that it

Re: Performance of list vs. set equality operations

2010-04-10 Thread Terry Reedy
On 4/10/2010 8:32 AM, Stefan Behnel wrote: Steven D'Aprano, 08.04.2010 03:41: On Wed, 07 Apr 2010 10:55:10 -0700, Raymond Hettinger wrote: If the two collections have unequal sizes, then both ways immediately return unequal. Perhaps I'm misinterpreting what you are saying, but I can't

Re: Python and Regular Expressions

2010-04-10 Thread Paul Rubin
Steven D'Aprano st...@remove-this-cybersource.com.au writes: As entertaining as this is, the analogy is rubbish. Skis are far too simple to use as an analogy for a parser (he says, having never seen skis up close in his life *wink*). Have you looked at PyParsing's source code? Regexes are

Re: ANN: obfuscate 0.2.2

2010-04-10 Thread geremy condra
On Sun, Apr 11, 2010 at 1:17 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sat, 10 Apr 2010 13:34:17 -0700, Paul Rubin wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: DISCLAIMER: obfuscate is not cryptographically strong, and should not be used where

doctest.testfile fails on text files with Windows line endings

2010-04-10 Thread Steven D'Aprano
After converting a text file containing doctests to use Windows line endings, I'm getting spurious errors: ValueError: line 19 of the docstring for examples.txt has inconsistent leading whitespace: '\r' I don't believe that doctest.testfile is documented as requiring Unix line endings, and

Re: ANN: obfuscate 0.2.2

2010-04-10 Thread Steven D'Aprano
On Sun, 11 Apr 2010 03:00:50 +, geremy condra wrote: On Sun, Apr 11, 2010 at 1:17 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sat, 10 Apr 2010 13:34:17 -0700, Paul Rubin wrote: Steven D'Aprano st...@remove-this-cybersource.com.au writes: DISCLAIMER: obfuscate is

[Possibly OT] Comments on PyPI

2010-04-10 Thread Steven D'Aprano
How do I leave comments on PyPI? There's a checkbox Allow comments on releases which I have checked, but no obvious way to actually post a comment. There's a link on the sidebar called Comments, but it goes to a page about the Catalog SIG. I know there was a push to remove comments from PyPI

Re: daemon.DaemonContext and logging

2010-04-10 Thread Ben Finney
Sean DiZazzo half.ital...@gmail.com writes: I'm finally getting around to trying out the python-daemon module and have hit a wall. I'm trying to set up logging inside of the with daemon.DaemonContext block. But when I try to use a logger inside the block it throws an error: Specifically,

Re: doctest.testfile fails on text files with Windows line endings

2010-04-10 Thread Patrick Maupin
On Apr 10, 10:16 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: After converting a text file containing doctests to use Windows line endings, I'm getting spurious errors: ValueError: line 19 of the docstring for examples.txt has inconsistent leading whitespace: '\r' I

Re: 2.7 beta 1

2010-04-10 Thread Mensanator
On Apr 10, 7:15�pm, Chris Rebert c...@rebertia.com wrote: On Sat, Apr 10, 2010 at 4:47 PM, Mensanator mensana...@aol.com wrote: On Apr 10, 5:45�pm, Michael Str�der mich...@stroeder.com wrote: average wrote: On behalf of the Python development team, I'm merry to announce the first beta

SEC proposes the use of Python and XML

2010-04-10 Thread Ted Larson Freeman
This week the SEC proposed new requirements for asset-backed securities that include the use of XML and Python: The asset-level information would be provided according to proposed standards and in a tagged data format using eXtensible Markup Language (XML). In addition, we are proposing to

Re: Python and Regular Expressions

2010-04-10 Thread Paul McGuire
On Apr 10, 8:38 pm, Paul Rubin no.em...@nospam.invalid wrote: The impression that I have (from a distance) is that Pyparsing is a good interface abstraction with a kludgy and slow implementation.  That the implementation uses regexps just goes to show how kludgy it is.  One hopes that someday

Re: ANN: obfuscate 0.2.2

2010-04-10 Thread Aahz
In article mailman.1734.1270954853.23598.python-l...@python.org, geremy condra debat...@gmail.com wrote: On Sun, Apr 11, 2010 at 1:17 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sat, 10 Apr 2010 13:34:17 -0700, Paul Rubin wrote: Steven D'Aprano

Re: ANN: obfuscate 0.2.2

2010-04-10 Thread geremy condra
On Sun, Apr 11, 2010 at 3:44 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sun, 11 Apr 2010 03:00:50 +, geremy condra wrote: On Sun, Apr 11, 2010 at 1:17 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sat, 10 Apr 2010 13:34:17 -0700, Paul Rubin

Re: ANN: obfuscate 0.2.2

2010-04-10 Thread geremy condra
On Sun, Apr 11, 2010 at 4:37 AM, Aahz a...@pythoncraft.com wrote: In article mailman.1734.1270954853.23598.python-l...@python.org, geremy condra  debat...@gmail.com wrote: On Sun, Apr 11, 2010 at 1:17 AM, Steven D'Aprano st...@remove-this-cybersource.com.au wrote: On Sat, 10 Apr 2010 13:34:17

Re: 2.7 beta 1

2010-04-10 Thread alex23
Mensanator mensana...@aol.com wrote: 3.x won't be adopted by WINDOWS developers WHO USE IDLE until it's fixed. I think you left your hyperbole level too high so I turned it down for you. I don't know of _anyone_ who uses IDLE to run production code, nor do I follow how one errant IDE shows that

Error Occurs: Replace a character in a String

2010-04-10 Thread Jimbo
Hello, I am getting an error in my python script when I try to change a character in a string. [b]But I dont know why or what to do to fix it?[/b] I have commented in my code where the error occurs [code] def format_file(filename): HTML_file = open(filename,'r') HTML_source =

Re: [issue8355] diff.py produce unified format by default

2010-04-10 Thread Brian Curtin
On 2010-04-09, Eric Smith rep...@bugs.python.org wrote: Eric Smith e...@trueblade.com added the comment: I tried -p1 and it failed, but no matter. The contents were clear enough, and exactly how I would have changed the code. $ patch -p1 8355.diff-py-unified-by-default.diff patching file

[issue3581] failures in test_uuid

2010-04-10 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Sorry, the random node id generation in uuid.py is correct. The least significant bit of the first octet (which is set to 1) is the first one transmitted on the network, then the low 47 random bits follow. I assumed that the least

[issue3581] failures in test_uuid

2010-04-10 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- resolution: - accepted ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3581 ___ ___

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Abdellah Chelli
New submission from عبدالله شلي (Abdellah Chelli) sneets...@gmail.com: c/printf accepts this: n=1; printf(One hour., n); in other hand python/print rises an error: n=1 print One hour. % n Exactly the % formatting operation. (TypeError: not all arguments converted during string formatting)

[issue8360] doc: unittest.skipTest method added in 2.7

2010-04-10 Thread anatoly techtonik
Changes by anatoly techtonik techto...@gmail.com: -- assignee: georg.brandl components: Documentation files: doc.python-version-for-skiptest.diff keywords: patch nosy: georg.brandl, techtonik severity: normal status: open title: doc: unittest.skipTest method added in 2.7 versions:

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Can you use str.format instead? It doesn't have this restriction. It's available in 2.6 and 3.0. -- nosy: +eric.smith versions: +Python 2.7, Python 3.2 -Python 2.5, Python 2.6, Python 3.1 ___ Python

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Also, if you use the 'mapping' version of %-formatting you also don't have this restriction: 'One hour' % {'n': 3} -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8359

[issue8360] doc: unittest.skipTest method added in 2.7

2010-04-10 Thread Georg Brandl
New submission from Georg Brandl ge...@python.org: Thanks, fixed in r79923. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8360 ___

[issue8346] Old Version Name in Interactive Mode

2010-04-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: Thanks, fixed in r79924. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8346 ___

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Georg Brandl
Georg Brandl ge...@python.org added the comment: I think we won't add new features to %-formatting, when it is considered old-style anyway. -- nosy: +georg.brandl resolution: - wont fix status: open - closed ___ Python tracker

[issue8361] Remove assert in functools.total_ordering

2010-04-10 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: Hello The correct behavior of functools.total_ordering depends on a check performed with an assert. Attached patch changes it to a test that always runs. Since it’s a kind of protocol error, I went for TypeError but you may disagree. Regards

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Abdellah Chelli
عبدالله شلي (Abdellah Chelli) sneets...@gmail.com added the comment: 'One hour' % {'n': 3} / mapping will not work gettext replaces the string for each language. str.format works well. The problem we couldn't submit a bug to change the code for all packages using it. I think it's better to

[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-04-10 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: Hello The maintainers listing is helpful for us outside bug reporters, but only present in the py3k branch. I copied it and reverted module name changes. Attached is the resulting file and the diff against py3k. Regards -- assignee:

[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-04-10 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- keywords: +patch Added file: http://bugs.python.org/file16854/maintainers.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8362 ___

[issue5341] A selection of spelling errors and typos throughout source

2010-04-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Hello spelling and doc people (I hope it’s okay to use this bug as umbrella instead of opening a myriad bugs for typos.) Attached patch fixes small things in functools module and docs: - Typos: “simplies” does not exist, “fills-in” needs no

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I don't understand how this: n=1 print One hour. % n is different from this: map={'n': 3} print One hour. % map In any event, if str.format works for you, use that. It's the new style. -- ___ Python

[issue3581] failures in test_uuid

2010-04-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Should the patch go into the maintenance branches as well (after the beta is out)? Yes, I think it would be nice (though not mandatory). -- ___ Python tracker rep...@bugs.python.org

[issue7355] Struct incorrectly compiles format strings

2010-04-10 Thread Meador Inge
Changes by Meador Inge mead...@gmail.com: -- nosy: +minge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7355 ___ ___ Python-bugs-list mailing list

[issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py

2010-04-10 Thread Jean-Paul Calderone
New submission from Jean-Paul Calderone exar...@divmod.com: There are two tests for the way inspect.classify_class_attrs handles various sorts of attributes. The tests are identical, except one uses a classic class and one a new-style class. The tests sources have actually begun to diverge,

[issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py

2010-04-10 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone exar...@divmod.com: Added file: http://bugs.python.org/file16856/test_inspect.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8363 ___

[issue8364] Update site.setquit docstring

2010-04-10 Thread Éric Araujo
New submission from Éric Araujo mer...@netwok.org: Hello The docstring for site.setquit was not updated when r42948 changed quit and exit from strings to callables. Attached patch fixes it. By the way, is “Library” the right component for docstring-related bugs or is it “Documentation”?

[issue8359] % formating - TypeError: not all arguments converted during string formatting

2010-04-10 Thread Abdellah Chelli
عبدالله شلي (Abdellah Chelli) sneets...@gmail.com added the comment: The full example: === import gettext gettext.bindtextdomain(pygettext_test,./locale) gettext.textdomain(pygettext_test) _=gettext.gettext n_=gettext.ngettext n1=1 n2=3 print n_(there is %i command,there are %i commands,n1) %

[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-04-10 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I didn't put maintainers.rst into 2.6 because I didn't want to commit to maintaining the two divergent copies. If you want to commit to maintaining it in the 2.x branch (copying changes backwards from the 3.x branch), then I'd be +0

[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-04-10 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Module names have to be converted only once, so now maintenance is just keeping names updated. I’m willing to commit to maintaining the maintainers file 0.2 meta wink with one caveat: Core developers can commit and merge immediately, keeping

[issue8362] Add Misc/maintainers.rst to 2.x branch

2010-04-10 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8362 ___

[issue1079] decode_header does not follow RFC 2047

2010-04-10 Thread Oliver Martin
Oliver Martin oli...@volatilevoid.net added the comment: I got bitten by this too. In addition to not decoding encoded words without whitespace after them, it throws an exception if there is a valid encoded word later in the string and the first encoded word is followed by something that

[issue8322] test_ssl failures with OpenSSL 1.0.0

2010-04-10 Thread Roumen Petrov
Roumen Petrov bugtr...@roumenpetrov.info added the comment: Antoine Pitrou wrote: Antoine Pitroupit...@free.fr added the comment: After some investigation, the error does occur because of the aforementioned changelog entry (SSLv2 weak ciphers are now disabled by default). To check it I

[issue8322] test_ssl failures with OpenSSL 1.0.0

2010-04-10 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: List of ciphers is application dependent and configure script can't limit users(applications) . I was obviously talking about a runtime argument to ssl.wrap_socket(). -- ___ Python tracker

[issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py

2010-04-10 Thread Benjamin Peterson
Benjamin Peterson benja...@python.org added the comment: I think the patch is ok except for that docstrings should start on the same line as the triple quote. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org

  1   2   >