Re: Testing conditions.

2005-02-09 Thread Fredrik Lundh
Ray Gibbon wrote: > This is NOT another request for statements to be accepted as expressions for > two reasons:- > 1. I've seen enough arguments on the subject where I've found myself firmly > on the anti change side. > 2. I now realise that it might scratch the itch, but it would not cure it. > >

Re: A 'Python like' language

2005-02-09 Thread frnknstn
> Well I considered writing a pep to move all that stuff to a module > called __icky__, you know: > > from __icky__ import * I think that should be: from __icky__ import import_asterisk import_asterisk __icky__ Frnknstn - This message was sent usin

Re: Testing conditions.

2005-02-09 Thread Terry Reedy
"Ray Gibbon" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > e.g. 1 > |while new_data = get_more_data(source): > |process_data(new_data) > > is obviously the sort of thing I'm missing, but it is not a general > solution > because :- > > e.g. 2 > |while new_data, env

That horrible regexp idiom

2005-02-09 Thread Stephen Thorne
Hi, import re foo_pattern = re.compile('foo') '>>> m = foo_pattern.search(subject) '>>> if m: '>>>pass '>>> else: '>>>pass We've all seen it before. Its a horrible idiom that you would achieve in another language by doing: if (m = foo_pattern.search(subject)) { } else { } but it occu

Re: Testing conditions.

2005-02-09 Thread Jeremy Bowers
On Thu, 10 Feb 2005 05:38:54 +, Ray Gibbon wrote: > e.g. 2 > |while new_data, environment = get_more_data(source): > |process_data(new_data, environment) > > is something I'm equally likely to want to do, but I can't express it's > meaning. I think we'd usually phrase that as fo

Re: A 'Python like' language

2005-02-09 Thread Courageous
>We really need in Python a clear separation of advanced features from >the basic syntax. No more lambda calculus in the basic part. :>) Well I considered writing a pep to move all that stuff to a module called __icky__, you know: from __icky__ import * ... but I didn't think the committee wou

Re: negative integer division

2005-02-09 Thread John Machin
[EMAIL PROTECTED] (Mark Jackson) wrote in message news:<[EMAIL PROTECTED]>... > > A: 42 > > Q: What multiple of 7 did I add to the critical expression in the Zeller > algorithm so it would remain nonnegative for the next few centuries? What are you calling "the Zeller algorithm", and what

Testing conditions.

2005-02-09 Thread Ray Gibbon
Testing conditions. Common scenario. Old programmer, new to Python, love it, but still hankering after some of my old ways. Of all of it's 'new to me' features, I appear to be enjoying 'no declarations' and mixing types with abandon. In particular I find myself writing functions which return wh

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-09 Thread Simon John
Yeah I had a look at the Qt Free/Win project, but I think it offers me less than the current official 3.12 from BlackAdder, which is only $80 without the hassle of following those convoluted build instructions (I did try yesterday). As far as XMMS/Gtk goes, it's a remote client for XMMS, designed

Re: newbie question

2005-02-09 Thread Dan Perl
"Cameron Laird" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > In article <[EMAIL PROTECTED]>, > Dan Perl <[EMAIL PROTECTED]> wrote: > . > . > . >>has the conciseness of the C statement. The pre- and post-increment >>and -decrement in C/C++/Java are very powerful and I miss them i

Re: Python and version control

2005-02-09 Thread Joe Francia
Chris wrote: Hi Joe, I'm curious. Why do you only use Eclipse for big projects? Habit, mainly; plus it's easier for one-offs and single-file scripts to just right-click a file in Explorer and "Edit with ScITE" and work from there. And to further complicate matters, when in FreeBSD or Linux, Er

pygame and music

2005-02-09 Thread maxime
Hi, I try to develop a game in python and pygame. In my game I play a music (.mid with pygame.mixer.music) but sometime I need to accelerate it but I don't see how to do that with pygame. Is it possible? If not, do you know an other python music lib that do that? Thanks a lot -- http://mail.python

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-09 Thread John Lenton
On Wed, Feb 09, 2005 at 06:44:31PM -0800, Simon John wrote: > > I'm writing an XMMS remote control program, so it will be GPL when > released (if it's ever good enough to release!) so I'm looking at > buying the commercial PyQt3 or BlackAdder whilst waiting for the GPL > PyQt4 may I observe that

Re: PyQt and Python 2.4 - also WinXP LnF?

2005-02-09 Thread Joe Francia
Simon John wrote: Also, would I have to build it all myself or does Riverbank/TheKompany provide binaries like PyQt 3.13 for Python 2.4, as I don't have Visual Studio I can't build it myself. There is a GPLed version of Qt that will build on win32, and free compilers to build it with. Despite it

Re: Help: retrieving e-mail from yahoo pop server. what's wrong?

2005-02-09 Thread Kristian M Zoerhoff
In article <[EMAIL PROTECTED]>, Andre wrote: > > import getpass, poplib, re > POPHOST = "pop.mail.yahoo.com" > POPUSER = "mylogin" > POPPASS = "mypass" > pop = poplib.POP3(POPHOST) > pop.user(POPUSER) > > > up to this point evertything proceeds fine, but when i do > > > if not POPPASS:> > POP

Re: What's wrong with `is not None`?

2005-02-09 Thread [EMAIL PROTECTED]
btw, 'isnot' is not pronounced "is-not" but rather "i-snot". :-) S -- http://mail.python.org/mailman/listinfo/python-list

Re: A great Alan Kay quote

2005-02-09 Thread Arthur
On Wed, 9 Feb 2005 21:23:06 +0100, Francis Girard <[EMAIL PROTECTED]> wrote: > >I love him. I don't. > >It's also interesting to see GUIs with windows, mouse (etc.), which apparently >find their origin in is mind, probably comes from the desire to introduce >computers to children. Alfred Bork,

Re: how can I replace a execfile with __import__ in class to use self variables

2005-02-09 Thread Wensheng
I just realized I can pass the object itself: like p=__import__("printit") p.pr(self) in printit.py - def pr(self): print self.var --- -- http://mail.python.org/mailman/listinfo/python-list

wxgrid multiline cell editor

2005-02-09 Thread James
wxpython 2.5.3 hi, anyone know how to make a multiline cell editor for wxgrid? thank you :) best regards, James -- http://mail.python.org/mailman/listinfo/python-list

Re: Help: retrieving e-mail from yahoo pop server. what's wrong?

2005-02-09 Thread Kartic
Andre said the following on 2/9/2005 7:28 PM: Thank, Kartic I actually tried doing it with several other accounts, notably mail.com and netscape.com When i do it with netscape the dialog goes like the following: The username and password are naturally valid, but something else is wrong. Do you know

Pioneers of WIMPishness (was: A great Alan Kay quote)

2005-02-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Scott David Daniels <[EMAIL PROTECTED]> wrote: . [thoroughly appropriate focus on Engelbart and his Augment colleagues] . . >(or great) guess and

Re: newbie question

2005-02-09 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Dan Perl <[EMAIL PROTECTED]> wrote: . . . >has the conciseness of the C statement. The pre- and post-increment >and -decrement in C/C++/Java are very powerful and I miss them in python. > > M

PyQt and Python 2.4 - also WinXP LnF?

2005-02-09 Thread Simon John
After quite a while of wxPython I'm getting back into PyQt, mainly due to the announcement by Trolltech that they will make a GPL version of Qt4 for Windows (and Phil-T said he will make a PyQt to go with it eventually!) I'm currently using PyQt 3.12 that comes with the BlackAdder demo, it seems t

Re: Loop in list.

2005-02-09 Thread Jim
Wow! All I wanted to do was write the equivalence of the Fortran statement: Real*4 matrix(n,n). I'm going to have to go to the intrepreter to see what your saying. Thanks for all the help. Jim -- http://mail.python.org/mailman/listinfo/python-list

Re: negative integer division

2005-02-09 Thread Carl Banks
Jive Dadson wrote: > > Now, I'll agree with you if you want to argue that some machines do > > negative integer division in stupifyingly horrible ways. > > That's why I think it was a stupifyingly horrible decision. > Understandable, but in the end an s.h.d. nonetheless. C language is chock-full

Re: Is Python as capable as Perl for sysadmin work?

2005-02-09 Thread Jeff Shannon
Courageous wrote: *checks self to see if self is wearing rose colored glasses* assert(self.glasses.color != 'rose') ;) Jeff Shannon Technician/Programmer Credit International -- http://mail.python.org/mailman/listinfo/python-list

Re: newbie question

2005-02-09 Thread Jeff Shannon
[EMAIL PROTECTED] wrote: Thanks for the reply. I am trying to convert some C code to python and i was not sure what the equivalent python code would be. I want to postdecrement the value in the while loop. Since i cannot use assignment in while statements is there any other way to do it in python?

Re: newbie question

2005-02-09 Thread Dan Perl
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello All, > What is the python equivalent of the following statement? > > while (n--) Like other posters said, you should give more details with your question. What do you mean by equivalent? The following is *functionally* equival

Re: Reportlab and Barcodes

2005-02-09 Thread Damjan
> One of the users on the Reportlabs mailing list was kinda enough to > offer me the solution.. A simple call to the drawOn function, e.g.: > > bc = code39.Standard39("123",xdim = .015*inch) whats code39 in this example? > x = 6*inch > y = -5*inch > bc.drawOn(canvas,x,y) -- damjan -- http://m

Re: Java Integer.ParseInt translation to python

2005-02-09 Thread comp.lang.java
Ok. Just to end this, here is what is happening with this. Take for example this piece of java code: int i = 235; byte b = (byte)i; this will assign b a value of -21. Huh? Ok, so in java a byte is an 8 bit value between -128 to 127. So, what (byte) does to an integer is to check if the valu

Re: A great Alan Kay quote

2005-02-09 Thread Scott David Daniels
Francis Girard wrote: ... It's also interesting to see GUIs with windows, mouse (etc.), which apparently find their origin in is mind, probably comes from the desire to introduce computers to children. OK, presuming "origin in is mind" was meant to say "origin in his mind," I'd like to stick up f

Re: Vectors in Visual Python

2005-02-09 Thread Arthur
On Thu, 10 Feb 2005 00:16:05 +0100, [EMAIL PROTECTED] (Alex Martelli) wrote: > Having found out how to >build a lasting killfile, I'd like to see if using it liberally on >people who appear to post here just to provoke flamewars, rather than to >offer and receive help, and participate in interesti

how can I replace a execfile with __import__ in class to use self variables

2005-02-09 Thread Wensheng
I have a py program below: class someclass: def __init__(self): self.var = "hell, world" def printitout(self): execfile("printit.py") #__import__("printit") #doesn't work if __name__=="__main__":

Re: negative integer division

2005-02-09 Thread Scott David Daniels
Jive Dadson wrote: I've forgotten what we are arguing about, but I'm sure I'm right. ^^^ QOTW --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list

Re: convert list of tuples into several lists

2005-02-09 Thread Cappy2112
What does the leading * do? -- http://mail.python.org/mailman/listinfo/python-list

Re: Vectors in Visual Python

2005-02-09 Thread Arthur
On Thu, 10 Feb 2005 00:16:05 +0100, [EMAIL PROTECTED] (Alex Martelli) wrote: >Arthur <[EMAIL PROTECTED]> wrote: > > >Please clarify if you were making a lame joke without smilies, are >utterly confused about what "declaration" *MEANS*, or what other folly >prompted you to this astounding remark, t

Re: Re: Big development in the GUI realm

2005-02-09 Thread Tim Churches
Courageous <[EMAIL PROTECTED]> wrote: > > > >It should also be pointed out that the FSF's interpretation of the GPL > >with respect to Qt means absolutely zero. > > Indeed. It would be the court that would have to decide what the > language of the GPL means, given the substantial body of case >

Re: Big development in the GUI realm

2005-02-09 Thread Cappy2112
Damjan wrote: > > For all you GUI developers, things just got a little more interesting. > > Trolltech will soon be offering the QT GUI toolkit for Windows under > > the GPL license. That means that PyQt may become a much more popular > > option in the near future. > > This applies to QT-4 only.

Re: Help: retrieving e-mail from yahoo pop server. what's wrong?

2005-02-09 Thread Andre
Thank, Kartic I actually tried doing it with several other accounts, notably mail.com and netscape.com When i do it with netscape the dialog goes like the following: >>> POPHOST = 'pop3.isp.netscape.com' >>> pop = poplib.POP3(POPHOST) >>> POPUSER = "myusername" >>> pop.user(POPUSER) '+OK' >>> pop

Re: Big development in the GUI realm

2005-02-09 Thread Greg Ewing
Luke Skywalker wrote: OK, so according to Linus, the GPL allows a proprietary program to make calls to the kernel, As I understand things, it's not the GPL which allows this, it's Linus himself who allows it. If Linus hadn't explicitly said that, the GPL might be interpreted as disallowing it. -- G

Re: A great Alan Kay quote

2005-02-09 Thread Jeremy Bowers
On Wed, 09 Feb 2005 15:57:10 -0800, has wrote: > I'd say Python is somewhere in the middle, though moving slowly towards > 'agglutination' in the last couple years. But it feels really badly about that and promises to kick the habit somewhere around the year 3000. -- http://mail.python.org/mailma

Re: A great Alan Kay quote

2005-02-09 Thread has
Grant Edwards wrote: > In an interview at http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=273 > Alan Kay said something I really liked, and I think it applies > equally well to Python as well as the languages mentioned: > >I characterized one way of looking at languages in this >

Re: turing machine in an LC

2005-02-09 Thread Greg Ewing
Jeremy Bowers wrote: I can't figure out how to write a TM in a Python List Comprehension without one of either "variable binding" (so we can store the last symbol list and manipulate it in the next iteration) or "recursive function" (to express the whole tape as a recursive function), both of which

Re: empty classes as c structs?

2005-02-09 Thread Steven Bethard
Alex Martelli wrote: Steven Bethard <[EMAIL PROTECTED]> wrote: I didn't know what to do for __setattr__... Was that what you meant by "The best semantics for _bindings_ as opposed to lookups isn't clear though"? Yep. __delattr__ ain't too obvious to me either, though I guess your semantics for t

Re: Is Python as capable as Perl for sysadmin work?

2005-02-09 Thread Courageous
>> Well, that's where Python helps you out compared to >> Perl. Python can be a bit clumsier than Perl for dirt-simple tasks, but >> you'll find that Python scales much better than Perl. My opinion: If "scales" refers to the /manageability/ of the code produced, I'd say that Python scales bett

Re: win32 service and sockets

2005-02-09 Thread Tom Brown
On Wednesday 09 February 2005 10:48, David Bolen wrote: > Tom Brown <[EMAIL PROTECTED]> writes: > > Well, I have found that it works if I launch the client on the same > > machine as the service. It will not work from a remote machine. Any > > ideas? > > Since you mentioned Xp, could any of it's bu

Re: Big development in the GUI realm

2005-02-09 Thread Courageous
>It should also be pointed out that the FSF's interpretation of the GPL >with respect to Qt means absolutely zero. Indeed. It would be the court that would have to decide what the language of the GPL means, given the substantial body of case law as the court sees it. >... but it establishes tha

Re: A great Alan Kay quote

2005-02-09 Thread Peter Hansen
François Pinard wrote: [Peter Hansen] Then Perl is an "agglutination of styles", while Python might be considered a "crystallization of features"... Grosso modo, yes. Yet, we should recognise that Python agglutinated a few crystals in the recent years. :-) It gave up some of its purity for pract

Re: empty classes as c structs?

2005-02-09 Thread Alex Martelli
Steven Bethard <[EMAIL PROTECTED]> wrote: > I didn't know what to do for __setattr__... Was that what you meant by > "The best semantics for _bindings_ as opposed to lookups isn't clear > though"? Yep. __delattr__ ain't too obvious to me either, though I guess your semantics for that are OK.

Re: newbie question

2005-02-09 Thread Peter Hansen
[EMAIL PROTECTED] wrote: Thanks for the reply. I am trying to convert some C code to python and i was not sure what the equivalent python code would be. I want to postdecrement the value in the while loop. Since i cannot use assignment in while statements is there any other way to do it in python?

Re: negative integer division

2005-02-09 Thread Peter Hansen
Grant Edwards wrote: This is pretty much completely off-topic now. :) No discussion of how lame other languages are is ever completely off-topic in comp.lang.python. After all, these discussions continue to remind us how lucky we all are to be able to program in Python, and that can only be a goo

Re: newbie question

2005-02-09 Thread doodle4
Thanks for the reply. I am trying to convert some C code to python and i was not sure what the equivalent python code would be. I want to postdecrement the value in the while loop. Since i cannot use assignment in while statements is there any other way to do it in python? Thanks. -d4 -- http:

Re: A great Alan Kay quote

2005-02-09 Thread François Pinard
[Peter Hansen] > Then Perl is an "agglutination of styles", while Python might > be considered a "crystallization of features"... Grosso modo, yes. Yet, we should recognise that Python agglutinated a few crystals in the recent years. :-) It gave up some of its purity for practical reasons. We

Re: Name of type of object

2005-02-09 Thread Jeremy Bowers
On Wed, 09 Feb 2005 21:57:15 +, Jive Dadson wrote: > But that works only if the exception happens to be derived from Exception. > How do I handle the > general case? I believe the answer is that Exceptions not derived from Exception shouldn't be thrown; it's basically a deprecated feature and

Python as a machine tool (Re: Is Python as capable as Perl for sysadmin work?)

2005-02-09 Thread Greg Ewing
Jeff Epler wrote: Unlike Perl, Python implements only a *finite turning machine* That's interesting -- I didn't know Python could be used as a lathe. You learn something new every day! I suppose an "infinite turning machine" would be a really *big* lathe... -- Greg Ewing, Computer Science Dept, Uni

Re: Is Python as capable as Perl for sysadmin work?

2005-02-09 Thread Steve Horsley
Jeff Epler wrote: If I want to beg my computer to run programs, I know where to find Intercal with its "PLEASE" and "DO PLEASE" constructions. Was it INTERCAL that had the COMEFROM statement instead of GOTO? I REALLY like the idea of a COMEFROM statement. I think python should have a COMEFROM st

Re: negative integer division

2005-02-09 Thread Grant Edwards
On 2005-02-09, Jive Dadson <[EMAIL PROTECTED]> wrote: > intentionally I disagree! -- Grant Edwards grante Yow! ... I don't like at FRANK SINATRA or his visi.comCHILDREN. --

Re: negative integer division

2005-02-09 Thread Grant Edwards
On 2005-02-09, Jive Dadson <[EMAIL PROTECTED]> wrote: [C] isn't - it's a portable assembler. >>> >>> I've heard that many times, but it makes no sense to me. >> >> I think the point is that C is a low-level, hardware twiddling >> language to be used by people writing things like kernel code

Re: empty classes as c structs?

2005-02-09 Thread Steven Bethard
Alex Martelli wrote: Nick Coghlan <[EMAIL PROTECTED]> wrote: We could use __add__, instead for combining namespaces Update already let's us combine namespaces. To create a new object that merges two namespaces do: namespace.update(namespace(ns_1), ns_2) One thing I'd like to see in namespaces

Re: A great Alan Kay quote

2005-02-09 Thread Grant Edwards
On 2005-02-09, Peter Hansen <[EMAIL PROTECTED]> wrote: >> I characterized one way of looking at languages in this >> way: a lot of them are either the agglutination of features >> or they're a crystallization of style. Languages such as >> APL, Lisp, and Smalltalk are what you migh

Re: check socket alive

2005-02-09 Thread Steve Horsley
[EMAIL PROTECTED] wrote: Dear all, following are some piece of my code (mainly create a socket connection to server and loop to receive data): # function to receive data def recv_for_sock(sock): sock.settimeout(25) while 1: if sock is None: return 1 try:

Re: newbie question

2005-02-09 Thread Peter Hansen
[EMAIL PROTECTED] wrote: What is the python equivalent of the following statement? while (n--) Thank you. That depends on a number of things, including whether "n" is declared as "volatile", and whether you consider the above as an executable piece of code (it is not), or just a code snippet... Rou

Re: Vectors in Visual Python

2005-02-09 Thread Alex Martelli
Terry Reedy <[EMAIL PROTECTED]> wrote: > I (and I believe Alex) object to name declaration *statements* and/or the > strong typing of *names*. I confirm that my key objection is to declarations in the strict sense: thingies that aren't executable, but rather billets doux to the compiler, for exam

Re: Vectors in Visual Python

2005-02-09 Thread Alex Martelli
Arthur <[EMAIL PROTECTED]> wrote: > is that VPython "vectors" are in effect flat 3 element Numeric arrays, > and Numeric ararys can be constructed with Float64 specified as the > datatype. (wonder if that speciufication is a "declaration", and if > so whether that would indicate some conflict bet

Re: negative integer division

2005-02-09 Thread Jive Dadson
intentionally -- http://mail.python.org/mailman/listinfo/python-list

Re: negative integer division

2005-02-09 Thread Jive Dadson
Grant Edwards wrote: > > On 2005-02-09, Jive Dadson <[EMAIL PROTECTED]> wrote: > > >> [C] isn't - it's a portable assembler. > > > > I've heard that many times, but it makes no sense to me. > > I think the point is that C is a low-level, hardware twiddling > language to be used by people writi

variable declaration

2005-02-09 Thread Alexander Zatvornitskiy
Hi, Steve! 07 feb 2005 at 17:51, Steve Holden wrote: >> information about variable S to the memory. I don't find big >> difference. By the way keyword "def" is as bad as "var", from your >> point of view? :) SH> If your colloquial English is good enough to understand the word SH> "bollocks" t

variable declaration

2005-02-09 Thread Alexander Zatvornitskiy
Hi, Elspeth! 09 feb 2005 at 14:44, Elspeth Thorne wrote: >> You may say: give better names for your variables! Ha, I'am often >> don't understand that they mean! They are written for me by an >> engineer! ET> Hang on, though - if you don't understand what you are programming, ET> then how can

Re: convert list of tuples into several lists

2005-02-09 Thread Steven Bethard
Peter Hansen wrote: Steven Bethard wrote: Diez B. Roggisch wrote: zip(*[(1,4),(2,5),(3,6)]) While this is also the approach I would use, it is worth noting that Guido thinks of this as an abuse of the argument passing machinery: http://mail.python.org/pipermail/python-dev/2003-July/037346.html I'

newbie question

2005-02-09 Thread doodle4
Hello All, What is the python equivalent of the following statement? while (n--) Thank you. -d4 -- http://mail.python.org/mailman/listinfo/python-list

Re: Crash in thread on program termination

2005-02-09 Thread Peter Hansen
Alec Wysoker wrote: I have several programs that have two or more threads. The threads > that are not the main thread are daemon threads, i.e. the fact > that they are running should not stop the program from terminating > if the main thread (the only non-daemon thread) terminates. Traceback (mos

Re: Seekable output from ClientForm?

2005-02-09 Thread mac
In article <[EMAIL PROTECTED]>, Matej Cepl wrote: > Hi, > > using python 2.3, ClientForm, and ClientCookie and I have this code: > > opener = ClientCookie.build_opener(ClientCookie.HTTPRefererProcessor, >ClientCookie.HTTPRefreshProcessor, >

Re: User Identification

2005-02-09 Thread Bob Parnes
On Tue, 08 Feb 2005 12:29:48 -, Bob Parnes <[EMAIL PROTECTED]> wrote: > I have a python program on a server of an all-linux network. It needs to > record the user name running it. Is there a way for the program to extract > the name from the system without a separate log-in dialog? > > Bob Pa

Re: negative integer division

2005-02-09 Thread Grant Edwards
On 2005-02-09, Jive Dadson <[EMAIL PROTECTED]> wrote: >> [C] isn't - it's a portable assembler. > > I've heard that many times, but it makes no sense to me. I think the point is that C is a low-level, hardware twiddling language to be used by people writing things like kernel code -- something th

Re: Newbie: SWIG or SIP?

2005-02-09 Thread Peter Hansen
Larry Bates wrote: You can call the .DLL file by using a solution I wrote (and donated) some time ago. It is located here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847 You will need calldll.pyd available here: http://www.nightmare.com/software.html While calldll works for this (a

Re: A great Alan Kay quote

2005-02-09 Thread Peter Hansen
Grant Edwards wrote: In an interview at http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=273 Alan Kay said something I really liked, and I think it applies equally well to Python as well as the languages mentioned: I characterized one way of looking at languages in this way: a

RE: Python and version control

2005-02-09 Thread Johann C. Rocholl
Robert Brewer wrote: > Peter Hansen wrote: > > Carl wrote: > > > What is the ultimate version control tool for Python if you > > > are working in a Windows environment? > > > > I never liked coupling the two together like that. Instead > > I use tools like TortoiseCVS or (now) TortoiseSVN with

Re: convert list of tuples into several lists

2005-02-09 Thread Peter Hansen
Steven Bethard wrote: Diez B. Roggisch wrote: zip(*[(1,4),(2,5),(3,6)]) While this is also the approach I would use, it is worth noting that Guido thinks of this as an abuse of the argument passing machinery: http://mail.python.org/pipermail/python-dev/2003-July/037346.html I'm not sure that's th

Re: negative integer division

2005-02-09 Thread Jive Dadson
Mike Meyer wrote: > > Jive Dadson <[EMAIL PROTECTED]> writes: > > > Python does it right. C is allowed to do it anyway it likes, which was > > a stupifyingly horrible decision, IMHO. > > C only does it wrong if you think that C is a high level language. I didn't say it does it wrong. I sai

Crash in thread on program termination

2005-02-09 Thread Alec Wysoker
I have several programs that have two or more threads. The threads that are not the main thread are daemon threads, i.e. the fact that they are running should not stop the program from terminating if the main thread (the only non-daemon thread) terminates. I do not join to these threads, but j

Some questions...

2005-02-09 Thread Mario Lacunza
Hello, Im new in Python, please I need some information: - Somebody know if: is possible use Python within Net Framework in windows environment?? - Where found info about reports in Python? exist some program like Crystal Reports?? - Database access: Firebird , I dont found correct information

Re: Newbie: SWIG or SIP?

2005-02-09 Thread Caleb Hattingh
Brent Google "python ctypes". ctypes is cool :) keep well Caleb On Wed, 9 Feb 2005 13:44:44 -0700, Brent W. Hughes <[EMAIL PROTECTED]> wrote: I have a third-party DLL and it's associated .h file. The DLL was written in C. I have neither the associated .c files nor the .obj files for the DL

Re: Python and version control

2005-02-09 Thread Tom Willis
I'll throw in my reccomendation for svn as well. It just works. On Wed, 09 Feb 2005 14:01:33 -0800 (PST), Timo Virkkala <[EMAIL PROTECTED]> wrote: > Carl wrote: > > What is the ultimate version control tool for Python if you are working in a > > Windows environment? > > I would very much recomme

Re: A ListComp that maintains its own state

2005-02-09 Thread Carl Banks
Bernhard Herzog wrote: > Michael Spencer <[EMAIL PROTECTED]> writes: > > > So, here's factorial in one line: > > # state refers to list of state history - it is initialized to [1] > > # on any iteration, the previous state is in state[-1] > > # the expression also uses the trick of list.append() =

RE: strange behaviour with decorators.

2005-02-09 Thread Delaney, Timothy C (Timothy)
Antoon Pardon wrote: > Ah, yes, the penny dropped. The try: except where there because > originally there were other statements I wanted to test and I > didn't want the raise exception by the inc(-2) stop the script. > I completely forget to consider it would also catch the > error I was expecting

Re: Python and version control

2005-02-09 Thread Timo Virkkala
Carl wrote: What is the ultimate version control tool for Python if you are working in a Windows environment? I would very much recommend Subversion. It's in no way specific to either Windows or Python, but it's a wonderful tool. If you've ever used CVS, you'll feel right at home. Or after 10 mi

Re: Is Python as capable as Perl for sysadmin work?

2005-02-09 Thread Caleb Hattingh
Roy How about the Yoda version: do: statement do not do: statement The Yoda version actually goes statement :do statement :not do Caleb -- http://mail.python.org/mailman/listinfo/python-list

Re: Name of type of object

2005-02-09 Thread Jive Dadson
I don't think I've quite got it. The application I'm writing has some similarities to an interactive shell. Like an interactive shell, it executes arbitrary code that it receives from an input stream. When it gets an exception, it should create an informative message, regardless of the type of

Re: Python and version control

2005-02-09 Thread Caleb Hattingh
Carl What is the ultimate version control tool for Python if you are working in a Windows environment? We use JEDI VCS (open source, free). To be fair, JEDI VCS actually integrates into the Delphi IDE, which is what we use mostly. However, the standard installation also installs a standalon

Can't get pcap file scanner to terminate normally

2005-02-09 Thread Earl Eiland
I'm using pcapy to scan a packet capture file. I've tried a variety of tests to end the loop at EOF, but can't seem to avoid the program terminating with a pcapy.PcapError. I've tested for empty lists (while Raw == [] or Passed == []:) and strings (while Raw ==""] or Passed == "":) as well as the

Re: Python versus Perl ?

2005-02-09 Thread Caleb Hattingh
Joe, thanks Yes, I am on the P4D mailing list :) What you didn't say was that the "python for delphi" extensions are *awesome*. full two-way communication, and you get it all by drag&dropping a little component widget onto your form in the IDE. Amazing. However... Dll's can be used by thi

Seekable output from ClientForm?

2005-02-09 Thread Matej Cepl
Hi, using python 2.3, ClientForm, and ClientCookie and I have this code: opener = ClientCookie.build_opener(ClientCookie.HTTPRefererProcessor, ClientCookie.HTTPRefreshProcessor, ClientCookie.SeekableProcessor) response = opene

wrapper classes question..

2005-02-09 Thread vegetax
Hi i made a wrapper class for handling file and dir operations and i wonder,  whats the performance penalty for making such wrapper classes? is it ok to make a lot of these wrappers? here it is: # import os class File(object): #access modes F_OK = os.F_OK, W_OK = os.

Re: Big development in the GUI realm

2005-02-09 Thread Scott Robinson
On Mon, 07 Feb 2005 20:56:44 -0800, Courageous <[EMAIL PROTECTED]> wrote: > >>OK, so according to Linus, the GPL allows > >No. Pay attention. Linus has his own revised version, to clarify >this point, and in fact /overruling/ the GPL if the point is >clarified differently by RMS or others. >

Re: Python and version control

2005-02-09 Thread Chris
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I don't know that you'll find a common approach. I use Subversion for > version control. For larger projects, I use Eclipse with the Pydev > plugin for editing, and the Subclipse plugin for talking to Subversion. > For smaller t

Re: overwriting method in baseclass

2005-02-09 Thread Harald Massa
marc, >> So HOW can SVN be of any use for THIS prob? > > Take a look at the Subversion documentation (the "book") and search > for `Vendor branches`. > [...] > The section deals specifically with the situation how to manage 3rd > party source code with subversion which you want to update from ti

Re: Help: retrieving e-mail from yahoo pop server. what's wrong?

2005-02-09 Thread Kartic
Andre, Do you have a premium Yahoo account? Only premium users can access Yahoo mail via POP3. If you are a premium account holder and it still is not working, print out your password to see if you typed the correct password. Have you tried accessing your Yahoo from an email client? Does that wor

Re: Newbie: SWIG or SIP?

2005-02-09 Thread Larry Bates
You can call the .DLL file by using a solution I wrote (and donated) some time ago. It is located here: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/146847 You will need calldll.pyd available here: http://www.nightmare.com/software.html I've used this solution a LOT and it has worked wi

RE: two questions - no common theme

2005-02-09 Thread Harper, Gina
2) os.listdir "returns a list containing the names of the entries in the directory", this does include directories in the top level directory. For the complete listing try os.walk() which "returns a tuple-(dirpath, dirnames, filenames" -Original Message- From: Sean McIlroy [mailto:[EMAIL

Re: two questions - no common theme

2005-02-09 Thread Larry Bates
...how do I get hold of a list of its subdirectories? This does what you asked for: import os targetpath='c:\\' all=os.listdir(targetpath) subdirs=[x for x in all if os.path.isdir(os.path.join(targetpath, x))] But you may need to take a look at os.walk (as others have suggested) also. Larr

  1   2   3   >