Help needed with controlling the python parser

2006-01-10 Thread vinjvinj
I use python to script my application. Users will be able to write their own python scripts which are then run a grid of servers. I want to be able to capture syntax errors in submitted users scripts and then display them (with line numbers) back to the user. I also want to check for obvious thing

Re: Client side web programming

2006-01-10 Thread Pramod Subramanyan
Michele Simionato wrote: > > Pramod Subramanyan asked aboyt urllib2: > > Look at this article: > > http://www.voidspace.org.uk/python/articles/urllib2.shtml > >Michele Simionato Thanks! This is the sort of thing I need. -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib.urlopen and https question

2006-01-10 Thread bowman . joseph
That's what I get for scimming the documentation too quickly. Got it, thanks! For anyone else working on something similar, here is all I did... mind you, this is my first experience with python. # subclass of FancyURLopener so we can override the prompt_user_password method class DBCheckUrlOpen

Re: Client side web programming

2006-01-10 Thread Luiz Geron
Maybe this will be useful to you: http://www.python.org/pypi/mechanoid/0.6.8 -- http://mail.python.org/mailman/listinfo/python-list

Re: Client side web programming

2006-01-10 Thread Pramod Subramanyan
Fuzzyman wrote: > And this one for cookie handling: > > http://www.voidspace.org.uk/python/articles/cookielib.shtml > > All the best, > > Fuzzyman Cool! Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib.urlopen and https question

2006-01-10 Thread doobiz
Does anyone have an entire (simple) script for someone new to programming and Python that will illustrate how to open an https site and log on to it (with the script providing the username and password, if that's possible). Thanks very much. rpd "Electricity is actually made up of extremely tiny

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Anton Vredegoor
Armin Rigo wrote: > We have some procedure now for funding > travel costs, although it's admittedly very bureaucratic :-( Since next sprint is in Palma de Mallorca I trust I can count on PyPy to refund me the money? > Anyway, independently of this, there are some people we are happy to see > co

could not find module vtk in MayaVi

2006-01-10 Thread bblais
Hello, I am trying to install the vtk module to use MayaVi. I went to vtk.org, and downloaded and installed VTK, and MayaVi seemed to compile fine, but when I try the test_vtk.py, it says: ImportError: No module named vtk I can't find any module named vtk, although I did install Pyvtk. I can't

Re: Do you have real-world use cases for map's None fill-in feature?

2006-01-10 Thread Raymond Hettinger
[Raymond] > >ISTM, these cures are worse than the disease ;-) [Bengt] > Are you reacting to my turgidly rambling post, or to > > >>> from ut.izip2 import izip2 as izip > >>> it = izip('abc','12','ABCD') > >>> for t in it: print t > ... > ('a', '1', 'A') > ('b', '2', 'B') > > Then after a bac

String question - find all possible versions of a person's firstname

2006-01-10 Thread Nico Grubert
Hi there, I have a string 'Michèle' that represents the firstname of a person. What's the best way to get all possible versions of this name if I consider to use these characters: e, è, é, ê I'd like to have a function that returns a list of the following names when passing 'Michèle' as parame

Re: Regex help needed

2006-01-10 Thread rh0dium
Paul McGuire wrote: > -- Paul > (Download pyparsing at http://pyparsing.sourceforge.net.) Done. Hey this is pretty cool! I have one small problem that I don't know how to resolve. I want the entire contents (whatever it is) of line 1 to be the ident. Now digging into the code showed a method

Re: Is 'everything' a refrence or isn't it?

2006-01-10 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > > afaik, the Python Language Reference never defines the word "reference". > > It carefully defines words like "object" and "value", though, and terms like > > "call by object" or "call by object reference" are perfectly understandable > > if you use the words as they ar

Re: Help wanted with md2 hash algorithm

2006-01-10 Thread Tom Anderson
On Sun, 8 Jan 2006, Tom Anderson wrote: > On Fri, 6 Jan 2006 [EMAIL PROTECTED] wrote: > >> below you find my simple python version of MD2 algorithm as described >> in RFC1319 (http://rfc1319.x42.com/MD2). It produces correct results >> for strings shorter than 16 Bytes and wrong results for long

Tkinter

2006-01-10 Thread Rodrigues, Joseph
Hi, I was referred to you by another python forum:     I would like to know if Tkinter is being developed/maintained.  It > appears the latest book on Tkinter by John E. Grayson published in 2000 > is the only book resource on Tkinter.   The publisher suggests Tkinter has been repla

Re: String question - find all possible versions of a person's firstname

2006-01-10 Thread Jeff Gercken
This sounds like a homework problem. You might try splitting the name at the e's, check the length of the resulting list and do that many nested loops. On 1/10/06, Nico Grubert <[EMAIL PROTECTED]> wrote: > Hi there, > > I have a string 'Michèle' that represents the firstname of a person. > > What

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Anton Vredegoor
Alex Martelli wrote: > situations, and in a few cases been able to help them back up. People > who attempt to *guilt-trip* me into helping have never been and will > never been in that lot: in this way, I'm definitely not a typical, guilt > driven "bleeding heart". I try to help people who are t

Augmented generators?

2006-01-10 Thread Andrew Koenig
Can anyone think of an easy technique for creating an object that acts like a generator but has additional methods? For example, it might be nice to be able to iterate through an associative container without having to index it for each element. Right now, I can say i = iter(d) and then r

Re: 2D canvas for GTK

2006-01-10 Thread David E. Konerding DSD staff
In article <[EMAIL PROTECTED]>, Sandro Dentella wrote: > Il 2006-01-09, John Bauman <[EMAIL PROTECTED]> ha scritto: >> >> "Sandro Dentella" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>>I need a (decent) canvas for PyGTK. I used tkinter.canvas with real >>>pleasure >>> in the

Opening for Python Professionals

2006-01-10 Thread rockyrocks_m
Hi I AM RAVEESH We have Urgent Openings with a leading UK based Mnc at Noida Delhi NCR for Python professsionsl ( scripting/ Programming, Developers) Exp Level -18 Years Excellent Salary Send cvs at [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- rockyrocks_m Me

An app without GUI

2006-01-10 Thread Daniel Crespo
Hello to all, I have to build a server app without GUI. This app must be an xml-rpc server, so it has to be up all the time. I would control it through the xml-rpc port from a web interface using php, sending parameters to defined xml-rpc functions for running certain processes, like viewing curre

Re: Augmented generators?

2006-01-10 Thread Paul Rubin
"Andrew Koenig" <[EMAIL PROTECTED]> writes: > Can anyone think of an easy technique for creating an object that acts like > a generator but has additional methods? > For example, it might be nice to be able to iterate through an associative > container without having to index it for each element

Re: Augmented generators?

2006-01-10 Thread Lonnie Princehouse
AFAIK there's no way to have "yield" produce anything other than a generator. You could achieve the syntax you want with a decorator, although under the hood it would still be iterating over a (key,value) tuples so there's not really any point. class GeneratorTupleWrapper: def __init__(self, g):

Re: Augmented generators?

2006-01-10 Thread Raymond Hettinger
Andrew Koenig wrote: > Can anyone think of an easy technique for creating an object that acts like > a generator but has additional methods? Perhaps the enable_attributes() recipe will help: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/164044 The recipe imbues generators with clas

Re: Regex help needed

2006-01-10 Thread Paul McGuire
"rh0dium" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Paul McGuire wrote: > > -- Paul > > (Download pyparsing at http://pyparsing.sourceforge.net.) > > Done. > > > Hey this is pretty cool! I have one small problem that I don't know > how to resolve. I want the entire contents

(Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
(windows or linux console) >>> print u'\u034a' Traceback (most recent call last): File "", line 1, in ? File "C:\PYTHON23\lib\encodings\cp850.py", line 18, in encode return codecs.charmap_encode(input,errors,encoding_map) UnicodeEncodeError: 'charmap' codec can't encode character u'\u034a'

Re: (Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread gregarican
Robert wrote: > (windows or linux console) > > > > >>> print u'\u034a' > > > Traceback (most recent call last): > File "", line 1, in ? > File "C:\PYTHON23\lib\encodings\cp850.py", line 18, in encode > return codecs.charmap_encode(input,errors,encoding_map) > UnicodeEncodeError: 'charmap'

Systems Developer for Toronto! URGENT!!

2006-01-10 Thread proex
Systems Developer- Toronto Overall Responsibility: To assist and lead in the fulfilment of organizational needs and goals of the Company through the design, development, programming, implementation, integration, maintenance and support of an internally built database driven reservations system (E

Re: (Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
gregarican wrote: > Robert wrote: > > > (windows or linux console) > > > > >>> print u'\u034a' > > > > Traceback (most recent call last): > > File "", line 1, in ? > > File "C:\PYTHON23\lib\encodings\cp850.py", line 18, in encode > > return codecs.charmap_encode(input,errors,encoding_map) >

COM automation, Internet Explorer, DocumentComplete event

2006-01-10 Thread puff
I'm very new to Python and have a question concerning IE automation and detection of page completion. The MSDN article 180366 states in part: The top-level frame fires the DocumentComplete in the end. So, to check if a page is done downloading, you need to check if the IDispatch* parameter i

Re: Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Fredrik Lundh
> Are you certain that this is a valid unicode character? Checking other > values (like \u0020 which is a blank space) seems to work okay. What > does \u034A represent? >>> import unicodedata >>> unicodedata.name(u"\u034A") 'COMBINING NOT TILDE ABOVE' (space is a valid CP850 character, combining

Where to report Python bug?

2006-01-10 Thread puff
I'm very new to Python and have encountered what appears to be a bug when using com automation of IE with events. I get exception messages that look like this: pythoncom error: Python error invoking COM method. Traceback (most recent call last): File "C:\Python24\Lib\site-packages\win32com\ser

Re: COM automation, Internet Explorer, DocumentComplete event

2006-01-10 Thread Graham Fawcett
puff wrote: > I'm able to catch IE's events including DocumentComplete with: > > def OnDocumentComplete(self, pDisp, URL): > > so i have pDisp. Self is the object returned by: > > self.ie = DispatchWithEvents("InternetExplorer.Application", > InternetExplorerEvents) > > that created th

Re: Regex help needed

2006-01-10 Thread Michael Spencer
rh0dium wrote: > Hi all, > > I am using python to drive another tool using pexpect. The values > which I get back I would like to automatically put into a list if there > is more than one return value. They provide me a way to see that the > data is in set by parenthesising it. > ... > > CAN S

Re: Is 'everything' a refrence or isn't it?

2006-01-10 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > "Donn Cave" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] ... > > So you've had time to think about how you would define value, in a > > few words. Any ideas? > > Not yet. The reason is that I am still trying to figure

Re: Is 'everything' a refrence or isn't it?

2006-01-10 Thread Paul Rubin
Donn Cave <[EMAIL PROTECTED]> writes: > But you're asking for more than that. We're not just talking > about how people think about value, you want a definition that's > suitable for a language reference. Whereupon you would indeed > run into the kinds of questions you pose above, and more. I kn

Re: Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Robert
Fredrik Lundh wrote: > > Are you certain that this is a valid unicode character? Checking other > > values (like \u0020 which is a blank space) seems to work okay. What > > does \u034A represent? > > >>> import unicodedata > >>> unicodedata.name(u"\u034A") > 'COMBINING NOT TILDE ABOVE' > > (space

Re: Augmented generators?

2006-01-10 Thread Bengt Richter
On Tue, 10 Jan 2006 18:37:13 GMT, "Andrew Koenig" <[EMAIL PROTECTED]> wrote: >Can anyone think of an easy technique for creating an object that acts like >a generator but has additional methods? > >For example, it might be nice to be able to iterate through an associative >container without havi

Re: Unicode & Pythonwin / win32 / console?

2006-01-10 Thread Martin v. Löwis
Robert wrote: >>>Also unicode strings should be displayed as nice as possible at the >>>console with normal print-s to stdout (on varying platforms, different >>>windows/countries and linux, ...; I py2exe/cxfreeze apps) ... >>> >>>Any hints how to do this and make it as complete and automated as >>

Re: Marshaling unicode WDDX

2006-01-10 Thread Martin v. Löwis
isthar wrote: > Ok. but how I suppose to use them. I am currently using marshaller > indirectly via wddx.dump(). Do UWDDXMarshaller().dump() Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list

Re: An app without GUI

2006-01-10 Thread jmdeschamps
Daniel Crespo wrote: > Hello to all, > > I have to build a server app without GUI. This app must be an xml-rpc > server, so it has to be up all the time. I would control it through the > xml-rpc port from a web interface using php, sending parameters to > defined xml-rpc functions for running cert

Re: Calling foreign functions from Python? ctypes?

2006-01-10 Thread Martin v. Löwis
Thomas Heller wrote: > It has been proposed to include it in core Python, but Guido didn't > accept it. The thread starts here: > > http://mail.python.org/pipermail/python-dev/2004-January/thread.html#41814 > > And Guido's last word was this (see the end of the message): > > http://mail.python.

Re: Calling foreign functions from Python? ctypes?

2006-01-10 Thread Thomas Heller
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > Thomas Heller wrote: >> It has been proposed to include it in core Python, but Guido didn't >> accept it. The thread starts here: >> >> http://mail.python.org/pipermail/python-dev/2004-January/thread.html#41814 >> >> And Guido's last word was this

Re: (Fucking) Unicode: console print statement and PythonWin: replacement for off-table chars HOWTO?

2006-01-10 Thread Neil Hodgson
Robert: > u'sytest3\\\u041f\u043e\u0448\u0443\u043a.txt' > > u'\u043a' is cyrillic: к > > no matter, I guess no (small) system can know all unicode ranges in use > wordwide. The real problem is: to get a smoot, smart an tolerant setup > by default - not a mixup of 4 codecs and (most bothersome)

Re: Failing unittest Test cases

2006-01-10 Thread skip
Michele> I am also +1 to run the tests in the code order. Got any ideas how that is to be accomplished short of jiggering the names so they sort in the order you want them to run? Skip -- http://mail.python.org/mailman/listinfo/python-list

ctypes & C++

2006-01-10 Thread skip
Thomas, Ctypes doesn't work to call arbitrary C++ code, is that correct? Skip -- http://mail.python.org/mailman/listinfo/python-list

Re: Failing unittest Test cases

2006-01-10 Thread Paul Rubin
[EMAIL PROTECTED] writes: > Got any ideas how that is to be accomplished short of jiggering the > names so they sort in the order you want them to run? How about with a decorator instead of the testFuncName convention, i.e. instead of def testJiggle(): # "test" in the func name means it's a

Re: Why keep identity-based equality comparison?

2006-01-10 Thread spam . noam
> Can you provide a case where having a test for equality throw an > exception > is actually useful? Yes. It will be useful because: 1. The bug of not > finding a key in a dict because it was implicitly hashed by identity and not > by value, would not have happened. 2. You wouldn't get the wei

Re: multiple clients updating same file in ftp

2006-01-10 Thread Larry Bates
Preface the update with a rename. If the rename fails, someone else is updating the file, if it succeeds update the file and rename back when finished. Suggestion: ftp is not the best way to handle such a task. Use a database, XMLRPC or sockets is probably a better way. -Larry Bates [EMAIL PRO

Re: COM automation, Internet Explorer, DocumentComplete event

2006-01-10 Thread puff
Without going into an overly long discussion, suffice to say that the busy attribute, notwithstanding Microsoft documentation to the contrary, simply doesn't work. BTW, there are a fair number of URLs for which PAMIE's combination of busy and readystate doesn't work. This scheme is somewhat bette

Re: Why keep identity-based equality comparison?

2006-01-10 Thread spam . noam
It seems to me that both Mike's and Fuzzyman's objections were that sometimes you want the current behaviour, of saying that two objects are equal if they are: 1. the same object or 2. have the same value (when it's meaningful). In both cases this can be accomplished pretty easily: You can do it w

Interned Strings

2006-01-10 Thread Dave
Hello All, I'm trying to clarify how Python avoids byte by byte string comparisons most of the time. As I understand, dictionaries keep strings, their keys (hash values), and caches of their keys. Caching keys helps to avoid recalculation of a string's hash value. So, when two strings need to be c

Re: Regex help needed

2006-01-10 Thread rh0dium
Paul McGuire wrote: > ident = Combine( Word(alpha,alphanums+"_") + LPAR + RPAR ) This will only work for a word with a parentheses ( ie. somefunction() ) > If you *really* want everything on the first line to be the ident, try this: > > ident = Word(alpha,alphanums+"_") + restOfLine > or > ide

Re: Regex help needed

2006-01-10 Thread rh0dium
Michael Spencer wrote: > >>> def parse(source): > ... source = source.splitlines() > ... original, rest = source[0], "\n".join(source[1:]) > ... return original, rest_eval(get_tokens(rest)) This is a very clean and elegant way to separate them - Very nice!! I like this alot -

Re: Spelling mistakes!

2006-01-10 Thread Terry Hancock
On 9 Jan 2006 11:21:10 GMT Antoon Pardon <[EMAIL PROTECTED]> wrote: > Op 2006-01-06, Terry Hancock schreef > <[EMAIL PROTECTED]>: > > On 6 Jan 2006 07:30:41 -0800 > > "KraftDiner" <[EMAIL PROTECTED]> wrote: > >> in an init method I declare a variable > >self.someLongName > > >> later in a differe

Re: COM automation, Internet Explorer, DocumentComplete event

2006-01-10 Thread Roger Upole
PythonCom interfaces implement __cmp__ so that you can just use a straight == comparison. hth Roger "puff" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm very new to Python and have a question concerning IE automation and > detection of page completion. > > The MSD

Re: JINI service -- Python client

2006-01-10 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Roedy Green <[EMAIL PROTECTED]> wrote: >On 6 Jan 2006 11:17:58 -0800, [EMAIL PROTECTED] wrote, >quoted or indirectly quoted someone who said : > >>does anybody knows how to use JINI service from Python? > >IF you use it from JPython, it is almost identical to using

Dr. Dobb's Python-URL! - weekly Python news and links (Jan 10)

2006-01-10 Thread Cameron Laird
QOTW: "I'm a huge fan of single digit numbers ..." - Jim Hugunin, illustrating his undiminished grasp on the Pythonic ethos "It's hard to say exactly what constitutes research in the computer world, but as a first approximation, it's software that doesn't have users." - Paul Graham Microsof

Re: CGI errror in (only in) IIS 6.0 server 2003

2006-01-10 Thread [EMAIL PROTECTED]
also, the IDE pythonwin crash everythin time I run it -- http://mail.python.org/mailman/listinfo/python-list

Re: OT: Degrees as barriers to entry [was Re: - E04 - Leadership! Google, Guido van Rossum, PSF]

2006-01-10 Thread Steve Holden
Anton Vredegoor wrote: [stuuf] > > 'excuse me if I sound a bit bitter and as if suffering from a sense of > untitlement' > Consider yourself excused. Now stop whining and go do the things you *can*. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC

How can I test if an argument is a sequence or a scalar?

2006-01-10 Thread sandravandale
I want to be able to pass a sequence (tuple, or list) of objects to a function, or only one. It's easy enough to do: isinstance(var, (tuple, list)) But I would also like to accept generators. How can I do this? Anything else is assumed to be a single value (my fault if I pass a dict or somethin

Re: COM automation, Internet Explorer, DocumentComplete event

2006-01-10 Thread puff
Thanks very much Roger. As you might have guessed, I'm rather new to Python. The notion that == does the job illustrates one of the reason's I've undertaken learning yet another new language (40+ years on, the language count is rather larger than I'd care to admit). I should also mention the fac

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Steve Holden
Ilias Lazaridis wrote: [...] > [...] > > - > > TAG.google.evolution.talent.detection > TAG.who.gives.a.rats.ass -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ -- http://mail.pyth

Cross Compile Mips / Linux

2006-01-10 Thread [EMAIL PROTECTED]
Hi Everyone, I trying to get a build of Python together to run on an Embedded Linux / Mips machine. I run the ./configure --host= XXXmips(my mips proc) --build=XXX x86(my pc). and the configure runs perfectly. I then run "make" and it fails . I have also tried appling some patches, and running a

Re: Interned Strings

2006-01-10 Thread Martin v. Löwis
Dave wrote: > I'm trying to clarify how Python avoids byte by byte > string comparisons most of the time. As I understand, > dictionaries keep strings, their keys (hash values), > and caches of their keys. If you are talking about dictionaries with string keys, you also have the dictionary values

Re: Cross Compile Mips / Linux

2006-01-10 Thread Martin v. Löwis
[EMAIL PROTECTED] wrote: > Has anyone successfully built for Mips/Linux using a PC for the > build??, I doubt anybody has done that out of the box. Cross-compilation is not supported. > Should I try using a Linux based machine for the build, would that > help?? No. Instead, you should edit pyc

Re: try: except :

2006-01-10 Thread Tom Anderson
On Tue, 10 Jan 2006, Duncan Booth wrote: > Paul Rubin wrote: > >> Hallvard B Furuseth <[EMAIL PROTECTED]> writes: class NeverRaised(Exception): pass for ex in ZeroDivisionError, NeverRaised: >>> >>> Heh. Simple enough. Unless some obstinate person raises it anyway... >> >> Hmm, ok, how

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Carl Friedrich Bolz
Hi! Anton Vredegoor wrote: > Armin Rigo wrote: > > >> We have some procedure now for funding >>travel costs, although it's admittedly very bureaucratic :-( > > > Since next sprint is in Palma de Mallorca I trust I can count on PyPy > to refund me the money? If you want to attend the sprint yo

Re: Failing unittest Test cases

2006-01-10 Thread Jean-Paul Calderone
On 10 Jan 2006 13:49:17 -0800, Paul Rubin <"http://phr.cx"@nospam.invalid> wrote: >[EMAIL PROTECTED] writes: >> Got any ideas how that is to be accomplished short of jiggering the >> names so they sort in the order you want them to run? > >How about with a decorator instead of the testFuncName con

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Fredrik Lundh
TAG.how.come.this.thread.generates.kooks.faster.than.I.can.plonk.them.questionmark -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex help needed

2006-01-10 Thread Paul McGuire
"rh0dium" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Paul McGuire wrote: > > > ident = Combine( Word(alpha,alphanums+"_") + LPAR + RPAR ) > > This will only work for a word with a parentheses ( ie. somefunction() > ) > > > If you *really* want everything on the first line to b

Re: How can I test if an argument is a sequence or a scalar?

2006-01-10 Thread Jean-Paul Calderone
On 10 Jan 2006 15:18:22 -0800, [EMAIL PROTECTED] wrote: >I want to be able to pass a sequence (tuple, or list) of objects to a >function, or only one. Generally it's better to keep your API consistent. If you are going to take sequences, only take sequences. Don't try to make the interface mor

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Steve Holden
Fredrik Lundh wrote: > TAG.how.come.this.thread.generates.kooks.faster.than.I.can.plonk.them.questionmark > TAG.did.you.just.call.me.a.kook.questionmark TAG.above.tag.not.actually.valid -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com Py

Re: Cross Compile Mips / Linux

2006-01-10 Thread Alan Franzoni
Il 10 Jan 2006 15:31:34 -0800, [EMAIL PROTECTED] ha scritto: > Hi Everyone, > > I trying to get a build of Python together to run on an Embedded Linux > / Mips machine. You can't do that out of the box. The main reason is that the Python interpreter is run during the compilation process, and if

copying a file from windows file system to ext2 and ext3

2006-01-10 Thread muttu2244
hi all could anybody please tell me how can i copy a file from windows file systems like FAT12, FAT16,FAT32 and NTFS to EXT2, and EXT3. Is their any function in python that we can do the above Thanks in advance Yogi -- http://mail.python.org/mailman/listinfo/python-list

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Fredrik Lundh
> TAG.did.you.just.call.me.a.kook.questionmark TAG.no.dash.but.if.you.keep.replying.to.them.all.the.time.i.may.have.to.plonk.you.too.smiley -- http://mail.python.org/mailman/listinfo/python-list

Re: copying a file from windows file system to ext2 and ext3

2006-01-10 Thread Dan M
On Tue, 10 Jan 2006 15:59:01 -0800, muttu2244 wrote: > hi all > > could anybody please tell me how can i copy a file from windows file > systems like FAT12, FAT16,FAT32 and NTFS to EXT2, and EXT3. > Is their any function in python that we can do the above > > Thanks in advance > Yogi I'm sure m

Re: copying a file from windows file system to ext2 and ext3

2006-01-10 Thread Larry Bates
[EMAIL PROTECTED] wrote: > hi all > > could anybody please tell me how can i copy a file from windows file > systems like FAT12, FAT16,FAT32 and NTFS to EXT2, and EXT3. > Is their any function in python that we can do the above > > Thanks in advance > Yogi > I suspect that you are going to need

Re: Client side web programming

2006-01-10 Thread Pramod Subramanyan
Luiz Geron wrote: > Maybe this will be useful to you: > http://www.python.org/pypi/mechanoid/0.6.8 Actually I found this thing when I was googling. But there isn't too much documentation, which is why I posted here. Using cookielib and urllib2, I've come up with a workable solution. Its damn slo

Re: Why keep identity-based equality comparison?

2006-01-10 Thread Mike Meyer
[EMAIL PROTECTED] writes: > It seems to me that both Mike's and Fuzzyman's objections were that > sometimes you want the current behaviour, of saying that two objects > are equal if they are: 1. the same object or 2. have the same value > (when it's meaningful). In both cases this can be accomplis

Reading from input file.

2006-01-10 Thread paczkow
Dear Python Community, I am an engineering and I am experiencing some trouble. Having output data from other software I want to use it. To achieve this I decided to use Python since this language is the best known for me. So.. for my future Python script, the input data are in form of: 1 1233.2E-

Re: How can I test if an argument is a sequence or a scalar?

2006-01-10 Thread sandravandale
Hi Jean-Paul, Thank you for the advice, I appreciate it, my university training was next to useless so I learn how to write good programs by the advice of helpful people in online communities. I'm really thankfull when people take the time to tell me when I'm doing something wrong and show me a be

Re: How can I test if an argument is a sequence or a scalar?

2006-01-10 Thread sandravandale
Hi Jean-Paul, Thank you for the advice, I appreciate it, my university training was next to useless so I learn how to write good programs by the advice of helpful people in online communities. I'm really thankfull when people take the time to tell me when I'm doing something wrong and show me a be

Re: Client side web programming

2006-01-10 Thread Neil Hodgson
Pramod Subramanyan wrote: > Using cookielib and urllib2, I've come up with a workable solution. Its > damn slow though - which is probably orkut's fault - deletes about > 10-15 scraps a minute - so to get through 14000 scraps its probably > gonna take around 23 hours. It'll be interesting to

Re: Regex help needed

2006-01-10 Thread Michael Spencer
rh0dium wrote: > Michael Spencer wrote: >> >>> def parse(source): >> ... source = source.splitlines() >> ... original, rest = source[0], "\n".join(source[1:]) >> ... return original, rest_eval(get_tokens(rest)) > > This is a very clean and elegant way to separate them - Very ni

Re: Help needed with controlling the python parser

2006-01-10 Thread André
vinjvinj wrote: > I use python to script my application. Users will be able to write > their own python scripts which are then run a grid of servers. I want > to be able to capture syntax errors in submitted users scripts and then > display them (with line numbers) back to the user. I was going to

Re: How can I test if an argument is a sequence or a scalar?

2006-01-10 Thread Michael Spencer
Jean-Paul Calderone wrote: > On 10 Jan 2006 15:18:22 -0800, [EMAIL PROTECTED] wrote: >> I want to be able to pass a sequence (tuple, or list) of objects to a >> function, or only one. > ... > but in case you're curious, the easiest > way to tell an iterable from a non-iterable is by trying to ite

Re: Get path of a class

2006-01-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Florian Lindner wrote: > Hello, > how can I get the path of a class. I managed to do it with > > c.__module__ + "." + c.__name__ > > but I'm sure there is a better way. How about using the `inspect` module:: In [33]: import inspect, zipfile In [34]: inspect.getsource

Re: Spelling mistakes!

2006-01-10 Thread Peter Hansen
Sybren Stuvel wrote: > Xavier Morel enlightened us with: >>1- The unit test will obviously fail in this case, telling you in >>which code unit the issue is > > Given the assumption the same mistake hasn't been made in the test as > well. If the spelling in the test matches the spelling in the cod

Re: Augmented generators?

2006-01-10 Thread Bengt Richter
Sorry to reply this way. I saw this on google, but neither this nor my previous post has shown up yet on my news server. Wonder what all this delay is lately ;-/ >From: Paul Rubin >Subject: Re: Augmented generators? >Date: 10 Jan 2006 11:03:39 -0800 >Message-ID: <[EMAIL

Re: testing units in a specific order?

2006-01-10 Thread Tim Peters
[Antoon Pardon] > Well maybe unit tests shouldn't care (Thats what I think you meant), Yup! > I care. Some methods are vital for the functionality of other methods. > So it the test for the first method fails it is very likely a number of > other methods will fail too. However I'm not interrested

Re: Why keep identity-based equality comparison?

2006-01-10 Thread Steven Bethard
Mike Meyer wrote: > [EMAIL PROTECTED] writes: > >> My question is, what reasons are left for leaving the current default >> equality operator for Py3K, not counting backwards-compatibility? >> (assume that you have idset and iddict, so explicitness' cost is only >> two characters, in Guido's examp

A bug for unicode strings in Python 2.4?

2006-01-10 Thread Thomas Moore
Hi: Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> u=u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32' >>> u.split() [u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32'] >>> I think u should get split. --Frank

A bug about unicode string in Python 2.4?

2006-01-10 Thread Thomas Moore
Hi: Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> u=u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32' >>> u.split() [u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32'] >>> I think u should get split. --Frank

File Paramaterized Abstract Factory

2006-01-10 Thread Charles Krug
List: I have an idea for an abstract factory that parameterizes the factory with an input module. The general ideom can be expressed thus: class ThingFactory(object): def CreateThisThing() : return ThisThing() def CreateThatThing() : return ThatThing() def CreateTheOtherThing() : ret

Re: Real-world use cases for map's None fill-in feature?

2006-01-10 Thread rurpy
Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > > > History of zip() > > > > > > PEP 201 (lock-step iteration) documents that a fill-in feature was > > > contemplated and rejected for the zip() built-in introduced in Py2.0. > > > In the years before and after, SourceForge logs sho

Re: A bug for unicode strings in Python 2.4?

2006-01-10 Thread Neil Hodgson
Thomas Moore: u=u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32' u.split() > > [u'\u9019\u662f\u4e2d\u6587\u5b57\u4e32'] > > > I think u should get split. Where do you think "這是中文字串" should be split and why? Neil -- http://mail.python.org/mailman/listinfo/python-list

Change Gateway Programmatically

2006-01-10 Thread Godwin Burby
Dear Pythoneer, I need to toggle the gateway ip of my windows xp machine quite often due to some software requirements. I just want to know whether i could do it programmatically using Python. If so how? -- http://mail.python.org/mailman/listinfo/python-list

Re: Why keep identity-based equality comparison?

2006-01-10 Thread Mike Meyer
Steven Bethard <[EMAIL PROTECTED]> writes: > Not to advocate one way or the other, but how often do you use > heterogeneous containers? Pretty much everything I do has heterogenous containers of some sort or another. SQL queries made to DP API compliant modules return homogenous lists of heterogen

ANN: wxPython 2.6.2.1

2006-01-10 Thread Robin Dunn
Announcing -- The 2.6.2.1 release of wxPython is now available for download at http://wxpython.org/download.php. There have been many enhancements and fixes implemented in this version, listed below and at http://wxpython.org/recentchanges.php. What is wxPython? - wxPyt

Re: - E04 - Leadership! Google, Guido van Rossum, PSF

2006-01-10 Thread Alex Martelli
Anton Vredegoor <[EMAIL PROTECTED]> wrote: ... > > On the bureaucratic side: Alex, we *have* a procedure at this point, and > > we have been trying to contact you several time in the past months -- with > > no success as far as I know, so I'll try via comp.lang.python this time > > :-) If you s

<    1   2   3   >