Re: Set/Get attribute syntatic sugar

2005-06-29 Thread szport
> e = 'i_am_an_attribute' > o.(e) = 10 > o.i_am_an_attribute == 10 Yes I mean this thing: to write o.(e) = 10 or o.[e] = 10 -- http://mail.python.org/mailman/listinfo/python-list

Re: map vs. list-comprehension

2005-06-29 Thread Scott David Daniels
Mandus wrote: > 29 Jun 2005 10:04:40 GMT skrev F. Petitjean: > >>Le Wed, 29 Jun 2005 09:46:15 + (UTC), Mandus a écrit : >> >>res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ] > > seem to be a tad slower than the map, but nothing serious. Guess it's > the extra zip. You could try timing it using i

Re: Debugger Confusion

2005-06-29 Thread Rex Eastbourne
Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: Python/IDLE - text in different colours

2005-06-29 Thread TouTaTis
"Bill Davy" <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > To make life easier for my users, I'd like to colour my prompt string > (as handed to raw_input()) a different colour to that produced by > print. I'm using Python 2.4.1 and IDLE 1.1.1 on Windows XP. Is it > possible, and if so,

Re: Reading output from a child process non-blockingly

2005-06-29 Thread Dan Sommers
On Wed, 29 Jun 2005 15:45:20 +0200, Thomas Guettler <[EMAIL PROTECTED]> wrote: > Check out.log with "tail" or "less +F". Do you see the data appear in > small chunks? ... You'll need "tail -f", I think. Regards, Dan -- Dan Sommers -- http://mail.python.org/

Re: Set/Get attribute syntatic sugar

2005-06-29 Thread szport
Yes, I mean this thing. -- http://mail.python.org/mailman/listinfo/python-list

RE: Open running processes

2005-06-29 Thread Tim Golden
[DeRRudi] | Well it doesnt work yet, but its gonna! ;) | i've tested it with a little app. There is my main app (called it | server) wich contains a thread. This thread listens to a mm (memory | mapping) when an other program sets a flag | (finished_producing_event.set() ) it just calls self.iconiz

re:Open running processes

2005-06-29 Thread DeRRudi
Well it doesnt work yet, but its gonna! ;) i've tested it with a little app. There is my main app (called it server) wich contains a thread. This thread listens to a mm (memory mapping) when an other program sets a flag (finished_producing_event.set() ) it just calls self.iconize(false) I'm not su

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-29 Thread Dan Sommers
On Wed, 29 Jun 2005 03:14:26 -, Grant Edwards <[EMAIL PROTECTED]> wrote: > On 2005-06-28, James Stroud <[EMAIL PROTECTED]> wrote: >> I think James Bond did it for Americans. He always wore a >> dinner jacket and played a lot of backarack--which is only >> cool because you have to bet a lot of

Re: Boss wants me to program

2005-06-29 Thread Chinook
On Wed, 29 Jun 2005 08:11:43 -0400, phil wrote (in article <[EMAIL PROTECTED]>): > > Comes down to preference. Isn't it absolutely amazing how many > choices we have. Remember the 70's - Cobol, ASM, C, Basic.CICS(shudder) > And please, no eulogies (especially for CICS) - being reminded of them

Re: whois like functionality on Windows?

2005-06-29 Thread Peter Hansen
Gerrit Muller wrote: > thanks for your suggestion. I did indeed look broader than whois, and > reverse DNS maybe a better description. Unfortunately I did try the > socket.gethostbyaddr("194.109.137.226"), but the result was a > disappointing "host not found", both at home on an XP machine as we

Programmers Contest: Fit pictures on a page

2005-06-29 Thread hicinbothem
GLOSSY: The Summer Programmer Of The Month Contest is underway! Deadline is September 30, 2005 http://dinsights.com/POTM I love taking digital pictures, but that nice glossy photo paper is expensive! So when my lovel

Re: MS Compiler to build Python 2.3 extension

2005-06-29 Thread Richie Hindle
[Gary] > I recenly built a C API Python extension for Python 2.3 > on OS X, and now I need to build it for Windows. Will > [MS Visual Studio Pro 6.0] do the trick? Yes. That's exactly the compiler that Python 2.3 itself, and most 2.3 extensions, were built with. -- Richie Hindle [EMAIL PROTEC

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-29 Thread Steven D'Aprano
On Tue, 28 Jun 2005 11:27:40 -0700, muldoon wrote: > Americans consider having a "British accent" a sign of sophistication > and high intelligence. Many companies hire salespersons from Britain to > represent their products,etc. Question: When the British hear an > "American accent," does it sound

Re: Which kid's beginners programming - Python or Forth?

2005-06-29 Thread Rocco Moretti
BORT wrote: > Gentle folk of comp.lang.python, I heartily thank you all for your > input. I think I'm taking the boys through the door marked "Logo." We > may be back this way, though. We will likely need MORE in the nebulous > future. I am impressed with the outpouring of support here! Other

MS Compiler to build Python 2.3 extension

2005-06-29 Thread garyrob
Hello, I have no Microsoft compilers on my hard disk. I recenly built a C API Python extension for Python 2.3 on OS X, and now I need to build it for Windows. When I start Python 2.3 on Windows, it says it was built with "MS C v.1200". I'm not sure how that maps to current Microsoft compiler prod

Re: python broadcast socket

2005-06-29 Thread Grant Edwards
On 2005-06-29, <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote: > I'm sort of new to both Python and socket programming so I > appologize ahead of time if this is a dumb question. I have > found that the following code works on windows but on linux I > get an exception. > > import socket > s = sock

Re: tkinter radiobutton

2005-06-29 Thread William Gill
I did some more digging based on your code, and discovered list comprehensions. They didn't register the first time I skimmed the language reference and tutorial. It's obvious the more I learn, the more I need to relearn what I think I know. I need to study comprehensions, but they open up l

Re: COM problem .py versus .exe

2005-06-29 Thread Greg Miller
I didn't see the earlier post, thanks for the resend. The firefighting is just about over, I have to find the machine owner to get permission to try the code. Then back to the dll version battle. If I can keep away from dealing with the ctypes code I will. I'll see how this works for me. Thank

Re: Python syntax high-lighting and preservation on web

2005-06-29 Thread Gregory Piñero
This is perfect! Thanks! On 6/29/05, Daniel Dittmar <[EMAIL PROTECTED]> wrote: > Gregory Piñero wrote: > > Hey guys, > > > > Does anyone know where I can pick up a style sheet (css) and/or other > > files/programs I might need to display python code on my website with > > tab preservation(or rep

python broadcast socket

2005-06-29 Thread ronpro
I'm sort of new to both Python and socket programming so I appologize ahead of time if this is a dumb question. I have found that the following code works on windows but on linux I get an exception. import socket s = socket.socket( socket.AF_INET, socket.SOCK_DGRAM ) s.connect( ( '', 1617 ) )

Re: Got an interesting problem. (platform ruuning issue)

2005-06-29 Thread John Abel
Jeffrey Maitland wrote: >when running scripts they seem to work fine on ia-32 but I get >segfault on ia-64 what the heck should I be looking for? > >I did notice that it seems to work ok only for certain scripts but any >script that imports MySQLdb or glob seems to make this occur. > >Thanks Jeff

Re: How to find Windows "Application data" directory??

2005-06-29 Thread pyguy2
I had a post yesterday on just that. Anyways, I always love it when what can be a really annoying problem, reduces into as something simple and elegant like a python dict. (in general, I find dictionaries rock). I remember a similar eureka, when some time ago I found it really neat that split

Re: Reading output from a child process non-blockingly

2005-06-29 Thread Thomas Guettler
Am Wed, 29 Jun 2005 16:08:54 +0800 schrieb Yuan HOng: > In my program I have to call an external program and parse its output. > For that I use the os.popen2 function, and then read the output > stream. [cut] > I tried use select.select on the output stream returned by os.popen2, > but it returns

Re: Python syntax high-lighting and preservation on web

2005-06-29 Thread Daniel Dittmar
Gregory Piñero wrote: > Hey guys, > > Does anyone know where I can pick up a style sheet (css) and/or other > files/programs I might need to display python code on my website with > tab preservation(or replace with spaces) and colored syntax? I want > something similar to the python code on a pag

Got an interesting problem. (platform ruuning issue)

2005-06-29 Thread Jeffrey Maitland
when running scripts they seem to work fine on ia-32 but I get segfault on ia-64 what the heck should I be looking for? I did notice that it seems to work ok only for certain scripts but any script that imports MySQLdb or glob seems to make this occur. Thanks Jeff -- http://mail.python.org/mailm

Re: XMLRPC and non-ascii characters

2005-06-29 Thread Richard Brodie
"Joxean Koret" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I'm having troubles to make my XMLRPC application working with non > ASCII characters. I don't think XMLRPC has a mechanism for specifying an encoding other than UTF-8 (and that only by default). If you recode to that,

RE: COM problem .py versus .exe

2005-06-29 Thread Tim Golden
[Greg Miller] | Unfortunately I have a "fire" to put out with a patch to the existing | machine code, I'll get back to looking into the problem a | little later. | Thanks very much for you assistance with this! I really didn't look | into the GetFileVersionInfo, can I assume that is a cytypes fu

Python syntax high-lighting and preservation on web

2005-06-29 Thread Gregory Piñero
Hey guys, Does anyone know where I can pick up a style sheet (css) and/or other files/programs I might need to display python code on my website with tab preservation(or replace with spaces) and colored syntax? I want something similar to the python code on a page like this: http://aspn.activest

Re: MySQLdb reconnect

2005-06-29 Thread Damjan
> Does MySQLdb automatically reconnect if the connection to the database is > broken? It seems so. > I'm asking this since I have a longrunning Python precess that is > connected to Mysql-4.1.11, and I execute "set names utf8" when I connect > to it. > > But after running a day the results from

Re: COM problem .py versus .exe

2005-06-29 Thread Greg Miller
Unfortunately I have a "fire" to put out with a patch to the existing machine code, I'll get back to looking into the problem a little later. Thanks very much for you assistance with this! I really didn't look into the GetFileVersionInfo, can I assume that is a cytypes function? -- http://mail.

Re: XMLRPC and non-ascii characters

2005-06-29 Thread Fredrik Lundh
Joxean Koret wrote: > I'm having troubles to make my XMLRPC application working with non > ASCII characters. you cannot just pass in 8-bit strings in arbitrary encodings and expect the XML- RPC layer to automagically figure out what you're doing. you can either use the encoding option to the Ser

Re: map vs. list-comprehension

2005-06-29 Thread George Sakkis
"Carl Banks" <[EMAIL PROTECTED]> wrote in message > Fear not, people: just as the BDFL does not indiscriminately add > features, also he does not indiscriminately remove them. zip, though > it feels a little exotic, is very useful and serves a purpose that no > language feature serves(*), so rest

XMLRPC and non-ascii characters

2005-06-29 Thread Joxean Koret
Hi to all! I'm having troubles to make my XMLRPC application working with non ASCII characters. Example: 1.- In one terminal run the following script: ---XMLRPC Server- import SimpleXMLRPCServer server = SimpleXMLRPCServer.SimpleXMLRPCServer(("localhost",8003)) def

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-29 Thread Scott David Daniels
Roy Smith wrote: > Andrew Durdin <[EMAIL PROTECTED]> wrote: >>Corrected version: >>result = [(lambda: expr0), lambda: expr1][bool(cond)]() Sorry, I thought cond was a standard boolean. Better is: result = [(lambda: true_expr), lambda: false_expr][not cond]() --Scott David Daniels [EMAIL P

RE: COM problem .py versus .exe

2005-06-29 Thread Tim Golden
[Greg Miller] | line 157 is in fact where the traceback says the failure is: | | File "autoStart.py", line 241, in test | File "wmib.pyc", line 157, in ? | File "win32com\client\__init__.pyc", line 73, in GetObject | File "win32com\client\__init__.pyc", line 88, in Moniker | com_error: (-214722102

Re: How to connect python and Mysql?

2005-06-29 Thread Andy Dustman
Post your question here: http://sourceforge.net/forum/forum.php?forum_id=70461 -- http://mail.python.org/mailman/listinfo/python-list

RE: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-29 Thread Tim Golden
[A.M. Kuchling] | I think that backwoods American speech is more archaic, and | therefore is possibly closer to historical European speech. | Susan Cooper uses this as a minor plot point in her juvenile | novel "King of Shadows", which is about a 20th-century | Southern kid who goes back to El

Re: COM problem .py versus .exe

2005-06-29 Thread Greg Miller
line 157 is in fact where the traceback says the failure is: File "autoStart.py", line 241, in test File "wmib.pyc", line 157, in ? File "win32com\client\__init__.pyc", line 73, in GetObject File "win32com\client\__init__.pyc", line 88, in Moniker com_error: (-2147221020, 'Invalid syntax', None, N

Re: Newbie: Explain My Problem

2005-06-29 Thread Robert Kern
John Machin wrote: > [EMAIL PROTECTED] wrote: > [snip] > >>while counter != 0: >>if guess == num: > > [snip] > > Others have told you already what was wrong with your program. Here's a > clue on how you could possibly help yourself: > > 1. Each time around your loop, print the values of th

Re: Is there something similar to ?: operator (C/C++) in Python?

2005-06-29 Thread Roy Smith
Andrew Durdin <[EMAIL PROTECTED]> wrote: > Corrected version: > > result = [(lambda: expr0), lambda: expr1][bool(cond)]() I'd go one step further. Most people expect the first item to correspond to True and the second one to correspond to False. So: result = [(lambda: expr0), lambda: expr

Re: Modules for inclusion in standard library?

2005-06-29 Thread Chris Cioffi
One of my votes would be for something like: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303481 or http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303770.   We use something like these in the stdlib already (time_struct), but don't supply a ready solution for people to implement

RE: COM problem .py versus .exe

2005-06-29 Thread Tim Golden
[Greg Miller] | | I put you code snippet into my code, running it from the desktop PC | gave me the following output ( I added a print statement ): | | . . . winmgmts: | T i.Caption is \\rocps00101\ROCPR001 | T i.Caption is \\ROCPS00101\ROCPR024 | TTT

Re: map vs. list-comprehension

2005-06-29 Thread Carl Banks
F. Petitjean wrote: > Le Wed, 29 Jun 2005 09:46:15 + (UTC), Mandus a écrit : > > Hi there, > > > > inspired by a recent thread where the end of reduce/map/lambda in Python was > > discussed, I looked over some of my maps, and tried to convert them to > > list-comprehensions. > > > > This one I

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-29 Thread A.M. Kuchling
On Wed, 29 Jun 2005 03:14:26 -, Grant Edwards <[EMAIL PROTECTED]> wrote: >> cool because you have to bet a lot of money. Anyway, if you >> insist on making distinctions between the backwoods of >> apalachia and european aristocracy, > > What, you think they sound the same? I think tha

Re: COM problem .py versus .exe

2005-06-29 Thread Greg Miller
I put you code snippet into my code, running it from the desktop PC gave me the following output ( I added a print statement ): . . . winmgmts: T i.Caption is \\rocps00101\ROCPR001 T i.Caption is \\ROCPS00101\ROCPR024 T i.Caption is \\ROCPS00101\R

Re: Creating Python wrapper for DLL

2005-06-29 Thread Tim
Thanks guys, I'll take a look! -- http://mail.python.org/mailman/listinfo/python-list

Re: Boss wants me to program

2005-06-29 Thread phil
> I don't want to start a flamewar here - > No heat, no flames. Everyone's cool > Let me emphasize a little more. Even though Python itself is great, I think we > don't have quite yet tools that offer > Ya know, I just don't know enough about javaworld. The language I do not like. I wonder

Re: map vs. list-comprehension

2005-06-29 Thread Mandus
29 Jun 2005 10:04:40 GMT skrev F. Petitjean: > Le Wed, 29 Jun 2005 09:46:15 + (UTC), Mandus a écrit : >> Hi there, >> >> inspired by a recent thread where the end of reduce/map/lambda in Python was >> discussed, I looked over some of my maps, and tried to convert them to >> list-comprehensions.

RE: COM problem .py versus .exe

2005-06-29 Thread Tim Golden
[Tim Golden] | [Greg Miller] | | | I didn't have this problem on the | | first release | | as we weren't interested in displaying the file version of the .dll. | | With this improved version of the product the request has | come down to | | have all software package versions displayed, so that i

Re: Modules for inclusion in standard library?

2005-06-29 Thread bruno modulix
George Sakkis wrote: >>"bruno modulix" <[EMAIL PROTECTED]> wrote: > > >>George Sakkis wrote: >> >>>I'd love to see IPython replace the standard interpreter. >> >>I dont. > > > Care to say why ? Sorry... it was about the "replace", not about IPython itself nor about IPython becoming part of th

RE: COM problem .py versus .exe

2005-06-29 Thread Tim Golden
[Greg Miller] | | The two machines are both running Windows XP, the desktop is | running XP Pro, the "virgin" PC is running XP embedded. Well my first thought was: maybe XP Embedded has cut out WMI. A quick Google around suggests that it's still there, but maybe there's some restrictions in what

Re: Python/IDLE - text in different colours

2005-06-29 Thread Bill Davy
Thank you Nathan, but that does not quite address my question. I want to have code in Python so make_the_prompt_string(Red) make_print_output(Green) while True: s = raw_input("This prompt (which is really several lines long) will be in red: ") Foo(s) print "And the result is in Gree

Re: Modules for inclusion in standard library?

2005-06-29 Thread Gregory Piñero
I'd like to see some database API's to the most common databases included. It would make Python much more useful for web development. I've come across situations where a web host supports python and supports MySQL yet it's taken me days to get the MySQLAPI installed with running setup in my home

Re: COM problem .py versus .exe

2005-06-29 Thread Greg Miller
The two machines are both running Windows XP, the desktop is running XP Pro, the "virgin" PC is running XP embedded. I would say the biggest difference is that the embedded machine has only the py2exe executable running/installed, while the desktop has the full python24 installation. I get no bui

RE: Open running processes

2005-06-29 Thread Tim Golden
[DeRRudi] | It is a wxWindow app. It is a kind of datamanager. it is possible to | minimize it to the systray. | | hmm.. i've thought of an solution using memorymapping. see if it | works.. don't know if it is the 'best' or 'safest' way.. but ok. Did your idea work out? If it didn't (or if it did

Re: Modules for inclusion in standard library?

2005-06-29 Thread Thomas Heller
Simon Brunning <[EMAIL PROTECTED]> writes: > On 6/28/05, John Roth <[EMAIL PROTECTED]> wrote: >> I'd definitely like to see ctypes. I can agree with the segfault >> issue, but I think that some design work would eliminate that. > > I'm not sure that it would. Ctypes allows you, as one colleague >

Re: Reading output from a child process non-blockingly

2005-06-29 Thread ilochab
Yuan HOng ha scritto: > In my program I have to call an external program and parse its output. > For that I use the os.popen2 function, and then read the output > stream. > > But the complexity is that the external program gives back its output > in a piecemeal manner, with long delays between th

Re: Better console for Windows?

2005-06-29 Thread Thorsten Kampe
* Richie Hindle (2005-06-28 14:44 +0100) > [Christos, on widening the Windows Command Prompt] >> Hm... right-click the cmd.exe window's title bar (or click on the >> top-left icon, or press Alt-Space), go to Properties, Layout tab, Window >> Size, Width. > > Just to take this thread *completely* o

Re: ANN: PyDev 0.9.5 released

2005-06-29 Thread Stephen Toledo-Brown
Dave Cook wrote: > On 2005-06-28, Fabio Zadrozny <[EMAIL PROTECTED]> wrote: >>PyDev - Python IDE (Python Development Enviroment for Eclipse) version >>0.9.5 has just been released. > Does it work with the newly released Eclipse 3.1? It's worked with previous release candidates. -- http://mail.

Re: Thoughts on Guido's ITC audio interview

2005-06-29 Thread Stephen Kellett
In message <[EMAIL PROTECTED]>, Markus Wankus <[EMAIL PROTECTED]> writes >Have you ever tried anything that provides real, usable refactoring >like Eclipse does with Java? I guarantee if you used it more than a >few times your view would most likely change. I was forced to use Eclipse recently

Re: map vs. list-comprehension

2005-06-29 Thread Björn Lindström
"F. Petitjean" <[EMAIL PROTECTED]> writes: > res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ] > > Hoping that zip will not be deprecated. Nobody has suggested that. The ones that are planned to be removed are lambda, reduce, filter and map. Here's GvR's blog posting that explains the reasons: http:

Re: Boss wants me to program

2005-06-29 Thread Edvard Majakari
phil <[EMAIL PROTECTED]> writes: > From 30 years of application development experience I will tell you > NOT HUMBLY, that Python is easily the most productive, the most read-write > and the most elegant of any of the above. Handsdown better than Java, the > runner up in that group. I don't want

Re: ANN: PyDev 0.9.5 released

2005-06-29 Thread Edvard Majakari
Dave Cook <[EMAIL PROTECTED]> writes: >> PyDev - Python IDE (Python Development Enviroment for Eclipse) version >> 0.9.5 has just been released. > > Does it work with the newly released Eclipse 3.1? Seems to work for me (but I've only coded one smallish Python program with it) -- # Edvard Majaka

Re: map vs. list-comprehension

2005-06-29 Thread F. Petitjean
Le Wed, 29 Jun 2005 09:46:15 + (UTC), Mandus a écrit : > Hi there, > > inspired by a recent thread where the end of reduce/map/lambda in Python was > discussed, I looked over some of my maps, and tried to convert them to > list-comprehensions. > > This one I am not sure how to conver: > > Given

Re: Modules for inclusion in standard library?

2005-06-29 Thread Simon Brunning
On 6/28/05, John Roth <[EMAIL PROTECTED]> wrote: > I'd definitely like to see ctypes. I can agree with the segfault > issue, but I think that some design work would eliminate that. I'm not sure that it would. Ctypes allows you, as one colleague memorably put it, to "poke the operating system with

map vs. list-comprehension

2005-06-29 Thread Mandus
Hi there, inspired by a recent thread where the end of reduce/map/lambda in Python was discussed, I looked over some of my maps, and tried to convert them to list-comprehensions. This one I am not sure how to conver: Given three tuples of length n, b,i and d, I now do: map(lambda bb,ii,dd: bb+i

Re: Newbie: Explain My Problem

2005-06-29 Thread John Machin
[EMAIL PROTECTED] wrote: [snip] > while counter != 0: > if guess == num: [snip] Others have told you already what was wrong with your program. Here's a clue on how you could possibly help yourself: 1. Each time around your loop, print the values of the interesting objects, in this case coun

RE: COM problem .py versus .exe

2005-06-29 Thread Tim Golden
[Thomas Heller] | | "Tim Golden" <[EMAIL PROTECTED]> writes: | | > [Greg Miller] | > | Hello again, I put the executable on the "virgin" PC today. | > | I am using | > | the wmi(b) that you gave me. The error that I am | receiving now is: | > | | > | File "autoStart.pyc", line 241, in test |

Re: strange __call__

2005-06-29 Thread Andreas Kostyrka
Just a guess, but setting "__X__" special methods won't work in most cases because these are usually optimized when the class is created. It might work if a.__call__ did exist before (because class a: contained a __call__ definition). Andreas On Wed, Jun 29, 2005 at 09:15:45AM +0100, Michael Hof

Re: COM problem .py versus .exe

2005-06-29 Thread Thomas Heller
"Tim Golden" <[EMAIL PROTECTED]> writes: > [Greg Miller] > | Hello again, I put the executable on the "virgin" PC today. > | I am using > | the wmi(b) that you gave me. The error that I am receiving now is: > | > | File "autoStart.pyc", line 241, in test > | File "wmib.pyc", line 157, in ? > |

Re: Favorite non-python language trick?

2005-06-29 Thread Mandus
Sun, 26 Jun 2005 08:35:58 +0200 skrev Peter Otten: > Steven D'Aprano wrote: > >> On Sat, 25 Jun 2005 21:30:26 +0200, Peter Otten wrote: >> >>> Mandus wrote: >>> By using the builtin reduce, I move the for-loop into the c-code which performs better. >>> >>> No. There is no hope of ever

Re: Which kid's beginners programming - Python or Forth?

2005-06-29 Thread gabriele renzi
BORT ha scritto: > All, > > The Forth-Python pull was heading to a conclusion just like "Tastes > Great" vs. "Less Filling" or Ford-Chevy. However, friendly folks at > comp.lang.forth pointed me to Amazon.com and _Mindstorms: Children, > Computers, and Powerful Ideas_ > by Seymour Papert. The bo

RE: COM problem .py versus .exe

2005-06-29 Thread Tim Golden
[Greg Miller] | Hello again, I put the executable on the "virgin" PC today. | I am using | the wmi(b) that you gave me. The error that I am receiving now is: | | File "autoStart.pyc", line 241, in test | File "wmib.pyc", line 157, in ? | File "win32com\client\__init__.pyc", line 73, in GetObjec

Re: How to connect python and Mysql?

2005-06-29 Thread bruno modulix
praba kar wrote: > Dear All, > > I am using python2.4 and Mysql 4.0.20. Now I am > want to connect python and mysql. I have problem to > install Mysql-python-1.2.0 interface into my machine. > When I try to install this interface the following > error restrict to install fully. > > /System

Re: Newbie: Help Figger Out My Problem

2005-06-29 Thread bruno modulix
[EMAIL PROTECTED] wrote: > Thanks to all who replied. I did not ask for other iterations of my > program. I asked what was wrong with it. Please understand that usenet is not a commercial support service. Everyone is free to answer how he likes. Or not to answer at all... -- bruno desthuilliers

Regarding MySQLdb

2005-06-29 Thread praba kar
Dear All After installation of Mysql-Python Interface. I try to import MySQLdb but I got below error How to correct this error. regards Praba >>> import MySQLdb Traceback (most recent call last): File "", line 1, in ? File "MySQLdb/__init__.py", line 27, in ? import _mysql ImportError:

Re: Newbie: Explain My Problem

2005-06-29 Thread Roel Schroeven
[EMAIL PROTECTED] wrote: > Code: > [snip] > else: > counter = counter - 1 > print > print "The number is greater than your guess." > print "You have", counter, " chances left to guess the number." > guess = (raw_input("Your guess is ")) The above line

Re: Dictionary to tuple

2005-06-29 Thread bruno modulix
Erik Max Francis wrote: > bruno modulix wrote: > >> Err... don't you spot any useless code here ?-) >> >> (tip: dict.items() already returns a list of (k,v) tuples...) > > But it doesn't return a tuple of them. Which is what the tuple call > there does. Of course, but the list-to-tuple convers

Re: Set/Get attribute syntatic sugar

2005-06-29 Thread Michael Hoffman
Peter Hansen wrote: > Elmo Mäntynen wrote: > >> Maybe funny, but a bit too cocky for my taste. Robert kern is propably >> right about what he really meant so don't be too hasty in the future, >> right?). > > Elmo, it's probably neither cocky nor funny, but before you pass > judgment you should

Re: How to compare two directories?

2005-06-29 Thread Michael Hoffman
could ildg wrote: > I want to compare 2 directories, > and find If all of theire sub-folders and files and sub-files are identical. > If not the same, I want know which files or folders are not the same. > I know filecmp moudle has cmpfiles function and a class named dircmp, > they may help, but I

Re: strange __call__

2005-06-29 Thread Michael Hoffman
Rahul wrote: > Consider the following: > def a(x): > return x+1 > > def b(f): > def g(*args,**kwargs): > for arg in args: > print arg > return f(*args,**kwargs) > return g > > a.__call__ = b(a.__call__) > > now calling a(1) and a.__call__(1) yield 2 different results!! > i.e

Reading output from a child process non-blockingly

2005-06-29 Thread Yuan HOng
In my program I have to call an external program and parse its output. For that I use the os.popen2 function, and then read the output stream. But the complexity is that the external program gives back its output in a piecemeal manner, with long delays between the outputs. In the main program I wa

Re: Newbie: Explain My Problem

2005-06-29 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 29/06/2005 03:11: > Code: > > #The Guess My Number Game > > import random > num = "" > guess = "" > counter = 7 > num = random.randrange(1, 100) > print "I'm thinking of a whole number from 1 to 100." > print "You have ", counter, " chances left to guess

Re: Newbie: Explain My Problem

2005-06-29 Thread rjreeves
Hi Chuck 1. Missing an int(.. on one of the guess= print "You have", counter, " chances left to guess the number." guess = int(raw_input("Your guess is ")) Thus ensuring guess is consistent with it content type 2. Need a break when the guess=num if guess == num: print "Y

Re: Newbie: Explain My Problem

2005-06-29 Thread rjreeves
Hi Chuck 1. Missing an int(.. on one of the guess= print "You have", counter, " chances left to guess the number." guess = int(raw_input("Your guess is ")) Thus ensuring guess is consistent with it content type 2. Need a break when the guess=num if guess == num: print "Y

How to connect python and Mysql?

2005-06-29 Thread praba kar
Dear All, I am using python2.4 and Mysql 4.0.20. Now I am want to connect python and mysql. I have problem to install Mysql-python-1.2.0 interface into my machine. When I try to install this interface the following error restrict to install fully. /System/Links/Executables/ld: cannot find

Newbie: Explain My Problem

2005-06-29 Thread ChuckDubya
Code: #The Guess My Number Game import random num = "" guess = "" counter = 7 num = random.randrange(1, 100) print "I'm thinking of a whole number from 1 to 100." print "You have ", counter, " chances left to guess the number." print guess = int(raw_input("Your guess is: ")) while counter != 0:

Re: When someone from Britain speaks, Americans hear a "British accent"...

2005-06-29 Thread Peter Maas
muldoon schrieb: >Now, what forum would you recommend? Any help would be appreciated. alt.culture.us.* -- --- Peter Maas, M+R Infosysteme, D-52070 Aachen, Tel +49-241-93878-0 E-mail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('ba

<    1   2