HOW do you stop a print???

2005-11-13 Thread john boy
ok...I am running the following program:   def printMultiples (n): i = 1 while i <= 6:  print n*i,   ' \t ', i = i + 1 i = 1 while i <= 6: printMultiples(i) i = i + 1   this is supposed to return a simple multiplication table, but for some reason it does not want to s

Re: Abstract Base Classes

2005-11-13 Thread Steven D'Aprano
Ben Finney wrote: > Ben Finney <[EMAIL PROTECTED]> wrote: > >>I want my modules to (sometimes) define an abstract base exception >>class, that all other exceptions in that module inherit from. > > > [re-posting with the implementation properly foo-ified] Isn't the proper Python idiom to use Mon

modifying small chunks from long string

2005-11-13 Thread MackS
Hello everyone I am faced with the following problem. For the first time I've asked myself "might this actually be easier to code in C rather than in python?", and I am not looking at device drivers. : ) This program is meant to process relatively long strings (10-20 MB) by selectively modifying

Re: PySizer 0.1

2005-11-13 Thread Claudio Grondi
A small hint about the Web-site: At least to me, the links to the documentation as e.g. http://pysizer.8325.org/doc/auto/home/nick/sizer-trunk/doc/auto/scanner.html are broken (no big thing, because the distro has it anyway). Claudio "Nick Smallbone" <[EMAIL PROTECTED]> schrieb im Newsbeitrag ne

Dictionary of tuples from query question

2005-11-13 Thread David Pratt
Hi. I am interested in having results from a db query in the following form. {1: (value0, value1, value2,), 2: (value0, value1, value2,), 3: (value0, value1, value2,)} so I generate a dictionary of tuples (field values) dynamically so if I queried a table with five fields I would have five field

Re: Abstract Base Classes

2005-11-13 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> wrote: > I want my modules to (sometimes) define an abstract base exception > class, that all other exceptions in that module inherit from. [re-posting with the implementation properly foo-ified] Not a whole lot of feedback on this, so here's the implementation I de

Re: Abstract Base Classes

2005-11-13 Thread Ben Finney
Ben Finney <[EMAIL PROTECTED]> wrote: > I want my modules to (sometimes) define an abstract base exception > class, that all other exceptions in that module inherit from. Not a whole lot of feedback on this, so here's the implementation I decided upon. class FooException(Exception): "

Re: Sorting dominoes

2005-11-13 Thread Yu-Xi Lim
DaveM wrote: > Essentially, I'm trying to sort 12 dominoes. Each domino has two different > numbers and there are two of every number. Identical dominoes are possible, > but doubles are not. > > The problem is to place the dominoes in a line, side to side, so that two > columns (or rows, depending

Re: Sorting dominoes

2005-11-13 Thread jepler
So if you have the dominoes (1 2), (3 2) and (3 1) you must arrange them as 1|2|3 2|3|1 ? If so, then it seems to me your algorithm is this: 1. pick an arbitrary domino to be first, and an arbitrary side to be the "top" 2a. until the dominoes are exhausted, pick the other domino wi

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread David T
I realize that this thread skirts with being OT, but there are serious implications for Pythonistas and Open Source software types. I didn't mean to suggest that T.E. moved to California. I did, however, misspeak (mis-type?) when I said Edison formed a studio in California. His was in NJ, ac

Re: py2exe, pyparallel

2005-11-13 Thread garyr
Chris Mellon wrote: > On 13 Nov 2005 10:03:52 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm using py2exe to create a standalone program that uses pyparallel. > > When I run the created program an error occurs and a message directs me > > to > > the log file which contains: > > > > Tr

Sorting dominoes

2005-11-13 Thread DaveM
Essentially, I'm trying to sort 12 dominoes. Each domino has two different numbers and there are two of every number. Identical dominoes are possible, but doubles are not. The problem is to place the dominoes in a line, side to side, so that two columns (or rows, depending how you orientate them)

Trouble with "freeze.py" importing 3rd Party Modules

2005-11-13 Thread Michael Williams
Can anyone explain why "freeze.py" will make binaries with the std modules fine, however, when using 3rd party modules (Pexpect in particular) it requires the target system to actually have it installed? Thanks in advance, Mike -- http://mail.python.org/mailman/listinfo/python-list

gmpy/decimal interoperation

2005-11-13 Thread Alex Martelli
As things stand now (gmpy 1.01), an instance d of decimal.Decimal cannot transparently become an instance of any of gmpy.{mpz, mpq, mpf}, nor vice versa (the conversions are all possible, but a bit laborious, e.g. by explicitly going through string-forms). I'm thinking about possible ways to fix t

Re: Hash map with multiple keys per value ?

2005-11-13 Thread Bengt Richter
On Fri, 11 Nov 2005 22:55:53 +, Chris Stiles <[EMAIL PROTECTED]> wrote: >Hi -- > >I'm working on something that includes the concept of multiple aliases for a >particular object, where a lookup for any of the aliases has to return all the >others. The hack way of doing this was to have a dict

gmpy 1.01 binaries for the mac

2005-11-13 Thread Alex Martelli
I've added to gmpy.sf.net two binary packages of gmpy for Mac OS X 10.4, one for the Python 2.3.5 that comes with the system and one for Bob Ippolito's build of 2.4.1. They still need GMP to be previously installed (I'm told the one that comes with fink works; I installed my own from sources, from

Re: Iterator addition

2005-11-13 Thread Bengt Richter
On Sun, 13 Nov 2005 17:28:59 -0600, [EMAIL PROTECTED] wrote: [...] > >On Sun, Nov 13, 2005 at 09:44:43PM +, Bengt Richter wrote: >> even if expr1 had a __unaryop__ method, >> expr1 - expr2 >> could not become >> expr1.__unaryop__(-expr2) >> unless you forced the issue with >> expr1

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Alex Martelli
David T <[EMAIL PROTECTED]> wrote: ... > Tom Edison moved to California so _he_ could skirt copyright laws of I'm not aware of any move to California for either the better-known Thomas Alva Edison, or his lesser-known and less successful son of the same name. Could you clarify? The movie indu

Re: py2exe, pyparallel

2005-11-13 Thread Chris Mellon
On 13 Nov 2005 10:03:52 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I'm using py2exe to create a standalone program that uses pyparallel. > When I run the created program an error occurs and a message directs me > to > the log file which contains: > > Traceback (most recent call last): >

Re: Python Book

2005-11-13 Thread Kent Johnson
David Rasmussen wrote: > What is the best book for Python newbies (seasoned programmer in other > languages)? I like Learning Python. Python in a Nutshell is good if you want something brief. Kent -- http://mail.python.org/mailman/listinfo/python-list

Re: Confusion about __call__ and attribute lookup

2005-11-13 Thread Kent Johnson
John J. Lee wrote: > Kent Johnson <[EMAIL PROTECTED]> writes: > >>Leif K-Brooks wrote: >> >>>New-style classes look up special methods on the class, not on the instance: >> >>For my future reference, is this documented somewhere in the standard docs? > > Maybe somewhere in here :-( > > http://ww

Re: Proposal for adding symbols within Python

2005-11-13 Thread Ben Finney
Michael <[EMAIL PROTECTED]> wrote: > Ben Finney wrote: > > I've yet to see a convincing argument against simply assigning > > values to names, then using those names. > > If you have a name, you can redefine a name, therefore the value a > name refers to is mutable. Since there are mutable and im

Re: Python Book

2005-11-13 Thread calad . sigilon
Have you tried the tutorial on python.org? It's pretty good, even for seasoned programmers. Calad Sigilon David Rasmussen wrote: > What is the best book for Python newbies (seasoned programmer in other > languages)? > > /David -- http://mail.python.org/mailman/listinfo/python-list

Re: which feature of python do you like most?

2005-11-13 Thread Gregory Bond
[EMAIL PROTECTED] wrote: > which feature of python do you like most? > Duck typing (All I care about is that it quacks, and it doesn't have to derive from Duck() to do that!) And decorating (the ability to add attributes to objects on-the-fly, not the @XXX stuff) -- http://mail.python.org/mai

Re: Iterator addition

2005-11-13 Thread jepler
On Sun, Nov 13, 2005 at 09:44:43PM +, Bengt Richter wrote: > even if expr1 had a __unaryop__ method, > expr1 - expr2 > could not become > expr1.__unaryop__(-expr2) > unless you forced the issue with > expr1 (-expr2) as opposed to being a function call? I don't think you've solved

Re: help make it faster please

2005-11-13 Thread Ron Adam
Fredrik Lundh wrote: > Ron Adam wrote: > > >>The \w does make a small difference, but not as much as I expected. > > > that's probably because your benchmark has a lot of dubious overhead: I think it does what the OP described, but that may not be what he really needs. Although the test to

Re: Proposal for adding symbols within Python

2005-11-13 Thread Erik Max Francis
Ben Finney wrote: > I believe that's exactly what Pierre doesn't want to do. He wants to > simply use names (marked special in some way) and have Python > automatically determine a unique value for each name, with nary an > assignment in sight. > > To me, that's a net loss. It makes names more co

Re: Multikey Dict?

2005-11-13 Thread Bengt Richter
On Sun, 13 Nov 2005 01:03:05 +0100, David Rasmussen <[EMAIL PROTECTED]> wrote: >If I have a collection of dicts like: > >john = {'id': 1, 'name': "John Cleese", 'year': 1939} >graham = {'id': 2, 'name': "Graham Chapman", 'year': 1941} > Why do you use dicts for what looks like fixed-format records

Re: Python Book

2005-11-13 Thread Stuart McGraw
"Stuart McGraw" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > David Beasley's Essential Python (New Riders). It's a little dated > now (covers only up to version 2.2) [...] Oops, that should be "Beazley", "Python Essential Reference", and version 2.1. -- http://mail.python.org

Re: Proposal for adding symbols within Python

2005-11-13 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Mon, 14 Nov 2005 00:48:46 +1100, Ben Finney wrote: > > I believe Pierre is looking for a syntax that will save him from > > assigning values to names; that Python will simply assign > > arbitrary unique values for these special names. > > > What I st

Re: Proposal for adding symbols within Python

2005-11-13 Thread Michael
Ben Finney wrote: ... > I've yet to see a convincing argument against simply assigning values > to names, then using those names. I don't like any syntax I've seen so far, but I can understand the problem. If you have a name, you can redefine a name, therefore the value a name refers to is mutable

Re: Copyright

2005-11-13 Thread Robert Kern
Mike Meyer wrote: > Erik Max Francis <[EMAIL PROTECTED]> writes: > >>Mike Meyer wrote: >> >>>Further, recent evidence is that this is no longer true in that >>>country, assuming it ever was. >> >>Oh, please. Take the political crap elsewhere. > > It's got as much right to be here as the copyrigh

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Erik Max Francis
Steven D'Aprano wrote: > That is *not* generally true, although it is true in certain industries, > such as newspapers. It is true in many industries, including the software industry. My point was that the creator of a work and the copyright holder and not necessarily one and the same. Often,

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Erik Max Francis
Bruno Desthuilliers wrote: > Depends on the country's laws and the exact agreement. Work for hire is part of the Berne convention. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis Life is painting a picture, n

ANN: PySizer 0.1

2005-11-13 Thread Nick Smallbone
I'd like to announce the first release of PySizer, a memory usage profiler for Python code. PySizer was written as part of Google's Summer of Code. The source, documentation and so on are at http://pysizer.8325.org. The current release is at http://pysizer.8325.org/dist/sizer-0.1.tar.gz. The code

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Steven D'Aprano
On Sun, 13 Nov 2005 13:16:43 -0800, Erik Max Francis wrote: > David T wrote: > >> Individuals, and perhaps groups of individuals are the creators of >> works. > > When someone pays you to create a work, then they own the copyright, not > you. It's called work for hire. That is *not* general

Re: something wrong in wx

2005-11-13 Thread [EMAIL PROTECTED]
Don't know if this will help or not because it seems like a strange error if this is the problem. I've always had to run my wxPython apps with pythonw, otherwise it will give you an error saying it needs the GUI interpreter or something like that. However, this could be an operating system specif

Re: Copyright

2005-11-13 Thread Mike Meyer
Erik Max Francis <[EMAIL PROTECTED]> writes: > Mike Meyer wrote: >> Further, recent evidence is that this is no longer true in that >> country, assuming it ever was. > Oh, please. Take the political crap elsewhere. It's got as much right to be here as the copyright crap. And I'm trying to keep it

Re: open source and pure python

2005-11-13 Thread Robert Kern
Ben Bush wrote: > Is there any package written in pure python code? Quite a lot. Browse through the Package Index. http://cheeseshop.python.org/pypi -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Bruno Desthuilliers
Erik Max Francis a écrit : > David T wrote: > >> Individuals, and perhaps groups of individuals are the creators of >> works. > > > When someone pays you to create a work, then they own the copyright, Depends on the country's laws and the exact agreement. -- http://mail.python.org/mailman/l

Re: Copyright

2005-11-13 Thread Mike Meyer
"The Eternal Squire" <[EMAIL PROTECTED]> writes: >>Further, recent evidence is that this is no longer true in that >>country, assuming it ever was. > Wow, how Machiaviellian. Just an observation on the state of the US. It's been a long while since the people running the country did so for the peop

Re: Python Book

2005-11-13 Thread Stuart McGraw
David Beasley's Essential Python (New Riders). It's a little dated now (covers only up to version 2.2) but lucid, consise, well organized. It restricts itself to Python's syntax and semantics and does not waste time explaining basic programming concepts. I made several attempts to learn Python bu

Re: something wrong in wx

2005-11-13 Thread Robert Tomasik
Dnia Sun, 13 Nov 2005 08:29:49 +, Tim Roberts napisał(a): >>I wrote program training na Artificial Neural Network. It work well in >>console mode, but when I try to add GUI there is an error: >>FANN Error 10: Error reading info from train data file "zapis.txt", line: 2 > > How are you launchi

Re: strip not working on strings?

2005-11-13 Thread Eric Jacoboni
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I'm using Python 2.3.5 and when I type the following in the interactive > prompt I see that strip() is not working as advertised: > > >>>s = 'p p:p' > >>>s.strip(' :') > 'p p:p' > > Is this just me or does it not work? I want to get rid

Re: strip not working on strings?

2005-11-13 Thread Eric Jacoboni
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I'm using Python 2.3.5 and when I type the following in the interactive > prompt I see that strip() is not working as advertised: > > >>>s = 'p p:p' > >>>s.strip(' :') > 'p p:p' > > Is this just me or does it not work? I want to get rid

need drvmcdb.sys

2005-11-13 Thread james HU
Anybody has this file in ..\system32\drivers\drvmcdb.sys in your computer? please send it to me. You will save my life! thanks a lot!   James Yahoo! FareChase - Search multiple travel sites in one click. -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterator addition

2005-11-13 Thread Bengt Richter
On Sun, 13 Nov 2005 17:31:32 +0100, Reinhold Birkenfeld <[EMAIL PROTECTED]> wrote: >[EMAIL PROTECTED] wrote: >> Tom Anderson: >>> And we're halfway to looking like perl already! Perhaps a more pythonic >>> thing would be to define a "then" operator: >>> all_lines = file1 then file2 then file3 >>

Re: strip not working on strings?

2005-11-13 Thread Eric Jacoboni
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > I'm using Python 2.3.5 and when I type the following in the interactive > prompt I see that strip() is not working as advertised: > > >>>s = 'p p:p' > >>>s.strip(' :') > 'p p:p' > > Is this just me or does it not work? I want to get rid

Re: strip not working on strings?

2005-11-13 Thread Pierre Quentel
[EMAIL PROTECTED] a écrit : > I'm using Python 2.3.5 and when I type the following in the interactive > prompt I see that strip() is not working as advertised: > > s = 'p p:p' s.strip(' :') > > 'p p:p' > > Is this just me or does it not work? I want to get rid of all ' ' and > ':' in th

Re: strip not working on strings?

2005-11-13 Thread marduk
On Sun, 2005-11-13 at 13:16 -0800, [EMAIL PROTECTED] wrote: > I'm using Python 2.3.5 and when I type the following in the interactive > prompt I see that strip() is not working as advertised: > > >>>s = 'p p:p' > >>>s.strip(' :') > 'p p:p' > > Is this just me or does it not work? I want to get ri

open source and pure python

2005-11-13 Thread Ben Bush
Is there any package written in pure python code? I know lots of packages borrow the functions from other languages such as C or FORTRAN. So it is still black box to me because I do not know these languages. Ben -- http://mail.python.org/mailman/listinfo/python-list

Re: Copyright [was Re: Python obfuscation]

2005-11-13 Thread Erik Max Francis
Mike Meyer wrote: > Further, recent evidence is that this is no longer true in that > country, assuming it ever was. Oh, please. Take the political crap elsewhere. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfranci

strip not working on strings?

2005-11-13 Thread dan . j . weber
I'm using Python 2.3.5 and when I type the following in the interactive prompt I see that strip() is not working as advertised: >>>s = 'p p:p' >>>s.strip(' :') 'p p:p' Is this just me or does it not work? I want to get rid of all ' ' and ':' in the string. I've checked the doc and from what I can

Re: Copyright [was Re: Python Obfuscation]

2005-11-13 Thread Erik Max Francis
David T wrote: > Individuals, and perhaps groups of individuals are the creators of > works. When someone pays you to create a work, then they own the copyright, not you. It's called work for hire. -- Erik Max Francis && [EMAIL PROTECTED] && http://www.alcyone.com/max/ San Jose, CA, USA &&

Re: Confusion about __call__ and attribute lookup

2005-11-13 Thread Serge Orlov
Kent Johnson wrote: > Leif K-Brooks wrote: > > New-style classes look up special methods on the class, not on the instance: > > For my future reference, is this documented somewhere in the standard docs? > Looks like it's the most detailed explanation on the net: http://mail.python.org/pipermail/

Re: Copyright [was Re: Python obfuscation]

2005-11-13 Thread The Eternal Squire
>As far as I know, only one country ever claimed to have that, so your >"we" only applies to citizens of that country, and not to everyone who >may be reading the letter - and the status of the person you quoted >but did not attribute is unclear. It applies to not only the US, which explicitly has

Re: Python Book

2005-11-13 Thread Bruno Desthuilliers
David Rasmussen a écrit : > What is the best book for Python newbies (seasoned programmer in other > languages)? I don't know if it's the "best", but a DiveIntoPython/PythonCookbook combo may be a good choice. -- http://mail.python.org/mailman/listinfo/python-list

Error

2005-11-13 Thread danger
hi everybody, i have a problem with py2exe that gives me this error: ImportError: could not import pango ImportError: could not import pango Traceback (most recent call last): File "acqua.py", line 40, in ? File "gtk\__init__.pyc", line 113, in ? AttributeError: 'module' object has no attribut

Re: the button of cancel

2005-11-13 Thread Ben Bush
On 11/13/05, Fredrik Lundh <[EMAIL PROTECTED]> wrote: Ben Bush wrote:> When I click the button of cancel,> I got the follwoing message. I want to see "Goodbye" on the console screen. > What to do?> KeyboardInterrupt: operation cancelled> num = input( "Enter a number between 1 and 100: " )> while n

Re: help make it faster please

2005-11-13 Thread Fredrik Lundh
Ron Adam wrote: > The \w does make a small difference, but not as much as I expected. that's probably because your benchmark has a lot of dubious overhead: > word_finder = re.compile('[EMAIL PROTECTED]', re.I) no need to force case-insensitive search here; \w looks for both lower- and uppercase

Re: Rename files with numbers

2005-11-13 Thread Florian Diesch
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Ok, so the function simplifyed without loops: > > def renamer(folder, band): > archive = #file to transform > rest = archive[3:] > print band + " -",rest.capitalize() > > > obs: the file names came this way(with spaces or apostrophes)

Python Book

2005-11-13 Thread David Rasmussen
What is the best book for Python newbies (seasoned programmer in other languages)? /David -- http://mail.python.org/mailman/listinfo/python-list

Re: help make it faster please

2005-11-13 Thread Ron Adam
Fredrik Lundh wrote: > Lonnie Princehouse wrote: > > >>"[a-z0-9_]" means "match a single character from the set {a through z, >>0 through 9, underscore}". > > > "\w" should be a bit faster; it's equivalent to "[a-zA-Z0-9_]" (unless you > specify otherwise using the locale or unicode flags), b

Re: Pywin32: How to import data into Excel?

2005-11-13 Thread Norbert
Simon Brunning wrote: > On 08/11/05, Dmytro Lesnyak <[EMAIL PROTECTED]> wrote: > > I need to import some big data into Excel from my Python script. I have TXT > > file (~7,5 Mb). > > Have you considered converting your text data to CSV format? Excel > opens CSV files happily enough, and you could a

Re: Confusion about __call__ and attribute lookup

2005-11-13 Thread John J. Lee
Kent Johnson <[EMAIL PROTECTED]> writes: > Leif K-Brooks wrote: > > New-style classes look up special methods on the class, not on the instance: > > For my future reference, is this documented somewhere in the standard docs? Maybe somewhere in here :-( http://www.python.org/doc/newstyle.html

py2exe, pyparallel

2005-11-13 Thread garyr
I'm using py2exe to create a standalone program that uses pyparallel. When I run the created program an error occurs and a message directs me to the log file which contains: Traceback (most recent call last): File "fg.py", line 30, in ? import dds2 File "dds2.pyc", line 24, in ? WHETHE

D foreach

2005-11-13 Thread bearophileHUGS
The Digital Mars D compiler is a kind of "improved c++", it contains a "foreach" statement: http://www.digitalmars.com/d/statement.html#foreach Usage example: foreach(int i, inout int p; v1) p = i; Is equal to Python: for i in xrange(len(v)): v[i] = i That is: v1 = range(len(v1)) (Some people us

Re: Iterator addition

2005-11-13 Thread Tom Anderson
On Sun, 13 Nov 2005, Reinhold Birkenfeld wrote: > [EMAIL PROTECTED] wrote: > >> Tom Anderson: > >>> And we're halfway to looking like perl already! Perhaps a more >>> pythonic thing would be to define a "then" operator: >>> >>> all_lines = file1 then file2 then file3 >> >> Or a "chain" one: >> >>

Re: IE Temporary Internet Files & Python

2005-11-13 Thread John J. Lee
"James Hu" <[EMAIL PROTECTED]> writes: > Maybe the reason is ..\Content.IE5\index.dat can't be deleted! [...] IIRC, it can/could be from linux (with Win NT 4 installed on a VFAT partition), so I guess it is/was a normal file to that extent. John -- http://mail.python.org/mailman/listinfo/pyt

Re:Copyright [was Re: Python Obfuscation]

2005-11-13 Thread David T
> > Thomas Edison (I think it was him) once said it took 999 failures to > make 1 success. That makes SourceForge 10 times more successful. > > > >> The world is filled with >> millions of wanna-be poets, writers and creators whose sum total >> contribution to the artistic wealth of the world is n

[no subject]

2005-11-13 Thread David T
> > Thomas Edison (I think it was him) once said it took 999 failures to > make 1 success. That makes SourceForge 10 times more successful. > > >> The world is filled with >> millions of wanna-be poets, writers and creators whose sum total >> contribution to the artistic wealth of the world is neg

Re: SnakeCard goes open source

2005-11-13 Thread Philippe C. Martin
I forgot SC-School-ID and SC-Corporate-ID: software = Python, GUI = wxWidget, Applets JavaCard and BasicCard. Regards, Philippe Philippe C. Martin wrote: > Dear all, > > I have decided to focus my activities on development and support. > > I will release SnakeCard's produt line source code

SnakeCard goes open source

2005-11-13 Thread Philippe C. Martin
Dear all, I have decided to focus my activities on development and support. I will release SnakeCard's produt line source code under the GPL licence this week (www.snakecard.com) ... I need to fix the site. It includes: SCF: SnakeCard Framework (software=Python) SCFB: SnaleCard Framework Bundle

splitting Tkinter gui into several files

2005-11-13 Thread jarhead
My Tkinter app's gui file grew to the point that i wanted to split it into several files: menus.py, mainFrame,py, buttons.py, etc. Of course, when i moved the menu code into its own file, then did "import menus" in the main gui file, it died because of references in the menus file to stuff in the m

Re: Iterator addition

2005-11-13 Thread Reinhold Birkenfeld
[EMAIL PROTECTED] wrote: > Tom Anderson: >> And we're halfway to looking like perl already! Perhaps a more pythonic >> thing would be to define a "then" operator: >> all_lines = file1 then file2 then file3 > > Or a "chain" one: >> all_lines = file1 chain file2 chain file3 That's certainly not bet

Re: about python ide

2005-11-13 Thread D H
?? wrote: > i am use python2.4.2 on my gentoo linux system > i want to find some ide of python > but i am using gtk2.8,wxPython has some bug on it.i cant emerge it correctly. > i want some ide use pygtk or other lib of python gui except > wxpython(wxWidgets) Try Gazpacho or Glade for designing yo

Re: How to avoid "f.close" (no parens) bug?

2005-11-13 Thread D H
Carsten Haese wrote: > On Thu, 2 Nov 2006 23:56:22 +0200, o wrote > >>plez send me >> > > > Please tell us what bug you're talking about: > > A) Python closed the file but you expected it not to. > B) Python didn't close the file but you expected it to. > C) Python didn't warn you when you w

Re: want some python ide

2005-11-13 Thread D H
[EMAIL PROTECTED] wrote: > i want some python ide use pygtk > eric3 is good for me ,but i like gtk,so i want some pygtk ide look like > eric3 > wing is a good python ide,but i can not download it > some other python ide(must use pygtk) > thx > You can just use a text editor like jedit with gazpac

Re: elementtree.ElemenTree barfs on my Safari Cookies file

2005-11-13 Thread skip
Fredrik> that apple's tools are able to generate bogus XML is a known Fredrik> problem; for a discussion and some workarounds, see the "Status Fredrik> of XML 1.1 processing in Python" over at the xml-sig mailing Fredrik> list: Fredrik> http://aspn.activestate.com/ASPN/Mai

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Björn Lindström a écrit : > Ben Finney <[EMAIL PROTECTED]> writes: > > >>I've yet to see a convincing argument against simply assigning values >>to names, then using those names. > > > The problem with that is that you can't pass around the names of objects > that are used for other things. Obv

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Steven D'Aprano a écrit : > On Sun, 13 Nov 2005 12:33:48 +0100, Pierre Barbier de Reuille wrote: > > >>Steven D'Aprano a écrit : >>[...] > > > If you want to be technical, Python doesn't have variables. It has names > and objects. > > If I want a name x to be bound to an object 1, I have to de

Re: Proposal for adding symbols within Python

2005-11-13 Thread Steven D'Aprano
On Mon, 14 Nov 2005 00:48:46 +1100, Ben Finney wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >> On Sun, 13 Nov 2005 10:11:04 +0100, Pierre Barbier de Reuille wrote: >> > The problem, IMHO, is that way you need to declare "symbols" >> > beforehands, that's what I was trying to avoid by requir

Re: Proposal for adding symbols within Python

2005-11-13 Thread Björn Lindström
Ben Finney <[EMAIL PROTECTED]> writes: > I've yet to see a convincing argument against simply assigning values > to names, then using those names. The problem with that is that you can't pass around the names of objects that are used for other things. Obviously they make enums unnecessary, but on

Re: Proposal for adding symbols within Python

2005-11-13 Thread Pierre Barbier de Reuille
Ben Finney a écrit : > Pierre Barbier de Reuille <[EMAIL PROTECTED]> wrote: > >>Mike Meyer a écrit : >> >>>Hmm. You know, $symbol$ doesn't seem nearly as bad as $symbol. It >>>tickles TeX, not P***. I could live with that. >> >>Yep, I like this $symbol$ notation ! > > > Gets a big -1 here. > >

Re: Proposal for adding symbols within Python

2005-11-13 Thread Steven D'Aprano
On Sun, 13 Nov 2005 12:33:48 +0100, Pierre Barbier de Reuille wrote: > Steven D'Aprano a écrit : >> On Sun, 13 Nov 2005 10:11:04 +0100, Pierre Barbier de Reuille wrote: >> >> >>>The problem, IMHO, is that way you need to declare "symbols" >>>beforehands, that's what I was trying to avoid by requ

[ANNOUNCE] gmpy 1.1 beta released

2005-11-13 Thread Alex Martelli
See http://gmpy.sourceforge.net/ for details. What is it: a wrapper for the GMP 4 library (http://swox.com/gmp/), to provide multi-precision arithmetic for Python. Multi-precision floats, and unbounded-precision rationals, are not present in stock Python; multi-precision integers ('long') are, b

ANNOUNCE: twill v0.7.4, Web testing language.

2005-11-13 Thread C. Titus Brown
ANNOUNCING twill v0.7.4. twill is a simple Web scripting language built on top of Python and John J. Lee's 'mechanize'. It's designed for automated testing of Web sites, but it should prove useful for anybody who needs to interact with Web sites (especially those using logins and cookies) on the

Re: want some python ide

2005-11-13 Thread 赵光
wingide is good for me but i cant down load it i download from http://wingware.com/pub/wingide-personal/2.0.4/wingide-personal-2.0.4-1-i386-linux.tar.gz but it stop at 7% who can help me thx -- /** * Love in Gentoo-Linux C and Python * Look

Re: How to avoid "f.close" (no parens) bug?

2005-11-13 Thread Carsten Haese
On Thu, 2 Nov 2006 23:56:22 +0200, o wrote > plez send me > Please tell us what bug you're talking about: A) Python closed the file but you expected it not to. B) Python didn't close the file but you expected it to. C) Python didn't warn you when you wrote "f.close" instead of "f.close()". D)

Re: how to think like a computer scientist

2005-11-13 Thread Colin J. Williams
Brian van den Broek wrote: > john boy said unto the world upon 2005-11-11 22:25: > >> Question for the following program: sec 5.5 >> >> def factorial (n): >>if n == 0: >> return 1 >>else: >> recurse = factorial (n-1) >> result = n * recurse >> return result >> >

want some python ide

2005-11-13 Thread [EMAIL PROTECTED]
i want some python ide use pygtk eric3 is good for me ,but i like gtk,so i want some pygtk ide look like eric3 wing is a good python ide,but i can not download it some other python ide(must use pygtk) thx -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal for adding symbols within Python

2005-11-13 Thread Ben Finney
Pierre Barbier de Reuille <[EMAIL PROTECTED]> wrote: > Mike Meyer a écrit : > > Hmm. You know, $symbol$ doesn't seem nearly as bad as $symbol. It > > tickles TeX, not P***. I could live with that. > Yep, I like this $symbol$ notation ! Gets a big -1 here. I've yet to see a convincing argument aga

Re: Proposal for adding symbols within Python

2005-11-13 Thread Ben Finney
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 13 Nov 2005 10:11:04 +0100, Pierre Barbier de Reuille wrote: > > The problem, IMHO, is that way you need to declare "symbols" > > beforehands, that's what I was trying to avoid by requiring a new > > syntax. > > If you don't declare your symbols

Re: help make it faster please

2005-11-13 Thread Sybren Stuvel
Bengt Richter enlightened us with: > I meant somestring.split() just like that -- without a splitter > argument. My suspicion remains ;-) Mine too ;-) Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't we just take the

Re: about python ide

2005-11-13 Thread Diez B. Roggisch
赵光 wrote: > i am use python2.4.2 on my gentoo linux system > i want to find some ide of python > but i am using gtk2.8,wxPython has some bug on it.i cant emerge it correctly. > i want some ide use pygtk or other lib of python gui except > wxpython(wxWidgets) Take astab at eric3. Uses Qt + PyQt

Re: How to avoid "f.close" (no parens) bug?

2005-11-13 Thread Peter
o wrote: > plez send me > > First off, please explain what you are talking about better next time. Second, What on earth are you talking about? "f" is a file object, correct? Are you trying to close a file by typing f.close or is the file closing when you type f.close? If you are trying to

Re: Multikey Dict?

2005-11-13 Thread Scott David Daniels
David Rasmussen wrote: > If I have a collection of dicts like: > > john = {'id': 1, 'name': "John Cleese", 'year': 1939} > graham = {'id': 2, 'name': "Graham Chapman", 'year': 1941} If these are all like that, I prefer: john = dict(id=1, name="John Cleese", year=1939} graham = dict{id-2,

Python and Lotus Notes

2005-11-13 Thread bisj
I would like to interact with Lotus Notes. I wrote following: >>> from win32com.client.dynamic import Dispatch >>> ln=Dispatch('Lotus.Notessession') then, following exception come out: Traceback (most recent call last): File "", line 1, in ? File "C:\Python24\Lib\site-packages\win32com\client\

Re: Is there a built-in method for transforming (1,None,"Hello!") to 1,None,"Hello!"?

2005-11-13 Thread Amaury
Hello, Daniel Crespo wrote: > Is there a built-in method for transforming (1,None,"Hello!") to > 1,None,"Hello!"? As others answered before, the two syntaxes build the same object, so there is no need to convert. Except if you already have the tuple stored in a variable, and want to call a fun

about python ide

2005-11-13 Thread 赵光
i am use python2.4.2 on my gentoo linux system i want to find some ide of python but i am using gtk2.8,wxPython has some bug on it.i cant emerge it correctly. i want some ide use pygtk or other lib of python gui except wxpython(wxWidgets) thx -- /***

  1   2   >