Pythomnic 2.0, framework for building reliable highly dynamic network services

2006-05-16 Thread dmitry
Major new features in version 2.0: * Support for distributed transactions * Network-wide service health monitoring * Dynamic service discovery at runtime * Support for module level persistency * Full support for JMS integration The what's new page: http://www.pythomnic.org/changes.html

Far from complete

2006-05-16 Thread Kay Schluehr
Section 2.3 of the Python 2.5. tutorial The following sections describe the standard types that are built into the interpreter. Historically, Python's built-in types have differed from user-defined types because it was not possible to use the built-in types as the basis for object-oriented

Re: Aggregate funuctions broken in MySQLdb?

2006-05-16 Thread Lorenzo
In article [EMAIL PROTECTED], John Salerno [EMAIL PROTECTED] wrote: http://sourceforge.net/docman/?group_id=22307 Yes, I did, but I did not find them thorough enough. -- My Break-Dancing days are over, but there's always the Funky Chicken --The Full Monty --

Re: Aggregate funuctions broken in MySQLdb?

2006-05-16 Thread Lorenzo
In article [EMAIL PROTECTED], Dennis Lee Bieber [EMAIL PROTECTED] wrote: On Mon, 15 May 2006 20:14:29 GMT, John Salerno [EMAIL PROTECTED] declaimed the following in comp.lang.python: Lorenzo Thurman wrote: Thanks, that was my problem. Can you point me to some documentation on

Re: Decrypt DES by password

2006-05-16 Thread Thomas Dybdahl Ahle
Den Mon, 15 May 2006 11:32:47 -0700. skrev Paul Rubin: Thomas Dybdahl Ahle [EMAIL PROTECTED] writes: byte[] array2 = bytes1.CryptDeriveKey(DES, MD5, 0, array1); Anybody know how to do this in python? I'm not aware of a standard that says how CryptDeriveKey is supposed to work. Or rather,

Re: using target words from arrays in regex, pythons version of perls 'map'

2006-05-16 Thread Paddy
I don't like string interpolation within REs, it pops me out of 'RE mode' as I scan the line. Maybe creating a dict of matchobjects could be used in the larger context?: dict( [(t, re.search(t+regexp_tail, file2) for t in targets] ) (untested). - Pad. --

Re: Why does stack.inspect take so long?

2006-05-16 Thread 63q2o4i02
Tim Peters wrote: [EMAIL PROTECTED] Hi, I've written a top-down recursive decent parser for SPICE circuit descriptions. For debugging purposes, I wanted each production ... Any clues? It should go much faster to use a function that doesn't crawl the entire call stack. For example,

Re: using target words from arrays in regex, pythons version of perls 'map'

2006-05-16 Thread John Machin
Think about how well the above solutions scale as len(targets) increases. 1. Make targets a set, not a list. 2. Have *ONE* regex which includes a bracketed match for a generic target e.g. ([A-Z\s]+) 3. Do *ONE* regex search, not 1 per target 4. If successful, check if the bracketed gizmoid is in

Re: Large Dictionaries

2006-05-16 Thread Maric Michaud
Le Lundi 15 Mai 2006 21:07, Diez B. Roggisch a écrit : d={}.fromkeys(xrange(5*10**6)) ? That is a totally different beast. You don't want to insert arbitrary keys, you want the internal hash-array to be of the right size. But you can replace the xrange part by any generator function you

Re: using target words from arrays in regex, pythons version of perls 'map'

2006-05-16 Thread John Machin
Would you believe steps 3 4? -- http://mail.python.org/mailman/listinfo/python-list

Re: How to guess the language of a given textstring?

2006-05-16 Thread Roman
Hi This is what I'm looking for. Thank you. Roman gene tani schrieb: Roman wrote: Does anybody know an easy way (or tool) to guess the language of a given text string? http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/355807

Re: Multiple inheritance : waht does this error mean ?

2006-05-16 Thread Peter Otten
[EMAIL PROTECTED] wrote: I am using Python 2.4.3 class K(object,list): ...: pass ...: Traceback (most recent call last): File console, line 1, in ? TypeError: Error when calling the metaclass bases Cannot

Using python for a CAD program

2006-05-16 Thread 63q2o4i02
Hi, I'm interested in using python to start writing a CAD program for electrical design. I just got done reading Steven Rubin's book, I've used real EDA tools, and I have an MSEE, so I know what I *want* at the end of this; I just have never taken on a programming task of this magnitude. I've

Re: using target words from arrays in regex, pythons version of perls 'map'

2006-05-16 Thread Paul McGuire
Dennis Lee Bieber [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Mon, 15 May 2006 19:41:39 -0500, Lance Hoffmeyer [EMAIL PROTECTED] declaimed the following in comp.lang.python: I would have something similar to perl above: targets = ['OVERALL RATING',

Re: Decrypt DES by password

2006-05-16 Thread Paul Rubin
Thomas Dybdahl Ahle [EMAIL PROTECTED] writes: I'm not aware of a standard that says how CryptDeriveKey is supposed to work I tried to find out how the monofolks did it, but also they didn't know the algorithms. Actually this is almost certainly an entry into the Windows Crypto API. If

Re: List and order

2006-05-16 Thread Nic
Perfect. Thanks. Nic Peter Otten [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Nic wrote: The only problem is that from: 12 22 21 In spite of writing 12 12 22 it writes 12 21 22 Do you know how is it possible to delete also this last trouble? I thought that the

Re: C API: getting sys.argv

2006-05-16 Thread Georg Brandl
[EMAIL PROTECTED] wrote: John Machin wrote: PyObject *_argv = PyImport_ImportModule(sys.argv); What does the name of the function tell you? You can't do that in one hit. Start with PyObject *_sys = PyImport_ImportModule(sys); then you need to get the module's argv attribute. I just

Python and Combinatorics

2006-05-16 Thread Nic
Hello, I've a problem in defining a good Python code useful to articulate the following algorithm. Can you help me please? Thanks a bunch, Nic 1. Insert a number n. Example: 3 2. List all the numbers or = to n. Example: 1,2,3. 3. Combine the listed numbers each other. Example: 12 13 23 4.

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Duncan Booth
achates wrote: A tab is not equivalent to a number of spaces. It is a character signifying an indent, just like the newline character signifies the end of a line. If your editor automatically converts tabs to spaces (i.e. you are unable to create source files containing tabs) then either it's

accessing information in a class

2006-05-16 Thread Hudson Diederich
hello, I'm writing a gui evotign program and I need to access information inputted by a user through a radiobutton. the radobuttons are in a class and I cannot get the value of the radiobuttons -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and Combinatorics

2006-05-16 Thread Peter Otten
Nic wrote: [Algorithm that I may have misunderstood] 12a 13a 23a 12a 13b 23a 12a 13b 23b 12b 13a 23a 12b 13b 23a 12b 13b 23b What about 12a 13a 23b and 12b 13a 23b? Peter PS: Please don't top-post. -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Dictionaries

2006-05-16 Thread Duncan Booth
Chris Foote wrote: Don't forget that adding keys requires resizing the dict, which is a moderately expensive operation. Yep, that's why I probably need a dictionary where I can pre-specify an approximate size at the time of its creation. Try splitting the creation of the keys from the

Re: do/while structure needed

2006-05-16 Thread Antoon Pardon
Op 2006-05-15, Terry Reedy schreef [EMAIL PROTECTED]: John Salerno [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks, that looks pretty good. Although I have to say, a do/while structure is the much more obvious way. I wonder why it hasn't been added to the language. Been

Re: A critic of Guido's blog on Python's lambda

2006-05-16 Thread Ben
Ok, I'm sorry. This kind of discussions between two groups of people, neither of who know the other person's language very well just wind me up something chronic! It wasn't your post as such, just reading through most of the thread in one go. That will teach me to post while cross :). Sorry for

Re: Python and Combinatorics

2006-05-16 Thread Nic
I forgot them. Sorry. They should be included. Nic Peter Otten [EMAIL PROTECTED] ha scritto nel messaggio news:[EMAIL PROTECTED] Nic wrote: [Algorithm that I may have misunderstood] 12a 13a 23a 12a 13b 23a 12a 13b 23b 12b 13a 23a 12b 13b 23a 12b 13b 23b What about 12a 13a 23b and 12b

IDLE confusion

2006-05-16 Thread MrBlueSky
Hi, I'm trying to use IDLE to develop My First Python App and my head hurts... I've a file called spalvi.py with this in it: from Test import * firstTest(Mike) And a file called Test.py with this in it: def firstTest(name): print Yo,name I open spalvi.py with IDLE and Run

Re: Python and Combinatorics

2006-05-16 Thread Peter Otten
Nic wrote: PS: Please don't top-post. You probably overlooked that :-) Here's a naive implementation: from itertools import izip def unique(items, N): assert N 0 if N == 1: for item in items: yield item, else: for index, item in enumerate(items):

Re: IDLE confusion

2006-05-16 Thread Claudio Grondi
MrBlueSky wrote: Hi, I'm trying to use IDLE to develop My First Python App and my head hurts... I've a file called spalvi.py with this in it: from Test import * firstTest(Mike) And a file called Test.py with this in it: def firstTest(name): print Yo,name I open

Re: IDLE confusion

2006-05-16 Thread Christophe
Claudio Grondi a écrit : MrBlueSky wrote: Hi, I'm trying to use IDLE to develop My First Python App and my head hurts... I've a file called spalvi.py with this in it: from Test import * firstTest(Mike) And a file called Test.py with this in it: def firstTest(name):

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Ed Singleton
On 5/15/06, Brian Quinlan [EMAIL PROTECTED] wrote: The problem with tabs is that people use tabs for alignment e.g. def foo(): -query = SELECT * - - - FROM sometable - - - WHERE condition Now I change my editor to use 8-space tabs and the code is all messed up. Of course,

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Sybren Stuvel
Duncan Booth enlightened us with: That is true so far as it goes, but equally if your editor inserts a tab character when you press the tab key it is as broken as though it inserted a backspace character when you press the backspace key. In both of these cases you have an operation (move to

problem with namespaces using eval and exec

2006-05-16 Thread Jens
Hi, has anyone an idea why the following code does not work. s = def a(n): return n*n def b(t): return a(t) ns = {} exec(s, {}, ns) eval(b(2), ns, {}) executing this script raises an exception (NameError: global name 'a' is not defined) in the last line. Hope for your help. --

Re: Large Dictionaries

2006-05-16 Thread Chris Foote
Claudio Grondi wrote: Chris Foote wrote: p.s. Disk-based DBs are out of the question because most key lookups will result in a miss, and lookup time is critical for this application. Python Bindings (\Python24\Lib\bsddb vers. 4.3.0) and the DLL for BerkeleyDB (\Python24\DLLs\_bsddb.pyd

Re: Large Dictionaries

2006-05-16 Thread Chris Foote
Paul McGuire wrote: Claudio Grondi [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Chris Foote wrote: Hi all. I have the need to store a large (10M) number of keys in a hash table, based on a tuple of (long_integer, integer). The standard python dictionary works well for small

Re: Multiple inheritance : waht does this error mean ?

2006-05-16 Thread Michele Simionato
[EMAIL PROTECTED] wrote: I am using Python 2.4.3 class K(object,list): ...: pass ...: Traceback (most recent call last): File console, line 1, in ? TypeError: Error when calling the metaclass bases Cannot create

[silly] Does the python mascot have a name ?

2006-05-16 Thread Steve
umm, was just wondering, does the python mascot have a name ? We are naming the conference rooms in our office you see :o). Also, is there a place I could get some neat, good quality pics of the python ? - steve -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Iain King
Oh God, I agree with Xah Lee. Someone take me out behind the chemical sheds... Iain Xah Lee wrote: Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion

Re: Python and Combinatorics

2006-05-16 Thread Gerard Flanagan
Nic wrote: Hello, I've a problem in defining a good Python code useful to articulate the following algorithm. Can you help me please? Thanks a bunch, Nic 1. Insert a number n. Example: 3 2. List all the numbers or = to n. Example: 1,2,3. 3. Combine the listed numbers each other.

Re: Large Dictionaries

2006-05-16 Thread Chris Foote
lcaamano wrote: Sounds like PyTables could be useful. http://www.pytables.org In browsing their excellent documentation, it seems that all concepts are built around storing and reading HDF5 format files. Not suitable for this project unfortunately. Cheers, Chris --

Re: problem with namespaces using eval and exec

2006-05-16 Thread Maric Michaud
Le Mardi 16 Mai 2006 11:05, Jens a écrit : s = def a(n):   return n*n def b(t):   return a(t) ns = {} exec(s, {}, ns) eval(b(2), ns, {}) you passed an empty globals dictionnary to the eval func (the local one is not in the scope of b defintion) try this : exec s // like exec s in

Re: Far from complete

2006-05-16 Thread Steve Holden
Kay Schluehr wrote: Section 2.3 of the Python 2.5. tutorial The following sections describe the standard types that are built into the interpreter. Historically, Python's built-in types have differed from user-defined types because it was not possible to use the built-in types as the basis

Re: problem with namespaces using eval and exec

2006-05-16 Thread Peter Otten
Jens wrote: has anyone an idea why the following code does not work. s = def a(n): return n*n def b(t): return a(t) ns = {} exec(s, {}, ns) Here you are providing a local namespace into which all toplevel names (a and b) are inserted. eval(b(2), ns, {}) Here you provide a

Re: Large Dictionaries

2006-05-16 Thread John Machin
(my dictionary values are all None). So in fact all you need is a set. Have you experimented with the Python 2.5 alpha? -- http://mail.python.org/mailman/listinfo/python-list

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Duncan Booth
Sybren Stuvel wrote: An editor should be capable of letting you create or modify files containing control characters without gratuitously corrupting them, but the keys should perform the expected operations I agree with that. not insert the characters. But not with that, since it is

Re: Large Dictionaries

2006-05-16 Thread Vladimir 'Yu' Stepanov
Chris Foote wrote: lcaamano wrote: Sounds like PyTables could be useful. http://www.pytables.org In browsing their excellent documentation, it seems that all concepts are built around storing and reading HDF5 format files. Not suitable for this project unfortunately. Cheers,

Python script windows servcie

2006-05-16 Thread Mivabe
I'm using a Python script om my Wildfire XMPP server to connect to external transports (for instantce MSN) I configured the script as a windows service with 'srvany' and 'instrv and everything seems te work fine. The service starts with the system, but as soon as an local useraccount (remote

Re: Large Dictionaries

2006-05-16 Thread Duncan Booth
John Machin wrote: (my dictionary values are all None). So in fact all you need is a set. Have you experimented with the Python 2.5 alpha? I don't think that will help him: my timings work out about the same on 2.4.2 or 2.5a2. As I pointed out, the bottleneck is creating the tuples.

Re: Argument Decorators Enhancement?

2006-05-16 Thread bayerj
Hi, -1 because I find it extremly hard to read and not necessary in that scale. Actually, there are a lot of recipes in the Cookbook [1] on how to use decorators for type-checking. On example is: @require(int, int) def add(x,y): return x + y Which I find much more readable, easier to implement

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Sybren Stuvel
Duncan Booth enlightened us with: It could be, and for some keys (q, w, e, r, t, y, etc. spring to mind) that is quite a reasonable implementation. For others 'tab', 'backspace', 'enter', 'delete', etc. it is less reasonable, but it is a quality of implementation issue. If I had an editor

Re: A critic of Guido's blog on Python's lambda

2006-05-16 Thread A. Rogowski
[EMAIL PROTECTED] (Alex Martelli) writes: Bill Atkins [EMAIL PROTECTED] wrote: ... ``allow ( as an ordinary single-character identifier'' as for the unneded feature ``allow unnamed functions with all the flexibility of named ones''. Not so infeasible: (let

Re: Large Dictionaries

2006-05-16 Thread Claudio Grondi
Chris Foote wrote: Claudio Grondi wrote: Chris Foote wrote: p.s. Disk-based DBs are out of the question because most key lookups will result in a miss, and lookup time is critical for this application. Python Bindings (\Python24\Lib\bsddb vers. 4.3.0) and the DLL for BerkeleyDB

Re: Far from complete

2006-05-16 Thread Kay Schluehr
Steve Holden wrote: Kay Schluehr wrote: Section 2.3 of the Python 2.5. tutorial The following sections describe the standard types that are built into the interpreter. Historically, Python's built-in types have differed from user-defined types because it was not possible to use the

Re: Large Dictionaries

2006-05-16 Thread [EMAIL PROTECTED]
BTW why are python dicts implemented as hash tables and not judy arrays? -- http://mail.python.org/mailman/listinfo/python-list

Re: Using python for a CAD program

2006-05-16 Thread BartlebyScrivener
Art Haas posts from time to time regarding a program called PythonCad that he maintains: http://tinyurl.com/o36t8 Also, here is a search of this forum on Cad: http://tinyurl.com/nuobe -- http://mail.python.org/mailman/listinfo/python-list

Google-API Bad-Gateway-Error

2006-05-16 Thread DierkErdmann
Hi, I am trying to query google from within a python script using the Google-Api (pygoogle). The following piece of codes gives me a SOAPpy.Errors.HTTPError: HTTPError 502 Bad Gateway, the full Traceback is shown below. I am aware of the incompatibilities between the Google-Api and older versions

Re: Google-API Bad-Gateway-Error

2006-05-16 Thread John Bokma
[EMAIL PROTECTED] wrote: Hi, I am trying to query google from within a python script using the Google-Api (pygoogle). The following piece of codes gives me a SOAPpy.Errors.HTTPError: HTTPError 502 Bad Gateway, Not with Python, but with Perl, I am seeing now and then the same error. If

Re: Google-API Bad-Gateway-Error

2006-05-16 Thread DierkErdmann
It's quite strange, after calling the script several times it started to work; but sometimes the error occurs again. Maybe google has technical probs. Dierk -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Dictionaries

2006-05-16 Thread Duncan Booth
[EMAIL PROTECTED] wrote: BTW why are python dicts implemented as hash tables and not judy arrays? Probably because: Python predates judy arrays. Nobody has proposed replacing the current dict implementation. Nobody has demonstrated that it would actually be an advantage to replace the

Unicode digit to unicode string

2006-05-16 Thread Gabriele *darkbard* Farina
Hi, I have a unicode digit stored into a variable ('0020' for example) and I'd like to retrieve the corrisponding unicode character based on the current encoding. How can i do that ? -- http://mail.python.org/mailman/listinfo/python-list

Python script for remotely shutting down Windows PC from Linux ?

2006-05-16 Thread diffuser78
I am a newbie in Python and want your help in writing python script. I have to remotely shut the windows px from linux box. I run OpenSSH on windows PC. I remotely connect it from Linux box using ssh [EMAIL PROTECTED]# connects me fine now without problems (LOCAL) Next, I wrote a

Re: Unicode digit to unicode string

2006-05-16 Thread Alexandre Fayolle
Le 16-05-2006, Gabriele [EMAIL PROTECTED] nous disait: Hi, I have a unicode digit stored into a variable ('0020' for example) and I'd like to retrieve the corrisponding unicode character based on the current encoding. How can i do that ? use the unichr builtin function -- Alexandre Fayolle

a question

2006-05-16 Thread Nader Emami
L.S., I have read all replays about web development with python. I would agree with somebody who have said that web design is depends on specific requirements. I would like to develop some in which the animation is well important. It will be an animation of a radar file. I have looked for a

Re: Large Dictionaries

2006-05-16 Thread Duncan Booth
Duncan Booth wrote: BTW why are python dicts implemented as hash tables and not judy arrays? Probably because: Python predates judy arrays. Nobody has proposed replacing the current dict implementation. Nobody has demonstrated that it would actually be an advantage to replace the

Re: Unicode digit to unicode string

2006-05-16 Thread Gabriele *darkbard* Farina
thank you, bye -- http://mail.python.org/mailman/listinfo/python-list

which one?

2006-05-16 Thread Nader Emami
L.S., I have read your replay about web development with python. I would agree with you that web design is depends on specific requirements. I would like to develop some in which the animation is well important. It will be an animation of a radar file. I have looked for a lot of alternative but I

Re: taking qoutes in arguments

2006-05-16 Thread Lee Caine
yea thanks alot for your help, gonna read up on 'Konsole' :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Large Dictionaries

2006-05-16 Thread Sion Arrowsmith
Maric Michaud [EMAIL PROTECTED] wrote: I don't see a use case where a python programmer should need a dictionnary that will be probably big but can't predict what keys will be in. I've recently been working on an app with precisely this characteristic, although there were enough other

Re: Google-API Bad-Gateway-Error

2006-05-16 Thread John Bokma
[EMAIL PROTECTED] wrote: It's quite strange, after calling the script several times it started to work; but sometimes the error occurs again. Maybe google has technical probs. Yup, I've seen exactly the same behavoir. So now I do several retry - sleep - retry steps before giving up. --

Re: Large Dictionaries

2006-05-16 Thread Chris Foote
Claudio Grondi wrote: Chris Foote wrote: However, please note that the Python bsddb module doesn't support in-memory based databases - note the library documentation's[1] wording: Files never intended to be preserved on disk may be created by passing None as the filename. which

Re: Python script for remotely shutting down Windows PC from Linux ?

2006-05-16 Thread Diez B. Roggisch
Next, I wrote a script that would log me in and also shut the windows pc down, so I wrote a script ssh [EMAIL PROTECTED] # connects me fine now without problems (LOCAL) shutdown -s# This is a windows command (REMOTE) Now, when I run this script, it successfully logs me into

Re: Python script for remotely shutting down Windows PC from Linux ?

2006-05-16 Thread diffuser78
ssh [EMAIL PROTECTED] shutdown -s Than indeed workedThanks use the subprocess module or shellutils to execute the above. I am a python newbie and how easy or difficult it is using the sub process module and shell utils. Thanks, I really appreciate your help. --

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread numeromancer
An old debate. My $0.02 : http://numeromancer.dyndns.org/~timothy/tab-width-independence/description.html The idea can be extended to other programming languages. TS -- http://mail.python.org/mailman/listinfo/python-list

Re: saving file permission denied on windows

2006-05-16 Thread zombek
That's right! I just didn't notice it. Thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: my cryptogram program

2006-05-16 Thread John Salerno
Paul Rubin wrote: You're trying to make sure that no character maps to itself in the cryptogram. I'm not sure if that's one of the rules. It's a rule for cryptogram puzzles, which is what I'm working on. I'm not trying to make complicated hacker-proof codes or anything. :) It also looks

Re: Python script for remotely shutting down Windows PC from Linux ?

2006-05-16 Thread bruno at modulix
[EMAIL PROTECTED] wrote: ssh [EMAIL PROTECTED] shutdown -s Than indeed workedThanks use the subprocess module or shellutils to execute the above. I am a python newbie and how easy or difficult it is using the sub process module and shell utils. It's as difficult as : 1. read the

Questions about the event loop

2006-05-16 Thread egbert
What does a gui_event_loop know ? My gui is based on pygtk, but i suppose the mechanism is the same everywhere. The gui is created within a class-instance within a function. Normally, ie without a gui, everything that happens within a function is forgotten as soon the function ends. But in a

Re: my cryptogram program

2006-05-16 Thread John Salerno
Bruno Desthuilliers wrote: Too late ! You asked for it, you get it !-) Good, I desperately need it! :) PUNCT_SPACE_SET = set(string.punctuation + string.whitespace) def make_set(original): return ''.join(set(original) - PUNCT_SPACE_SET) Interesting! Always learning new, weird ways to do

Re: my cryptogram program

2006-05-16 Thread John Salerno
Bruno Desthuilliers wrote: At least someone reading this may learn about the max_split param of str.split() !-) LOL. The first thing I did was scramble to the docs to see what that second parameter meant! :) But I was a little confused about why you included it. Just to insure that only

Re: Large Dictionaries

2006-05-16 Thread Claudio Grondi
Chris Foote wrote: Claudio Grondi wrote: Chris Foote wrote: However, please note that the Python bsddb module doesn't support in-memory based databases - note the library documentation's[1] wording: Files never intended to be preserved on disk may be created by passing None as

build now requires Python exist before the build starts

2006-05-16 Thread Toon Knapen
I'm trying to build the svn-trunk version of python on a Solaris box. However I do not have a python installed yet and apparantly the build of python requires a python to be accessible (as also annotated in the Makefile generated during the ./configure). How can I solve this situation? Thanks,

Re: Using python for a CAD program

2006-05-16 Thread Harry George
[EMAIL PROTECTED] writes: Hi, I'm interested in using python to start writing a CAD program for electrical design. I just got done reading Steven Rubin's book, I've used real EDA tools, and I have an MSEE, so I know what I *want* at the end of this; I just have never taken on a programming

Re: do/while structure needed

2006-05-16 Thread John Salerno
Dennis Lee Bieber wrote: And what syntax would you propose? I guess something like: do: stuff goes here and here and here while (condition) The absence of a colon after the while statement can be the signal that it isn't a regular while statement with a following

Re: my cryptogram program

2006-05-16 Thread bruno at modulix
John Salerno wrote: Bruno Desthuilliers wrote: At least someone reading this may learn about the max_split param of str.split() !-) LOL. The first thing I did was scramble to the docs to see what that second parameter meant! :) But I was a little confused about why you included it.

constucting a lookup table

2006-05-16 Thread mhodkin
I'm new to Python and want to contruct a lookup table which would be similar to a spreadsheet in that a value is read along the first column, then along the top row, and the intersection of the two gives a value that is hard-coded, i.e. not mathmatically related. An example would be a table with

Re: Using python for a CAD program

2006-05-16 Thread skip
Someone in hiding wrote: Hi, I'm interested in using python to start writing a CAD program for electrical design. Google for PythonCAD. Skip -- http://mail.python.org/mailman/listinfo/python-list

questions on python script compiling for embedding

2006-05-16 Thread Limin Fu
Dear all, I am trying to embed python into another scripting language, to do this I need to solve a number of problems on importing or compiling python script. First let me state what exactly I want to do, that is, I want the following syntax to be supported in the host language which I am

what is the difference between tuple and list?

2006-05-16 Thread daniel
is there any typical usage that shows their difference? thanks daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions about the event loop

2006-05-16 Thread bruno at modulix
egbert wrote: What does a gui_event_loop know ? My gui is based on pygtk, but i suppose the mechanism is the same everywhere. The gui is created within a class-instance within a function. Normally, ie without a gui, everything that happens within a function is forgotten as soon the

Re: what is the difference between tuple and list?

2006-05-16 Thread [EMAIL PROTECTED]
Lists are mutable, i.e. one can do this: a = [1,2,3] a[0] = 100 You can't do that with a tuple. a = (1,2,3) a[0] = 100 # error -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the difference between tuple and list?

2006-05-16 Thread Diez B. Roggisch
daniel wrote: is there any typical usage that shows their difference? d = {} d[('multi', 'part', 'key')] = 'schnarz' d[['multi', 'part', 'key']] = 'schnarz' Traceback (most recent call last): File stdin, line 1, in ? TypeError: list objects are unhashable A lot of discussions regarding

Re: what is the difference between tuple and list?

2006-05-16 Thread Simon Brunning
On 16 May 2006 07:47:24 -0700, daniel [EMAIL PROTECTED] wrote: http://www.python.org/doc/faq/general.html#why-are-there-separate-tuple-and-list-data-types -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list

Re: what is the difference between tuple and list?

2006-05-16 Thread infidel
is there any typical usage that shows their difference? I think the general idea is to use lists for homogenous collections and tuples for heterogenous structures. I think the database API provides a good usage that shows their differences. When you do cursor.fetchall() after executing a

Re: constucting a lookup table

2006-05-16 Thread johnzenger
How about a dictionary, keyed on tuples of (height, weight)? [EMAIL PROTECTED] wrote: I'm new to Python and want to contruct a lookup table which would be similar to a spreadsheet in that a value is read along the first column, then along the top row, and the intersection of the two gives a

Re: what is the difference between tuple and list?

2006-05-16 Thread Harold Fellermann
The main difference is that lists are mutables while tuples are not. Tuples are fine if you only want to group some objects (e.g. as a return value) and access their members as in t = (1,2,3,4) t[2] 3 Lists give you a lot more flexibility, because they are mutable: you can change the order of

regex help

2006-05-16 Thread Lance Hoffmeyer
I have the following table and I am trying to match percentage the 2nd column on the 2nd Tiger line (9.0). I have tried both of the following. I expected both to match but neither did? Is there a modifier I am missing? What changes do I need to make these match? I need to keep the

Windows Apache 1.3 mod_python.dll

2006-05-16 Thread Tama
Hello, I've didn't find any answer to my problem so I start a new topic. I have installed Apache 1.3.33 on Windows XP. I've also downloaded and installed ActivePython form http://www.activestate.com/. Then I went to http://www.modpython.org/ and search how to use python script with my web pages.

Re: Tabs versus Spaces in Source Code

2006-05-16 Thread Oliver Bandel
Xah Lee wrote: Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about which is better. It has become what's known as “religious war” — a heated fight

Re: Windows Apache 1.3 mod_python.dll

2006-05-16 Thread Tim N. van der Leeuw
Any particular reason for not using Apache 2, and mod_python 3.x? Anyways, looks to me like there's a problem with the path where the DLL is installed, vs. where it's search for by Apache? I had no particular problems installing Apache 2 and mod_python 3.x on WinXP, using the mod_python

Unable to extract Python source code using Windows

2006-05-16 Thread [EMAIL PROTECTED]
I'm currently trying to get access to the Python source code, however whenever I try to extract the files using the latest version of WinZip (version 10) I get the following error error reading however after processing 0 entries -- http://mail.python.org/mailman/listinfo/python-list

Unable to extract Python source code using Windows

2006-05-16 Thread [EMAIL PROTECTED]
I'm currently trying to get access to the Python source code, however whenever I try to extract the files using the latest version of WinZip (version 10) I get the following error error reading header after processing 0 entries I was under the impression that I could (from reading the various

  1   2   3   >