decorator 3.3 is out

2011-01-01 Thread Michele Simionato
Thanks to the holiday period I found the time to add to the decorator module a long-awaited feature, the ability to understand and to preserve Python 3 function annotations. I have just released version 3.3 which implements such feature. It should be considered at an experimental stage. If you use

How to port bytes formatting to Python 3.x ?

2011-01-01 Thread Baptiste Lepilleur
Hi, I'm trying to port a small library to Python 3.x, and I'm wondering what is the best way to port statements such as the one belows that are frequently found in network protocol implementation: headerparts = ("%s:%s\n" % (key, value) for key, value in headers.iteritems()) frame

How to define a bytes literal in Python 2.x for porting to Python 3.x using 2to3?

2011-01-01 Thread Baptiste Lepilleur
Hi, I'm trying to port some network protocol library to Python 3.x, and it defines many bytes literals as plain string. How do you define bytes literals so that the library can be ported to Python 3.x using only 2to3? For example: In python 2.x, I need: self.buffer = '\n' In python 3.x,

Re: User input masks - Access Style

2011-01-01 Thread flebber
On Jan 1, 11:13 am, Tim Harig wrote: > On 2010-12-31, flebber wrote: > > > On Dec 28 2010, 12:21 am, Adam Tauno Williams > > wrote: > >> On Sun, 2010-12-26 at 20:37 -0800, flebber wrote: > >> > Is there anyay to use input masks in python? Similar to the function > >> > found in access where a us

Re: How to define a bytes literal in Python 2.x for porting to Python 3.x using 2to3?

2011-01-01 Thread Terry Reedy
On 1/1/2011 4:08 AM, Baptiste Lepilleur wrote: Is there a way to mark string literals so that 2to3 automatically prefixes them with 'b'? Is there a simpler trick? Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()"

Re: How to define a bytes literal in Python 2.x for porting to Python 3.x using 2to3?

2011-01-01 Thread Stefan Behnel
Terry Reedy, 01.01.2011 11:08: On 1/1/2011 4:08 AM, Baptiste Lepilleur wrote: Is there a way to mark string literals so that 2to3 automatically prefixes them with 'b'? Is there a simpler trick? Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Type "copyrig

Re: How to port bytes formatting to Python 3.x ?

2011-01-01 Thread Stefan Behnel
Baptiste Lepilleur, 01.01.2011 10:01: Hi, I'm trying to port a small library to Python 3.x, and I'm wondering what is the best way to port statements such as the one belows that are frequently found in network protocol implementation: headerparts = ("%s:%s\n" % (key, value) for key, va

Re: How to define a bytes literal in Python 2.x for porting to Python 3.x using 2to3?

2011-01-01 Thread Baptiste Lepilleur
2011/1/1 Stefan Behnel > Terry Reedy, 01.01.2011 11:08: > > On 1/1/2011 4:08 AM, Baptiste Lepilleur wrote: >> >> Is there a way to mark string literals so that 2to3 automatically >>> prefixes them with 'b'? Is there a simpler trick? >>> >> >> Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MS

Re: How to port bytes formatting to Python 3.x ?

2011-01-01 Thread Baptiste Lepilleur
2011/1/1 Stefan Behnel > Baptiste Lepilleur, 01.01.2011 10:01: > > Hi, >> I'm trying to port a small library to Python 3.x, and I'm wondering what >> is >> the best way to port statements such as the one belows that are >> frequently >> found in network protocol implementation: >> ... >> > See

Interesting bug

2011-01-01 Thread joy99
Dear Group, Hope all of you are fine and spending nice new year evenings. I get a bug in Python over the last 4 years or so, since I am using it. The language is superb, no doubt about it. It helped me finish many a projects, with extraordinary accuracy. But long since, I was getting an interesti

Re: How to port bytes formatting to Python 3.x ?

2011-01-01 Thread Stefan Behnel
Baptiste Lepilleur, 01.01.2011 12:53: 2011/1/1 Stefan Behnel Baptiste Lepilleur, 01.01.2011 10:01: I'm trying to port a small library to Python 3.x, and I'm wondering what is the best way to port statements such as the one belows that are frequently found in network protocol implementation: ...

Re: Interesting bug

2011-01-01 Thread Daniel Fetchinson
> Dear Group, > > Hope all of you are fine and spending nice new year evenings. > > I get a bug in Python over the last 4 years or so, since I am using > it. The language is superb, no doubt about it. It helped me finish > many a projects, with extraordinary accuracy. But long since, I was > gettin

Re: kinterbasdb error connection

2011-01-01 Thread Uwe Grauer
On 12/31/2010 04:41 PM, Ale Ghelfi wrote: > On 09/12/2010 15:17, Uwe Grauer wrote: >> On 12/07/2010 04:35 PM, Ale Ghelfi wrote: >>> (i'm under Ubuntu 10.10 amd64 and python 2.6 and kinterbasdb 3.2 ) >>> I try to connect my database of firebird 2.5 by kinterbasdb. >>> But python return this error :

Re: Interesting bug

2011-01-01 Thread joy99
On Jan 1, 6:22 pm, Daniel Fetchinson wrote: > > Dear Group, > > > Hope all of you are fine and spending nice new year evenings. > > > I get a bug in Python over the last 4 years or so, since I am using > > it. The language is superb, no doubt about it. It helped me finish > > many a projects, with

Re: Nagios

2011-01-01 Thread Robert
On 2010-12-31 23:57:24 -0500, Adam Skutt said: On Friday, December 31, 2010 9:56:02 PM UTC-5, Robert H wrote: It was forked to be written in Python, yes. The whole point (and it wasn't a Nagios port to Tcl) was that the Tcl community (and I like the Tcl community a lot) has a strange fixation w

Portable Python challenge - round 1

2011-01-01 Thread Perica Zivkovic
All, Portable Python challenge - round 1 has started ! Answer one simple question and you can win 4GB USB fingerprint drive. http://www.egistec.com/en/sensors/fingerprintUSB.aspx This round of Portable Python challenge is sponsored by EgisTec Inc. In the future challenges we will test your k

Re: Nagios

2011-01-01 Thread Adam Skutt
On Saturday, January 1, 2011 10:00:06 AM UTC-5, Robert H wrote: > > Right, just because you say it paints me in a negative light. Look at > every language out there and look within the groups. Everyone is trying > to revinvent the wheel to (in their view) make it better. "Everyone" is doing not

python etl tool

2011-01-01 Thread krishna kumar
can u please list out the etl tool which has been devloped in python and it is being used in market now? or just list me the etl tools developed in python? Thanks Krishnakumar.A -- http://mail.python.org/mailman/listinfo/python-list

Re: How to define a bytes literal in Python 2.x for porting to Python 3.x using 2to3?

2011-01-01 Thread Terry Reedy
On 1/1/2011 5:57 AM, Stefan Behnel wrote: Terry Reedy, 01.01.2011 11:08: On 1/1/2011 4:08 AM, Baptiste Lepilleur wrote: Is there a way to mark string literals so that 2to3 automatically prefixes them with 'b'? Is there a simpler trick? Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.

Re: Portable Python challenge - round 1

2011-01-01 Thread Terry Reedy
On 1/1/2011 10:14 AM, Perica Zivkovic wrote: All, Portable Python challenge - round 1 has started ! Answer one simple question and you can win 4GB USB fingerprint drive. In exchange for name and email... The question: "What is the exact date (day month and year) of the first Portable Python

Re: Portable Python challenge - round 1

2011-01-01 Thread Perica Zivkovic
Hi Terry, when those versions of Portable Python were published, they were the latest available versions of Python. Unfortunately I did not had time to update them since the last release. regards, Perica -- http://mail.python.org/mailman/listinfo/python-list

Re: Tkinter: The good, the bad, and the ugly!

2011-01-01 Thread rantingrick
On Dec 31 2010, 8:47 am, Adam Skutt wrote: Ok, at this point i am not going to respond to the last few posts that where directed at me. What i am going to do is to restate my intentions at the time i started this thread. First and foremost i want everyone to know that i have tons of GUI code th

Re: Portable Python challenge - round 1

2011-01-01 Thread Terry Reedy
On 1/1/2011 3:59 PM, Perica Zivkovic wrote: when those versions of Portable Python were published, they were the latest available versions of Python. 2.6.1: December 2008; 3.0.1: February 2009 Unfortunately I did not had time to update them since the last release. If you have not done any

Re: How to define a bytes literal in Python 2.x for porting to Python 3.x using 2to3?

2011-01-01 Thread Martin v. Loewis
>> To support older Python versions, you need to write your own wrapper >> functions for bytes literals that do nothing in Python 2 and convert the >> literal back to a bytes literal in Python 3. That's ugly, but there's no >> other way to do it. > > I think the developers expected that most maint

Re: Portable Python challenge - round 1

2011-01-01 Thread Perica Zivkovic
Well I'm not paying anybody anything. I'm giving USB sticks for free because I got them for free from our sponsor :) Name and email I need to be able to know where to send them, or you know some easier ways for that ? And thanks for your suggestion but I'm putting my free time where I want while

Re: How to define a bytes literal in Python 2.x for porting to Python 3.x using 2to3?

2011-01-01 Thread Terry Reedy
On 1/1/2011 5:07 PM, Martin v. Loewis wrote: >> I think the developers expected that most maintained and updated 2.x >> code, especially code targeted at 3.x also, would be migrated to 2.6+. > > Unfortunately, that assumption has hurt Python 3 migration > significantly. It gave the impression tha

Re: How to define a bytes literal in Python 2.x for porting to Python 3.x using 2to3?

2011-01-01 Thread Martin v. Loewis
> 1. Code running in multiple versions has to be syntactically correct in > every detail all versions in order to be compiled without error. > However, version specific syntax *can* be used in modules that are > conditionally imported and therefore conditionally compiled and executed. I also encou

Re: Nagios

2011-01-01 Thread Robert
On 2011-01-01 10:34:46 -0500, Adam Skutt said: On Saturday, January 1, 2011 10:00:06 AM UTC-5, Robert H wrote: Right, just because you say it paints me in a negative light. Look at every language out there and look within the groups. Everyone is trying to revinvent the wheel to (in their view)

Re: Tkinter: The good, the bad, and the ugly!

2011-01-01 Thread Adam Skutt
On Jan 1, 5:03 pm, rantingrick wrote: > I actually like Tkinter's simplistic API. I especially love Tkinter > geometry management! However i realize that TclTk is lacking and > because of that fact we will always be at the mercy of another > community. This bothers me, and it should also bother y

Re: Nagios

2011-01-01 Thread Robert
On 2011-01-01 10:34:46 -0500, Adam Skutt said: On Saturday, January 1, 2011 10:00:06 AM UTC-5, Robert H wrote: Right, just because you say it paints me in a negative light. Look at every language out there and look within the groups. Everyone is trying to revinvent the wheel to (in their view)

Re: Tkinter: The good, the bad, and the ugly!

2011-01-01 Thread CM
Rantingrick, Find a closet in your home, go inside, turn off the lights, and shout into a thermos; that will likely have a similar result as these posts on the state of GUI libraries in Python. There is something admirable about the FOSS philosophy of "You want it? You make it". And I don't see

Re: Nagios

2011-01-01 Thread Adam Skutt
On Jan 1, 6:21 pm, Robert wrote: > > Really? How many templating systems does Python have? More than one? > Why is that? How many web frameworks does Perl have? More than one? Why > is that? > > Why *was* Nagios forked and re-written in Python? > > There are too many examples to count. > You're m

wiki language

2011-01-01 Thread gert
I can't get the space betweeen \ " to work, what am I doing wrong? http://pypi.python.org/pypi/appwsgi | Install python3_ and launch the server_ | | All the examples are sending ajax packages, no html is being generated by the server. Pleas take a look at the source code and consider this techniq

Re: Tkinter: The good, the bad, and the ugly!

2011-01-01 Thread rantingrick
On Jan 1, 5:39 pm, CM wrote: > And I don't see this as a problem anyway.  I wanted to do GUI > programming in Python, so I read a bit, chose wxPython, downloaded it, > and started learning it.  Done. I, I, I...Me,Me,Me. Seems you are only concerned about yourself CM. However this a community di

re: nagios

2011-01-01 Thread Littlefield, Tyler
Adam, Frankly, I am getting really tired of listening to you. I've seen numerous good posts on this list, some post more good quality information and arguments than others, and so far I have yet to see any post of yours where you do not resort to insults and totally avoid the argument. I under

Pydev 1.6.4 Released

2011-01-01 Thread Fabio Zadrozny
Hi All, Pydev 1.6.4 has been released Details on Pydev: http://pydev.org Details on its development: http://pydev.blogspot.com Release Highlights: --- * Improved Unittest integration: o Created a PyUnit view (with a red/green bar) which can be used to see the

@property; @classmethod; def f()

2011-01-01 Thread K. Richard Pixley
Can anyone explain to me why this doesn't work? class Foo(object): @property @classmethod def f(cls): return 4 I mean, I think it seems to be syntactically clear what I'm trying to accomplish. What am I missing? --rich -- http://mail.python.org/mailman/listinfo/python-lis

Multiple instances and wrong parental links

2011-01-01 Thread Josh English
I have hit yet another wall. I am dynamically creating a class and then creating instances of that class. The class relies on a second class to store a list of objects. (This is simplified from the the original by a factor of about 20. The real program is trying to create a Python object around

Re: @property; @classmethod; def f()

2011-01-01 Thread Ian Kelly
On 1/1/2011 6:55 PM, K. Richard Pixley wrote: Can anyone explain to me why this doesn't work? class Foo(object): @property @classmethod def f(cls): return 4 I mean, I think it seems to be syntactically clear what I'm trying to accomplish. What am I missing? First, because classmethod returns

pyWin32 attempted installation; Error message: Skipping exchdapi: No library 'Ex2KSdk'

2011-01-01 Thread marceepoo
I just downloaded pyWin32 (https://sourceforge.net/projects/pywin32/) and started to install it. I get these error msgs: Skipping exchange: No library 'Ex2KSdk' Skipping exchdapi: No library 'Ex2KSdk' Skipping directsound: The header 'dsound.h' can not be located Does anyone have any sug

Re: Multiple instances and wrong parental links

2011-01-01 Thread ChasBrown
On Jan 1, 5:59 pm, Josh English wrote: > I have hit yet another wall. I am dynamically creating a class and then > creating instances of that class. The class relies on a second class to store > a list of objects. (This is simplified from the the original by a factor of > about 20. The real pro

Re: @property; @classmethod; def f()

2011-01-01 Thread Steven D'Aprano
On Sat, 01 Jan 2011 17:55:10 -0800, K. Richard Pixley wrote: > Can anyone explain to me why this doesn't work? > > class Foo(object): > @property > @classmethod > def f(cls): > return 4 What does "doesn't work" mean? It works for me: >>> class Foo(object): ... @pro

Re: Multiple instances and wrong parental links

2011-01-01 Thread John Nagle
On 1/1/2011 9:57 PM, ChasBrown wrote: setattr(Wrap, 'stuff', ElementList(self, 'test')) Right. As the previous poster wrote, that line is the basic problem. It's not entirely clear what you're trying to do, but it seems to be overly complex. You could have Wrap inherit from ElementList, if y

CPython on the Web

2011-01-01 Thread azakai
Hello, I hope this will be interesting to people here: CPython running on the web, http://syntensity.com/static/python.html That isn't a new implementation of Python, but rather CPython 2.7.1, compiled from C to JavaScript using Emscripten and LLVM. For more details on the conversion process, see

Re: Multiple instances and wrong parental links

2011-01-01 Thread Steven D'Aprano
On Sat, 01 Jan 2011 17:59:33 -0800, Josh English wrote: > I have hit yet another wall. I am dynamically creating a class and then > creating instances of that class. The class relies on a second class to > store a list of objects. (This is simplified from the the original by a > factor of about 20