py-postgresql 1.0 released

2010-03-31 Thread jwp
I'm pleased to announce the release of py-postgresql version 1.0, the pure Python 3 driver for PostgreSQL formerly known as 'pg_proboscis'. Highlights: * CopyManager for connection-to-connection COPY operations. * NotificationManager for receiving asynchronous notifications with payloads. *

modern-package-template 1.0c1 released

2010-03-31 Thread Sridhar Ratnakumar
modern-package-template is a PasteScript template to create an initial layout for your Python projects using modern tools and practices followed in the Python community. http://pypi.python.org/pypi/modern-package-template/ 1.0c1 Release date: 30-Mar-2010 • Add a

ANN: Shed Skin 0.4

2010-03-31 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.4, an experimental (restricted) Python-to-C++ compiler. Please see my blog for more details about the release: http://shed-skin.blogspot.com/ Thanks, Mark Dufour. -- Overdesigning is a SIN. It's the archetypal example of what I call 'bad taste' - Linus

Re: xpat error in xmlrp client. How to inspect data.

2010-03-31 Thread Gabriel Genellina
En Tue, 30 Mar 2010 18:01:40 -0300, News123 news1...@free.fr escribió: Gabriel Genellina wrote: En Thu, 25 Mar 2010 05:31:05 -0300, News123 news1...@free.fr escribió: I'm havign a small xmlrpc client, which works normally fine. (xmlrpc via https) Sometimes however I receive an Exception

Sublassing tuple works, subclassing list does not

2010-03-31 Thread Frank Millman
Hi all I needed something similar to, but not quite the same as, collections.namedtuple. The differences are that namedtuple requires the 'names' to be provided at creation time, and then lends itself to creating multiple instances of itself. I wanted a more generic class where I could

Python + OpenOffice Calc

2010-03-31 Thread Tracubik
Hi all! i'm giving away to a friend of mine that have a garage (he repair car) my old computer. He will use it essentialy to create estimates of the work via an ods file (i've made a simple ods file to be filled with the cost of materials and a description of the work). He's totally new with

Re: logging: local functions == loss of lineno

2010-03-31 Thread Peter Otten
Hellmut Weber wrote: Hi Peter and Jean-Michel, thanks for all your hints and pieces of code. It took me a while to play around with what I got from you (and some study of Vinay's module documentation. Now I have come up with a more complete solution I'm quite satisfied with. And I would

Re: Python + OpenOffice Calc

2010-03-31 Thread Chris Rebert
On Wed, Mar 31, 2010 at 12:47 AM, Tracubik affdfsdfds...@b.com wrote: Hi all! i'm giving away to a friend of mine that have a garage (he repair car) my old computer. He will use it essentialy to create estimates of the work via an ods file (i've made a simple ods file to be filled with the

Jobs in Kuwait Kuwait jobs accounts jobs in kuwait MEDICAL JOBS IN KUWAIT FINANCE JOBS IN KUWAIT ENGINEERING JOBS IN KUWAIT ADVERTISED JOBS ION KUWAIT ON http://jobsinkuwait-net.blogsp

2010-03-31 Thread Naeem
Jobs in Kuwait Kuwait jobs accounts jobs in kuwait MEDICAL JOBS IN KUWAIT FINANCE JOBS IN KUWAIT ENGINEERING JOBS IN KUWAIT ADVERTISED JOBS ION KUWAIT ON http://jobsinkuwait-net.blogspot.com/ Jobs in Kuwait Kuwait jobs accounts jobs in kuwait MEDICAL JOBS IN KUWAIT FINANCE JOBS IN KUWAIT

Re: (a==b) ? 'Yes' : 'No'

2010-03-31 Thread Peter Otten
Pierre Quentel wrote: I'm surprised nobody proposed a solution with itertools ;-) next(itertools.takewhile(lambda _: a == b, [yes]), no) You spoke to soon :) Peter -- http://mail.python.org/mailman/listinfo/python-list

No editbox () functionality in python-dialog module?

2010-03-31 Thread Harishankar
Strange issue, I find that the dialog utility has an editbox function but the python-dialog module doesn't provide this and there's no mention of the reason for the omission of this important functionality. Is there no easy and simple way to create a multi-line input dialog in ANY of the text

Re: Sublassing tuple works, subclassing list does not

2010-03-31 Thread lbolla
On Mar 31, 7:49 am, Frank Millman fr...@chagford.com wrote: Hi all I needed something similar to, but not quite the same as, collections.namedtuple. The differences are that namedtuple requires the 'names' to be provided at creation time, and then lends itself to creating multiple instances

Re: Sublassing tuple works, subclassing list does not

2010-03-31 Thread Frank Millman
lbolla lbo...@gmail.com wrote in message news:f8011c0b-0b1b-4a4f-94ff-304c16ef9...@q16g2000yqq.googlegroups.com... On Mar 31, 7:49 am, Frank Millman fr...@chagford.com wrote: Hi all When subclassing immutable types, you need to override __new__; otherwise you need to override __init__.

Re: psycopg2 / psycopg2.DataError: invalid input syntax for type timestamp with time zone:

2010-03-31 Thread Michael Ricordeau
Hi You cannot add 'NOW() - '29 days'::INTERVAL' as a query because cursor.execute() will try to mogrify it. You can do : import datetime idays = psycopg2.extensions.adapt(datetime.timedelta(days=29)) self.dyndb.orderdb.query('update set creation_date=(NOW() - %s) where id_order=%s',

libpst - python bindings

2010-03-31 Thread Richard Lamboj
Hello, are there any python bindings for libpst? http://www.five-ten-sg.com/libpst/ https://alioth.debian.org/projects/libpst/ Kind Regards Richi -- http://mail.python.org/mailman/listinfo/python-list

Re: psycopg2 / psycopg2.DataError: invalid input syntax for type timestamp with time zone:

2010-03-31 Thread Anton Shishkov
On Mar 31, 3:10 am, D'Arcy J.M. Cain da...@druid.net wrote: On Tue, 30 Mar 2010 15:46:12 -0700 (PDT) ASh anton.shish...@gmail.com wrote:             new_start_date = NOW() - '29 days'::INTERVAL             self.dyndb.orderdb.query('''update set creation_date = %s            

Re: Sublassing tuple works, subclassing list does not

2010-03-31 Thread Bruno Desthuilliers
lbolla a écrit : class MyList(list): def __init__(self, names, values): list.__init__(self, values) for name, value in zip(names, values): setattr(self, name, value) names = ['A', 'B', 'C'] values = ['a', 'b', 'c'] lst =

Re: Sublassing tuple works, subclassing list does not

2010-03-31 Thread Rob Williscroft
Frank Millman wrote in news:mailman.1360.1270018159.23598.python- l...@python.org in comp.lang.python: I came up with a simple solution that seems to work - class MyTuple(tuple): ... def __new__(cls, names, values): ... for name, value in zip(names, values): ... setattr(cls,

Re: Sublassing tuple works, subclassing list does not

2010-03-31 Thread Carl Banks
On Mar 31, 2:02 am, Rob Williscroft r...@rtw.me.uk wrote: Frank Millman wrote in news:mailman.1360.1270018159.23598.python- l...@python.org in comp.lang.python: I came up with a simple solution that seems to work - class MyTuple(tuple): ...   def __new__(cls, names, values): ...    

ANN: Shed Skin 0.4

2010-03-31 Thread Mark Dufour
Hi all, I have just released Shed Skin 0.4, an experimental (restricted) Python-to-C++ compiler. Please see my blog for more details about the release: http://shed-skin.blogspot.com/ Thanks, Mark Dufour. -- Overdesigning is a SIN. It's the archetypal example of what I call 'bad taste' - Linus

Re: PyDispatcher on sourceforge doesn't play nice with easy_install

2010-03-31 Thread Chris Withers
Mike C. Fletcher wrote: Chris Withers wrote: Hi All, Using easy_install to get PyDispatcher results in: ... Who's the maintainer of PyDispatcher nowadays? Would be handy if they removed the sourceforge link from pypi. ... Thanks for the report. I've released a 2.0.2 version on PyPI.

Generating text from a regular expression

2010-03-31 Thread Nathan Harmston
Hi everyone, I have a slightly complicated/medium sized regular expression and I want to generate all possible words that it can match (to compare performance of regex against an acora based matcher). Using the regular expression as a grammar to generate all words in its language. I was wondering

Re: psycopg2 / psycopg2.DataError: invalid input syntax for type timestamp with time zone:

2010-03-31 Thread Anton Shishkov
On Mar 31, 11:29 am, Michael Ricordeau michael.ricord...@gmail.com wrote: Hi You cannot add 'NOW() - '29 days'::INTERVAL' as a query because cursor.execute() will try to mogrify it. You can do :   import datetime   idays = psycopg2.extensions.adapt(datetime.timedelta(days=29))  

Re: Sublassing tuple works, subclassing list does not

2010-03-31 Thread Hrvoje Niksic
Frank Millman fr...@chagford.com writes: class MyList(list): ... def __new__(cls, names, values): ... for name, value in zip(names, values): ... setattr(cls, name, value) ... return list.__new__(cls, values) Did you really mean to setattr the class here? If I'm guessing

Re: Sublassing tuple works, subclassing list does not

2010-03-31 Thread Frank Millman
On Mar 31, 8:49 am, Frank Millman fr...@chagford.com wrote: Hi all Thanks to all for the helpful replies. Rob, you are correct, I had not realised I was adding attributes to the class instead of the instance. Your alternative does work correctly. Thanks. Carl, I understand your concern

Re: Generating text from a regular expression

2010-03-31 Thread Gabriel Genellina
En Wed, 31 Mar 2010 07:49:14 -0300, Nathan Harmston iwanttobeabad...@googlemail.com escribió: I have a slightly complicated/medium sized regular expression and I want to generate all possible words that it can match (to compare performance of regex against an acora based matcher). Using the

Re: Generating text from a regular expression

2010-03-31 Thread Tim Chase
Nathan Harmston wrote: I have a slightly complicated/medium sized regular expression and I want to generate all possible words that it can match (to compare performance of regex against an acora based matcher). Using the regular expression as a grammar to generate all words in its language. I

Re: os.walk restart

2010-03-31 Thread Piet van Oostrum
You have no guarantee that on the next run the directories will be visited in the same order as in the first run (this could depend on the filesystem). So then remembering a last directory won't do it. You could write each completed directory name to a file, and then on the second run check

Re: libpst - python bindings

2010-03-31 Thread Jean-Michel Pichavant
Richard Lamboj wrote: Hello, are there any python bindings for libpst? http://www.five-ten-sg.com/libpst/ https://alioth.debian.org/projects/libpst/ Kind Regards Richi http://www.lmgtfy.com/?q=libpst+python 3rd hit Cheers, JM -- http://mail.python.org/mailman/listinfo/python-list

wrapping data from groups

2010-03-31 Thread azrael
Hi Could anyone give me a hint about a problem I have. I want to wrap data from newsgroups like comp.lang.python. Is there anywhere out some module for this or does google has something for this. -- http://mail.python.org/mailman/listinfo/python-list

Re: wrapping data from groups

2010-03-31 Thread Steve Holden
azrael wrote: Hi Could anyone give me a hint about a problem I have. I want to wrap data from newsgroups like comp.lang.python. Is there anywhere out some module for this or does google has something for this. nntplib would be the normal starting point. I've used it, and it works

Re: Generating text from a regular expression

2010-03-31 Thread Grant Edwards
On 2010-03-31, Nathan Harmston iwanttobeabad...@googlemail.com wrote: I have a slightly complicated/medium sized regular expression and I want to generate all possible words that it can match I was wondering if this possible in Python or possible using anything. Google doesnt seem to give

Re: Generating text from a regular expression

2010-03-31 Thread Paul McGuire
On Mar 31, 5:49 am, Nathan Harmston iwanttobeabad...@googlemail.com wrote: Hi everyone, I have a slightly complicated/medium sized regular expression and I want to generate all possible words that it can match (to compare performance of regex against an acora based matcher). The pyparsing

associative array

2010-03-31 Thread Javier Montoya
Dear all, I'm a newbie in python and would be acknowledge if somebody could shed some light on associative arrays. More precisely, I would like to create a multi-dimensional associative array. I have for example a list of students which are identified uniquely by their student IDs. Additionally,

Re: associative array

2010-03-31 Thread Kushal Kumaran
On Wed, Mar 31, 2010 at 10:10 PM, Javier Montoya jmonto...@gmail.com wrote: Dear all, I'm a newbie in python and would be acknowledge if somebody could shed some light on associative arrays. More precisely, I would like to create a multi-dimensional associative array. I have for example a

Re: wrapping data from groups

2010-03-31 Thread azrael
I tried to use some servers I know but they have a limited amount of stored threads. not like google that has every thread ever opened. so I tried to wrap google's html but I get a 403 error. any sugesstions? On Mar 31, 3:28 pm, Steve Holden st...@holdenweb.com wrote: azrael wrote: Hi

sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Chris Curvey
I must be having a brain cramp. Given a list of objects, how can I sort the list on one attribute in descending order, then sort within each group in ascending order on another attribute. For example: class Foo: def __init__(self, a, b, c): self.a = a self.b = b

Re: (a==b) ? 'Yes' : 'No'

2010-03-31 Thread TomF
On 2010-03-31 00:57:51 -0700, Peter Otten __pete...@web.de said: Pierre Quentel wrote: I'm surprised nobody proposed a solution with itertools ;-) next(itertools.takewhile(lambda _: a == b, [yes]), no) You spoke to soon :) I salute you, sir, for upholding the standards of this group.

Video is very funny..hhhhhhhhhhhh

2010-03-31 Thread safwan alahmadi
Video is very funny http://www.youtube.com/watch?v=-cKvPp71QFY -- http://mail.python.org/mailman/listinfo/python-list

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Tim Golden
On 31/03/2010 18:08, Chris Curvey wrote: I must be having a brain cramp. Given a list of objects, how can I sort the list on one attribute in descending order, then sort within each group in ascending order on another attribute. For example: class Foo: def __init__(self, a, b, c):

Re: associative array

2010-03-31 Thread Gary Herron
Javier Montoya wrote: Dear all, I'm a newbie in python and would be acknowledge if somebody could shed some light on associative arrays. More precisely, I would like to create a multi-dimensional associative array. I have for example a list of students which are identified uniquely by their

Re: Usability, the Soul of Python

2010-03-31 Thread John Nagle
Alf P. Steinbach wrote: * Jean-Michel Pichavant: John Nagle wrote: Jonathan Hayward wrote: I've posted Usability, the Soul of Python: An Introduction to the Python Programming Language Through the Eyes of Usability, at: http://JonathansCorner.com/python/ No, it's just a rather

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Peter Otten
Chris Curvey wrote: I must be having a brain cramp. Given a list of objects, how can I sort the list on one attribute in descending order, then sort within each group in ascending order on another attribute. For example: class Foo: def __init__(self, a, b, c): self.a = a

Question about list comprehension/standard for disparities

2010-03-31 Thread Nathan Rice
I was just wondering, why the list/generator and standard for have disparities? It would be really nice to be able to do: for x in y if foo: ... rather than: for x in (x for x in y if foo): ... Also, from a style standpoint, I prefer to extract the loop logic into a function if it's

ANN: Intro+Intermediate Python course, SF, May 10-12

2010-03-31 Thread wesley chun
Need to get up-to-speed with Python as quickly as possible? Come join me, Wesley Chun, author of Prentice-Hall's bestseller Core Python Programming, for a comprehensive intro course coming up this May in beautiful Northern California! Please pass on this note to whomever you think may be

Re: sort array, apply rearrangement to second

2010-03-31 Thread Victor Eijkhout
Robert Kern robert.k...@gmail.com wrote: second[first.argsort()] Really cool. Thanks. Ask numpy questions on the numpy mailing list. I will. I thought that this question would have an answer in a generic python idiom. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu --

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Patrick Maupin
On Mar 31, 12:08 pm, Chris Curvey ccur...@gmail.com wrote: I must be having a brain cramp.  Given a list of objects, how can I sort the list on one attribute in descending order, then sort within each group in ascending order on another attribute. For example: class Foo:     def

Re: sort array, apply rearrangement to second

2010-03-31 Thread Robert Kern
On 2010-03-31 13:58 PM, Victor Eijkhout wrote: Robert Kernrobert.k...@gmail.com wrote: second[first.argsort()] Really cool. Thanks. Ask numpy questions on the numpy mailing list. I will. I thought that this question would have an answer in a generic python idiom. When dealing with

Re: (a==b) ? 'Yes' : 'No'

2010-03-31 Thread Joaquin Abian
On Mar 31, 1:18 am, Lawrence D'Oliveiro l...@geek- central.gen.new_zealand wrote: In message 7316f3d2-bcc9-4a1a-8598- cdd5d41fd...@k17g2000yqb.googlegroups.com, Joaquin Abian wrote: (a==b) and 'YES' or 'NO' Yes, ugly Why would you say that’s ugly? By the way, you don’t need the

Re: Usability, the Soul of Python

2010-03-31 Thread Ricardo Aráoz
Lawrence D'Oliveiro wrote: In message 20100331003241.47fa9...@vulcan.local, Robert Fendt wrote: The braces are gone, and with them the holy wars. Let me start a new one. I would still put in some kind of explicit indicator of the end of the grouping construct: count = 99

Re: sort array, apply rearrangement to second

2010-03-31 Thread Steve Holden
Victor Eijkhout wrote: Robert Kern robert.k...@gmail.com wrote: second[first.argsort()] Really cool. Thanks. Ask numpy questions on the numpy mailing list. I will. I thought that this question would have an answer in a generic python idiom. Victor. Not an unreasonable assumption,

Re: sort array, apply rearrangement to second

2010-03-31 Thread Raymond Hettinger
On Mar 30, 4:25 pm, s...@sig.for.address (Victor Eijkhout) wrote: I have two arrays, made with numpy. The first one has values that I want to use as sorting keys; the second one needs to be sorted by those keys. Obviously I could turn them into a dictionary  of pairs and sort by the first

Want / Need Genuine Google Adsense Account for Rs.300/-

2010-03-31 Thread SWETHA
Genuine Google Adsense Account for Rs.300/- We will approve your google adsense approval. We will help you till you get the first adsense check. Please send your mobile number to pramesh0...@gmail.com , i will call you with in 15 minutes and give you the google adsense account. High Price

Re: Question about list comprehension/standard for disparities

2010-03-31 Thread Steve Holden
Nathan Rice wrote: I was just wondering, why the list/generator and standard for have disparities? It would be really nice to be able to do: for x in y if foo: ... rather than: for x in (x for x in y if foo): ... But it's not much of an issue when you can easily write

Re: Python + OpenOffice Calc

2010-03-31 Thread bobicanprogram
On Mar 31, 2:47 am, Tracubik affdfsdfds...@b.com wrote: Hi all! i'm giving away to a friend of mine that have a garage (he repair car) my old computer. He will use it essentialy to create estimates of the work via an ods file (i've made a simple ods file to be filled with the cost of

Re: Python + OpenOffice Calc

2010-03-31 Thread Chris Colbert
On Wed, Mar 31, 2010 at 4:21 PM, bobicanprogram ican...@gmail.com wrote: On Mar 31, 2:47 am, Tracubik affdfsdfds...@b.com wrote: Hi all! i'm giving away to a friend of mine that have a garage (he repair car) my old computer. He will use it essentialy to create estimates of the work via

Re: decorators only when __debug__ == True

2010-03-31 Thread LX
On Mar 30, 2:41 pm, MRAB pyt...@mrabarnett.plus.com wrote: LX wrote: On Mar 29, 6:34 pm, MRAB pyt...@mrabarnett.plus.com wrote: LX wrote: Hi all, I have a question about decorators. I would like to use them for argument checking, and pre/post conditions. However, I don't want the

Re: decorators only when __debug__ == True

2010-03-31 Thread MRAB
LX wrote: On Mar 30, 2:41 pm, MRAB pyt...@mrabarnett.plus.com wrote: LX wrote: On Mar 29, 6:34 pm, MRAB pyt...@mrabarnett.plus.com wrote: LX wrote: Hi all, I have a question about decorators. I would like to use them for argument checking, and pre/post conditions. However, I don't want the

subprocess only good for win32?

2010-03-31 Thread wukong
subprocess works fine on my win pro 32-bit, but not on vista 64-bit. am i doing some wrong, or it just won't work for win64? If that's true, will it be extended to win64 in teh future? thanks in advance wk -- http://mail.python.org/mailman/listinfo/python-list

Re: decorators only when __debug__ == True

2010-03-31 Thread Stephen Hansen
On 2010-03-31 13:59:01 -0700, LX said: pass_decorator will be called when the decorated function is _defined_, but not when the decorated function is _called_. Why is it then that during runtime, with a breakpoint in some arbitrary main() in main.py, I get something similar to the following

Re: subprocess only good for win32?

2010-03-31 Thread Chris Rebert
On Wed, Mar 31, 2010 at 2:26 PM, wukong novacomp...@gmail.com wrote: subprocess works fine on my win pro 32-bit, but not on vista 64-bit. am i doing some wrong, or it just won't work for win64?  If that's true, will it be extended to win64 in teh future? Please characterize exactly how it is

Get Eclipse/PyDev to run scripts that don't end in .py

2010-03-31 Thread J
Is there any way to tell PyDev in Eclipse to run a script that doesn't end in .py? Even if I have to go and manually set something for each file... I've inherited (in a manner of speaking) a dev project that is done in python2.6... I pulled the latest dev branch and have it opened as a project

Re: subprocess only good for win32?

2010-03-31 Thread wukong
On Mar 31, 2:33 pm, Chris Rebert c...@rebertia.com wrote: On Wed, Mar 31, 2010 at 2:26 PM, wukong novacomp...@gmail.com wrote: subprocess works fine on my win pro 32-bit, but not on vista 64-bit. am i doing some wrong, or it just won't work for win64?  If that's true, will it be extended to

Re: subprocess only good for win32?

2010-03-31 Thread Terry Reedy
On 3/31/2010 5:26 PM, wukong wrote: subprocess works fine on my win pro 32-bit, but not on vista 64-bit. You are more likely to get a helpful answer if you give a minimal example and explain exactly what 'not [works fine]' means. What did happen? Include full error traceback if there was

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Raymond Hettinger
On Mar 31, 10:08 am, Chris Curvey ccur...@gmail.com wrote: I must be having a brain cramp.  Given a list of objects, how can I sort the list on one attribute in descending order, then sort within each group in ascending order on another attribute. For example: class Foo:     def

Re: subprocess only good for win32?

2010-03-31 Thread Martin v. Loewis
WindowsError: [Error 14001] The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log for more detail This is a configuration error on your system. The application you are trying to start is incorrectly installed - it's not

Getting a Python program to run of off a flash drive?

2010-03-31 Thread Abethebabe
I wanted to know if there was a way I could get a Python program to run off of my flash drive as soon as the computer (Windows) detected the device? For example I could have a a simple program that would create a text document on the computers desktop when my flash drive is detected. --

Re: decorators only when __debug__ == True

2010-03-31 Thread Steven D'Aprano
On Wed, 31 Mar 2010 22:27:05 +0100, MRAB wrote: LX wrote: [...] It looks to me the call stack still includes the additional level of the decorator... what am I missing? Thank you for your time. Are you still defining your decorators in the same way as in your original post? A decorator

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Steven D'Aprano
On Wed, 31 Mar 2010 12:05:24 -0700, Patrick Maupin wrote: You can provide a cmp function to the string sort method, e.g. cmp = lambda x,y: -cmp(x.a, y.a) or cmp(x.b, y.b) String sort method? ''.sort Traceback (most recent call last): File stdin, line 1, in module AttributeError: 'str'

Re: Getting a Python program to run of off a flash drive?

2010-03-31 Thread rantingrick
On Mar 31, 5:48 pm, Abethebabe abrahamalra...@gmail.com wrote: I wanted to know if there was a way I could get a Python program to run off of my flash drive as soon as the computer (Windows) detected the device? For example I could have a a simple program that would create a text document on

Re: Getting a Python program to run of off a flash drive?

2010-03-31 Thread Alf P. Steinbach
* Abethebabe: I wanted to know if there was a way I could get a Python program to run off of my flash drive as soon as the computer (Windows) detected the device? For example I could have a a simple program that would create a text document on the computers desktop when my flash drive is

Re: decorators only when __debug__ == True

2010-03-31 Thread MRAB
Steven D'Aprano wrote: On Wed, 31 Mar 2010 22:27:05 +0100, MRAB wrote: LX wrote: [...] It looks to me the call stack still includes the additional level of the decorator... what am I missing? Thank you for your time. Are you still defining your decorators in the same way as in your original

Re: decorators only when __debug__ == True

2010-03-31 Thread LX
On Mar 31, 2:28 pm, Stephen Hansen apt.shan...@gmail.invalid wrote: On 2010-03-31 13:59:01 -0700, LX said: pass_decorator will be called when the decorated function is _defined_, but not when the decorated function is _called_. Why is it then that during runtime, with a breakpoint in

Re: simple-way-to-recover-your-missing-laptop

2010-03-31 Thread NADHIRAH
fizzi fi...@my10sen.com wrote in message news:48469e2f$...@news.tm.net.my... Worst thing could happen to your laptop is its been stolen, there is an easy way to recover back your missing property. LocatePC is a software that sends you a secret email message from your computer containing

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Patrick Maupin
On Mar 31, 5:57 pm, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: Did you mean list sort method? Why, yes. Yes, I did. Yes, I'm an old forgetful man who sometimes misspeaks or mistypes, and you're the smartest, sharpest guy in the world. Most helpful, too. It's much more

Re: Getting a Python program to run of off a flash drive?

2010-03-31 Thread Abethebabe
On Mar 31, 7:00 pm, rantingrick rantingr...@gmail.com wrote: On Mar 31, 5:48 pm, Abethebabe abrahamalra...@gmail.com wrote: I wanted to know if there was a way I could get a Python program to run off of my flash drive as soon as the computer (Windows) detected the device? For example I

Re: Getting a Python program to run of off a flash drive?

2010-03-31 Thread Abethebabe
On Mar 31, 7:04 pm, Alf P. Steinbach al...@start.no wrote: * Abethebabe: I wanted to know if there was a way I could get a Python program to run off of my flash drive as soon as the computer (Windows) detected the device? For example I could have a a simple program that would create a

CGI templating with python

2010-03-31 Thread KB
Hi there, Years ago I wrote a LAMP app using python. I find I need a simple web data entry tool to store records (stock research) and when I enter a stock ticker, to pull up all the past research I have done. I am imagining fields like ticker, date, pulldown menus for various options, long text

Re: Get Eclipse/PyDev to run scripts that don't end in .py

2010-03-31 Thread Martin P. Hellwig
On 03/31/10 22:37, J wrote: Is there any way to tell PyDev in Eclipse to run a script that doesn't end in .py? Even if I have to go and manually set something for each file... I've inherited (in a manner of speaking) a dev project that is done in python2.6... I pulled the latest dev branch and

Re: Get Eclipse/PyDev to run scripts that don't end in .py

2010-03-31 Thread Fabio Zadrozny
On Wed, Mar 31, 2010 at 6:37 PM, J dreadpiratej...@gmail.com wrote: Is there any way to tell PyDev in Eclipse to run a script that doesn't end in .py?  Even if I have to go and manually set something for each file... I've inherited (in a manner of speaking) a dev project that is done in

Re: decorators only when __debug__ == True

2010-03-31 Thread Steven D'Aprano
On Thu, 01 Apr 2010 00:27:51 +0100, MRAB wrote: A decorator shouldn't call the function it's decorating. *raises eyebrow* Surely, in the general case, a decorator SHOULD call the function it is decorating? I'm sure you know that, but your wording is funny and could confuse the OP.

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Steven D'Aprano
On Wed, 31 Mar 2010 17:21:18 -0700, Patrick Maupin wrote: Doesn't matter though. The OP was sorting lists, not strings, so he knew what I meant. I have found that when people ask basic questions about fundamental Python operations like sorting, it is risky to assume that they will know what

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Steve Holden
Steven D'Aprano wrote: On Wed, 31 Mar 2010 17:21:18 -0700, Patrick Maupin wrote: Doesn't matter though. The OP was sorting lists, not strings, so he knew what I meant. I have found that when people ask basic questions about fundamental Python operations like sorting, it is risky to

Re: CGI templating with python

2010-03-31 Thread Robert Kern
On 2010-03-31 19:38 , KB wrote: Hi there, Years ago I wrote a LAMP app using python. I find I need a simple web data entry tool to store records (stock research) and when I enter a stock ticker, to pull up all the past research I have done. I am imagining fields like ticker, date, pulldown

Re: Getting a Python program to run of off a flash drive?

2010-03-31 Thread Aahz
In article hp0ki2$en...@news.eternal-september.org, Alf P. Steinbach al...@start.no wrote: I think it was EMI who once distributed a nasty rootkit (and yes, it was theirs, it was not an accident) as a copy protection scheme on a music CD.

how to build with --enable-shared so that binary knows where libraries are.

2010-03-31 Thread d d
The following is on Linux. I'd like to build python with ./configure --enable-shared. And install in a non-standard place (an nfs-mounted directory). However, the binary is then not usable, since it can't find the library. I can fix this by defining LD_LIBRARY_PATH, but I don't want to do

Re: Python + OpenOffice Calc

2010-03-31 Thread rantingrick
On Mar 31, 2:47 am, Tracubik affdfsdfds...@b.com wrote: Hi all! i'm giving away to a friend of mine that have a garage (he repair car) my old computer. He will use it essentialy to create estimates of the work via an ods file (i've made a simple ods file to be filled with the cost of

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Steven D'Aprano
On Wed, 31 Mar 2010 22:19:27 -0400, Steve Holden wrote: Steven D'Aprano wrote: On Wed, 31 Mar 2010 17:21:18 -0700, Patrick Maupin wrote: Doesn't matter though. The OP was sorting lists, not strings, so he knew what I meant. I have found that when people ask basic questions about

Re: Getting a Python program to run of off a flash drive?

2010-03-31 Thread rantingrick
On Mar 31, 10:33 pm, a...@pythoncraft.com (Aahz) wrote: In article hp0ki2$en...@news.eternal-september.org, Alf P. Steinbach al...@start.no wrote: I think it was EMI who once distributed a nasty rootkit (and yes, it   was theirs, it was not an accident) as a copy protection scheme on a  

Re: Re: Fetch files from mail in python

2010-03-31 Thread hidura
Ok, I will take your advice and implemented in my project. Thank you all for your help. On Mar 31, 2010 3:03am, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Wed, 31 Mar 2010 00:47:47 +, hid...@gmail.com declaimed the following in gmane.comp.python.general: I did that but i

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Steven D'Aprano
On Wed, 31 Mar 2010 22:19:27 -0400, Steve Holden wrote: I'm the same myself, and I know from personal experience that while I am (simply?) seeking accuracy and truth it sometimes bugs the hell out of people ... By the way, why are we acting as if seeking accuracy and truth is a bad thing?

Re: how to build with --enable-shared so that binary knows where libraries are.

2010-03-31 Thread d d
d d ded.utility at gmail.com writes: I found this: http://koansys.com/tech/building-python-with-enable-shared-in-non-standard-location It recommends LDFLAGS=-rpath path to lib, and mentions that you get a compiler cannot create executables error unless you first create the empty directory.

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Patrick Maupin
On Mar 31, 11:28 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: I wouldn't so much say literal as precise. Being precise in your own words is an admirable trait. Asking others to be more precise can be done politely when necessary, but in this case it obviously wasn't

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Patrick Maupin
On Mar 31, 11:40 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: By the way, why are we acting as if seeking accuracy and truth is a bad thing? I don't think anybody is acting like that is a bad thing. It's all how you choose to interpret things. Personally, if I were

Re: sorting ascending/descending with operator.attrgetter

2010-03-31 Thread Steve Holden
Patrick Maupin wrote: On Mar 31, 11:28 pm, Steven D'Aprano ste...@remove.this.cybersource.com.au wrote: I wouldn't so much say literal as precise. Being precise in your own words is an admirable trait. Asking others to be more precise can be done politely when necessary, but in this

[issue8272] Odd exception messages when using cStringIO.StringIO instances as callables.

2010-03-31 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: cStringIO.StringIO is a factory function, so those messages are correct. This is mentioned in http://docs.python.org/library/stringio.html#module-cStringIO . -- nosy: +eric.smith resolution: - rejected status: open - closed

[issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result

2010-03-31 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Hi Stephane, I think you're seeing different buffering behavior, which I suspect is correct according to docs. codecs.open should default to line buffering[1], while open uses the system default[2]. The read() where the assert fails is

[issue8198] Importing pydoc and overwriting sys.stdout, causes one char to be sent to the console when calling help()

2010-03-31 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: Nice buglet, please take a look at Lib/pydoc.py to follow :) As you point out, this is issue 1700304. 'plainpager', which outputs the help in these cases, uses 'sys.stdout.write(plain(text))', but Helper.help has a

[issue1700304] pydoc.help samples sys.stdout and sys.stdin at import time

2010-03-31 Thread Daniel Diniz
Daniel Diniz aja...@gmail.com added the comment: From #8198: I see a solution by turning Helper.output into a property, but it smells of over-engineering :) Passing all output to pagers should work too, unless we need Helper.output as a sort of sys.stderr. -- keywords: +easy nosy:

[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0

2010-03-31 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Unicode nosy: +ezio.melotti priority: - normal stage: - test needed versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271

  1   2   >