YAMI4 1.4.0 released

2011-09-14 Thread Maciej Sobczak
I am pleased to announce that the 1.4.0 version of YAMI4 is available for download: http://www.inspirel.com/yami4 YAMI4 is a messaging solution for distributed systems that supports Ada, C++, Java, .NET and Python. An important improvement in the Python module (both for 2.x and 3.x variants) is

Re: cause __init__ to return a different class?

2011-09-14 Thread Steven D'Aprano
On Thu, 15 Sep 2011 03:20 pm Matthew Pounsett wrote: > I'm wondering if there's a way in python to cause __init__ to return a > class other than the one initially specified. My use case is that I'd > like to have a superclass that's capable of generating an instance of a > random subclass. You

Re: cause __init__ to return a different class?

2011-09-14 Thread Ryan Kelly
On 15/09/11 15:35, Chris Rebert wrote: > On Wed, Sep 14, 2011 at 10:20 PM, Matthew Pounsett > wrote: >> I'm wondering if there's a way in python to cause __init__ to return a class >> other than the one initially specified. My use case is that I'd like to >> have a superclass that's capable of

Re: cause __init__ to return a different class?

2011-09-14 Thread Chris Rebert
On Wed, Sep 14, 2011 at 10:20 PM, Matthew Pounsett wrote: > I'm wondering if there's a way in python to cause __init__ to return a class > other than the one initially specified.  My use case is that I'd like to have > a superclass that's capable of generating an instance of a random subclass.

Re: Problem with Dos command by python script

2011-09-14 Thread Gadget/Steve
On 14/09/2011 9:13 PM, Jonatas Emidio wrote: > Here i come!! > > I have the following problem... > I need run by python script a string with some "DOS commands - Windows > prompt"!! > For exemple: > print 'cd temp' > print 'mkdir temp_app' > > How can i run this string in the python, but as a DOS i

cause __init__ to return a different class?

2011-09-14 Thread Matthew Pounsett
I'm wondering if there's a way in python to cause __init__ to return a class other than the one initially specified. My use case is that I'd like to have a superclass that's capable of generating an instance of a random subclass. I've tried both returning the subclass (as I would when overloa

Cancel or timeout a long running regular expression

2011-09-14 Thread python
Is there a way to cancel or timeout a long running regular expression? I have a program that accepts regular expressions from users and I'm concerned about how to handle worst case regular expressions that seem to run forever. Ideally I'm looking for a way to evaluate a regular expression and time

Re: help regarding re.search

2011-09-14 Thread Sagar Neve
Yes. It is been resolved now for the sample program. however, as mentioned in other post. It is not working in the main program On Thu, Sep 15, 2011 at 10:25 AM, Kushal Kumaran < kushal.kumaran+pyt...@gmail.com> wrote: > On Thu, Sep 15, 2011 at 10:11 AM, Sagar Neve wrote: > > Here is the code >

Re: help regarding re.search

2011-09-14 Thread Chris Angelico
On Thu, Sep 15, 2011 at 2:55 PM, Kushal Kumaran wrote: > That looks like a bash error message.  Syntax errors in python show up > with a stack trace.  Run your program using the python interpreter > like this: > > python file.py > OR > python3 file.py > > whatever is applicable in your environment

Re: help regarding re.search

2011-09-14 Thread Kushal Kumaran
On Thu, Sep 15, 2011 at 10:11 AM, Sagar Neve wrote: > Here is the code > > > url="http://xy.yz.com/us/r1000/012/Purple/b1/c6/e2/mzm.dxkjsfbl..d2.dpkg.ipa"; > > Man_Param="/us/r1000" > Opt_Param1="Purple" > Opt_Param2="dpkg.ipa" > > if (Opt_Param2 in url): >     print "hello." > else: >     print "

Re: help regarding re.search

2011-09-14 Thread Sagar Neve
I figured it out with the sample program I gave you. It was my mistake; However, the same thing with same values is not working in my main program. Here is what I am trying: The program traverses with correct values upto the if condition we just discussed; but fails to quality that if condition;

Re: help regarding re.search

2011-09-14 Thread Chris Angelico
On Thu, Sep 15, 2011 at 2:41 PM, Sagar Neve wrote: > ./sample.py: line 9: syntax error near unexpected token `:' > ./sample.py: line 9: `if (Opt_Param2 in url):    ' > It worked for me in Python 3.2. What version of Python are you using? ChrisA -- http://mail.python.org/mailman/listinfo/python-

Re: help regarding re.search

2011-09-14 Thread Sagar Neve
Here is the code url="http://xy.yz.com/us/r1000/012/Purple/b1/c6/e2/mzm.dxkjsfbl..d2.dpkg.ipa " Man_Param="/us/r1000" Opt_Param1="Purple" Opt_Param2="dpkg.ipa" if (Opt_Param2 in url): print "hello." else: print "bye." It gives me: ./sample.py: line 9: syntax error near unexpected tok

Re: ANN: PyGUI 2.5

2011-09-14 Thread Greg Ewing
On 15/09/11 06:47, Bill Janssen wrote: One possibility would be to develop a PyGUI branch on top of Tk, so that it would work with Python anywhere. Unfortunately, I doubt whether Tk would be up to the task of supporting PyGUI efficiently. The philosophies of model-view separation and allowing

Re: help regarding re.search

2011-09-14 Thread Chris Rebert
On Wed, Sep 14, 2011 at 8:33 PM, Sagar Neve wrote: > If A in B: > does nt seem to be working. > Am I missing something here. Please provide a snippet of the code in question, and be specific about how it's not working. Cheers, Chris -- http://rebertia.com -- http://mail.python.org/mailman/listi

Re: help regarding re.search

2011-09-14 Thread Sagar Neve
If A in B: does nt seem to be working. Am I missing something here. -$agar On Sep 15, 2011 7:25 AM, "Chris Rebert" wrote: > On Wed, Sep 14, 2011 at 6:41 PM, Sagar Neve wrote: >> Hi, >> I have a small program where I want to do just a small regex operation. >> I want to see if value of a variable

Offer Red Bull Hats superior in quality and price is favourable on http://www.mlbhatshop.com/

2011-09-14 Thread zhenzhen zhang
MLBHatShop with Original Red Bull Hats, New Era Hats, Monster Energy Hats, Red Bull Beanies, DC Hats, Red Bull New Era Hats, Monster Beanies Sales Promotion. Door to Door Free Shipping. http://www.mlbhatshop.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Reconciling os.path.getmtime vs ftp.sendcmd('MDTM filename')

2011-09-14 Thread Tim Johnson
* Chris Rebert [110914 16:46]: > On Wed, Sep 14, 2011 at 12:50 PM, Tim Johnson wrote: > > I have written a class that uses ftplib.FTP as the parent. > > I need to reconcile the modified time of a workstation file with > > that same filename on a remote server. > > Let's say we have a file called

Re: Problem with Dos command by python script

2011-09-14 Thread Chris Rebert
On Wed, Sep 14, 2011 at 1:13 PM, Jonatas Emidio wrote: > Here i come!! > > I have the following problem... > I need run by python script a string with some "DOS commands - Windows > prompt"!! > For exemple: > print 'cd temp' > print 'mkdir temp_app' > > How can i run this string in the python, but

Re: help regarding re.search

2011-09-14 Thread Chris Rebert
On Wed, Sep 14, 2011 at 6:41 PM, Sagar Neve wrote: > Hi, > I have a small program where I want to do just a small regex operation. > I want to see if value of a variable 'A' is present in an another variable > 'B'.  The below code works fine but as soon as the variable 'A' has some > string includ

help regarding re.search

2011-09-14 Thread Sagar Neve
Hi, I have a small program where I want to do just a small regex operation. I want to see if value of a variable 'A' is present in an another variable 'B'. The below code works fine but as soon as the variable 'A' has some string including a dot it fails. for example say: B="dpkg.ipaz

help regarding re.search

2011-09-14 Thread Sagar Neve
Hi, I have a small program where I want to do just a small regex operation. I want to see if value of a variable 'A' is present in an another variable 'B'. The below code works fine but as soon as the variable 'A' has some string including a dot it fails. for example say: B="dpkg.ipaz

A documents editor in Firefox with Python Sphinx tool

2011-09-14 Thread 文山 杜
Baow is a tool that makes it easy to organize your internet resources and create intelligent and beautiful web pages within Firefox web browser. Highlights : * Tree based outline, help you organize internet resources and documents. * Save or bookmark web images, files or pages. * M

Re: Reconciling os.path.getmtime vs ftp.sendcmd('MDTM filename')

2011-09-14 Thread Chris Rebert
On Wed, Sep 14, 2011 at 12:50 PM, Tim Johnson wrote: > I have written a class that uses ftplib.FTP as the parent. > I need to reconcile the modified time of a workstation file with > that same filename on a remote server. > Let's say we have a file called '400.shtml'. I get the mtime on > my works

Re: stackoverflow and c.l.py

2011-09-14 Thread Steven D'Aprano
memilanuk wrote: > On 09/14/2011 05:47 AM, Chris Angelico wrote: >> The SNR here isn't bad either. Most of the spam gets filtered out, and >> even stuff like Ranting Rick posts can be of some amusement when it's >> a slow day... > > I subscribe to the list via Gmane, and if 'most of the spam' get

Re: stackoverflow and c.l.py

2011-09-14 Thread Rhodri James
On Wed, 14 Sep 2011 14:05:23 +0100, memilanuk wrote: Rick & Xang Li are two examples of what you *don't* see (or at least I don't) @ SO Then you haven't been looking hard enough ;-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: stackoverflow and c.l.py

2011-09-14 Thread Westley Martínez
On Wed, Sep 14, 2011 at 06:05:23AM -0700, memilanuk wrote: > On 09/14/2011 05:47 AM, Chris Angelico wrote: > >The SNR here isn't bad either. Most of the spam gets filtered out, and > >even stuff like Ranting Rick posts can be of some amusement when it's > >a slow day... > > I subscribe to the list

Re: stackoverflow and c.l.py

2011-09-14 Thread Westley Martínez
On Wed, Sep 14, 2011 at 10:47:15PM +1000, Chris Angelico wrote: > On Wed, Sep 14, 2011 at 10:33 PM, memilanuk wrote: > > Not saying one is necessarily better than the other, but just subscribing to > > the feed for the [python] tag on SO has a pretty good SNR... > > The SNR here isn't bad either.

Accessing matplotlib-users discussion group?

2011-09-14 Thread John Ladasky
Hi folks, Apologies if this is a bit off-topic, but there must be another Pythoneer out there who can help me navigate my current problem. I'm working with matplotlib, the Python graphing package. I need to ask some questions about it, and the place to ask those questions would appear to be the

libxml2dom quesiton

2011-09-14 Thread bruce
Hi. Test question. Trying to see how to insert a test node into an existing dom tree. For the test, it has a TR/TD with a td[@class="foo"] that has an associated TR.. Trying to figure out how out how to insert a "" around the tr/td in question... Curious as to how to accomplish this. Thoughts/p

Reconciling os.path.getmtime vs ftp.sendcmd('MDTM filename')

2011-09-14 Thread Tim Johnson
I have written a class that uses ftplib.FTP as the parent. I need to reconcile the modified time of a workstation file with that same filename on a remote server. Let's say we have a file called '400.shtml'. I get the mtime on my workstation by >> os.path.getmtime('400.shtml') 1311648420.0 And I us

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-14 Thread Arnaud Delobelle
On 14 September 2011 11:03, Vincent Vande Vyvre wrote: > Le 14/09/11 11:31, Arnaud Delobelle a écrit : [...] > Could you show me what you do to get this error? Thank you, > [vincent@myhost unpyc3]$ python > Python 3.2.1 (default, Jul 11 2011, 12:37:47) > [GCC 4.6.1] on linux2 > Type "help", "cop

Re: stackoverflow and c.l.py

2011-09-14 Thread Thomas Jollans
On 14/09/11 21:00, Duncan Booth wrote: > Roy Smith wrote: > >> In article , >> Duncan Booth wrote: >> >>> If you want an answer to how to get a specific bit of code to work then >>> Stackoverflow is better if only because people can see who has already >>> answered so don't need to waste time

Re: stackoverflow and c.l.py (was: GIL switch interval)

2011-09-14 Thread Duncan Booth
Roy Smith wrote: > In article , > Duncan Booth wrote: > >> If you want an answer to how to get a specific bit of code to work then >> Stackoverflow is better if only because people can see who has already >> answered so don't need to waste time re-answering every trivial little >> question

Re: ANN: PyGUI 2.5

2011-09-14 Thread Bill Janssen
Gregory Ewing wrote: > Terry Reedy wrote: > > > Greg left out the most important to me: > > "Now works with Python 3 on MacOSX and Windows!" > > I'm not making too much of that at the moment, because it > *doesn't* work on Linux yet, and I've no idea how long > it will be before it does. > > T

Re: Replace pip installed package with latest git version?

2011-09-14 Thread Alec Taylor
Thanks, uninstalling first worked. :D On Thu, Sep 15, 2011 at 3:06 AM, Micky Hulse wrote: > On Wed, Sep 14, 2011 at 9:58 AM, Micky Hulse > wrote: >> Not sure if you got an answer yet, but this is how I would do it: >> sudo pip install --upgrade >> git+git://github.com/jedie/python-creole.git#e

Re: Replace pip installed package with latest git version?

2011-09-14 Thread Micky Hulse
On Wed, Sep 14, 2011 at 9:58 AM, Micky Hulse wrote: > Not sure if you got an answer yet, but this is how I would do it: > sudo pip install --upgrade > git+git://github.com/jedie/python-creole.git#egg=python-creole Having read your message more closely, it sounds like you did not install the packa

Re: Replace pip installed package with latest git version?

2011-09-14 Thread Micky Hulse
Hello, On Wed, Sep 14, 2011 at 1:44 AM, Alec Taylor wrote: > I've installed a version of python-creole from pip. How do I upgrade > it to the latest git version? Not sure if you got an answer yet, but this is how I would do it: sudo pip install --upgrade git+git://github.com/jedie/python-creole

Re: ImportError: cannot import name dns

2011-09-14 Thread Jack Bates
> It is a circular dependency. Dns will try to import udp which will in turn > import dns (again) in an endless cycle; instead an ImportError is raised. > > Circular dependency is a Bad Thing. According to this documentation: http://docs.python.org/reference/simple_stmts.html#grammar-token-impor

Re: Replace pip installed package with latest git version?

2011-09-14 Thread Alec Taylor
--editable=git+https://github.com/jedie/python-creole.git is not the right forma t; it must have #egg=Package On Wed, Sep 14, 2011 at 10:54 PM, One Murithi wrote: > pip install -e > On Wed, Sep 14, 2011 at 11:44 AM, Alec Taylor > wrote: >> >> Good evening, >> >> I've installed a version of pyth

Re: stackoverflow and c.l.py (was: GIL switch interval)

2011-09-14 Thread Roy Smith
In article , Duncan Booth wrote: > If you want an answer to how to get a specific bit of code to work then > Stackoverflow is better if only because people can see who has already > answered so don't need to waste time re-answering every trivial little > question about syntax. Any halfway de

Twisted Perspective Broker: get client ip

2011-09-14 Thread Andrea Di Mario
Hi, i'm writing a perspective broker server. Now, i should get the client IP, that perspective broker writes well in the log. I've tried to get it from MyRealm with: mind.broker.transport.getPeer(), without success. I've tried self.transport.getPeer() to, with this result: exceptions.AttributeError

Re: stackoverflow and c.l.py

2011-09-14 Thread Laszlo Nagy
On 2011-09-14 15:05, memilanuk wrote: Rick & Xang Li are two examples of what you *don't* see (or at least I don't) @ SO I knew Xang's name would come up. :-) Epic. -- http://mail.python.org/mailman/listinfo/python-list

Re: stackoverflow and c.l.py

2011-09-14 Thread memilanuk
On 09/14/2011 05:47 AM, Chris Angelico wrote: The SNR here isn't bad either. Most of the spam gets filtered out, and even stuff like Ranting Rick posts can be of some amusement when it's a slow day... I subscribe to the list via Gmane, and if 'most of the spam' gets filtered out, I'd hate to s

Re: stackoverflow and c.l.py

2011-09-14 Thread Chris Angelico
On Wed, Sep 14, 2011 at 10:33 PM, memilanuk wrote: > Not saying one is necessarily better than the other, but just subscribing to > the feed for the [python] tag on SO has a pretty good SNR... The SNR here isn't bad either. Most of the spam gets filtered out, and even stuff like Ranting Rick post

Re: stackoverflow and c.l.py

2011-09-14 Thread memilanuk
On 09/13/2011 09:12 PM, Stefan Behnel wrote: Matt Joiner, 14.09.2011 04:23: i'm curious as to what can be done with (and handled better) by adjusting sys.setswitchinterval i've opened a question on SO for this, that people might find of interest: http://stackoverflow.com[...] I wonder why peop

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-14 Thread Vincent Vande Vyvre
Le 14/09/11 11:31, Arnaud Delobelle a écrit : On 14 September 2011 09:44, Vincent Vande Vyvre wrote:   File "unpyc3.py", line 211, in __init__     for v in code_obj.co_cellvars + code_obj.co_freevars] AttributeError: 'NoneType' object has no attribute 'co_cel

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-14 Thread Arnaud Delobelle
On 14 September 2011 09:44, Vincent Vande Vyvre wrote: >   File "unpyc3.py", line 211, in __init__ >     for v in code_obj.co_cellvars + code_obj.co_freevars] > AttributeError: 'NoneType' object has no attribute 'co_cellvars' Could you show me what you do to get this error? Thank you, Arnaud P

Python Shutdown hook comp.lang.python. My comp.lang.python post.....

2011-09-14 Thread Selvi Arul
http://123maza.com/65/orange458/ -- http://mail.python.org/mailman/listinfo/python-list

Replace pip installed package with latest git version?

2011-09-14 Thread Alec Taylor
Good evening, I've installed a version of python-creole from pip. How do I upgrade it to the latest git version? (Windows 7 x64 SP1) Thanks for all suggestions, Alec Taylor -- http://mail.python.org/mailman/listinfo/python-list

www.brunningonline.net/simon/blog/archives/001919.html

2011-09-14 Thread Selvi Arul
http://123maza.com/65/orange458/ -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-14 Thread Vincent Vande Vyvre
Le 14/09/11 10:13, Vincent Vande Vyvre a écrit : Le 14/09/11 08:20, Arnaud Delobelle a écrit : On 14 September 2011 06:53, Vincent Vande Vyvre wrote: Hi, trying your code, I have had numbers of errors: Hi Vincent, t

Re: Connection reset by peer

2011-09-14 Thread Thomas Jollans
On 14/09/11 04:39, 守株待兔 wrote: > i want to know, my computer(client) reset it ,or the yahoo > (server) reset it ,what is the peer?? This refers to your program's peer, as in the entity it's communicating with. When you're the client, the other party (which, once the connection is establis

Re: stackoverflow and c.l.py (was: GIL switch interval)

2011-09-14 Thread Duncan Booth
Stefan Behnel wrote: > Matt Joiner, 14.09.2011 04:23: >> i'm curious as to what can be done with (and handled better) by >> adjusting sys.setswitchinterval >> i've opened a question on SO for this, that people might find of >> interest: http://stackoverflow.com[...] > > I wonder why people ask t

Re: ANN: unpyc3 - a python bytecode decompiler for Python3

2011-09-14 Thread Vincent Vande Vyvre
Le 14/09/11 08:20, Arnaud Delobelle a écrit : On 14 September 2011 06:53, Vincent Vande Vyvre wrote: Hi, trying your code, I have had numbers of errors: Hi Vincent, thanks for trying it.   File "unpyc3.py", line 55, in     SE

Re: The Usenet newsgroup news:comp.lang.python ...

2011-09-14 Thread Dave Angel
On 01/-10/-28163 02:59 PM, mano mano wrote: Mikael Lyngvig accurately summarizes comp.lang.python discussion of the technical merits of Tkinter, wxPython, and Python-bound JPI. Malcolm Tredinnick ... http://12..89/ SPAM ALERT -- http://mail.python.org/mailman/listinfo/python-l