Re: PYTHON WORKING WITH PERL ??

2008-11-01 Thread Shawn Milochik
On Sat, Nov 1, 2008 at 11:15 AM, Nicola Larosa (tekNico) <[EMAIL PROTECTED]> wrote: > Pat <[EMAIL PROTECTED]> wrote: >> After you learn Python, you'll come to despise Perl. > > Some of us came to despise Perl *before* learning Python (third to > last paragraph): For what it's worth, I thought I'd

Re: remote unzip

2008-11-01 Thread morecowbell
On Nov 1, 5:35 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > morecowbell wrote: > > i got a bunch of zip files on a remote server and need to get to one > > of the files, an xml file, in each of the archives. fairly simple to > > do locally with zipfile but i don't seem to be able to combine that

Re: Anyone in the Houston / College Station / Austin area? Looking to do some sprints / joint projects.

2008-11-01 Thread Dan Bishop
On Nov 1, 10:35 pm, xkenneth <[EMAIL PROTECTED]> wrote: > All, > >    I'm in Houston/College Station/Austin quite often and I'm looking > for other coders to do some joint projects with, share experiences, or > do some sprints. Let me know if you're interested. > > Regards, > Ken I live in Houston

Re: Responding to web request with python

2008-11-01 Thread Tim Roberts
scott212 <[EMAIL PROTECTED]> wrote: > >I'm responding with xml to a web request from google checkout but I >think I'm in a catch-22. To get my webserver (apache) to respond I >need a header and then a blank line before my xml begins, or else it >throws the 500 error. If have the blank line before t

Re: Executing a hidden/background program

2008-11-01 Thread Mike Driscoll
Jim, On Sat, Nov 1, 2008 at 6:02 PM, <[EMAIL PROTECTED]> wrote: > Using wxPython, I'm looking to build a GUI app for a daemon-based app, > on Win32 platform, how would I go about executing the daemon app so it > stays in the background when the Py app is running? It's critical that > the child pr

Anyone in the Houston / College Station / Austin area? Looking to do some sprints / joint projects.

2008-11-01 Thread xkenneth
All, I'm in Houston/College Station/Austin quite often and I'm looking for other coders to do some joint projects with, share experiences, or do some sprints. Let me know if you're interested. Regards, Ken -- http://mail.python.org/mailman/listinfo/python-list

Ping monitor - monitor ip in the background?

2008-11-01 Thread ScottZ
With python 2.6 and wxpython I'm trying to create a system tray icon application based around an example found here: http://codeboje.de/MailSneaker-Part-3-SystemTrayTaskBar-Icons-with-Python-and-wxPython/ The application will simply change the systray icon based on if an ip address is online or n

Re: Decorator for validation - inefficient?

2008-11-01 Thread Steven D'Aprano
On Sat, 01 Nov 2008 17:12:33 -0700, Bryan wrote: > The list of validation error descriptions is returned instead of raising > exceptions so clients can show the errors to the user for fixing. > Raising exceptions seems like an uneeded burden for the client, as there > is nothing exceptional about

Re: Ordering python sets

2008-11-01 Thread Steven D'Aprano
On Sat, 01 Nov 2008 18:58:59 +, Tim Rowe wrote: > 2008/10/27 <[EMAIL PROTECTED]>: >> Lie Ryan: >> >>>Oh no, the two dict implementation would work _exactly_ the same from >>>the outside, they are transparently interchangeable. Only the >>>performance characteristic differs because of the diff

[ANN] Python 3 Symbol Glossary

2008-11-01 Thread Terry Reedy
Over the years, people have complained about the difficulty of finding the meaning of symbols used in Python syntax. So ... I wrote a Python 3 Symbol Glossary http://code.google.com/p/xploro/downloads/list There are .txt and .odt versions. The first is usable, the second is nicer if you have

Re: CAD.py

2008-11-01 Thread infixum
[EMAIL PROTECTED] wrote: > r> I am currently looking to create a small CAD program with python. > > Instead of starting from scratch how about extending PythonCAD instead: > > http://www.pythoncad.org/ > > Skip ThanCAD might have a few ideas too. Carl T. -- http://mail.python.org/mailman/lis

How to Use ANSI for Remote Screen Scraping?

2008-11-01 Thread Henry Chang
Using the below script, I can use pexpect to correctly output the entire remote terminal content to screen. At this point, I am running into difficulty to scrap the screen, for the screen elements that I want. (Say: the screen region from the complete 3rd line to the 8th line.) I believe I need t

Re: Decorator for validation - inefficient?

2008-11-01 Thread Bryan
Steven D'Aprano wrote: > On Fri, 31 Oct 2008 11:26:19 -0700, Bryan wrote: > > > I want my business objects to be able to do this: > [snip code] > > The code you show is quite long and complex and frankly I don't have the > time to study it in detail at the moment, but I can make a couple of > qui

Executing a hidden/background program

2008-11-01 Thread jim3371
Using wxPython, I'm looking to build a GUI app for a daemon-based app, on Win32 platform, how would I go about executing the daemon app so it stays in the background when the Py app is running? It's critical that the child process exit when the Py app exits/crashes. -- http://mail.python.org/mailma

Re: Ordering python sets

2008-11-01 Thread Terry Reedy
Lie Ryan wrote: You need to adjust the current mindset slightly (but in an important way to understand the "why" behind this idea). The current notion is: list and dict is a data structure. With this idea, list and dict is an abstract type, not a data structure. array, linked list, binary tree

Re: Some Problem about Moin

2008-11-01 Thread Paul Boddie
On 18 Okt, 16:44, Paul Boddie <[EMAIL PROTECTED]> wrote: > > For a long time I've been tempted to make a category menu macro for > MoinMoin I've now made this available here: http://moinmo.in/MacroMarket/CategoryMenu It probably needs some refinement, however. Paul -- http://mail.python.org/mai

Re: Ordering python sets

2008-11-01 Thread Tim Rowe
2008/10/27 <[EMAIL PROTECTED]>: > Lie Ryan: > >>Oh no, the two dict implementation would work _exactly_ the same from the >>outside, they are transparently interchangeable. Only the performance >>characteristic differs because of the different implementation.< > > I don't agree with the general

Re: Ordering python sets

2008-11-01 Thread bearophileHUGS
Lie Ryan: >Although you said you disagree with the general idea, you actually take the >idea two steps further, I take that as an implicit agreement to several parts >of the idea.< Think about a bridge: building half bridge may be bad/useless, while building it whole may lead to something useful

Re: Windows DOS box redirection

2008-11-01 Thread Thorsten Kampe
* Tim Golden (Fri, 31 Oct 2008 12:21:12 +) > Bill McClain wrote: > > On 2008-10-31, Glenn Linderman <[EMAIL PROTECTED]> wrote: > This is the MS article which describes the problem: > > http://support.microsoft.com/kb/321788 > > and suggests that it's fixed in XP SP1 but this > thread: > >

Responding to web request with python

2008-11-01 Thread scott212
I'm responding with xml to a web request from google checkout but I think I'm in a catch-22. To get my webserver (apache) to respond I need a header and then a blank line before my xml begins, or else it throws the 500 error. If have the blank line before the xml, the service I'm responding to cann

Re: Installation of Py3.0rc1 fails on Mac OS X with bad locale

2008-11-01 Thread Martin v. Löwis
> How should this issue be worked around or dealt with? Should users on > Mac OS X 10.5 change the default value of LC_CTYPE? To what? It would be best if a Mac user could propose a patch for that problem before the release of Python 3.0. Regards, Martin -- http://mail.python.org/mailman/listinfo

Re: Simplifying anonymous inner classes?

2008-11-01 Thread Martin v. Löwis
> Is there a more Pythonic way to instantiate sub-classes and provide > instance-specific implementations without the overhead of an unused > "anonymous" class cluttering my code/namespace? I agree with Carl Banks that what you do is already fairly Pythonic: explicit is better than implicit, and s

Installation of Py3.0rc1 fails on Mac OS X with bad locale

2008-11-01 Thread Mario Ruggier
Hi, i had the following problem when installing py3.0rc1 on a Mac OS X 10.5.5. On this system, the default locale values are: $ locale LANG= LC_COLLATE="C" LC_CTYPE="UTF-8" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= but "UTF-8" is is not a value for LC_CTYPE that is

Re: PYTHON WORKING WITH PERL ??

2008-11-01 Thread Nicola Larosa (tekNico)
Pat <[EMAIL PROTECTED]> wrote: > After you learn Python, you'll come to despise Perl. Some of us came to despise Perl *before* learning Python (third to last paragraph): A journey through languages http://www.teknico.net/devel/journey/index.en.html -- Nicola Larosa - http://www.tekNico.net/ Loo

Re: Simplifying anonymous inner classes?

2008-11-01 Thread Arnaud Delobelle
Tim Chase <[EMAIL PROTECTED]> writes: > I've got code similar to the following > > class Action: >def __init__(self, ...): pass >def __call__(self, ...): pass >def get_help(self, ...): pass > > class Backend: >class _Load(Action): > def __init__(self, ...): pass # overrid

Re: Simplifying anonymous inner classes?

2008-11-01 Thread Carl Banks
On Nov 1, 8:13 am, Tim Chase <[EMAIL PROTECTED]> wrote: > I've got code similar to the following > >   class Action: >     def __init__(self, ...):  pass >     def __call__(self, ...):  pass >     def get_help(self, ...):  pass > >   class Backend: >     class _Load(Action): >       def __init__(se

Python Object Notation (PyON)

2008-11-01 Thread Zaur Shibzoukhov
Python Object Notation (PyON ) Python 2.6/3.0 now has a module ast. This opens up new opportunities. One of them is the possibility of introducing human readable/writable literal object notation, based on the syntax of the python language. I woul

Re: Simplifying anonymous inner classes?

2008-11-01 Thread Tim Chase
PS: part of the aim is to have properties that can be discovered through introspection, know how to provide help on themselves, and have a protocol for parameter-discovery for the __call__ method. Without a more concrete example it is hard to tell what you are trying to achieve. Python already

Re: Function Memory Usage

2008-11-01 Thread Steven D'Aprano
On Sat, 01 Nov 2008 01:43:44 -0400, Terry Reedy wrote: > Paulo J. Matos wrote: >> Hi all, >> >> What's the best way to know the amount of memory allocated by a >> function > > What do you count? > > def zeros(n): return [0]*n > > how much memory is that? I assume you don't include the memory

Re: Exact match with regular expression

2008-11-01 Thread Rob Williscroft
Lawrence D'Oliveiro wrote in news:[EMAIL PROTECTED] in comp.lang.python: > In message <[EMAIL PROTECTED]>, Rob > Williscroft wrote: > >> Read (and bookmark) this: >> >> http://www.python.org/doc/2.5.2/lib/re-syntax.html > > Funny how you never get a thank-you when you tell people to RTFM. Say

Re: Simplifying anonymous inner classes?

2008-11-01 Thread Peter Otten
Tim Chase wrote: > I've got code similar to the following > > class Action: > def __init__(self, ...): pass > def __call__(self, ...): pass > def get_help(self, ...): pass > > class Backend: > class _Load(Action): > def __init__(self, ...): pass # override1 > d

Re: Question about scope

2008-11-01 Thread Pat
Steven D'Aprano wrote: On Thu, 23 Oct 2008 11:38:35 -0400, Pat wrote: I have a Globals class. Well, that's your first mistake. Using global variables in a class is no better than using bare global variables. They're still global, and that's a problem: http://weblogs.asp.net/wallen/archive

Re: Simplifying anonymous inner classes?

2008-11-01 Thread Duncan Booth
Tim Chase <[EMAIL PROTECTED]> wrote: > PS: part of the aim is to have properties that can be discovered > through introspection, know how to provide help on themselves, > and have a protocol for parameter-discovery for the __call__ method. > Without a more concrete example it is hard to tell w

Simplifying anonymous inner classes?

2008-11-01 Thread Tim Chase
I've got code similar to the following class Action: def __init__(self, ...): pass def __call__(self, ...): pass def get_help(self, ...): pass class Backend: class _Load(Action): def __init__(self, ...): pass # override1 def __call__(self, ...): pass # override1 d

Re: brackets content regular expression

2008-11-01 Thread netimen
Yeah, I know it's quite simple to do manually. I was just interested if it could be done by regular expressions. Thank you anyway. On 1 нояб, 00:36, Matimus <[EMAIL PROTECTED]> wrote: > On Oct 31, 11:57 am, netimen <[EMAIL PROTECTED]> wrote: > > > > > > > Thank's but if i have several top-level gro

Re: remote unzip

2008-11-01 Thread Stefan Behnel
morecowbell wrote: > i got a bunch of zip files on a remote server and need to get to one > of the files, an xml file, in each of the archives. fairly simple to > do locally with zipfile but i don't seem to be able to combine that > local code with the paramiko sftp client. a rather simplified code

Shah Rukh kicks off Temptations Reloaded with style

2008-11-01 Thread [EMAIL PROTECTED]
Shah Rukh kicks off Temptations Reloaded with style http://dreamstoday.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Function Memory Usage

2008-11-01 Thread Lie Ryan
On Fri, 31 Oct 2008 18:41:58 +, Paulo J. Matos wrote: > Hi all, > > What's the best way to know the amount of memory allocated by a function > and the time it took to run? While the latter is simple to implement > using a wrapper function, the former is striking me as something that > needs t

Re: Ordering python sets

2008-11-01 Thread Lie Ryan
On Mon, 27 Oct 2008 13:18:43 -0700, bearophileHUGS wrote: > So I don't accept so much different data structures to have the > same name You need to adjust the current mindset slightly (but in an important way to understand the "why" behind this idea). The current notion is: list and dict is a

Re: Embedding: Is it possible to limit number of virtual instructions executed?

2008-11-01 Thread Paul Rubin
[EMAIL PROTECTED] writes: > The goal is to be able to set some limit on the amount of time in the > interpreter in each loop, and not rely on the python side code. ... > Does anyone have any suggestions for how this could be achieved? Not really. Limiting the number of virtual instructions (byte

Re: Embedding: Is it possible to limit number of virtual instructions executed?

2008-11-01 Thread Terry Reedy
[EMAIL PROTECTED] wrote: Hi experts- I have a potential use case of embedding Python where it must co- operate with the host c/c++ application in a single thread. That is, the c code and python interpreter need to cooperate and time share, or yield to each other. The main loop would need to do

Re: Embedding: Is it possible to limit number of virtual instructions executed?

2008-11-01 Thread Martin v. Löwis
> Does anyone have any suggestions for how this could be achieved? You'll have to adjust Python/ceval.c. Look for _Py_Ticker, which provides some fairness for Python threads (releasing the GIL after _Py_CheckInterval instructions). If you decrement another global variable there, you can determine