ANN: PyTables 2.1rc1 ready for testing

2008-10-31 Thread Francesc Alted
Announcing PyTables 2.1rc1 PyTables is a library for managing hierarchical datasets and designed to efficiently cope with extremely large amounts of data with support for full 64-bit file addressing. PyTables runs on top of the HDF5

Re: modifying locals

2008-10-31 Thread Tino Wildenhain
Hi John, John [H2O] wrote: Steven D'Aprano-7 wrote: What you are actually trying to do is unclear to me. Perhaps you could try explaining better with a more concrete example? -- Steven -- Actually, maybe a LACK of an example would make it simpler. What I'm after is a function, to which

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Dale Roberts wrote: Are you saying that C++ is capable of using the Call By Reference idiom, but C is not, because C does not have a reference designation for formal function parameters? Call by reference is not an idiom, it's a *language feature*. Pascal has it (using var), VB.NET has it

how to run python file from the python IDLE editor

2008-10-31 Thread Seid Mohammed
Greetins all 1. I can easily run python file from a comand prompt just typing python filname.py. How can I do this from the python IDLE shell 2. How to create EXE in python. thanks all for making me to be more copnfortable with python Seid M -- RABI ZIDNI ILMA --

Optparse object containing generators: only seem to work if given particular names?

2008-10-31 Thread John O'Hagan
Here's a strange one for you: I have a generator function which produces lists of numbers and takes options which influence the output. The generator contains a loop, and to enable the options to have a different value on each iteration, the options may themselves be instances of the same

Tree or hierarchical structure

2008-10-31 Thread Abah Joseph
I need tutorial or book on Tree or hierarchical structure using Python. -- http://mail.python.org/mailman/listinfo/python-list

Re: how to use logging module to log an object like print()

2008-10-31 Thread Tim Roberts
Steve Holden [EMAIL PROTECTED] wrote: Diez B. Roggisch wrote: Steve Holden schrieb: Diez B. Roggisch wrote: davy zhang schrieb: logger.debug(debug message,d)#can not do this logger.debug(yes you can: %r, d) One deficiency of this approach, however, is that the string formatting is

Re: about recursive load

2008-10-31 Thread alex23
On Fri, Oct 31, 2008 at 3:50 PM, Abah Joseph [EMAIL PROTECTED] wrote: what will module_name looks like?. i mean the new loaded module. i am very new to this also. thank you. I'm not sure if I'm following what you want... I thought you were asking for a way to load modules containing

Re: about recursive load

2008-10-31 Thread alex23
On Oct 31, 4:58 pm, alex23 [EMAIL PROTECTED] wrote: project.test.app, which the load_config module imports and then Sorry, that should be load_config *method*. -- http://mail.python.org/mailman/listinfo/python-list

Re: py2exe

2008-10-31 Thread Tim Roberts
Gandalf [EMAIL PROTECTED] wrote: OK this question is not clear enough. I'm trying to convert my python script to executable file. it seems than the simple setup(console=['file.py']) won't work in my case because i use unsupported modules (like pywinauto and extra). If you have explicit

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Joe Strout wrote: (Perhaps explaining why there appears to be far more confusion about call semantics in the Python community than in the community of other languages where the default semantics are exactly the same.) I think part of the problem stems from the fact that the word value is

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Dale Roberts wrote: Just as the Pass By Reference idiom deserves a unique name to distinguish it from Pass By Value (even though it is often Pass By (address) Value internally), so Pass By Object Reference deserves a unique name (even though it too is Pass By (reference) Value internally).

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Steven D'Aprano wrote: Which definition of call-by-value? Certainly not the one that most people are familiar with, where c-b-v implies that calling a function with a large array will copy the entire array. But that's only true in languages where *assigning* a large array will also copy the

Re: modifying locals

2008-10-31 Thread Marc 'BlackJack' Rintsch
On Thu, 30 Oct 2008 16:19:11 -0700, John [H2O] wrote: Steven D'Aprano-7 wrote: What you are actually trying to do is unclear to me. Perhaps you could try explaining better with a more concrete example? Actually, maybe a LACK of an example would make it simpler. What I'm after is a

Re: Printing with interspersed element

2008-10-31 Thread Marc 'BlackJack' Rintsch
On Thu, 30 Oct 2008 16:40:17 -0500, Grant Edwards wrote: If you want to do it on the fly, then try something like this: iter = [1,2,3,4,5].__iter__() sys.stdout.write(str(iter.next())) for n in iter: sys.stdout.write(',' +str(n)) Maybe without shadowing the built in `iter()` and

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Steven D'Aprano wrote: By value is very simple. It means a copy of the value is passed to the function. It only means that if you understand copy to mean whatever it is that happens when you perform an assignment. In Python, the term copy tends to imply rather more than that, so you go off

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Aaron Brady wrote: Maybe I missed this part. What does the phrase, value of variable x mean in Python? I didn't use the phrase value of variable x anywhere in my definitions, so it doesn't matter what it means, or even whether it means anything at all. If value of 'x' is not defined, we

Re: modifying locals

2008-10-31 Thread Steven D'Aprano
On Fri, 31 Oct 2008 07:10:05 +0100, Tino Wildenhain wrote: Also, locals() already returns a dict, no need for the exec trickery. You can just modify it: locals()[foo]=bar foo 'bar' That is incorrect. People often try modifying locals() in the global scope, and then get bitten when

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Douglas Alan wrote: greg [EMAIL PROTECTED] writes: This holds for *all* languages that I know about, both static and dynamic. Then you don't know about all that many languages. There are languages that use call-by-name, and those that use call-by-value-return. Some use call-by-need and

Re: modifying locals

2008-10-31 Thread Tino Wildenhain
Hi, Steven D'Aprano wrote: On Fri, 31 Oct 2008 07:10:05 +0100, Tino Wildenhain wrote: Also, locals() already returns a dict, no need for the exec trickery. You can just modify it: locals()[foo]=bar foo 'bar' That is incorrect. People often try modifying locals() in the global scope,

Re: Finding the instance reference of an object

2008-10-31 Thread greg
Steven D'Aprano wrote: Using call by value to mean pass a copy of a reference to the value is an abuse of terminology, because that's exactly what happens in call by reference: a copy of the reference to the value is passed. No, it's not a reference to a value, it's a reference to a

Re: Finding the instance reference of an object

2008-10-31 Thread Steven D'Aprano
On Fri, 31 Oct 2008 20:07:16 +1300, greg wrote: Joe Strout wrote: (Perhaps explaining why there appears to be far more confusion about call semantics in the Python community than in the community of other languages where the default semantics are exactly the same.) I think part of the

Re: Finding the instance reference of an object

2008-10-31 Thread Steven D'Aprano
On Fri, 31 Oct 2008 20:15:30 +1300, greg wrote: Dale Roberts wrote: Just as the Pass By Reference idiom deserves a unique name to distinguish it from Pass By Value (even though it is often Pass By (address) Value internally), so Pass By Object Reference deserves a unique name (even though

Re: Optparse object containing generators: only seem to work if given particular names?

2008-10-31 Thread Peter Otten
John O'Hagan wrote: Here's a strange one for you: I have a generator function which produces lists of numbers and takes options which influence the output. The generator contains a loop, and to enable the options to have a different value on each iteration, the options may themselves be

Re: 2.6, 3.0, and truly independent intepreters

2008-10-31 Thread greg
Patrick Stinson wrote: Speaking of the big picture, is this how it normally works when someone says Here's some code and a problem and I'm willing to pay for a solution? In an open-source volunteer context, time is generally more valuable than money. Most people can't just drop part of their

Re: open a new terminal window from another terminal window in linux/unix system

2008-10-31 Thread Tim Golden
gaurav kashyap wrote: I am using Microsoft Windows XP.Using putty.exe,I connected to LINUX server and a terminal window gets opened.Here i logeed in as root. What i want to do is open another terminal window from already opened terminal window. Can this be achieved.If yes,please provide a

Re: Single string vs list of strings

2008-10-31 Thread greg
Grant Edwards wrote: Checking to see if something is a sequence of strings is a bit trickier, since a string is actually a sequence of strings. For that reason I'd just check whether it's a string, and if it's anything else, assume it's a sequence of strings. You'll find out soon enough if it

Re: Finding the instance reference of an object

2008-10-31 Thread Bruno Desthuilliers
greg a écrit : Aaron Brady wrote: Maybe I missed this part. What does the phrase, value of variable x mean in Python? I didn't use the phrase value of variable x anywhere in my definitions, so it doesn't matter what it means, or even whether it means anything at all. If value of 'x' is

Re: Finding the instance reference of an object

2008-10-31 Thread Steven D'Aprano
On Fri, 31 Oct 2008 20:22:23 +1300, greg wrote: Steven D'Aprano wrote: Which definition of call-by-value? Certainly not the one that most people are familiar with, where c-b-v implies that calling a function with a large array will copy the entire array. But that's only true in languages

Re: modifying locals

2008-10-31 Thread Arnaud Delobelle
On Oct 30, 9:21 pm, John [H2O] [EMAIL PROTECTED] wrote: I would like to write a function to write variables to a file and modify a few 'counters'. This is to replace multiple instances of identical code in a module I am writing. This is my approach: def write_vars(D):     pass D=locals()

Re: How to open a shell prompt from an existing shell prompt

2008-10-31 Thread Tino Wildenhain
Hi, gaurav kashyap wrote: Dear Tino, There is no subprocess module in python 2.3.5. My goal is: 1.Open a terminal window and login as root. 2.Issue some command in the terminal window that will open another terminal,similar to the onealready opened. Am i clear now. Not at all. All

Re: open a new terminal window from another terminal window in linux/unix system

2008-10-31 Thread Tino Wildenhain
Hi, gaurav kashyap wrote: Dear all, I am using Microsoft Windows XP.Using putty.exe,I connected to LINUX server and a terminal window gets opened.Here i logeed in as root. What i want to do is open another terminal window from already opened terminal window. Ugh. As others said and I

Re: how to use logging module to log an object like print()

2008-10-31 Thread Vinay Sajip
On Oct 30, 4:34 am, Steve Holden [EMAIL PROTECTED] wrote: Vinay, please tell me whether I was right or wrong ... What Tim Roberts has already said is right ... my post was highlighting how to mitigate any overhead which is typically (or at least in general terms) higher than the cost of

Re: Python suitable for Midi ?

2008-10-31 Thread Chuckk Hubbard
On Tue, Oct 28, 2008 at 7:13 PM, Derek Martin [EMAIL PROTECTED] wrote: On Tue, Oct 28, 2008 at 06:54:57PM +0200, Chuckk Hubbard wrote: The problem I've run into is that I can't set the audio to a higher priority than the GUI (Tkinter). If I move the mouse over the app, no matter what, I get

python openssl x509 CA

2008-10-31 Thread Marcin Jurczuk
Hello, I'm fighting with Certificate Authority functionality with python I stuck on following problem: How to sign CSR using CA key and write resulted certificate. You can do it using following openssl cmd: openssl ca -cert CA/cert.pem -keyfile CA/private/cakey.pem -policy policy_anything -out

Re: modifying locals

2008-10-31 Thread M.-A. Lemburg
On 2008-10-31 09:08, Tino Wildenhain wrote: Hi, Steven D'Aprano wrote: On Fri, 31 Oct 2008 07:10:05 +0100, Tino Wildenhain wrote: Also, locals() already returns a dict, no need for the exec trickery. You can just modify it: locals()[foo]=bar foo 'bar' That is incorrect. People

Re: Is there a time limit for replies?

2008-10-31 Thread Ulrich Eckhardt
Rafe wrote: I tried to post some follow-ups to some issues I posted in the hopes of helping others, but I only get reply to author and forward, but no reply option (using GoogleGroups). Is there some kind of time limit to reply? Two things: 1. Google Groups is by far not the best interface to

Re: modifying locals

2008-10-31 Thread Tino Wildenhain
M.-A. Lemburg wrote: On 2008-10-31 09:08, Tino Wildenhain wrote: ... Ah thats interesting. I would not know because I usually avoid such ugly hacks :-) It doesn't even work for already defined local variables: def foo(): ... x = 1 ... locals()['x'] = 2 ... print x ... foo()

Re: Is there a time limit for replies?

2008-10-31 Thread Rafe
On Oct 31, 5:21 pm, Ulrich Eckhardt [EMAIL PROTECTED] wrote: Rafe wrote: I tried to post some follow-ups to some issues I posted in the hopes of helping others, but I only get reply to author and forward, but no reply option (using GoogleGroups). Is there some kind of time limit to reply?

Re: python openssl x509 CA

2008-10-31 Thread M.-A. Lemburg
On 2008-10-31 11:10, Marcin Jurczuk wrote: Hello, I'm fighting with Certificate Authority functionality with python I stuck on following problem: How to sign CSR using CA key and write resulted certificate. You can do it using following openssl cmd: openssl ca -cert CA/cert.pem -keyfile

Re: Python 2.5: wrong number of arguments given in TypeError for function argument aggregation (dictionary input vs the norm)

2008-10-31 Thread M.-A. Lemburg
On 2008-10-31 00:18, John Krukoff wrote: On Fri, 2008-10-31 at 08:55 +1000, James Mills wrote: What you have discovered is not a bug :) cheers James Are you sure? It looks like his complaint isn't that it doesn't work, but that the error message is misleading. With the setup:

Is there a time limit for replies?

2008-10-31 Thread Rafe
I tried to post some follow-ups to some issues I posted in the hopes of helping others, but I only get reply to author and forward, but no reply option (using GoogleGroups). Is there some kind of time limit to reply? Thanks, - Rafe -- http://mail.python.org/mailman/listinfo/python-list

Windows DOS box redirection (was: Code not work - DESPERATE HELP)

2008-10-31 Thread Bill McClain
On 2008-10-31, Glenn Linderman [EMAIL PROTECTED] wrote: The problem with stdin/stdout is on Windows 2000 (and maybe the earlier NT?). But not on XP or AFAIK Vista. It only occurs when a program is executed indirectly using the file associations instead of directly via the command line.

Re: Finding the instance reference of an object

2008-10-31 Thread Arnaud Delobelle
On Oct 31, 9:12 am, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: [...] There's enough difficulty with learning a new programming language without people adding to it by misusing terms like call by value to describe what Python does. Maybe it could be named 'call by assignment'?

Re: open a new terminal window from another terminal window in linux/unix system

2008-10-31 Thread Paul Boddie
On 31 Okt, 10:50, Tino Wildenhain [EMAIL PROTECTED] wrote: gaurav kashyap wrote: I am using Microsoft Windows XP.Using putty.exe,I connected to LINUX server  and a terminal window gets opened.Here i logeed in as root. As pointed out already, root privileges should be used with caution,

Re: Finding the instance reference of an object

2008-10-31 Thread Steven D'Aprano
On Thu, 30 Oct 2008 19:55:57 -0700, Aaron Brady wrote: On Oct 30, 9:05 pm, Steven D'Aprano [EMAIL PROTECTED] cybersource.com.au wrote: On Fri, 31 Oct 2008 13:58:13 +1300, greg wrote: Dale Roberts wrote: snip If they understand how assignment works in Python, that tells them all they

Re: Windows DOS box redirection

2008-10-31 Thread Tim Golden
Bill McClain wrote: On 2008-10-31, Glenn Linderman [EMAIL PROTECTED] wrote: The problem with stdin/stdout is on Windows 2000 (and maybe the earlier NT?). But not on XP or AFAIK Vista. It only occurs when a program is executed indirectly using the file associations instead of directly via

Re: Is there a time limit for replies?

2008-10-31 Thread Paul Boddie
On 31 Okt, 10:38, Rafe [EMAIL PROTECTED] wrote: I tried to post some follow-ups to some issues I posted in the hopes of helping others, but I only get reply to author and forward, but no reply option (using GoogleGroups). Is there some kind of time limit to reply? Probably not for any of the

Re: Is there a time limit for replies?

2008-10-31 Thread Ulrich Eckhardt
Rafe wrote: Can you recommend anything? I would like to avoid 1,000s of emails flooding my account though. I like knode from KDE for browsing the Usenet. The Mozilla suite also contains a newsreader. Other than that, use a webmail account and configure a filter to file everything Pythonic into

[ANN] FOSS Project for grabbing contacts from gmail, yahoo, rediff etc.

2008-10-31 Thread Sanjay
Hi All, Glad to announce a python open source project named ContactGrabber to grab the contact emails from gmail, yahoo, rediff etc. The project is hosted at http://code.google.com/p/pycontactgrabber/ and is also available at cheeseshop. It is now working fine for 'gmail', 'yahoo' and 'rediff'.

Re: open a new terminal window from another terminal window in linux/unix system

2008-10-31 Thread Grant Edwards
On 2008-10-31, gaurav kashyap [EMAIL PROTECTED] wrote: Can this be achieved. If yes,please provide a tested solution Rude much? -- Grant Edwards grante Yow! Hmmm ... A hash-singer at and a cross-eyed guy were

Re: Is there a time limit for replies?

2008-10-31 Thread Duncan Booth
Paul Boddie [EMAIL PROTECTED] wrote: On 31 Okt, 10:38, Rafe [EMAIL PROTECTED] wrote: I tried to post some follow-ups to some issues I posted in the hopes of helping others, but I only get reply to author and forward, but no reply option (using GoogleGroups). Is there some kind of time limit

Re: Finding the instance reference of an object

2008-10-31 Thread Grant Edwards
On 2008-10-31, greg [EMAIL PROTECTED] wrote: Dale Roberts wrote: Just as the Pass By Reference idiom deserves a unique name to distinguish it from Pass By Value (even though it is often Pass By (address) Value internally), so Pass By Object Reference deserves a unique name (even though it

Re: Finding the instance reference of an object

2008-10-31 Thread Dale Roberts
On Oct 31, 3:15 am, greg [EMAIL PROTECTED] wrote: Dale Roberts wrote: Just as the Pass By Reference idiom deserves a unique name to distinguish it from Pass By Value (even though it is often Pass By (address) Value internally), so Pass By Object Reference deserves a unique name (even

Re: Is there a time limit for replies?

2008-10-31 Thread Grant Edwards
On 2008-10-31, Ulrich Eckhardt [EMAIL PROTECTED] wrote: Rafe wrote: I tried to post some follow-ups to some issues I posted in the hopes of helping others, but I only get reply to author and forward, but no reply option (using GoogleGroups). Is there some kind of time limit to reply? Two

How to make money with Python!

2008-10-31 Thread Duncan Booth
If that subject line didn't trip everyone's killfiles, see http://pythonide.blogspot.com/2008/10/how-to-make-money-with-free-software.html for a fantastic story involving Python. -- Duncan Booth http://kupuguy.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-10-31 Thread Dale Roberts
On Oct 31, 2:27 am, greg [EMAIL PROTECTED] wrote: Dale Roberts wrote: Are you saying that C++ is capable of using the Call By Reference idiom, but C is not, because C does not have a reference designation for formal function parameters? Call by reference is not an idiom, it's a

ctypes for Jython?

2008-10-31 Thread dudeja . rajat
Hi All, Is ctypes or something like this available for Jython? -- Regards, Rajat -- http://mail.python.org/mailman/listinfo/python-list

Testing dictionary results with doctest

2008-10-31 Thread Joe Strout
I love doctest -- the way it combines documentation with verification seems elegant and useful, and most of the time it's simple and easy to use. But I've run into a bit of a snag trying to test a method that returns a dictionary, because (of course) the order in which the dictionary

Pyodbc and minimock with doctest

2008-10-31 Thread dj
Hello, I have just started working with minimock in doctest. I want to create a mock pyodbc object which returns a string value when the method execute is called. Here is my doctest: from minimock import Mock import pyodbc def database_response() ... ServerName = 'test_server' ...

Re: Windows DOS box redirection

2008-10-31 Thread Bill McClain
On 2008-10-31, Tim Golden [EMAIL PROTECTED] wrote: You've got a few options. Ok, thanks! It is a small hobbyist community. I'll just document it and tell them life is hard for Windows users. -Bill -- Sattre PressThe King in Yellow http://sattre-press.com/

Re: How to make money with Python!

2008-10-31 Thread Grant Edwards
On 2008-10-31, Duncan Booth [EMAIL PROTECTED] wrote: If that subject line didn't trip everyone's killfiles, see http://pythonide.blogspot.com/2008/10/how-to-make-money-with-free-software.html for a fantastic story involving Python. Doh! The very clever pun went right past me several times

Re: Restricted Execution of untrusted code

2008-10-31 Thread Emanuele D'Arrigo
On Oct 30, 8:50 pm, Aaron Brady [EMAIL PROTECTED] wrote: Otherwise, you might be able to remove access to it by modifying however it is the 'cust' list is obtained.  Perhaps you can use the technique that's used to change the value of integers.  Keep us posted.  Does this give you any ideas?

indexing arrays in extensions created with ext_tools (scipy.weave)

2008-10-31 Thread Soren
Hi, I'm trying to make a weave python extension to use in my program. I already did it in inline, but that doesn't work with py2exe (needs compiler), so I'm creating extensions instead using ext_tools. Is there a way I can use blitz with ext_tools? so that I can refer to arrays like a(x,y) in

Re: Testing dictionary results with doctest

2008-10-31 Thread Duncan Booth
Joe Strout [EMAIL PROTECTED] wrote: What's the standard solution for this? Should I iterate over the sorted keys and print those out instead? Is there some built-in method somewhere that will print a dictionary in a reliable order? Does doctest have some special way to tell it to

Re: Testing dictionary results with doctest

2008-10-31 Thread bearophileHUGS
Joe Strout: What's the standard solution for this? I don't know of any standard solution, I generally sort the items in some ways, or add the result, that has to be equal: r = foo() r == {'object': 'rain', 'location': 'Spain', 'subloc': 'train'} True Does doctest have some special way to

Re: Testing dictionary results with doctest

2008-10-31 Thread MRAB
On Oct 31, 2:43 pm, Joe Strout [EMAIL PROTECTED] wrote: I love doctest -- the way it combines documentation with verification   seems elegant and useful, and most of the time it's simple and easy to   use. But I've run into a bit of a snag trying to test a method that returns   a dictionary,

Re: Exec and Scope

2008-10-31 Thread Emanuele D'Arrigo
On Oct 31, 3:56 am, James Mills [EMAIL PROTECTED] wrote: Good lord man, what are you trying to solve ? Describe your actual problem you're attempting to solve... This looks really really ugly and I would advise against any solution that relies on exec() I knew I was going to get some lighting

Extend Google docs?

2008-10-31 Thread bdbull
Is it possible to extend google docs or create a new project in GAE and use the google docs editor and all of its functionality? -- http://mail.python.org/mailman/listinfo/python-list

Re: Finding the instance reference of an object

2008-10-31 Thread pjacobi . de
Instead of comparing integers: x = 1 y = x # does assignment make copies? y += 1 assert x == 1 = succeeds, which implies that Python makes a copy when assigning with lists: x = [1] y = x # does assignment make copies? y += [1] assert x == [1] = fails, which implies that Python uses

Re: Finding the instance reference of an object

2008-10-31 Thread Duncan Booth
[EMAIL PROTECTED] wrote: x = 1 y = x # does assignment make copies? y += 1 assert x == 1 = succeeds, which implies that Python makes a copy when assigning with lists: x = [1] y = x # does assignment make copies? y += [1] assert x == [1] = fails, which implies that Python uses

Re: IDLE stopped working

2008-10-31 Thread Tal Einat
On Oct 27, 2:31 am, brianrpsgt1 [EMAIL PROTECTED] wrote: OSX 10.5.5 Python 2.5.1 I started upIDLEtoday and the bottom of the window was off of the screen.  I could not find a way to resize it.  I closed all apps and rebooted.  After rebooting,IDLEwill not start.  Below is the Traceback:

Re: Exec and Scope

2008-10-31 Thread Emanuele D'Arrigo
On Oct 31, 4:38 am, Rafe [EMAIL PROTECTED] wrote: If you are just looking to execute an attribute (be it a property, module-level function, instance or class method, or anything else which is an attribute of an object), just use getattr(). I must check this out. My understanding is that

Re: Finding the instance reference of an object

2008-10-31 Thread Douglas Alan
greg [EMAIL PROTECTED] writes: Douglas Alan wrote: greg [EMAIL PROTECTED] writes: This holds for *all* languages that I know about, both static and dynamic. Then you don't know about all that many languages. There are languages that use call-by-name, and those that use

Can I build Python with lthread instead of pthread?

2008-10-31 Thread Akira Kitada
Hi, I'm running Python 2.5 on FreeBSD 4. pthread on FreeBSD 4 has some problems so I would like to build python with lthread (linuxthreads) instead of BSD's pthread. So I looked at configure options but couldn't find any options for it. Python support lthread? and how can I build python with it?

CAD.py

2008-10-31 Thread r
Hello I am currently looking to create a small CAD program with python. This has been a major challenge for some like myself with very limited math skills, and only a year of self taught programming experience. But being the kind of hard headed, determined person I am, I won't give up. ;^) A

brackets content regular expression

2008-10-31 Thread netimen
I have a text containing brackets (or what is the correct term for ''?). I'd like to match text in the uppermost level of brackets. So, I have sth like: ' 123 1 aaa t bbb a tt ff 2 b'. How to match text between the uppermost brackets ( 1 aaa t bbb a tt ff 2 )? P.S. sorry

Re: how to run python file from the python IDLE editor

2008-10-31 Thread r
On Oct 31, 1:33 am, Seid Mohammed [EMAIL PROTECTED] wrote: Greetins all 1. I can easily run python file from a comand prompt just typing python filname.py. How can I do this from the python IDLE shell 2. How to create EXE in python. thanks all for making me to be more copnfortable with

Re: Windows DOS box redirection

2008-10-31 Thread Stef Mientki
Bill McClain wrote: On 2008-10-31, Tim Golden [EMAIL PROTECTED] wrote: You've got a few options. Ok, thanks! It is a small hobbyist community. I'll just document it and tell them life is hard for Windows users. Well I don't know any Windows users that still use DOS-boxes ;-)

Re: brackets content regular expression

2008-10-31 Thread Alex_Gaynor
On Oct 31, 1:25 pm, netimen [EMAIL PROTECTED] wrote: I have a text containing brackets (or what is the correct term for ''?). I'd like to match text in the uppermost level of brackets. So, I have sth like: ' 123 1 aaa t bbb a tt   ff 2 b'. How to match text between the uppermost

Re: brackets content regular expression

2008-10-31 Thread Paul McGuire
On Oct 31, 12:25 pm, netimen [EMAIL PROTECTED] wrote: I have a text containing brackets (or what is the correct term for ''?). I'd like to match text in the uppermost level of brackets. So, I have sth like: ' 123 1 aaa t bbb a tt   ff 2 b'. How to match text between the

Re: brackets content regular expression

2008-10-31 Thread Matimus
On Oct 31, 10:25 am, netimen [EMAIL PROTECTED] wrote: I have a text containing brackets (or what is the correct term for ''?). I'd like to match text in the uppermost level of brackets. So, I have sth like: ' 123 1 aaa t bbb a tt   ff 2 b'. How to match text between the

Selecting multiple directories (TKinter)

2008-10-31 Thread Fabian Svara
Hi, I'm currently using tkFileDialog.askdirectory() to select a single directory. I would like to be able to select multiple directories. tkFileDialog.askopenfilenames() seems to do this for files. What can I do in my situation? Are there alternative classes that provide file dialogs

Re: Windows DOS box redirection

2008-10-31 Thread Bill McClain
On 2008-10-31, Stef Mientki [EMAIL PROTECTED] wrote: Well I don't know any Windows users that still use DOS-boxes ;-) cheers, What do they do when they want to run a cross-platform command-line script with parameters and redirection? I suppose they could install cygwin and run bash, but that

Decorator for validation - inefficient?

2008-10-31 Thread Bryan
I want my business objects to be able to do this: class Person(base): def __init__(self): self.name = None @base.validator def validate_name(self): if not self.name: return ['Name cannot be empty'] p = Person() print p.invalid # Prints ['Name cannot be empty']

Re: Windows DOS box redirection

2008-10-31 Thread Tim Golden
Bill McClain wrote: On 2008-10-31, Stef Mientki [EMAIL PROTECTED] wrote: Well I don't know any Windows users that still use DOS-boxes ;-) cheers, What do they do when they want to run a cross-platform command-line script with parameters and redirection? I think it's a slight dig at the

Re: Windows DOS box redirection

2008-10-31 Thread Shawn Milochik
On Fri, Oct 31, 2008 at 2:14 PM, Bill McClain [EMAIL PROTECTED] wrote: On 2008-10-31, Stef Mientki [EMAIL PROTECTED] wrote: Well I don't know any Windows users that still use DOS-boxes ;-) cheers, What do they do when they want to run a cross-platform command-line script with parameters and

Re: python openssl x509 CA

2008-10-31 Thread Paul Rubin
Marcin Jurczuk [EMAIL PROTECTED] writes: I want to create pure python implementation without use of openssl wrapped with python code. There was a CA written in Python quite a while back, http://pyca.de . I don't know if it's maintained these days. --

Re: Testing dictionary results with doctest

2008-10-31 Thread Paul Rubin
Joe Strout [EMAIL PROTECTED] writes: t.match( The rain in Spain falls mainly on the train. ) {'object': 'rain', 'location': 'Spain', 'subloc': 'train'} You can compare dictionaries for equality: t.match( The rain in Spain falls mainly on the train. ) == \ {'object':

Function Memory Usage

2008-10-31 Thread Paulo J. Matos
Hi all, What's the best way to know the amount of memory allocated by a function and the time it took to run? While the latter is simple to implement using a wrapper function, the former is striking me as something that needs to be primitive to python. Any tips? Cheers, -- Paulo Jorge Matos -

convert string literal to object attribute

2008-10-31 Thread BiraRai
def getAttributeForProperty(self,rollnumber,attribute): # attribute have the value _ward ''' If year is null then use current year. Returns the value of the attribute for the given roll number ''' print 'Searching for attribute', attribute

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
On approximately 10/31/2008 5:06 AM, came the following characters from the keyboard of Bill McClain: On 2008-10-31, Glenn Linderman [EMAIL PROTECTED] wrote: The problem with stdin/stdout is on Windows 2000 (and maybe the earlier NT?). But not on XP or AFAIK Vista. It only occurs when

split() and string.whitespace

2008-10-31 Thread Chaim Krause
I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two return the whole sentence entact. import string from string import whitespace mytext = The quick brown

Re: brackets content regular expression

2008-10-31 Thread netimen
Thank's but if i have several top-level groups and want them match one by one: text = a b с d here starts a new group: e f g I want to match first b с d and then e f g but not b с d here starts a new group: e f g On 31 окт, 20:53, Matimus [EMAIL PROTECTED] wrote: On

Re: split() and string.whitespace

2008-10-31 Thread Marc 'BlackJack' Rintsch
On Fri, 31 Oct 2008 11:53:30 -0700, Chaim Krause wrote: I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two return the whole sentence entact. import

Re: split() and string.whitespace

2008-10-31 Thread Tim Chase
I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two return the whole sentence entact. import string from string import whitespace mytext = The quick brown

Re: split() and string.whitespace

2008-10-31 Thread Chris Rebert
On Fri, Oct 31, 2008 at 11:53 AM, Chaim Krause [EMAIL PROTECTED] wrote: I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two return the whole sentence

Re: convert string literal to object attribute

2008-10-31 Thread Marc 'BlackJack' Rintsch
On Fri, 31 Oct 2008 11:40:02 -0700, BiraRai wrote: def getAttributeForProperty(self,rollnumber,attribute): # attribute have the value _ward ''' If year is null then use current year. Returns the value of the attribute for the given roll number ''' print

Re: Windows DOS box redirection

2008-10-31 Thread Bill McClain
On 2008-10-31, Shawn Milochik [EMAIL PROTECTED] wrote: Easy. Make a desktop shortcut which includes the parameters, etc. People do that all the time, including for GUI apps such as Internet Explorer which have some optional command-line shortcuts. The only thing you have to do is make sure

Re: Windows DOS box redirection

2008-10-31 Thread Glenn Linderman
A little bit ago, I wrote: Creating the registry setting mentioned in this kb article didn't (immediately) solve the problem. Next time I reboot, I'll try to remember to test this again. It occurred to me to create a new CMD Prompt (yes, it is not a DOS box in these versions of Windows)

  1   2   >