Re: Change Gateway Programmatically

2006-01-10 Thread Fredrik Lundh
Godwin Burby wrote: > 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? os.system("route ...") could work. for details on the route command, use

Re: Change Gateway Programmatically

2006-01-10 Thread bonono
Godwin Burby wrote: > Well netsh turned out to be the perfect solution for my problem(even > though doing it in python would have given me some kicks). I managed it > with two .bat files for toggling the gateway ips. Thank you friend. there is os.system/os.open* if you want to put python in the e

Re: Change Gateway Programmatically

2006-01-10 Thread Godwin Burby
Well netsh turned out to be the perfect solution for my problem(even though doing it in python would have given me some kicks). I managed it with two .bat files for toggling the gateway ips. Thank you friend. -- http://mail.python.org/mailman/listinfo/python-list

Re: File Paramaterized Abstract Factory

2006-01-10 Thread Fredrik Lundh
Charles Krug wrote: > What I'd like is to do something like this: > > factoryFile = sys.argv[1] # we assume that argv[1] implements a > # correct ThingMaker interface. sys.argv[1] is a string, so I assume that you meant to say that the module named by argv[1] implements

Re: A bug for unicode strings in Python 2.4?

2006-01-10 Thread Thomas Moore
Hi: Thanks. I'll write my own split(). Frank -- http://mail.python.org/mailman/listinfo/python-list

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

2006-01-10 Thread Nico Grubert
> 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. This was my idea too but I am wondering if there are any scripts for tasks like this. Nico -- http://mail.python.org/mailman/listinfo/py

Re: A bug for unicode strings in Python 2.4?

2006-01-10 Thread Fredrik Lundh
Thomas Moore wrote: > 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 th

Re: another docs problem - imp

2006-01-10 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > > from the find_module documentation: > > > > find_module( name[, path]) > > > > Try to find the module _name_ on the search path _path_. > > If _path_ is a list of directory names, each directory is > > searched for files /.../. Invalid names in th

Re: A bug about unicode string in Python 2.4?

2006-01-10 Thread Steve Holden
Thomas Moore wrote: > 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'] > >

Re: ctypes & C++

2006-01-10 Thread Thomas Heller
[EMAIL PROTECTED] writes: > Thomas, > > Ctypes doesn't work to call arbitrary C++ code, is that correct? > > Skip Yes, that's correct. It doesn't do C++ name-(un)mangling, nor has it the C++ calling conventions. And so on... Thomas -- http://mail.python.org/mailman/listinfo/python-list

Re: A bug for unicode strings in Python 2.4?

2006-01-10 Thread Thomas Moore
> 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? Isn't a unicode string character by character? -Frank -- http

Re: Spelling mistakes!

2006-01-10 Thread Steve Holden
Terry Hancock wrote: [...] > > The ideal of "don't repeat yourself" seems to get > nudged out by "repeat yourself exactly once" when it's > really important to get it right. ;-) > I suppose most readers aren't old enough to remember the punch card days, when you would hand your work in on coding

Re: Change Gateway Programmatically

2006-01-10 Thread bonono
Godwin Burby wrote: > 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? I am sure there must be some elegant python way but you

Re: another docs problem - imp

2006-01-10 Thread rurpy
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > Turns out that you have to do > > >>> imp.find_module("mymod", ["./subdir"]) > > > > I saw not a hint of this in the docs. In fact > > they seem to say that the first (unworking) > > form *should* work. > > from the find_

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

2006-01-10 Thread Alex Martelli
Anton Vredegoor <[EMAIL PROTECTED]> wrote: ... > You are not my superior (or even considered to be more succesfull) as > you seem to imply. Depends on who does the considering, I'm sure. If the considerer loves the English language, for example, a horrible mis-spelling such as "successfull" wi

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

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: 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

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: 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

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

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

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

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

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

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: 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: 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: 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: 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: 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: 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: 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: 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

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: 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

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: 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: 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: - 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

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: 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

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: 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: 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: - 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: 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 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: 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: 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: 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

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: - 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

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

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: 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

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

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: 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

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: 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: 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: 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

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: 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

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: 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: 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: 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

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 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

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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

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: 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

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: (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) >

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 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'

(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: 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

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: 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 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

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

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

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

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: - 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

  1   2   3   >