Re: Typed named groups in regular expression

2007-05-19 Thread Hugo Ferreira
Both Paddy (hackish) and McGuire (right tool for the job) ideas sound very interesting ;-) I'll definitely research on them further. Thanks for the support... On 19 May 2007 04:39:58 -0700, Paul McGuire <[EMAIL PROTECTED]> wrote: > On May 19, 12:32 am, Paddy <[EMAIL PROTECTED]> wrote: > > On May

Re: python shell

2007-05-19 Thread Steve Holden
Cameron Laird wrote: > In article <[EMAIL PROTECTED]>, > Paddy <[EMAIL PROTECTED]> wrote: >> On May 16, 6:38 pm, Krypto <[EMAIL PROTECTED]> wrote: >>> I have been using python shell to test small parts of the big program. >>> What other ways can I use the shell effectively. My mentor told me >>> t

Re: regex matching question

2007-05-19 Thread John Machin
On 20/05/2007 10:18 AM, bullockbefriending bard wrote: >> Instead of the "or match.group(0) != results" caper, put \Z (*not* $) at >> the end of your pattern: >> mobj = re.match(r"pattern\Z", results) >> if not mobj: > > as the string i am matching against is coming from a command line > a

Re: docs patch: dicts and sets

2007-05-19 Thread Steve Holden
7stud wrote: >> Actually, it would just move the "endless, petty discussions about what >> minutiae are more important" into the docs. I don't see how that's an >> improvement. > > Because it highlights the issues you will be faced with when using the > described functions. People will post about

Re: mod_python performs several magnitudes slower than PHP?

2007-05-19 Thread Graham Dumpleton
On May 20, 10:01 am, John Nagle <[EMAIL PROTECTED]> wrote: > That's puzzling, because withmod_python, you're only invoking > the compiler once per Apache restart. With CGI programs, you pay > the loading penalty on every request. > > John Nagle > > [EMAIL PROTEC

Re: regex matching question

2007-05-19 Thread Steve Holden
John Machin wrote: > On 20/05/2007 10:18 AM, bullockbefriending bard wrote: >>> Instead of the "or match.group(0) != results" caper, put \Z (*not* $) at >>> the end of your pattern: >>> mobj = re.match(r"pattern\Z", results) >>> if not mobj: >> as the string i am matching against is coming

Re: python shell

2007-05-19 Thread Peter Anderson
Krypto wrote: > I have been using python shell to test small parts of the big program. > What other ways can I use the shell effectively. My mentor told me > that you can virtually do anything from testing your program to > anything in the shell. Any incite would be useful. > I'm not sure this wi

What is deployment? (was: A Few More Forrester Survey Questions)

2007-05-19 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Jeff Rush <[EMAIL PROTECTED]> wrote: . . . >2) How easy is it to install an application written in the language? > How is the application deployed? > > I'm having some trouble understanding

Re: [dfwPython] A Few More Forrester Survey Questions

2007-05-19 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Brad Allen <[EMAIL PROTECTED]> wrote: >At 10:22 AM -0500 5/18/07, Jeff Rush wrote: . . . >>3) What is the value of the language to developers? >> >>Yeah, a very common, slippery question. T

Re: (Modular-)Application Framework / Rich-Client-Platform in Python

2007-05-19 Thread Ben Finney
Wildemar Wildenburger <[EMAIL PROTECTED]> writes: > I really, really appreciate the effort you (all of you) make in > helping me and getting me on the right track, but I'm a bit > confounded by how you can be trying to convince me that the tools > I'm currently reading the docs for don't exist. I

Re: What is deployment? (was: A Few More Forrester Survey Questions)

2007-05-19 Thread Paul Rubin
[EMAIL PROTECTED] (Cameron Laird) writes: > What might C. mean? Say I install a program, but I still have to worry > about how I'm going to configure it within the cluster where I intend to > use it, AND I need to co-ordinate its configuration with the central > database on which it depends, AND

interesting dict bug

2007-05-19 Thread Sick Monkey
Here is a segment of some code that I have. CODE: -- print filename params2 = {'filename':filename,'id3title':title,'id3artist':artist,'id3album':album,'id3year':year,'id3track':track,'id3genre':genre,'uname':username,'password':password,'filesToUpload':open(file, 'rb')} print pa

Re: Start

2007-05-19 Thread Benjamin
On May 19, 10:18 am, Nautilus <[EMAIL PROTECTED]> wrote: > Can anybody halp me start using Python. First you'll need to download Python. You can do that at http://www.python.org. Then download and read the tutorial at http://python.org/doc/. -- http://mail.python.org/mailman/listinfo/python-list

Re: interesting dict bug

2007-05-19 Thread Jeff McNeil
Filename is a unicode string. See http://www.diveintopython.org/xml_processing/unicode.html or http://docs.python.org/tut/node5.html#SECTION00513. Python 2.5 (r25:51918, Sep 19 2006, 08:49:13) [GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin Type "help", "copyright", "credit

Re: regex matching question

2007-05-19 Thread bullockbefriending bard
> > No way? Famous last words :-) > > C:\junk>type showargs.py > import sys; print sys.argv > > C:\junk>\python25\python > Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import

Re: What is deployment?

2007-05-19 Thread Steve Holden
Paul Rubin wrote: > [EMAIL PROTECTED] (Cameron Laird) writes: >> What might C. mean? Say I install a program, but I still have to worry >> about how I'm going to configure it within the cluster where I intend to >> use it, AND I need to co-ordinate its configuration with the central >> database o

Re: zipfile [module and file format, both] stupidly broken

2007-05-19 Thread Martin Maney
Gabriel Genellina <[EMAIL PROTECTED]> wrote: > A module in the Python Standard Library has a bug. I take the Python > Library Reference manual, go to the last pages (Appendix B), and find how > to properly report a bug. Sure, the information is *somewhere*. Silly me, I expected it to be readi

Re: PEP 3131: Supporting Non-ASCII Identifiers

2007-05-19 Thread Istvan Albert
On May 19, 3:33 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > >That would be invalid syntax since the third line is an assignment > > with target identifiers separated only by spaces. > > Plus, the identifier starts with a number (even though 6 is not DIGIT > SIX, but FULLWIDTH DIGIT SIX,

Re: interesting dict bug

2007-05-19 Thread Sick Monkey
Ahhh thank you so much! I just added a ".encode('utf-8')" to the variables causing problems and that resolved my issue. Much appreciated! .dave On 5/19/07, Jeff McNeil <[EMAIL PROTECTED]> wrote: Filename is a unicode string. See http://www.diveintopython.org/xml_processing/unicode.html or htt

Re: Inverse of id()?

2007-05-19 Thread Alex Martelli
Paul McGuire <[EMAIL PROTECTED]> wrote: > Is there an inverse function to the builtin 'id'? The poster who No, there isn't. > Now is there anything better than this search technique to get back a > variable, given its id? For your own classes/types, you could override __new__ to maintain a cla

Closing socket file descriptors

2007-05-19 Thread Yang
Hi, I'm experiencing a problem when trying to close the file descriptor for a socket, creating another socket, and then closing the file descriptor for that second socket. I can't tell if my issue is about Python or POSIX. In the following, the first time through, everything works. On the sec

Re: What is deployment?

2007-05-19 Thread Ben Finney
Paul Rubin writes: > [EMAIL PROTECTED] (Cameron Laird) writes: > > all those things that happen after narrow-sense installation are > > still part of "deployment". > > Deployment also refers to pre-installation issues, like buying the > hardware that you're going to inst

Re: Can't embed python in C++(Mingw[3.*] compiler)

2007-05-19 Thread Arjun Narayanan
On May 20, 1:28 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Sat, 19 May 2007 13:14:40 -0300, Arjun Narayanan > <[EMAIL PROTECTED]> escribió: > > > For thr program, > > #include "E:\Python25\include\Python.h" > > #include > > Configure your environment so using: > > #include > > works (

Re: What is deployment?

2007-05-19 Thread Paul Rubin
Ben Finney <[EMAIL PROTECTED]> writes: > Agreed. I usually discuss "deployment" as meaning "everything required > to take something from the point of working in a vendor's lab > environment, to an actual working installation in a production > environment". I'd go beyond that. It includes putting

Re: zipfile stupidly broken

2007-05-19 Thread Nick Craig-Wood
Martin Maney <[EMAIL PROTECTED]> wrote: > Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > You don't need to do that, you can just "monkey patch" the _EndRecData > > function. > > For a quick & dirty test, sure. If I were certain I'd only ever use > this on one machine for a limited time (viz, n

<    1   2