[ANN] stdeb 0.3.2 and 0.4.1

2009-10-05 Thread Andrew Straw
stdeb produces Debian source packages from Python packages via a new distutils command, sdist_dsc. Automatic defaults are provided for the Debian package, but many aspects of the resulting package can be customized via a configuration file. An additional command, bdist_deb, creates a Debian binary

[ANN] TurboGears 1.1 final released

2009-10-05 Thread Christopher Arndt
On behalf of the TurboGears Team, I am pleased to announce that TurboGears 1.1 final is available for download at http://turbogears.org/ and the Python package index http://pypi.python.org/pypi/TurboGears TurboGears 1.1 is the first stable release of the TurboGears 1.1 branch, which

Re: Regular expression to structure HTML

2009-10-05 Thread Stefan Behnel
504cr...@gmail.com wrote: No -- sorry -- I don't want to use BeautifulSoup (though I have for other projects). Humor me, please -- I'd really like to see if this can be done with just regular expressions. I think the reason why people are giving funny comments here is that you failed to

Re: regex (?!..) problem

2009-10-05 Thread Carl Banks
On Oct 4, 9:34 pm, Wolfgang Rohdewald wolfg...@rohdewald.de wrote: Hi, I want to match a string only if a word (C1 in this example) appears at most once in it. This is what I tried: re.match(r'(.*?C1)((?!.*C1))','C1b1b1b1 b3b3b3b3 C1C2C3').groups() ('C1b1b1b1 b3b3b3b3 C1', '')

Re: regex (?!..) problem

2009-10-05 Thread Wolfgang Rohdewald
On Monday 05 October 2009, Carl Banks wrote: What you're not realizing is that if a regexp search comes to a dead end, it won't simply return no match. Instead it'll throw away part of the match, and backtrack to a previously-matched variable-length subexpression, such as .*?, and try

Re: regex (?!..) problem

2009-10-05 Thread Stefan Behnel
Wolfgang Rohdewald wrote: I want to match a string only if a word (C1 in this example) appears at most once in it. def match(s): if s.count(C1) 1: return None return s If this doesn't fit your requirements, you may want to provide some more details. Stefan --

Re: regex (?!..) problem

2009-10-05 Thread Carl Banks
On Oct 4, 11:17 pm, Wolfgang Rohdewald wolfg...@rohdewald.de wrote: On Monday 05 October 2009, Carl Banks wrote: What you're not realizing is that if a regexp search comes to a  dead end, it won't simply return no match.  Instead it'll throw  away part of the match, and backtrack to a

Re: regex (?!..) problem

2009-10-05 Thread Wolfgang Rohdewald
On Monday 05 October 2009, Stefan Behnel wrote: Wolfgang Rohdewald wrote: I want to match a string only if a word (C1 in this example) appears at most once in it. def match(s): if s.count(C1) 1: return None return s If this doesn't fit your

Re: Is pythonic version of scanf() or sscanf() planned?

2009-10-05 Thread TerryP
In the last 4 years, I have never missed functions like .*scanf() or atoi(). It's probably a greeaaat thing that Python provides nether as built ins (per se). -- http://mail.python.org/mailman/listinfo/python-list

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-05 Thread Adam Michalik
Kenneth Tilton kentil...@gmail.com writes: Hunh? He has done a nice job of collecting different logos and putting them all in one place where one can see them all just by scrolling. ie, it's a cool web page with added value available nowhere else. But it's Xah Lee. He is evil and so are all

Re: Enormous Input and Output Test

2009-10-05 Thread n00m
but unlike us, he's routinely under 11s. Crazy. No wonder! 50-80%% of users from the 1st page in ranklist are super-extra-brilliant (young students) programmers. They are winners of numerous competitions, national and international olympiads on informatics, etc. Some of them are/were even true

Re: Enormous Input and Output Test

2009-10-05 Thread n00m
Duncan Booth, alas... still TLE: 2800839 2009-10-04 13:03:59 Q Enormous Input and Output Test time limit exceeded - 88M PYTH -- http://mail.python.org/mailman/listinfo/python-list

Re: Trouble sending / receiving compressed data (using zlib) as HTTP POST to server (in django)

2009-10-05 Thread subeen
Thanks for your response. How did you post the data? If you post binary data you should indicate this with a proper mime type, like application/octet-stream. Otherwise it might be interpreted as text which it isn't. -- I am trying to send the data using following code: ... opener =

Re: [Image-SIG] Some issue with easy_install and PIL/Imaging

2009-10-05 Thread Fredrik Lundh
The problem is that too many people arguing for eggs do this by sending nastygrams, which doesn't really provide much motivation for doing anything about it (I don't do asshole-driven development). The public review PIL got a couple a minutes ago matches some of the private mail I've gotten:

Re: regex (?!..) problem

2009-10-05 Thread Wolfgang Rohdewald
On Monday 05 October 2009, MRAB wrote: (?!.*?(C1).*?\1) will succeed only if .*?(C1).*?\1 has failed, in which case the group (group 1) will be undefined (no capture). I see. I should have moved the (C1) out of this expression anyway: re.match(r'L(?Ptile..)(?!.*?(?P=tile).*?(?P=tile))(.*?

Re: epydoc - can I provide multiple dirs to parse

2009-10-05 Thread Jean-Michel Pichavant
Medi wrote: Can I present multiple directories to epydoc to process. For example epydoc -option -option -option dir_1 dir_2 dir_3 where dir_i is a directory containing some python src codes ? I am currently running it on two directories with about 10M + 20 Meg which takes a very long time

Re: Opinions, please, on PEP 8 and local, 3rd party imports

2009-10-05 Thread Jean-Michel Pichavant
Philip Semanchuk wrote: Hi all, Our project uses some libraries that were written by 3rd parties (i.e. not us). These libraries fit into a single Python file and live in our source tree alongside other modules we've written. When our app is distributed, they'll be included in the

Re: [Image-SIG] Some issue with easy_install and PIL/Imaging

2009-10-05 Thread Chris Withers
Fredrik Lundh wrote: The problem is that too many people arguing for eggs do this by sending nastygrams, which doesn't really provide much motivation for doing anything about it (I don't do asshole-driven development). Indeed, I couldn't agree more, and I'm sorry you've been subjected to

Re: can i use the browser to show the result of python

2009-10-05 Thread catafest
On Sep 25, 12:41 pm, Hacken taoke...@gmail.com wrote: I have write some python script i want to use browser(IE or FF) to call it, an show the returns! how to? Python script running under web browsers only like: python + website = django . --

Re: Need feedback on subprocess-using function

2009-10-05 Thread ryles
On Oct 4, 9:46 pm, Nobody nob...@nowhere.com wrote: On Sat, 03 Oct 2009 13:21:00 +, gb345 wrote: I'm relatively new to Python, and I'm trying to get the hang of using Python's subprocess module.  As an exercise, I wrote the Tac class below, which can prints output to a file in reverse

Re: Compile kinterbasdb with mingw32 and python 2.6 - DLL load failed

2009-10-05 Thread Tonal
I write path for compile kinterbasdb with mingw32 and python 2.6 for rev 1038 See http://sourceforge.net/tracker/?func=detailaid=2872794group_id=9913atid=309913 -- http://mail.python.org/mailman/listinfo/python-list

Re: Python shared lib

2009-10-05 Thread ryles
On Oct 4, 11:04 am, a...@pythoncraft.com (Aahz) wrote: I've got a dim memory that there's a reason for this -- you might try searching the python-dev archives and/or bugs.python.org. Found mention of it in this discussion: http://bugs.python.org/issue771998 I disagree that --enable-shared

Re: Delete all list entries of length unknown

2009-10-05 Thread flebber
On Oct 5, 3:05 pm, Mark Tolonen metolone+gm...@gmail.com wrote: Chris Rebert c...@rebertia.com wrote in message news:50697b2c0910042047i1cf2c1a3mc388bc74bab95...@mail.gmail.com... Tuples are immutable (i.e. they cannot be modified after creation) and are created using parentheses. Slight

Conversion of npyscreen module to python 3 -- help!

2009-10-05 Thread Nicholas
Dear Pythoners, Like a loyal python coder, I was attempting to convert a library to python 3. I have been stung in various ways by the new import semantics - the tests that used to live happily within the module have now had to be moved elsewhere. So be it. But even though I have removed all

Re: Q: sort's key and cmp parameters

2009-10-05 Thread Paul Rubin
Raymond Hettinger pyt...@rcn.com writes: So, it looks like the relevant comparison values can be stored in nested lists: list_of_lists = \ [[1, [3, [], []], [7, [5, [], []], []]], [19, [23, [], []], []], ] Now you've copied all the data out of the

python multiprocessing proxy

2009-10-05 Thread DrFalk3N
I have a 2 processes: the first process is manager.py and starts in backgroung: from multiprocessing.managers import SyncManager, BaseProxy from CompositeDict import * class CompositeDictProxy(BaseProxy): _exposed_ = ('addChild', 'setName') def addChild(self,

conflict between various library to process EXIF data

2009-10-05 Thread Bram Mertens
Hi, I posted this to [Image-SIG] a while ago but did not got a reply so I assume it may not have been the appropriate list. If this is again not the right list please direct me to the proper list. How to read and write EXIF data from images has been discussed several times on the [Image-SIG]

Re: some site login problem help plz..

2009-10-05 Thread james27
still looking for good solution. anyway..thanks Diez :) Diez B. Roggisch-2 wrote: james27 wrote: hello.. im new to python. i have some problem with mechanize. before i was used mechanize with no problem. but i couldn't success login with some site. for several days i was looked for

Twisted PB vs JMS

2009-10-05 Thread jacopo
I looked at Twisted PB for an architecture with one client distributing some processing to several servers. Now I came across JMS and I have seen that using ActiveMQ with the Stomp protocol there would be a good support for Python. Surprising I couldn’t find any article comparing the two

Is there a way to specify a superclass at runtime?

2009-10-05 Thread Chris Colbert
I have an application that needs to run different depending on whether the input data is being simulated, or provided from instrumentation. I am trying to abstract this machinery in a single class called Controller which I want to inherit from either SimController or RealController based on

Re: Is there a way to specify a superclass at runtime?

2009-10-05 Thread MRAB
Chris Colbert wrote: I have an application that needs to run different depending on whether the input data is being simulated, or provided from instrumentation. I am trying to abstract this machinery in a single class called Controller which I want to inherit from either SimController or

Re: Is there a way to specify a superclass at runtime?

2009-10-05 Thread Richard Brodie
Chris Colbert sccolb...@gmail.com wrote in message news:mailman.868.1254748945.2807.python-l...@python.org... I am trying to abstract this machinery in a single class called Controller which I want to inherit from either SimController or RealController based on whether a module level flag

Re: Is there a way to specify a superclass at runtime?

2009-10-05 Thread Chris Colbert
because when i import this module, the classes will already be determined by the intitial flag setting. i.e. SIMULATION = False class SimController(object): def foo(self): print 'bar' class RealController(object): def foo(self): print 'baz' if SIMULATION: SuperKlass =

Re: Is there a way to specify a superclass at runtime?

2009-10-05 Thread Chris Colbert
I dont think so, because that would require logic outside of the controller class to determine which controller to instantiate. My whole purpose for Controller is to encapsulate this logic. So, if the data should be simulated, then i just need to pass -simulate True as a command line argument,

Re: Is there a way to specify a superclass at runtime?

2009-10-05 Thread Chris Colbert
I suppose i can just move the SIMULATION flag to another module, and then import it and check it before intstantiation. So, the arg parser will have to set the flag before any other processing begins... On Mon, Oct 5, 2009 at 3:49 PM, Chris Colbert sccolb...@gmail.com wrote: I dont think so,

Re: Is there a way to specify a superclass at runtime?

2009-10-05 Thread MRAB
Chris Colbert wrote: because when i import this module, the classes will already be determined by the intitial flag setting. i.e. SIMULATION = False class SimController(object): def foo(self): print 'bar' class RealController(object): def foo(self): print 'baz' if

SAX: Short tag's ...

2009-10-05 Thread Thomas Lehmann
Hi! Is there a way to recognize short tags in a XML? I'm implementing a SAX handler... Problem: storing the XML code I would need this information in the startElement ... How can I handle this? element id=abc / element id=xyz any text/element --

Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Aaron Watters
This is a bit off topic except that many Python programmers seem to be allergic to typing SQL. RESOLVED: Using ORMs leads lazy programmers to make bad database designs. It's better to carefully design your database with no invisible means of support and there is no reason to not use SQL

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Bruno Desthuilliers
Aaron Watters a écrit : This is a bit off topic except that many Python programmers seem to be allergic to typing SQL. What I am mostly allergic to is manipulating sql queries as strings and resultsets as lists of tuples. I strongly prefer a higher level representation of both the queries

Module inspect Bug

2009-10-05 Thread Tomas Zulberti
Hi. I have a class that extends collections.MutableMapping. I am checking if it is abstract, using the module inspect. But isabstract returns a number different from zero insted of True or False. The problem with that is that sometimes it returns False when the class isn't an abstract.

Re: organizing your scripts, with plenty of re-use

2009-10-05 Thread Buck
On Oct 5, 11:29 am, Robert Kern robert.k...@gmail.com wrote: On 2009-10-05 12:42 PM, Buck wrote: With the package layout, you would just do:     from parrot.sleeping import sleeping_in_a_bed     from parrot.feeding.eating import eat_cracker This is really much more straightforward

Re: epydoc - can I provide multiple dirs to parse

2009-10-05 Thread Medi
On Oct 5, 2:09 am, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Medi wrote: Can I present multiple directories toepydocto process. For example epydoc-option -option -option dir_1 dir_2 dir_3 where dir_i is a directory containing some python src codes ? I am currently running it

Re: organizing your scripts, with plenty of re-use

2009-10-05 Thread Robert Kern
On 2009-10-05 13:48 PM, Buck wrote: On Oct 5, 11:29 am, Robert Kernrobert.k...@gmail.com wrote: On 2009-10-05 12:42 PM, Buck wrote: With the package layout, you would just do: from parrot.sleeping import sleeping_in_a_bed from parrot.feeding.eating import eat_cracker This

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Diez B. Roggisch
Aaron Watters schrieb: This is a bit off topic except that many Python programmers seem to be allergic to typing SQL. RESOLVED: Using ORMs leads lazy programmers to make bad database designs. It's better to carefully design your database with no invisible means of support and there is no

Re: Q: sort's key and cmp parameters

2009-10-05 Thread Raymond Hettinger
So, it looks like the relevant comparison values can be stored in nested lists: list_of_lists = \ [[1, [3, [], []], [7, [5, [], []], []]], [19, [23, [], []], []], ] Now you've copied all the data out of the original tree, which is even

Re: PIL : How to write array to image ???

2009-10-05 Thread Mart.
On Oct 5, 5:14 pm, Martin mar...@hvidberg.net wrote: On Oct 4, 10:16 pm, Mart. mdeka...@gmail.com wrote: On Oct 4, 9:47 am, Martin mar...@hvidberg.net wrote: On Oct 3, 11:56 pm, Peter Otten __pete...@web.de wrote: Martin wrote: Dear group I'm trying to use PIL to write

Re: organizing your scripts, with plenty of re-use

2009-10-05 Thread Margie
On Oct 5, 12:34 pm, Robert Kern robert.k...@gmail.com wrote: On 2009-10-05 13:48 PM, Buck wrote: On Oct 5, 11:29 am, Robert Kernrobert.k...@gmail.com  wrote: On 2009-10-05 12:42 PM, Buck wrote: With the package layout, you would just do:      from parrot.sleeping import

Re: organizing your scripts, with plenty of re-use

2009-10-05 Thread Buck
Thanks. I think we're getting closer to the core of this. To restate my problem more simply: My core goal is to have my scripts in some sort of organization better than a single directory, and still have plenty of re-use between them. The only way I can see to implement this is to have 10+ lines

Re: Q: sort's key and cmp parameters

2009-10-05 Thread Raymond Hettinger
 Say you want to change the numeric comparisons so that even numbers always sort before odd numbers, ie.     -4 -2 0 2 4 ... -999 ... -1 1 3 ... This is too easy:     s = [-2, 4, 2, -1, -3, 1, -4, 0, 3]     s.sort()     s.sort(key=lambda x: x%2)     s     [-4,

Re: conflict between various library to process EXIF data

2009-10-05 Thread Gabriel Genellina
En Mon, 05 Oct 2009 09:27:34 -0300, Bram Mertens mertensb.ma...@gmail.com escribió: In short: after adding a comment to the EXIF header using the setComment(...) and writeMetadata(...) methods of pyeviv2 (http://tilloy.net/dev/pyexiv2/doc/release-0.1.2/pyexiv2.htm) the EXIF header is altered in

Re: Conversion of npyscreen module to python 3 -- help!

2009-10-05 Thread Gabriel Genellina
En Mon, 05 Oct 2009 06:54:06 -0300, Nicholas nicholas.c...@gmail.com escribió: [...] I am clearly committing some horrible sin that works well in python 2 but which doesn't in python 3. Despite reading the Release notes and PEPs over and over, though, I can't see what is wrong. If anyone

Re: a questions about thread-safety of boolean variables

2009-10-05 Thread Gabriel Genellina
En Wed, 30 Sep 2009 06:14:50 -0300, Charlie Dickens cdickens...@gmail.com escribió: What about dictionaries? Reading values, adding new ones and the most important: changing an existing value - can it corrupt the state of the dictionary or that it is guaranteed that if I try to read the value

Re: SQLite or files?

2009-10-05 Thread AggieDan04
On Sep 17, 9:10 am, J Kenneth King ja...@agentultra.com wrote: ici iltch...@gmail.com writes: I likeshelvefor saving small amounts of data, user preferences, recent files etc. http://docs.python.org/library/shelve.html I like it too, but I hear the great powers that be are going to

Re: ARP code

2009-10-05 Thread Gabriel Genellina
En Tue, 29 Sep 2009 17:01:14 -0300, Nattapong Limprungpattanakit nattapon...@hotmail.com escribió: I have a problem can not run. Which problem? If you get an exception, copy and paste it including the whole traceback. How to use and detail ? import py_net_libs If your problem is

Re: ARP code

2009-10-05 Thread Gabriel Genellina
En Tue, 29 Sep 2009 17:01:14 -0300, Nattapong Limprungpattanakit nattapon...@hotmail.com escribió: I have a problem can not run. Which problem? If you get an exception, copy and paste it including the whole traceback. How to use and detail ? import py_net_libs If your problem is

Re: Q: sort's key and cmp parameters

2009-10-05 Thread Paul Rubin
Raymond Hettinger pyt...@rcn.com writes: There were two sorts in my post and only one in yours. That's why you didn't get the same answer. Whoops, missed that. When Guido made the final call, I'm sure he was balancing a number of goals including language simplification and one-way-to-do-it.

Re: How to sort a list of strings on a substring

2009-10-05 Thread Steven D'Aprano
On Mon, 05 Oct 2009 15:45:58 -0700, n00m wrote: Here you are: LogList = [\ inbound tcp office 192.168.0.125 inside 10.1.0.91 88, inbound tcp office 192.168.0.220 inside 10.1.0.31 2967, inbound udp lab 172.24.0.110 inside 10.1.0.6 161, inbound udp office 192.168.0.220

'Once' properties.

2009-10-05 Thread menomnon
Does python have a ‘once’ (per class) feature? ‘Once’, as I’ve know it is in Eiffel. May be in Java don’t. The first time you instantiate a given class into an object it constructs, say, a dictionary containing static information. In my case static is information that may change once a week at

Re: 'Once' properties.

2009-10-05 Thread Chris Rebert
On Mon, Oct 5, 2009 at 7:56 PM, menomnon p...@well.com wrote: Does python have a ‘once’ (per class) feature? In Python, `class` is an executable statement, so you can put whatever code you want in the class body (along with your method definitions) and it will be run exactly once, at the time

Re: How to refer to class name and function name in a python program?

2009-10-05 Thread Gabriel Genellina
En Mon, 28 Sep 2009 22:54:55 -0300, Peng Yu pengyu...@gmail.com escribió: On Sun, Sep 20, 2009 at 12:43 PM, Benjamin Kaplan benjamin.kap...@case.edu wrote: On Sun, Sep 20, 2009 at 12:43 PM, Peng Yu pengyu...@gmail.com wrote: On Sun, Sep 20, 2009 at 11:32 AM, Vijayendra Bapte

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Steve Holden
Diez B. Roggisch wrote: Aaron Watters schrieb: This is a bit off topic except that many Python programmers seem to be allergic to typing SQL. RESOLVED: Using ORMs leads lazy programmers to make bad database designs. It's better to carefully design your database with no invisible means of

Re: organizing your scripts, with plenty of re-use

2009-10-05 Thread Steven D'Aprano
On Mon, 05 Oct 2009 16:46:12 -0700, Carl Banks wrote: Notice the key idea in all of this: ONE script. When you design it that a file can be used either as a script or as a module, you are asking for trouble. I agree with everything you said in your post *except* that final comment. The

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Paul Rubin
Steve Holden st...@holdenweb.com writes: It seems to me that the biggest sin in databases is a failure to use rigorous design techniques. If somebody doesn't understand relational theory Where does one find out about this? I've somehow managed to avoid it for an awfully long time, but it

Re: SQLite or files?

2009-10-05 Thread Gabriel Genellina
En Mon, 05 Oct 2009 23:08:59 -0300, AggieDan04 danb...@yahoo.com escribió: On Sep 17, 9:10 am, J Kenneth King ja...@agentultra.com wrote: ici iltch...@gmail.com writes: I likeshelvefor saving small amounts of data, user preferences, recent files etc.

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Ben Finney
Paul Rubin http://phr...@nospam.invalid writes: Steve Holden st...@holdenweb.com writes: It seems to me that the biggest sin in databases is a failure to use rigorous design techniques. If somebody doesn't understand relational theory Where does one find out about this? I've somehow

Re: How to sort a list of strings on a substring

2009-10-05 Thread n00m
No, that's incorrect. Try it with this data and you will see it fails: Of course, you are right, but I think the topic-starter is smart enough to understand that I suggested only a hint, a sketch, a sample of how to use key= with lambda, not a ready-to-apply solution. --

Re: Q: sort's key and cmp parameters

2009-10-05 Thread Steven D'Aprano
On Mon, 05 Oct 2009 19:34:27 -0700, Paul Rubin wrote: Raymond Hettinger pyt...@rcn.com writes: When Guido made the final call, I'm sure he was balancing a number of goals including language simplification and one-way-to-do-it. I'm also sure that sorting lazily evaluated infinite sequences

Re: How to sort a list of strings on a substring

2009-10-05 Thread Steven D'Aprano
On Mon, 05 Oct 2009 20:33:51 -0700, n00m wrote: No, that's incorrect. Try it with this data and you will see it fails: Of course, you are right, but I think the topic-starter is smart enough to understand that I suggested only a hint, a sketch, a sample of how to use key= with lambda, not a

Re: How to sort a list of strings on a substring

2009-10-05 Thread n00m
English language is not my mother toung, so I can't grasp many subtle nuances of it. Maybe here you are means to me quite a different thing than to you. -- http://mail.python.org/mailman/listinfo/python-list

Re: How to sort a list of strings on a substring

2009-10-05 Thread Scott
On Oct 5, 6:05 pm, MRAB pyt...@mrabarnett.plus.com wrote: Scott wrote: I create a list of logs called LogList. Here is a sample: LogList = [inbound tcp office 192.168.0.125 inside 10.1.0.91 88, inbound tcp office 192.168.0.220 inside 10.1.0.31 2967, inbound udp lab 172.24.0.110 inside

Re: How to sort a list of strings on a substring

2009-10-05 Thread alex23
Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: Oh please. That's a ridiculous excuse. Your post started with Here you are -- the implication is that you thought it *was* a solution, not a hint. A hint would be something like Write a key function, perhaps using lambda, and pass it

Re: Module inspect Bug

2009-10-05 Thread Gabriel Genellina
En Mon, 05 Oct 2009 11:59:01 -0300, Tomas Zulberti tzulbe...@gmail.com escribió: Hi. I have a class that extends collections.MutableMapping. I am checking if it is abstract, using the module inspect. But isabstract returns a number different from zero insted of True or False. The problem with

Re: How to sort a list of strings on a substring

2009-10-05 Thread Steven D'Aprano
On Mon, 05 Oct 2009 21:16:38 -0700, n00m wrote: English language is not my mother toung, so I can't grasp many subtle nuances of it. Maybe here you are means to me quite a different thing than to you. It means here is the thing you were looking for. Anyway, nothing I wrote was meant as an

Re: How to sort a list of strings on a substring

2009-10-05 Thread n00m
In my early teen, school years Let It Be by The Beatles sounded for my ears (incredibly clearly and obviously!) as Lia Ri Pip. In school I studied French, English only many years later. My inner translation of Here you are! is smth like Catch it!, Take it!, Look at this! etc --

Re: Problem with subprocess module on Windows with open file in append mode

2009-10-05 Thread Gabriel Genellina
En Sat, 03 Oct 2009 21:53:12 -0300, Andrew Savige ajsav...@yahoo.com.au escribió: When I run this little test program on Linux: import subprocess subprocess.call([python,-V], stderr=open(log.tmp,a)) the file log.tmp is appended to each time I run it. When I run it on Windows, however, the

Strange performance issue

2009-10-05 Thread Dan Stromberg
I'm rewriting 3 programs as one program - from Python with Tkinter to Python with pygtk, both on Windows XP. My new version formats an SD card and preallocates some file space in about 3 minutes with Optimize Performance selected, and in about 30 minutes with Optimize for Quick Removal

Re: Object Relational Mappers are evil (a meditation)

2009-10-05 Thread Simon Forman
On Mon, Oct 5, 2009 at 11:14 PM, Paul Rubin http://phr...@nospam.invalid wrote: Steve Holden st...@holdenweb.com writes: It seems to me that the biggest sin in databases is a failure to use rigorous design techniques. If somebody doesn't understand relational theory Where does one find out

[issue7062] No docs for module 'IN'

2009-10-05 Thread Roman Sokolov
New submission from Roman Sokolov sokolov@gmail.com: Python 2.6.3 (r263:75183, Oct 2 2009, 11:22:08) import IN help(IN) -- contain following lines: MODULE DOCS http://docs.python.org/library/IN; , but server returns 404 error: The requested URL /library/IN was not found on this

[issue5395] array.fromfile not checking I/O errors

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: 12) I removed the try/except around the import. I have no clue if os might be unavailable. Maybe leave out handling that until we see that breaking. I added the try/except because I saw that in other tests in the same file when importing gc.

[issue7024] webbrowser : Could not open ftp server using webbrowser.open()

2009-10-05 Thread Harshad Modi
Harshad Modi h...@tinyerp.com added the comment: Hi, Antoine Pitrou! It is missing key for ftp in url-handlers... how can I add key for ftp? Thanks -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7024

[issue7042] test_signal fails on os x 10.6

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I updated the checkout of the 26 branch, and the test runs fine now. I have no clue about virtual time as well. If this is about passing time, there should be better ways (than those which break if your computer gets faster). --

[issue7038] test_curses fails on os x 10.6

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I am not able to reproduce my own report :) I'm sure I installed the 2.6.3 release, opened Terminal.app, checked `which python` and ran `python -m test.regrtest -uall`. I remember that I saw a crash report when I came back and some failed

[issue7063] Memory errors in array.array

2009-10-05 Thread Jan Hosang
New submission from Jan Hosang jan.hos...@gmail.com: While I was backporting the new buffer API to 2.7 I noticed some issues in array_ass_slice() in Modules/arraymodule.c in the python 3k branch. 1) Manual memory reallocation had been replaced by calls to array_resize. But I think when

[issue7042] test_signal fails on os x 10.6

2009-10-05 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: If this is about passing time, there should be better ways (than those which break if your computer gets faster). Agreed. The challenge is to find ways that don't add too much in the way of extra complexity, fragility, or dependencies to

[issue7042] test_signal fails on os x 10.6

2009-10-05 Thread Mark Dickinson
Mark Dickinson dicki...@gmail.com added the comment: Oops. That 5.0 should have been 30.0, of course. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7042 ___

[issue7063] Memory errors in array.array

2009-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: The array type also defines tp_as_mapping-mp_ass_subscript, which has priority in PyObject_SetItem(). A way to call array_ass_slice() is to use PySequence_SetItem(), but this is hard to trigger from python code (it should be possible

[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Adam Olsen wrote: Adam Olsen rha...@gmail.com added the comment: Surrogates aren't optional features of UTF-16, we really need to get this fixed. That includes .isalpha(). We use UCS2 on narrow Python builds, not UTF-16. We might

[issue7024] webbrowser : Could not open ftp server using webbrowser.open()

2009-10-05 Thread Senthil Kumaran
Senthil Kumaran orsent...@gmail.com added the comment: This bug is bit a tricky case. Harshad: You might try the work-around suggested by Antoine. But that is just a work-around. not a fix. Add an entry to gconf-editor like any other. ( google). The actual bug seems to be with gnome-open which

[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: No, but changing the APIs from 16-bit integers to 32-bit integers does require a recompile of all code using it. Is it acceptable between 3.1 and 3.2 for example? ISTM that other changes already require recompilation of extension

[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Amaury Forgeot d'Arc wrote: Amaury Forgeot d'Arc amaur...@gmail.com added the comment: No, but changing the APIs from 16-bit integers to 32-bit integers does require a recompile of all code using it. Is it acceptable between 3.1 and

[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: we should make sure that it's not possible to load an extension compiled with 3.1 in 3.2 to prevent segfaults and buffer overruns. This is the case with this patch: today all these functions (_PyUnicode_IsAlpha,

[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: We might keep the old public API for compatibility, but it should be clearly marked as broken for non-BMP scalar values. That has always been the case. UCS2 doesn't support surrogates. However, we have been slowly moving into the

[issue7064] Python 2.6.3 / setuptools 0.6c9: extension module builds fail with KeyError

2009-10-05 Thread Ned Deily
New submission from Ned Deily n...@acm.org: Due to a change in distutils released with Python 2.6.3, packages that use setuptools (version 0.6c9, as of this writing), or the easy_install command, to build C extension modules fail with a cryptic message ending with: ...

[issue7042] test_signal fails on os x 10.6

2009-10-05 Thread Jan Hosang
Jan Hosang jan.hos...@gmail.com added the comment: I think a timing out while loop explains much better what is happening. I mean we are trying to keep the cpu busy for 0.9 seconds (if I understand the definition of virtual time correctly) and not do 1 increments (which might be done

[issue7064] Python 2.6.3 / setuptools 0.6c9: extension module builds fail with KeyError

2009-10-05 Thread Tarek Ziadé
Tarek Ziadé ziade.ta...@gmail.com added the comment: (3) patch or downgrade distutils to restore the previous behavior This is not really an option since distutils code was modified to fix some bugs, with no API change and no backward compat break. Users affected with this problems have to

[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: Amaury Forgeot d'Arc wrote: Amaury Forgeot d'Arc amaur...@gmail.com added the comment: we should make sure that it's not possible to load an extension compiled with 3.1 in 3.2 to prevent segfaults and buffer overruns. This is the

[issue7064] Python 2.6.3 / setuptools 0.6c9: extension module builds fail with KeyError

2009-10-05 Thread steve steiner
Changes by steve steiner sstei...@users.sourceforge.net: -- nosy: +ssteiner ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7064 ___ ___

[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Marc-Andre Lemburg
Marc-Andre Lemburg m...@egenix.com added the comment: This is off-topic for the tracker item, but I'll reply anyway: Ezio Melotti wrote: Ezio Melotti ezio.melo...@gmail.com added the comment: We might keep the old public API for compatibility, but it should be clearly marked as broken

[issue5127] UnicodeEncodeError - I can't even see license

2009-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: We'd need to expose the UCS4 APIs *in addition* to those APIs and have the UCS2 APIs redirect to the UCS4 ones. Why have two names for the same function? it's Python 3, after all. Or is this no recompile feature so important (as long

[issue1571184] Generate numeric/space/linebreak from Unicode database.

2009-10-05 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: Marc-Andre, could you comment on this patch? The comments above were made by inspecting the generated code, comparing with the previous version. IMO the only drawback is the increased memory usage. --

  1   2   >