Re: Hack with os.walk()

2005-02-12 Thread Michael Spencer
Frans Englich wrote: Hello, Have a look at this recursive function: def walkDirectory( directory, element ): element = element.newChild( None, "directory", None ) # automatically appends to parent element.setProp( "name", os.path.basename(directory)) for root, dirs, files in os.walk(

Re: Commerical graphing packages?

2005-02-12 Thread 18k11tm001
>If you're generating lots of graphs programatically, eg. on a web >server, grace is not what you want. Yes, it has a command language, >but IIRC it depends on X11, and windows even pop up as it runs in >batch mode. Bleh. I don't understand what you're talking about. I've been using GRACE in bat

Re: Alternative to raw_input ?

2005-02-12 Thread BOOGIEMAN
On Fri, 11 Feb 2005 21:38:47 -0500, Peter Hansen wrote: > print prompt > while msvcrt.kbhit(): > msvcrt.getch() > msvcrt.getch() Thanks, it works but without line "print prompt" and also I'm not sure if I should put this function : def cekaj(): while msvcrt.kbhit(): msvcrt.getch

tk resource file for geometry?

2005-02-12 Thread Gabriel B.
i'm using almost every widget property from my pyTk programs in the form of resources, like: self.tk.option_add ( "*InputClass*background", "White" ) In the widget creation i have only the Class and the Command attribute, but i'm having to add some tk options to the geometry method, in the case,

For American numbers

2005-02-12 Thread Scott David Daniels
Kind of fun exercise (no good for British English). def units(value, units='bytes'): magnitude = abs(value) if magnitude >= 1000: for prefix in ['kilo mega giga tera peta ' 'exa zetta yotta').split(): magnitude /= 1000.

Re: multi threading in multi processor (computer)

2005-02-12 Thread Paul Rubin
John Lenton <[EMAIL PROTECTED]> writes: > and buying more, cheap computers gives you more processing power than > buying less, multi-processor computers. The day is coming when even cheap computers have multiple cpu's. See hyperthreading and the coming multi-core P4's, and the finally announced C

Re: [EVALUATION] - E01: The Java Failure - May Python Helps?

2005-02-12 Thread Steve Holden
Ilias Lazaridis wrote: Ilias Lazaridis wrote: [...] My question is essentially: How many of those constructs are already supported by python (and the surrounding open-source-projects): http://lazaridis.com/case/stack/index.html [...] The Signal/Noise ratio of this thread was very disapointing to

exec function

2005-02-12 Thread [EMAIL PROTECTED]
I'm a newbie to pthyon and I am creating an app with wxPython. I have 7 tables (more on the way... they are feed from a database) that need to be formatted in a certain way (DataTable() does this) and I am just looking for a cleaner way to pass all of the Grids (grid_1, grid_2, etc) through the sam

Re: multi threading in multi processor (computer)

2005-02-12 Thread Irmen de Jong
Paul Rubin wrote: John Lenton <[EMAIL PROTECTED]> writes: and buying more, cheap computers gives you more processing power than buying less, multi-processor computers. The day is coming when even cheap computers have multiple cpu's. See hyperthreading and the coming multi-core P4's, and the final

Re: exec function

2005-02-12 Thread Jeff Epler
In this case, you can use getattr() instead of the exec statement: getattr(self.frame, t).SetTable(DataTable(d, r[0]), True) Jeff pgp6KrffC7xJf.pgp Description: PGP signature -- http://mail.python.org/mailman/listinfo/python-list

Re: [PATCH] Re: frozenset() without arguments should return a singleton

2005-02-12 Thread Stefan Behnel
Raymond Hettinger wrote: >Stefan Behnel wrote: I stumbled over the fact that 'frozenset()' doesn't return a constant but creates a new object everytime. Since it is immutable, I wrote to c.l.py that this behaviour is different from what tuple() & Co do. It is not quite correct to say that this i

Re: Python in EDA

2005-02-12 Thread George Sakkis
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I am new to Python and coming from the EDA/VLSI Design background. > > I wanted to know if there are some active projects going on EDA modules > written in Python. > > Usually, use of scripting tools in VLSI Design is on a per-pr

Re: Commerical graphing packages?

2005-02-12 Thread Erik Johnson
Thank you both for your input. I will check them out. :) -ej -- http://mail.python.org/mailman/listinfo/python-list

Re: dos box appears when clicking .pyc

2005-02-12 Thread Peter Hansen
Larry Bates wrote: Change the association for .pyc files to pythonw.exe from python.exe. This might help further (taken from a properly configured machine): c:\>assoc .pyc .pyc=Python.CompiledFile c:\>ftype Python.CompiledFile Python.CompiledFile="C:\a\python24\python.exe" "%1" %* c:\>assoc .pyw .p

Re: Big development in the GUI realm

2005-02-12 Thread Arich Chanachai
Robert Kern wrote: Arich Chanachai wrote: > I have never seen a commercial license for a library which stated that you did not have to pay the license fee until you have made that much money in sales from the software which you created, in part, from that library. I would be in favor of such a

Re: Big development in the GUI realm

2005-02-12 Thread Arich Chanachai
Jorge Luiz Godoy Filho wrote: Max M wrote: GPL is not suitable for all kinds of software. It's nice if you are sharing code with others, but if you are developing something like a desktop application that you want to sell for money, using the GPL is a bad idea. If you're earning money, why

Re: Big development in the GUI realm

2005-02-12 Thread Jeremy Bowers
On Fri, 11 Feb 2005 14:45:09 -0800, Robert Kern wrote: > Until such matters are unequivocally determined in a court that has > jurisdiction over you, do you really want to open yourself to legal risk > and certain ill-will from the community? Huh? What are you talking about? I'm just pointing out

kerberos extension module

2005-02-12 Thread Michael Ströder
John Reuning wrote: I'm interested in updating the very old kerberos extension module. [..] http://www.python.org/ftp/python/contrib-09- Dec-1999/System/krb5module-0.1.tar.gz http://www.python.org/ftp/python/contrib-09- Dec-1999/System/krb5module.README Will it build against heimdal or is this modu

Trouble using telentlib

2005-02-12 Thread Nitin Chaumal
I sarched the existing threads but didnt find an answer to this. I am writing simple script which uses telentlib to open a session with a unix machine and run "tail -f logfile.txt" on one of the logfiles. import telnetlib HOST = "192.X.X.X" user = "myname" password = "mypass" tn = telnetlib.Tel

Re: goto, cls, wait commands

2005-02-12 Thread Fredrik Lundh
"jean-michel" <[EMAIL PROTECTED]> wrote: > And it was not possible to remove GOTO, because that would really need > to rewrite manually the programs really? converting GOTO messes to structured programs has been a solved problem for many years (you can buy commercial products that does this, and

Re: check if object is number

2005-02-12 Thread Steven Bethard
Peter Hansen wrote: Of course, most of the other definitions of "is a number" that have been posted may likewise fail (defined as not doing what the OP would have wanted, in this case) with a numarray arange. Or maybe not. (Pretty much all of them will call an arange a number... would the OP's fun

Re: listerator clonage

2005-02-12 Thread Raymond Hettinger
[Cyril BAZIN] > I want to build a function which return values which appear two or > more times in a list: > > So, I decided to write a little example which doesn't work: > #l = [1, 7, 3, 4, 3, 2, 1] > #i = iter(l) > #for x in i: > #j = iter(i) > #for y in j: > #if x == y: > #

Re: Testing web applications

2005-02-12 Thread richard
John J. Lee wrote: >> > I'm looking for frameworks to make testing web applications - > > Did you read the question? To answer the original question, which I did not see when first posted: http://www.mechanicalcat.net/tech/webunit/ Richard -- http://mail.python.org/mailman/listinfo/pytho

Re: Unittesting for web applications

2005-02-12 Thread richard
Sandip Bhattacharya wrote: > Can someone suggest me some good resources for learning how to use > unittests for web applications? Do we always have to cook up our own > webpage scrapers to test the code? http://www.mechanicalcat.net/tech/webunit/ Richard -- http://mail.python.org/mailman/l

Re: Hack with os.walk()

2005-02-12 Thread Fernando Perez
Michael Spencer wrote: > The path module by Jorendorff: http://www.jorendorff.com/articles/python/path/ > > wraps various os functions into an interface that can make this sort of thing > cleaner Wow, many thanks for the pointer. This has to be one of the single most useful small python modules

Re: Assigning to self

2005-02-12 Thread top
Jeff Shannon wrote: > class __Foo: > "I am a singleton!" > pass > > def Foo(foo_obj = __Foo()): > assert isinstance(foo_obj, __Foo > return foo_obj this is a bit simpler, I think, and takes advantage from Python's free name-rebinding. class Singleton(object): def __call__(s

Re: check if object is number

2005-02-12 Thread Michael Spencer
Steven Bethard wrote: Peter Hansen wrote: Of course, most of the other definitions of "is a number" that have been posted may likewise fail (defined as not doing what the OP would have wanted, in this case) with a numarray arange. Or maybe not. (Pretty much all of them will call an arange a number

Re: exec function

2005-02-12 Thread tertius
[EMAIL PROTECTED] wrote: I'm a newbie to pthyon and I am creating an app with wxPython. I have 7 tables (more on the way... they are feed from a database) that need to be formatted in a certain way (DataTable() does this) and I am just looking for a cleaner way to pass all of the Grids (grid_1, gri

Re: [PATCH] Re: frozenset() without arguments should return a singleton

2005-02-12 Thread Jp Calderone
On Sat, 12 Feb 2005 23:21:58 +0100, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > > Raymond Hettinger wrote: > >Stefan Behnel wrote: > >>I stumbled over the fact that 'frozenset()' doesn't return a constant but > >>creates a new object everytime. Since it is immutable, I wrote to c.l.py > >>that

Text files read multiple files into single file, and then recreate the multiple files

2005-02-12 Thread googlinggoogler
Hiya, The title says it all really, but im a newbie to python sort of. I can read in files and write files no probs. But what I want to do is read in a couple of files and output them to one single file, but then be able to take this one single file and recreate the files I put into it. Im reall

Re: Hack with os.walk()

2005-02-12 Thread Robert Kern
Fernando Perez wrote: Perhaps this path.py could be considered for inclusion in the stdlib? I've only read the page linked above, so perhaps it can use some polishing. But it certainly looks like a big improvement over the scatterblast which the stdlib is on this particular topic. I'm pretty sure

Re: exec function

2005-02-12 Thread scott m
Thanks, both of these examples will help me clean my code and improve it. Scott -- http://mail.python.org/mailman/listinfo/python-list

Re: Text files read multiple files into single file, and then recreate the multiple files

2005-02-12 Thread Irmen de Jong
[EMAIL PROTECTED] wrote: Hiya, The title says it all really, but im a newbie to python sort of. I can read in files and write files no probs. But what I want to do is read in a couple of files and output them to one single file, but then be able to take this one single file and recreate the files I

Re: check if object is number

2005-02-12 Thread Steven Bethard
Michael Spencer wrote: Steven Bethard wrote: Peter Hansen wrote: Of course, most of the other definitions of "is a number" that have been posted may likewise fail (defined as not doing what the OP would have wanted, in this case) with a numarray arange. How about explicitly calling an adapter in yo

Re: Text files read multiple files into single file, and then recreate the multiple files

2005-02-12 Thread googlinggoogler
Would like to use text files, its really for my own learning, but I suppose a Zip would work cheers -- http://mail.python.org/mailman/listinfo/python-list

Re: Hack with os.walk()

2005-02-12 Thread Fernando Perez
Robert Kern wrote: > Fernando Perez wrote: > >> Perhaps this path.py could be considered for inclusion in the stdlib? I've >> only >> read the page linked above, so perhaps it can use some polishing. But it >> certainly looks like a big improvement over the scatterblast which the stdlib >> is o

Re: check if object is number

2005-02-12 Thread Michael Spencer
Steven Bethard wrote: Michael Spencer wrote: Steven Bethard wrote: Peter Hansen wrote: Of course, most of the other definitions of "is a number" that have been posted may likewise fail (defined as not doing what the OP would have wanted, in this case) with a numarray arange. How about explicitly c

Re: Hack with os.walk()

2005-02-12 Thread Tim Peters
[Frans Englich] ... > My problem, AFAICT, with using os.walk() the usual way, is that in order to > construct the /hierarchial/ XML document, I need to be aware of the directory > depth, and a recursive function handles that nicely; os.walk() simply > concentrates on figuring out paths to all files

Re: deepcopy chokes with TypeError on dynamically assigned instance method

2005-02-12 Thread @t comcast d.t net
On Fri, 11 Feb 2005 21:22:35 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: > >Interesting. The problem appears to be that bound methods are not copyable: > Curiosity got the better of me and I started diggin about in copy.py. Turns out that return values of reductors for functions don't include

Kill GIL (was Re: multi threading in multi processor (computer))

2005-02-12 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > >The day is coming when even cheap computers have multiple cpu's. >See hyperthreading and the coming multi-core P4's, and the finally >announced Cell processor. > >Conclusion: the GIL must die. It's not clear to what e

Re: [PATCH] Re: frozenset() without arguments should return a singleton

2005-02-12 Thread Raymond Hettinger
> > It is not quite correct to say that this is what all immutables do: > > > >.>>>x = 500 > >.>>>y = 600 - 100 > >.>>>x is y > > False > > I know. The same is true for concateneted strings, etc. But whenever an > immutable object is created directly ('by hand'), it holds. It also holds, > btw, for

help please

2005-02-12 Thread gargonx
would anyone like to help to fugure out this problem i'm having here's a portion of my code: """ I have three dictionaries along with this(you can probally spot what they are), but just in case here are some testers: """ std = { "b":"bo" } ext = { "aa":"i" } punc = { ",":"!"

Re: goto, cls, wait commands

2005-02-12 Thread Mike Meyer
Alan Kennedy <[EMAIL PROTECTED]> writes: >> Secondly, how do I clear screen (cls) from text and other content ? > > That depends on > > A: What type of display device you're using > B: What type of interface is being rendered on that display (command > line, GUI, IDE, etc) > C: Perhaps what operati

Re: help please

2005-02-12 Thread Erik Max Francis
[EMAIL PROTECTED] wrote: UnboundLocalError: local variable 't2' referenced before assignment ... t2="" def Proc(text): # "text" is some random text or use OrigText for word in text: for letter in word: if letter in std.keys(): letter=std[letter]

Why Tk treat F10, F11, F12 diferently from F1...F9?

2005-02-12 Thread Gabriel B.
This is completely odd to me... # Bind F1...F12 to <> self.tk.event_add( '<>', # keys used to switch between the tabs '','','','','', '','','','','', '','' ) self.master.bind_all('<>', self.__functionKeysPressed ) def __functionKeysPressed(self, event): print e

Re: help please

2005-02-12 Thread Steven Bethard
[EMAIL PROTECTED] wrote: t2="" def Proc(text): # "text" is some random text or use OrigText for word in text: for letter in word: if letter in std.keys(): letter=std[letter] t2=t2+letter # the problem is referene to this elif lett

Re: help please

2005-02-12 Thread Steven Bethard
Erik Max Francis wrote: [EMAIL PROTECTED] wrote: UnboundLocalError: local variable 't2' referenced before assignment ... t2="" def Proc(text): # "text" is some random text or use OrigText ... The fix is to declare t2 global at the top of Proc: def Proc(text): global t2 .

Re: PyINI : Cross-Platform INI parser

2005-02-12 Thread Giovanni Bajo
Thomas Heller wrote: >>> I have released a simple alpha version, which can read *.ini, with >>> some extended features such as "key=value1,value2,value3". I also >>> made a c++ binding to PyINI with elmer toolkit. >> >> >> The most useful feature would be to be able to write INI files back >> with

Re: help please

2005-02-12 Thread [EMAIL PROTECTED]
add just below the procedure declaration 'global t2' as you're referring to a global variable ... -- http://mail.python.org/mailman/listinfo/python-list

Re: Hack with os.walk()

2005-02-12 Thread Michael Spencer
Tim Peters wrote: [Frans Englich] ... [snip] class HasPath: def __init__(self, path): self.path = path def __lt__(self, other): return self.path < other.path class Directory(HasPath): def __init__(self, path): HasPath.__init__(self, path) self.files = []

Re: Kill GIL (was Re: multi threading in multi processor (computer))

2005-02-12 Thread Jack Diederich
On Sat, Feb 12, 2005 at 07:13:17PM -0500, Aahz wrote: > In article <[EMAIL PROTECTED]>, > Paul Rubin wrote: > > > >The day is coming when even cheap computers have multiple cpu's. > >See hyperthreading and the coming multi-core P4's, and the finally > >announced Cell pro

Re: Iterate through dictionary of file objects and file names

2005-02-12 Thread jfj
Brian Beck wrote: print "Closed: %s" % fileName Call me a pedant, but what'd wrong with: print 'closed: ' + filename or print 'closed:', filename ? Modulus operator good but don't over-use it. Otherwise, bad style. jfj -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterate through dictionary of file objects and file names

2005-02-12 Thread Julian Yap
Brian Beck wrote: File objects as keys sounds pretty dangerous. I'm curious why the first thought that popped into your head wasn't using the file NAMES as keys instead? Here's my go at it. (Is Google Groups nice to indentation using spaces? I can't remember.) optionalFiles = dict.fromkeys(['ar

Re: THREAD_STACK_SIZE and python performance?

2005-02-12 Thread jfj
Stein Morten Sandbech wrote: The FreeBSD patch, setting the value to 0x10 seems to be enough for most of our zope servers, however, I've noticed that we get an occasional server death even with this value. This is on normal load, but handling many and large CMS operations in zope/plone. Just cu

Re: Why Tk treat F10, F11, F12 diferently from F1...F9?

2005-02-12 Thread Jeff Epler
The reason that F10 does nothing is because there is already a binding on all for . In Motif apps, F10 moves focus to the menu bar, like pressing and releasing Alt does on Windows. When there is a binding for a key, the handling of the event "event add" never takes place. If you want to get rid

Re: a sequence question

2005-02-12 Thread Nick Coghlan
David Isaac wrote: "Nick Coghlan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] A bug report on Sourceforge would help in getting the problem fixed for the 2.5 docs Done. Bug 1121416, for anyone else interested. Looks Raymond agrees with me about the left-to-right evaluation of iter

Re: deepcopy chokes with TypeError on dynamically assigned instance method

2005-02-12 Thread Nick Coghlan
"@t comcast d.t net <"@bag.python.org wrote: As an aside, what is the tuple returned by a reductor called? What are its components called? Ya got me. Alex might have a name for it :) >Normally, the methods live in the class dictionary, so they don't cause a >problem with copying the instance.

Re: Alternative to raw_input ?

2005-02-12 Thread Nick Coghlan
BOOGIEMAN wrote: On Fri, 11 Feb 2005 21:38:47 -0500, Peter Hansen wrote: print prompt while msvcrt.kbhit(): msvcrt.getch() msvcrt.getch() Thanks, it works but without line "print prompt" and also I'm not sure if I should put this function : def cekaj(): while msvcrt.kbhit(): msvcr

Re: Why Tk treat F10, F11, F12 diferently from F1...F9?

2005-02-12 Thread Gabriel B.
On Sat, 12 Feb 2005 19:44:25 -0600, Jeff Epler <[EMAIL PROTECTED]> wrote: > The reason that F10 does nothing is because there is already a binding > on all for . [...] > If you want to get rid of this binding, you would do it with something > like > w.bind_all("", "") > for some widget w. That

Re: help please

2005-02-12 Thread gargonx
This works much better, aside from the fact that it does'nt work for the std dictionary. the letters used from here stay the same. that dictionary looks like this: std = { "A":"Z", "Z":"A", "B":"Y", "Y":"B", "C":"X", "X":"C", "E":"V", "V":"E", "H":"S", "S":"

Re: help please

2005-02-12 Thread gargonx
Thanks that works very well -- http://mail.python.org/mailman/listinfo/python-list

Re: For American numbers

2005-02-12 Thread python
Scott David Daniels wrote: > Kind of fun exercise (no good for British English). > > def units(value, units='bytes'): > magnitude = abs(value) > if magnitude >= 1000: > for prefix in ['kilo mega giga tera peta ' > 'exa zetta yotta').s

Re: Kill GIL (was Re: multi threading in multi processor (computer))

2005-02-12 Thread Courageous
>Killing the GIL is proposing a silver bullet where there is no werewolf-ly, About the only reason for killing the GIL is /us/. We, purists, pythonistas, language nuts, or what not, who for some reason or other simply hate the idea of the GIL. I'd view it as an artistic desire, unurgent, somethin

Re: Iterate through dictionary of file objects and file names

2005-02-12 Thread Brian Beck
jfj wrote: Call me a pedant, but what'd wrong with: print 'closed: ' + filename or print 'closed:', filename ? I always figure that debug-oriented output like that in example code is very likely to be changed in format, or to include more information, by the person actually using it. So s

Re: Testing conditions.

2005-02-12 Thread Ray Gibbon
> Testing conditions. > All replies - Spot on! Much appreciated, apology for delay. Ray. -- http://mail.python.org/mailman/listinfo/python-list

Re: SCons build tool speed

2005-02-12 Thread Christopher De Vries
On Sat, Feb 12, 2005 at 07:16:02PM +, ted wrote: > How does the speed of the Scons build tool compare with Ant? I would recommend asking this question on [EMAIL PROTECTED] , but my impressions is that most of the time is probably spent in the compiler. If you are working on a java project you

Re: Alternative to raw_input ?

2005-02-12 Thread Peter Hansen
BOOGIEMAN wrote: On Fri, 11 Feb 2005 21:38:47 -0500, Peter Hansen wrote: print prompt while msvcrt.kbhit(): msvcrt.getch() msvcrt.getch() Thanks, it works but without line "print prompt" and also That was intended to be a hint that you might need to print a prompt to the user (maybe a string c

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-12 Thread Nick Coghlan
Yeah, talking to myself again. I had a couple of further thoughts on how to do things in an inheritance friendly way. . . Firstly, for Namespaces handling of special names, I think it would be good to make it easy for subclasses to change the sets of names that are handled using either Namespac

Re: SCons build tool speed

2005-02-12 Thread Peter Hansen
ted wrote: How does the speed of the Scons build tool compare with Ant? Right now with out Ant builds take around an hour. Hoping to speed that up. Don't tools like Scons, Ant, and for that matter "make" just execute other programs? So that 99% of the time is consumed external to the Scons, Ant,

Re: For American numbers

2005-02-12 Thread Peter Hansen
Scott David Daniels wrote: Kind of fun exercise (no good for British English). def units(value, units='bytes'): magnitude = abs(value) if magnitude >= 1000: for prefix in ['kilo mega giga tera peta ' 'exa zetta yotta').split():

Re: Text files read multiple files into single file, and then recreate the multiple files

2005-02-12 Thread Mike Meyer
[EMAIL PROTECTED] writes: > Would like to use text files, its really for my own learning, > > but I suppose a Zip would work How about outputing a file as: LENGTH=## in your joined file? That's a minimalistic archive format - one ASCII header line that provides just enough information to

Re: help please

2005-02-12 Thread Peter Hansen
[EMAIL PROTECTED] wrote: add just below the procedure declaration 'global t2' as you're referring to a global variable ... More specifically, *modifying* it. Just referring to it doesn't require a "global" declaration... -Peter -- http://mail.python.org/mailman/listinfo/python-list

Re: Kill GIL

2005-02-12 Thread Mike Meyer
Jack Diederich <[EMAIL PROTECTED]> writes: > From reading this > thread every couple months on c.l.py for the last few years it is my > opinion that the number of people who think threading is the only solution > to their problem greatly outnumber the number of people who actually have > such a

Re: For American numbers

2005-02-12 Thread Nick Coghlan
Scott David Daniels wrote: Kind of fun exercise (no good for British English). def units(value, units='bytes'): magnitude = abs(value) if magnitude >= 1000: for prefix in : magnitude /= 1000. if magnitude < 1000.: b

Re: SCons build tool speed

2005-02-12 Thread Mike Meyer
Peter Hansen <[EMAIL PROTECTED]> writes: > ted wrote: >> How does the speed of the Scons build tool compare with Ant? Right >> now with out Ant builds take around an hour. Hoping to speed that up. > > Don't tools like Scons, Ant, and for that matter "make" just > execute other programs? So that 9

Re: For American numbers

2005-02-12 Thread Nick Coghlan
Peter Hansen wrote: Only for hard drive manufacturers, perhaps. For the rest of the computer world, unless I've missed a changing of the guard or something, "kilo" is 1024 and "mega" is 1024*1024 and so forth... Given that there are perfectly good ISO prefixes for the multiples of 2**10, I don't s

Re: Kill GIL

2005-02-12 Thread Courageous
>Here here. I find that threading typically introduces worse problems >than it purports to solve. I recently worked on a software effort, arguably one of the most important software efforts in existence, in which individuals responsible for critical performance of the application threw arbitraril

writing unicode apps in python - some beginner questions.

2005-02-12 Thread WX
I love Python, and the unicode support is wonderful. The character set I am using is the Hindi/Devanagari character set at unicode range U+901.) I have TWO newbie questions: (#1) If I paste some unicode stuff from the clipboard into IDLE, it accepts it, but it can't execute a PRINT command like

Considering python - have a few questions.

2005-02-12 Thread Heather Stovold
Hi all... I am looking at writing a little program for my own use, and probably for a bunch of other people too, and I am trying to decide what would be the best language to use. I am a "retired" programmer, that started in the DOS world. (Well, I guess I started pre-DOS...). I learned C++ (for

Re: namespaces module (a.k.a. bunch, struct, generic object, etc.) PEP

2005-02-12 Thread Nick Coghlan
Nick Coghlan wrote: class Namespace(object): # etc def _update_dict(self, other): for k in other: setattr(self, k, other[k]) This doesn't work, as it doesn't allow the sequence of 2-tuples. So I copied the relevant check for a keys() attribute from d

Re: Considering python - have a few questions.

2005-02-12 Thread Benji York
Heather Stovold wrote: I need to make a GUI interface. There are many to choose from. I prefer wxPython (wxpython.org). It is portable, has native look-and-feel, comes with good documentation and an excellent demo application. I would really love it to be able to also be able to be run on the int

Re: Kill GIL

2005-02-12 Thread Nick Coghlan
Mike Meyer wrote: Jack Diederich <[EMAIL PROTECTED]> writes: From reading this thread every couple months on c.l.py for the last few years it is my opinion that the number of people who think threading is the only solution to their problem greatly outnumber the number of people who actually have

Re: For American numbers

2005-02-12 Thread Roel Schroeven
Peter Hansen wrote: Scott David Daniels wrote: Kind of fun exercise (no good for British English). def units(value, units='bytes'): magnitude = abs(value) if magnitude >= 1000: for prefix in ['kilo mega giga tera peta ' 'exa zetta yotta').s

Re: Kill GIL

2005-02-12 Thread Aahz
In article <[EMAIL PROTECTED]>, Mike Meyer <[EMAIL PROTECTED]> wrote: > >Here here. I find that threading typically introduces worse problems >than it purports to solve. Depends what you're trying to do with threads. Threads are definitely a good technique for managing long-running work in a GUI

Re: For American numbers

2005-02-12 Thread Pierre Hanser
Peter Hansen wrote: Scott David Daniels wrote: Kind of fun exercise (no good for British English). def units(value, units='bytes'): magnitude = abs(value) if magnitude >= 1000: for prefix in ['kilo mega giga tera peta ' 'exa zetta yotta').s

<    1   2