Re: The del statement

2008-05-08 Thread Duncan Booth
Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > Duncan Booth wrote: >> Arnaud Delobelle <[EMAIL PROTECTED]> wrote: >> >> > >> > >> > George Sakkis wrote: >> >> One of the few Python constructs that feels less elegant than >> >> necessary to me is the del statement. For one thing, it is overlo

Re: how to use subprocess.Popen execute "find" in windows

2008-05-08 Thread Gabriel Genellina
En Wed, 07 May 2008 23:29:58 -0300, <[EMAIL PROTECTED]> escribió: > On 5月7日, 上午9时45分, Justin Ezequiel <[EMAIL PROTECTED]> > wrote: >> On May 6, 5:19 pm, [EMAIL PROTECTED] wrote: >> >> > p1 = Popen(['netstat', '-an'], stdout = PIPE) >> > p2 = Popen(['find', '"445"'], stdin = p1.stdout, stdout = PI

Re: Can't drag and drop onto .py in Windows XP?

2008-05-08 Thread Sizer
"Roger Upole" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Sizer wrote: >> It's just a little weird that I >> can't just drag and drop file names onto .pyw or .py files. Am I >> missing something here? >> >> Thanks for any help. > > You can register a DropHandler for the Python file cla

Re: The del statement

2008-05-08 Thread Arnaud Delobelle
Duncan Booth wrote: > Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > > > > > George Sakkis wrote: > >> One of the few Python constructs that feels less elegant than > >> necessary to me is the del statement. For one thing, it is overloaded > >> to mean three different things: > >> (1) del x: R

Re: How to gather information about the system hardware?

2008-05-08 Thread s0suk3
On May 8, 2:14 am, "Florencio Cano" <[EMAIL PROTECTED]> wrote: > Hi, > I'm looking for a method of gathering information about the system > hardware and software installed using Python. I would like to do it in > UNIX and in Windows. I think that it would be good in Windows to look > in the registr

Python module for SNMP bindings ?

2008-05-08 Thread Banibrata Dutta
Hi, While looking around for Python API's to do SNMP, found the following link with a high level comparison -- http://urchin.earth.li/~twic/SNMP_in_Python.html i.e. options seems to be: PySNMP (complete SNMP impl.), SNMPy, yapSNMP (Net-SNMP bindings). Of those, yapSNMP seems to be most promising

Re: Problems with os.walk

2008-05-08 Thread Hrvoje Niksic
<[EMAIL PROTECTED]> writes: > (dirpath, dirnames, filenames) = os.walk(scriptPath) You're supposed to loop over values in different directories, like this: for dirpath, dirnames, filenames in os.walk(scriptPath): ... handle dirpath with dirnames and filenames ... The loop will be execut

Re: The Importance of Terminology's Quality

2008-05-08 Thread kodifik
>          |   PLEASE DO NOT   |            :.:\:\:/:/:.: >          |  FEED THE TROLLS  |           :=.' -   - '.=: I don't think Xah is trolling here (contrary to his/her habit) but posing an interesting matter of discussion. Don't know to which point it fits, but I w

Re: explain this function to me, lambda confusion

2008-05-08 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Here is a simple lambda that implements an exclusive or: > def XOR(x,y) : return lambda : ( ( x ) and not ( y ) ) or ( not ( x ) and ( y ) ) > > (Because of the resemblance to C macros, I have been cautious and > written the lambda with lots of parentheses

Re: The Importance of Terminology's Quality

2008-05-08 Thread John Thingstad
På Thu, 08 May 2008 04:14:35 +0200, skrev Kyle McGivney <[EMAIL PROTECTED]>: • Module, Block, in Mathematica is in lisp's various “let*”. The lisp's keywords “let”, is based on the English word “let”. That word is one of the English word with multitudes of meanings. If you look

Re: The del statement

2008-05-08 Thread Duncan Booth
Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > > > George Sakkis wrote: >> One of the few Python constructs that feels less elegant than >> necessary to me is the del statement. For one thing, it is overloaded >> to mean three different things: >> (1) del x: Remove x from the current namespace >>

POP connection timeout.

2008-05-08 Thread Aspersieman
Hi All I am have written an application that queries a POP mailbox and downloads messages. When the application tries to connect to the mail server, but takes too long (eg. longer than 60 seconds) I want to have it time out. Something like try: pop = poplib.POP3(POPHOST, POPPORT) except

Re: strftime() argument 1 must be str, not unicode

2008-05-08 Thread Andrii V. Mishkovskyi
2008/5/8 Tim Roberts <[EMAIL PROTECTED]>: > "Andrii V. Mishkovskyi" <[EMAIL PROTECTED]> wrote: > > >2008/5/7 Alexandr N Zamaraev <[EMAIL PROTECTED]>: > > >> Subj is bag? > >> > >> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit > >> (Intel)] on win32 > >> Type "help", "co

Re: strftime() argument 1 must be str, not unicode

2008-05-08 Thread Alexandr N Zamaraev
Tim Roberts wrote: > I think that's a perfectly reasonable thing to expect. At the risk of > over-generalization, there is no good reason why, by this point in time, > all of the standard library routines that accept strings shouldn't also > accept Unicode strings. However, file(fname), open(fnam

Re: anagram finder / dict mapping question

2008-05-08 Thread Kam-Hung Soh
On Thu, 08 May 2008 15:42:07 +1000, dave <[EMAIL PROTECTED]> wrote: This is what i've came up with. My problem is that I can't get them to properly evaluate.. when comparewords() runs it finds itself... Should I have the keys of mapdict iterate over itself? Is that possible? def annaf

Re: DISLIN 9.3 stuck

2008-05-08 Thread michels
On 8 Mai, 02:55, adolfo <[EMAIL PROTECTED]> wrote: > ... > 1- The strange thing is that I went to thedislindirectory in the C: > drive and there was no disli.pyd file anywhere. I found the file in > the My Documents subdirectory where I had originally unzipped > thedislinarchived files I download

Re: What is the purpose of ptyhon in Windows

2008-05-08 Thread [EMAIL PROTECTED]
On May 7, 9:35 pm, Max Erickson <[EMAIL PROTECTED]> wrote: > WolfgangZ <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] schrieb: > >> hi All, > >>http://mail.python.org/mailman/listinfo/python-list > > > At least I'm living in a free country and nobody forces me to > > learn python. So I don't full

Problems with os.walk

2008-05-08 Thread Dominique.Holzwarth
Hi everyone The following code: scriptPath = os.path.dirname(__file__) (dirpath, dirnames, filenames) = os.walk(scriptPath) print 'dirpath\n' print dirpath print 'dirnames\n' pprint.pprint(dirnames) print 'filenames\n' pprint.pprint(filnames) Fails on the os.walk call with the following error:

Re: python newbie: some surprises

2008-05-08 Thread Martin P. Hellwig
v4vijayakumar wrote: When I started coding in python, these two things surprised me. 1. my code is inconsistently indented with the combination of tabs and spaces. Even lines looked intended, but it is not. Even the standard editor Idle tries to guess the intendation, so this was never a probl

Re: Am I missing something with Python not having interfaces?

2008-05-08 Thread Daniel Marcel Eichler
Am Donnerstag 08 Mai 2008 00:12:26 schrieb [EMAIL PROTECTED]: > very often sees do-nothing catch-all try/catch blocks in Java - which > is way worse than just letting the exception propagate. I find all > this totally pointless, because there's just no way for a compiler to > check if your code i

How to gather information about the system hardware?

2008-05-08 Thread Florencio Cano
Hi, I'm looking for a method of gathering information about the system hardware and software installed using Python. I would like to do it in UNIX and in Windows. I think that it would be good in Windows to look in the registry and be able to parse and search it. Any pointer to information would be

Re: strftime() argument 1 must be str, not unicode

2008-05-08 Thread Tim Roberts
"Andrii V. Mishkovskyi" <[EMAIL PROTECTED]> wrote: >2008/5/7 Alexandr N Zamaraev <[EMAIL PROTECTED]>: >> Subj is bag? >> >> Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit >> (Intel)] on win32 >> Type "help", "copyright", "credits" or "license" for more information. >> >>> f

python newbie: some surprises

2008-05-08 Thread v4vijayakumar
When I started coding in python, these two things surprised me. 1. my code is inconsistently indented with the combination of tabs and spaces. Even lines looked intended, but it is not. 2. python requires to pass "self" to all instance methods and I missed ":" often. :) -- http://mail.python.org

Re: Am I missing something with Python not having interfaces?

2008-05-08 Thread Daniel Marcel Eichler
Am Mittwoch 07 Mai 2008 22:39:30 schrieb Luis Zarrabeitia: > There you have it, interfaces are not enough to ensure that the > implementors actually implement the methods. They are useful for > warning at compile time if there is a missing method, but nothing > more. It's not the fault of the en

Re: The del statement

2008-05-08 Thread Arnaud Delobelle
George Sakkis wrote: > One of the few Python constructs that feels less elegant than > necessary to me is the del statement. For one thing, it is overloaded > to mean three different things: > (1) del x: Remove x from the current namespace > (2) del x[i]: Equivalent to x.__delitem__(i) > (3) del

<    1   2   3