Re: popen and password entry

2006-06-14 Thread Sinan Nalkaya
hi,i have found expect method for this purpose. i`m trying to use pexpect but following code gives me an something strange as a result.# The CODEimport pexpectcmd = '/usr/bin/rsync config [EMAIL PROTECTED]:/tmp/.' #cmd = 'ssh [EMAIL PROTECTED]'child = pexpect.spawn(cmd)passwd = 'qwe123'try:   

Regular Expression pattern group

2006-06-14 Thread JH
Hi I am a fussy learner. Could someone explain to me why the following inconsistency exists between methods? How can it be justified if it is considered all right? There are three groups in pattern. However, match object shows 3 groups in collection, but group has to be indexed from one because t

Re: nested functions

2006-06-14 Thread Georg Brandl
George Sakkis wrote: > Ben Finney wrote: > >> "Gregory Petrosyan" <[EMAIL PROTECTED]> writes: >> >> > I often make helper functions nested, like this: >> > >> > def f(): >> > def helper(): >> > ... >> > ... >> > >> > is it a good practice or not? >> >> You have my blessing. Used we

Re: Question about the Exception class

2006-06-14 Thread Georg Brandl
Carl J. Van Arsdall wrote: > So this is probably a fairly basic question, but help me out because I'm > just not lining things up and I'm somewhat new to the world of exception > handling. > > What's the benefit to inheriting an exception from and of the available > parent exception classes? D

Re: Newbie wxpython staticbitmap help please

2006-06-14 Thread jean-michel bain-cornu
janama a écrit : > Can somewhone add a wx.Timer example to this to make it check > if the file exists every minute or so , instead of clicking the button > to check and update this? Or is there a better way of auto updating my > little gui apps StaticBitmap if a file exists? Why won't you

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Raffael Cavallaro
On 2006-06-14 16:36:52 -0400, Pascal Bourguignon <[EMAIL PROTECTED]> said: > In lisp, all lists are homogenous: lists of T. CL-USER 123 > (loop for elt in (list #\c 1 2.0d0 (/ 2 3)) collect (type-of elt)) (CHARACTER FIXNUM DOUBLE-FLOAT RATIO) i.e., "heterogenous" in the common lisp sense: havin

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Raffael Cavallaro
On 2006-06-14 15:04:34 -0400, Joachim Durchholz <[EMAIL PROTECTED]> said: > Um... heterogenous lists are not necessarily a sign of expressiveness. > The vast majority of cases can be transformed to homogenous lists > (though these might then contain closures or OO objects). > > As to references

Re: memory leak problem with arrays

2006-06-14 Thread sonjaa
Serge Orlov wrote: > sonjaa wrote: > > Serge Orlov wrote: > > > sonjaa wrote: > > > > Hi > > > > > > > > I'm new to programming in python and I hope that this is the problem. > > > > > > > > I've created a cellular automata program in python with the numpy array > > > > extensions. After each cycl

Re: Database read and write

2006-06-14 Thread Justin Ezequiel
Stan Cook wrote: > will ope, read, and write to a Dbase 3 or 4 file? I know I have one in VB6 that I've been meaning to translate to Python but... (do not have time/am lazy/does not work with indexes) did a google search for you though http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/3627

Re: Perl XML::Simple and Data::Dumper - exists in Python?

2006-06-14 Thread Wallace Owen
Miguel Manso wrote: > Hi there, > > I'm a Perl programmer trying to get into Python. I've been reading some > documentation and I've choosed Python has being the "next step" to give. > > Can you point me out to Python solutions for: > > 1) Perl's Data::Dumper > > It dumps any perl variable to

Re: split with "*" in string and ljust() puzzles

2006-06-14 Thread Sambo
George Sakkis wrote: > Serge Orlov wrote: > > >>Sambo wrote: >> >>>I have just (finally) realized that it is splitting and removing >>>on single space but that seams useless, and split items >>>1 and 2 are empty strings not spaces?? >> >>What is useless for you is worth $1,000,000 for somebody el

Re: nested functions

2006-06-14 Thread George Sakkis
Ben Finney wrote: > "Gregory Petrosyan" <[EMAIL PROTECTED]> writes: > > > I often make helper functions nested, like this: > > > > def f(): > > def helper(): > > ... > > ... > > > > is it a good practice or not? > > You have my blessing. Used well, it makes for more readable code.

Re: split with "*" in string and ljust() puzzles

2006-06-14 Thread George Sakkis
Serge Orlov wrote: > Sambo wrote: > > I have just (finally) realized that it is splitting and removing > > on single space but that seams useless, and split items > > 1 and 2 are empty strings not spaces?? > > What is useless for you is worth $1,000,000 for somebody else ;) > If you have comma sep

Database read and write

2006-06-14 Thread Stan Cook
Ok . I know I'm talking ancient history, but some of us are stuck working with them. Is there anything for python which will ope, read, and write to a Dbase 3 or 4 file? I really need your assistance on this one. Regards, Stan -- http://mail.python.org/mailman/listinfo/python-list

Re: __cmp__ method

2006-06-14 Thread George Sakkis
Jon Clements wrote: > This probably isn't exactly what you want, but, unless you wanted to do > something especially with your own string class, I would just pass a > function to the sorted algorithm. > > eg: > > sorted( [a,b,c], cmp=lambda a,b: cmp(len(a),len(b)) ) > > gives you the below in the

Re: Bundling an application with third-party modules

2006-06-14 Thread Serge Orlov
Ben Finney wrote: > "Serge Orlov" <[EMAIL PROTECTED]> writes: > > > Ben Finney wrote: > > > That's a large part of my question. How can I lay out these > > > modules sensibly during installation so they'll be easily > > > available to, but specific to, my application? > > > > Put them in a director

Re: Negative hex to int

2006-06-14 Thread Ben Finney
John Machin <[EMAIL PROTECTED]> writes: > On 15/06/2006 10:31 AM, Ben Finney wrote: > > If you want a special interpretation of the value, you'll have to > > calculate it. > > > > Example assuming you want a one's-complement interpretation:: > > Given that the OP had to ask the question at all,

Re: "groupby" is brilliant!

2006-06-14 Thread Alex Martelli
James Stroud <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > James Stroud <[EMAIL PROTECTED]> wrote: > >... > > > >>def doit(rows, doers, i=0): > >> for r, alist in groupby(rows, itemgetter(i)): > >> if len(doers) > 1: > >> doit(alist, doers[1:], i+1) > >> doers[0](r) >

Re: Screen capturing on Windows

2006-06-14 Thread Roger Upole
"Rune Strand" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > Is it possible by use of pyWin32 or ctypes to make a screen capture of > an inactive, or a hidden window if the hwnd/WindowName/ClassName is > known? I've seen dedicated screen capture software do this. While > PIL.ImageG

Re: How to select a folder with native windows dialog box?

2006-06-14 Thread Roger Upole
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks for your answer, it's working fine! > > For information, the function to use to get the pathName is > shell.SHGetPathFromIDList > It returns an error if you select a special folder (!?!?) but otherwise > it's working fine... And I

Re: Negative hex to int

2006-06-14 Thread John Machin
On 15/06/2006 10:31 AM, Ben Finney wrote: > [EMAIL PROTECTED] writes: > >> The problem is negative values. If the unit returns the hex value >> 'e7', it means -25, but python says it's 231: > > Python is right. There is no "negative bit" in Python numbers, now > that unification of 'long' and 'in

Re: Bundling an application with third-party modules

2006-06-14 Thread Ben Finney
"Serge Orlov" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > That's a large part of my question. How can I lay out these > > modules sensibly during installation so they'll be easily > > available to, but specific to, my application? > > Put them in a directory "lib" next to the main module

Re: wxPython problems with Fedora Core 5

2006-06-14 Thread writeson
Frank, Thanks for the link, that solved the problem for me with FC5! That was a great help to me! Doug -- http://mail.python.org/mailman/listinfo/python-list

wxPython install question

2006-06-14 Thread DarkBlue
Trying to install wxPython on Suse10.1 64 with gcc4.1.0 and get wxPython-src-2.6.3.2/wxPython # python setup.py install Found wx-config: /usr/local/bin/wx-config Using flags: --toolkit=gtk2 --unicode=no --version=2.6 Preparing CORE... Preparing GLCANVAS... Preparing STC... Preparing GIZMOS...

Re: Negative hex to int

2006-06-14 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hi! > > While communicating with a monitoring unit, I get some hex values > representing degrees celcius from its probes. The values can be > something like '19' or '7d'. To convert it to int, I do the following: > --- > Python 2.4.2 (#1, Sep 28 2

Re: prog1 | prog2 . How not to make prog2 block if not piped?

2006-06-14 Thread riquito
Steve Holden ha scritto: > When you run it "standalone" you should give it some input - type some > text then enter ^D (on Unix-like systems) or ^Z (on Windows). How else > do you expect read() to return anything? It *has* to read to the end fo > the file before it returns a value. > > regards >

Re: nested functions

2006-06-14 Thread Ben Finney
"Gregory Petrosyan" <[EMAIL PROTECTED]> writes: > I often make helper functions nested, like this: > > def f(): > def helper(): > ... > ... > > is it a good practice or not? You have my blessing. Used well, it makes for more readable code. > What about performance of such const

Re: Negative hex to int

2006-06-14 Thread Ben Finney
[EMAIL PROTECTED] writes: > The problem is negative values. If the unit returns the hex value > 'e7', it means -25, but python says it's 231: Python is right. There is no "negative bit" in Python numbers, now that unification of 'long' and 'int' is complete; numbers can grow indefinitely large.

Re: Bundling an application with third-party modules

2006-06-14 Thread Serge Orlov
Ben Finney wrote: > > 2. An Installshield-type installer can place files (essentially) > > wherever you want them > > That's a large part of my question. How can I lay out these modules > sensibly during installation so they'll be easily available to, but > specific to, my application? Put them in

Re: split with "*" in string and ljust() puzzles

2006-06-14 Thread Serge Orlov
Sambo wrote: > I have just (finally) realized that it is splitting and removing > on single space but that seams useless, and split items > 1 and 2 are empty strings not spaces?? What is useless for you is worth $1,000,000 for somebody else ;) If you have comma separated list '1,,2'.split(',') nat

found a swftools for 2.4 - Docs anyone?

2006-06-14 Thread jmdeschamps
New to swf - interesting technology for dynamic web graphic effects stemming from user input. I found a working windows pre-compiled binary (0.6.2) for Python 2.4 of rfxswf library from swftools to generate swf files. (flash compiled files(?)). No source of documentation of that api. There are

Re: Bundling an application with third-party modules

2006-06-14 Thread Ben Finney
"utabintarbo" <[EMAIL PROTECTED]> writes: > 1. py2exe/csFreeze-type thing. This would even relieve the customer > of installing python Not really what I need. I only want to have installation control over *some* of the modules, and leave Python and other dependencies up to the administrator to ma

Re: Writing PNG with pure Python

2006-06-14 Thread Ben Finney
"Johann C. Rocholl" <[EMAIL PROTECTED]> writes: > Ben Finney schrieb: > > Simplify. Please don't attempt to write yet another set of license > > terms without expert legal assistance. You've already chosen the > > Expat license as being acceptable; use that, and you grant all the > > rest without

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Grant Edwards
On 2006-06-14, Nick Maclaren <[EMAIL PROTECTED]> wrote: > > In article <[EMAIL PROTECTED]>, > Gary Herron <[EMAIL PROTECTED]> writes: >|> >|> The IEEE standard specifies (plus or minus) infinity as the result of >|> division by zero. This makes sense since such is the limit of division >|> by a q

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Grant Edwards
On 2006-06-14, Sébastien Boisgérault <[EMAIL PROTECTED]> wrote: > Jeez, 12 posts in this IEEE 754 thread, and still no message > from uncle timmy ? ;) > > Please, we need enlightenment here and *now* :) What we need is fewer people like me who do nothing but complain about it... -- Grant Edward

split with "*" in string and ljust() puzzles

2006-06-14 Thread Sambo
I have couple of puzzles in my code. def load_headers( group_info ): if os.path.isfile( group_info.pointer_file ): ptr_file = open( group_info.pointer_file, "r" ) else: print group_info.mess_list return linecount = 0 ptr_file.seek( 512 ) print ptr_file.

Re: Negative hex to int

2006-06-14 Thread John Machin
On 15/06/2006 9:24 AM, Wojciech Muła wrote: > [EMAIL PROTECTED] wrote: >> The problem is negative values. If the unit returns the hex value 'e7', >> it means -25, but python says it's 231: >> --- > int('e7', 16) >> 231 >> --- >> >> Does anyone hav

Re: Negative hex to int

2006-06-14 Thread Wojciech Muła
[EMAIL PROTECTED] wrote: > The problem is negative values. If the unit returns the hex value 'e7', > it means -25, but python says it's 231: > --- int('e7', 16) > 231 > --- > > Does anyone have a clue a to what I need to do? def u2(x): i

Re: __cmp__ method

2006-06-14 Thread Jon Clements
This probably isn't exactly what you want, but, unless you wanted to do something especially with your own string class, I would just pass a function to the sorted algorithm. eg: sorted( [a,b,c], cmp=lambda a,b: cmp(len(a),len(b)) ) gives you the below in the right order... Never tried doing wh

Re: Negative hex to int

2006-06-14 Thread John Machin
On 15/06/2006 9:09 AM, [EMAIL PROTECTED] wrote: > Hi! > > While communicating with a monitoring unit, I get some hex values > representing degrees celcius from its probes. The values can be > something like '19' or '7d'. To convert it to int, I do the following: > --- > Pyt

Re: __cmp__ method

2006-06-14 Thread marek . rocki
Python documentation says: >__cmp__( self, other) > Called by comparison operations if rich comparison (see above) is not defined. So it seems you have to redefine rich comparisons __lt__, __gt__, __eq__ etc as well. If all you need is change sorting order, why not use appropriate parameters of so

Re: memory leak problem with arrays

2006-06-14 Thread Serge Orlov
sonjaa wrote: > Serge Orlov wrote: > > sonjaa wrote: > > > Hi > > > > > > I'm new to programming in python and I hope that this is the problem. > > > > > > I've created a cellular automata program in python with the numpy array > > > extensions. After each cycle/iteration the memory used to examine

Negative hex to int

2006-06-14 Thread andreas . lydersen
Hi! While communicating with a monitoring unit, I get some hex values representing degrees celcius from its probes. The values can be something like '19' or '7d'. To convert it to int, I do the following: --- Python 2.4.2 (#1, Sep 28 2005, 10:25:47) [GCC 3.4.3 20041212 (Red

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Neelakantan Krishnaswami
In article <[EMAIL PROTECTED]>, Pascal Costanza wrote: > Torben Ægidius Mogensen wrote: > >> On a similar note, is a statically typed langauge more or less >> expressive than a dynamically typed language? Some would say less, as >> you can write programs in a dynamically typed language that you c

Pb console Effbot

2006-06-14 Thread M�ta-MCI
Good evening! I installed the Console of EFFBOT (http://effbot.org/downloads/#console). It functions well. It's a very fun/friendly tool. Except a detail: when I send (by console.write()) more than 53200 characters, it does not occur anything. I circumvented the problem, with a loop which sends

Newbie wxpython staticbitmap help please

2006-06-14 Thread janama
Hi, how do i go about having my little gui (boa) app updating (changing) the bitmap used in a StaticBitmap automatically. In the example below when i click the button the app check checks to see if a file exists and if so it swaps the StaticBitmap in the gui to another bitmap. Can somewho

Re: Tiddlywiki type project in Python?

2006-06-14 Thread Paul Boddie
Diez B. Roggisch wrote: > [Quoting jkn...] > > Well, that may be an/the answer, since another form of my question > > would be 'how can I write a TiddlyWikiLike using Python instead of JS' > > ;-). I appreciate that it might involve, for instance, a local server. > > Does the idea of embedding py

Re: memory leak problem with arrays

2006-06-14 Thread Robert Kern
sonjaa wrote: > Hi > > I'm new to programming in python and I hope that this is the problem. > > I've created a cellular automata program in python with the numpy array > extensions. After each cycle/iteration the memory used to examine and > change the array as determined by the transition rules

Re: memory leak problem with arrays

2006-06-14 Thread John Machin
On 15/06/2006 8:27 AM, sonjaa wrote: > Serge Orlov wrote: >> sonjaa wrote: >>> Hi >>> >>> I'm new to programming in python and I hope that this is the problem. >>> >>> I've created a cellular automata program in python with the numpy array >>> extensions. After each cycle/iteration the memory used

__cmp__ method

2006-06-14 Thread JH
Hi Can anyone explain to me why the following codes do not work? I want to try out using __cmp__ method to change the sorting order. I subclass the str and override the __cmp__ method so the strings can be sorted by the lengh. I expect the shortest string should be in the front. Thanks >>> class

Re: Earthquake and Tornado Forecasting Programs June 13, 2006

2006-06-14 Thread Richard E Maine
edgrsprj <[EMAIL PROTECTED]> wrote: > > Oh for a newsreader that can eliminate all such ugly excessively > > cross-posted articles lacking follow-ups. PLONK thread is the only > > remaining answer. > > > > Posted by E.D.G. June 14, 2006 > > In my opinion, even moderated Internet Newsgroups ca

Re: memory leak problem with arrays

2006-06-14 Thread sonjaa
Serge Orlov wrote: > sonjaa wrote: > > Hi > > > > I'm new to programming in python and I hope that this is the problem. > > > > I've created a cellular automata program in python with the numpy array > > extensions. After each cycle/iteration the memory used to examine and > > change the array as

Re: Earthquake and Tornado Forecasting Programs June 13, 2006

2006-06-14 Thread edgrsprj
> > Oh for a newsreader that can eliminate all such ugly excessively > cross-posted articles lacking follow-ups. PLONK thread is the only > remaining answer. > Posted by E.D.G. June 14, 2006 In my opinion, even moderated Internet Newsgroups cannot provide the necessary control for adequately p

Re: memory leak problem with arrays

2006-06-14 Thread Serge Orlov
sonjaa wrote: > Hi > > I'm new to programming in python and I hope that this is the problem. > > I've created a cellular automata program in python with the numpy array > extensions. After each cycle/iteration the memory used to examine and > change the array as determined by the transition rules i

Re: better Python IDE? Mimics Maya's script editor?

2006-06-14 Thread Scott David Daniels
warpcat wrote: > I've been scripting in Maya, via mel for years now. Recently learning > to Python, love it. Thing that's driving me nuts it the IDE. I'm > using PythonWin right now and trying to find something better, mainly > with this functionality: I'm not certain, but you could take a look

Re: Question about the Exception class

2006-06-14 Thread Scott David Daniels
Carl J. Van Arsdall wrote: > So this is probably a fairly basic question, but help me out because I'm > just not lining things up and I'm somewhat new to the world of exception > handling. > > What's the benefit to inheriting an exception from and of the available > parent exception classes? D

psycopg2, gtk and float

2006-06-14 Thread Sandro Dentella
Hi all, while building an applycation in pygtk I noticed that psycopg2 returns the floats rouded (eg: 4.123 -> 4.0). This turns out to be a problem of psycopg2 (psycopg behaves correctly) when you 'import gtk' !!! It behaves correctly with numeric/decimal, though. I'm totally clueless. Any hints

WS-Security support for Python SOAP libraries

2006-06-14 Thread Satchidanand Haridas
Hi, Do any of the existing SOAP libraries for Python have support for WS-Security? thanks, Satchit -- http://mail.python.org/mailman/listinfo/python-list

nested functions

2006-06-14 Thread Gregory Petrosyan
I often make helper functions nested, like this: def f(): def helper(): ... ... is it a good practice or not? What about performance of such constructs? -- Regards, Gregory. -- http://mail.python.org/mailman/listinfo/python-list

Re: Simple Char-I/O Dialogs for Win32 and DOS

2006-06-14 Thread Petr Jakes
Mr Roboto wrote: > Folks: > > I've already searched the group and have determined there *are* > char I/O based input systems, ala NCURSES, that are > Python-compatible (ie. PyNCurses, UrWid, etc.) What I *need* is > something that does simple dialogs under char-I/O Win32 and DOS > w/ very little f

Re: wxPython, tree Control text cutoff

2006-06-14 Thread Kiran
Ah, dang. Nice find! thanks a lot for your help. Also, your note is completely called for. I realize that my code was very complicated, and I just pasted what I had instead of simplifying it down. Next time, I will do so. thanks again! Kiran jean-michel bain-cornu wrote: > Kiran a écrit : > >

__lt__ slowing the "in" operator even if not called

2006-06-14 Thread Emanuele Aina
I have some code which does a lot of "in" on lists containing objects with no __eq__ defined. It all goes fast until I add the __lt__() method: then I have a slowdown comparable to the one I get using the overridden __eq__, while the __lt__ method is never called. Someone can explain me why? I

Interactive Find and Replace String Patterns on Multiple Files

2006-06-14 Thread Xah Lee
Interactive Find and Replace String Patterns on Multiple Files Xah Lee, 2006-06 Suppose you need to do find and replace of a string pattern, for all files in a directory. However, you do not want to replace all of them. You need to look at it in a case-by-case basis. What can you do? Answer: ema

Re: How to select a folder with native windows dialog box?

2006-06-14 Thread flaus . a
Thanks for your answer, it's working fine! For information, the function to use to get the pathName is shell.SHGetPathFromIDList It returns an error if you select a special folder (!?!?) but otherwise it's working fine... And I was unable to fix this issue. -- http://mail.python.org/mailman/list

Re: Earthquake and Tornado Forecasting Programs June 13, 2006

2006-06-14 Thread Aidan Karley
In article <[EMAIL PROTECTED]>, CBFalconer wrote: > Oh for a newsreader that can eliminate all such ugly excessively > cross-posted articles lacking follow-ups. PLONK thread is the only > remaining answer. > See my reply posted to alt.disasters.misc and sci.geo.earthquakes for an alternati

Re: wxPython, tree Control text cutoff

2006-06-14 Thread jean-michel bain-cornu
Kiran a écrit : > Hello all, > I am using a tree to display stuff, and it is constantly updated, but > what I have noticed is in the lowest level, there is clearly noticable > cutoff of the text I place there. The cutoff is existent even if I do > not update the text inside the tree constantly. It

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Pascal Bourguignon
Joachim Durchholz <[EMAIL PROTECTED]> writes: > Raffael Cavallaro schrieb: >> a program which would be perfectly permissible in a dynamically >> typed language such as common lisp - for example - heterogeneous >> lists and forward references to as yet non-existent functions. > > Um... heterogenous

memory leak problem with arrays

2006-06-14 Thread sonjaa
Hi I'm new to programming in python and I hope that this is the problem. I've created a cellular automata program in python with the numpy array extensions. After each cycle/iteration the memory used to examine and change the array as determined by the transition rules is never freed. I've tried

Re: prog1 | prog2 . How not to make prog2 block if not piped?

2006-06-14 Thread Steve Holden
imcs ee wrote: > yeah, forget my post ,it;s useless. > sorry for my thoughtless > On 14 Jun 2006 10:40:15 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >>imcs ee ha scritto: >> >> >>>do u really need read something even when you run the scripts2.py directly? >>>why not just change script2.

Question about the Exception class

2006-06-14 Thread Carl J. Van Arsdall
So this is probably a fairly basic question, but help me out because I'm just not lining things up and I'm somewhat new to the world of exception handling. What's the benefit to inheriting an exception from and of the available parent exception classes? Does one subclass have benefits over any

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Pascal Costanza
Torben Ægidius Mogensen wrote: > On a similar note, is a statically typed langauge more or less > expressive than a dynamically typed language? Some would say less, as > you can write programs in a dynamically typed language that you can't > compile in a statically typed language (without a lot o

Re: better Python IDE? Mimics Maya's script editor?

2006-06-14 Thread Steve Holden
warpcat wrote: > I'm not sure where you got "pythonwin sucks" from my text (none of > those words are there). Saying one aspect of a piece of software is > clunky to "me" (if that's what you're refering too?) or saying the > whole software "sucks" are pretty different IMO. All I stated is that >

Re: "groupby" is brilliant!

2006-06-14 Thread James Stroud
Alex Martelli wrote: > James Stroud <[EMAIL PROTECTED]> wrote: >... > >>def doit(rows, doers, i=0): >> for r, alist in groupby(rows, itemgetter(i)): >> if len(doers) > 1: >> doit(alist, doers[1:], i+1) >> doers[0](r) > > > Isn't this making N useless slices (thus copies, for

Re: determining file type

2006-06-14 Thread utabintarbo
http://www.demonseed.net/~jp/code/magic.py -- http://mail.python.org/mailman/listinfo/python-list

Re: better Python IDE? Mimics Maya's script editor?

2006-06-14 Thread warpcat
I'm not sure where you got "pythonwin sucks" from my text (none of those words are there). Saying one aspect of a piece of software is clunky to "me" (if that's what you're refering too?) or saying the whole software "sucks" are pretty different IMO. All I stated is that it's very different from

Re: "groupby" is brilliant!

2006-06-14 Thread James Stroud
Alex Martelli wrote: > James Stroud <[EMAIL PROTECTED]> wrote: >... > >>def doit(rows, doers, i=0): >> for r, alist in groupby(rows, itemgetter(i)): >> if len(doers) > 1: >> doit(alist, doers[1:], i+1) >> doers[0](r) > > > Isn't this making N useless slices (thus copies, for

python-list@python.org Removed

2006-06-14 Thread Gary M. Gordon
We are sorry to see you leaving Gary M. Gordon, LLC! You will not receive news and information about Gary M. Gordon, LLC anymore. -- If you ever want to join Gary M. Gordon, LLC again, simply visit: http://www.garymgordon.com/easylis

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Joachim Durchholz
Rob Thorpe schrieb: > > If a language can express constraints of one kind that is an increase > in expressiveness. Agreed. > If a language requires constraint to be in one particular way thats a > decrease in expressiveness. Unless alternatives would be redundant. Having redundant ways to expre

wxPython, tree Control text cutoff

2006-06-14 Thread Kiran
Hello all, I am using a tree to display stuff, and it is constantly updated, but what I have noticed is in the lowest level, there is clearly noticable cutoff of the text I place there. The cutoff is existent even if I do not update the text inside the tree constantly. It seems that the text is ha

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Joachim Durchholz
Raffael Cavallaro schrieb: > On 2006-06-14 09:42:25 -0400, [EMAIL PROTECTED] (Torben Ægidius > Mogensen) said: > >> It takes longer for the average >> programmer to get the program working in the dynamically typed >> language. > > Though I agree with much of your post I would say that many here

Re: What is Expressiveness in a Computer Language

2006-06-14 Thread Joachim Durchholz
Torben Ægidius Mogensen schrieb: > For example, > if you have to code everything as natural numbers, untyped pure lambda > calculus or S-expressions, there is a good chance that you can get > nonsense past the compiler. Also past peer review and/or debugging runs. And, most importantly, past your

Simple Char-I/O Dialogs for Win32 and DOS

2006-06-14 Thread Mr Roboto
Folks: I've already searched the group and have determined there *are* char I/O based input systems, ala NCURSES, that are Python-compatible (ie. PyNCurses, UrWid, etc.) What I *need* is something that does simple dialogs under char-I/O Win32 and DOS w/ very little fuss or muss. At most, I need

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Simon Brunning
On 14 Jun 2006 10:33:21 -0700, Sébastien Boisgérault <[EMAIL PROTECTED]> wrote: > Jeez, 12 posts in this IEEE 754 thread, and still > no message from uncle timmy ? ;) Somebody reboot the timbot, please. Seems to have hung. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simo

Re: Correctly reading stdout/stderr from subprocess

2006-06-14 Thread Christoph Haas
On Wed, Jun 14, 2006 at 03:56:16PM +0200, Maric Michaud wrote: > I did it just to validate my point and because i don't use threads very often > in python, some exercises can't hurt :) Since you are familiar with threads I believe that my excercises are a tad bit more low-level compared to yours

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Gary Herron <[EMAIL PROTECTED]> writes: |> |> The IEEE standard specifies (plus or minus) infinity as the result of |> division by zero. This makes sense since such is the limit of division |> by a quantity that goes to zero. The IEEE standard then goes on to |>

Re: prog1 | prog2 . How not to make prog2 block if not piped?

2006-06-14 Thread imcs ee
yeah, forget my post ,it;s useless. sorry for my thoughtless On 14 Jun 2006 10:40:15 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > imcs ee ha scritto: > > > do u really need read something even when you run the scripts2.py directly? > > why not just change script2.py to > > #script2.py >

Re: prog1 | prog2 . How not to make prog2 block if not piped?

2006-06-14 Thread riquito
imcs ee ha scritto: > do u really need read something even when you run the scripts2.py directly? > why not just change script2.py to > #script2.py > if __name__ == "__main__": > x=sys.stdin.read() > print 'passed' > else: > print 'passed from else branch' > > is it what you want? o

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Sébastien Boisgérault
Jeez, 12 posts in this IEEE 754 thread, and still no message from uncle timmy ? ;) Please, we need enlightenment here and *now* :) platform-dependent accident'ly yours, SB -- http://mail.python.org/mailman/listinfo/python-list

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Grant Edwards
On 2006-06-14, Christophe <[EMAIL PROTECTED]> wrote: The division by zero trap is really annoying. In my world the right thing to do is to return Inf. >>> >>>Your world is flawed then, this is a big mistake. NaN is the >>>only aceptable return value for a division by zero. >> >> You're p

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Scott David Daniels <[EMAIL PROTECTED]> writes: |> Grant Edwards wrote: |> |> > While you're at it, the pickle modules need to be fixed so they |> > support NaN and Inf. ;) |> |> The NaN problem is portability -- NaN values are not standard, and |> pretending they

Re: Trace KeyboardInterrupt exception?

2006-06-14 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > Tony Nelson wrote: > > I'm trying to find out what is eating some KeyboardInterrupt exceptions > > in a fairly large program (yum). My KeyboardInterrupt handler is called > > for some Ctl-C presses, but for others nothing seems to happen

Re: prog1 | prog2 . How not to make prog2 block if not piped?

2006-06-14 Thread imcs ee
do u really need read something even when you run the scripts2.py directly? why not just change script2.py to #script2.py if __name__ == "__main__": x=sys.stdin.read() print 'passed' else: print 'passed from else branch' is it what you want? or anything i misunderstand. On 14 Jun 20

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Nick Maclaren
In article <[EMAIL PROTECTED]>, Gary Herron <[EMAIL PROTECTED]> writes: |> Christophe wrote: |> > Grant Edwards a =E9crit : |> > |> >> The division by zero trap is really annoying. In my world the |> >> right thing to do is to return Inf. |> > |> > Your world is flawed then, this is a big mistake

Re: wxpython: how do i write this without the id parameter?

2006-06-14 Thread Scott David Daniels
John Salerno wrote: > Scott David Daniels wrote: > >> class InputForm(wx.Frame): >> def __init__(self, parent=None, id=-1, title=__file__): > > Also, is there a way to define parent and id with defaults, but not > title? Is it good to change the order around to do this? No, too many things k

Re: convert floats to their 4 byte representation

2006-06-14 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, godavemon <[EMAIL PROTECTED]> wrote: >I've been a member for a while but I had no idea how helpful this form >is. I had a one hour meeting and when I came back there were 4 >replies. Thanks for your help! > > >Scott David Daniels wrote: >> godavemon wrote: >> > I n

Re: Python Help

2006-06-14 Thread Tim Chase
> I have recently downloaded Python 2.4.3 on Windows XP. The > program does not recongnize when I type in python:" name > 'python' is not defined". Please tell me how to correct this. Sounds like you don't have it in your path. In XP, use Win+Break to pull up your system properties (the same as

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Christophe
Grant Edwards a écrit : > On 2006-06-14, Christophe <[EMAIL PROTECTED]> wrote: > >>Grant Edwards a écrit : >> >>>The division by zero trap is really annoying. In my world the >>>right thing to do is to return Inf. >> >>Your world is flawed then, this is a big mistake. NaN is the >>only aceptable

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Gary Herron
Christophe wrote: > Grant Edwards a écrit : > >> The division by zero trap is really annoying. In my world the >> right thing to do is to return Inf. >> > > Your world is flawed then, this is a big mistake. NaN is the only > aceptable return value for a division by zero. > Sorry, but t

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Grant Edwards
On 2006-06-14, Scott David Daniels <[EMAIL PROTECTED]> wrote: > Grant Edwards wrote: > >> While you're at it, the pickle modules need to be fixed so they >> support NaN and Inf. ;) > The NaN problem is portability -- NaN values are not standard, My copy of IEEE 754 defines them quite precisely. :

Re: Numerics, NaNs, IEEE 754 and C99

2006-06-14 Thread Grant Edwards
On 2006-06-14, Christophe <[EMAIL PROTECTED]> wrote: > Grant Edwards a écrit : >> The division by zero trap is really annoying. In my world the >> right thing to do is to return Inf. > > Your world is flawed then, this is a big mistake. NaN is the > only aceptable return value for a division by ze

  1   2   >