Calling for Python Writers/Authors

2007-06-12 Thread Jeff Rush
For those who write books and articles, I've established a wiki page just as we already have a page for those who offer training services for Python. If you would like to be reachable by those needing writing services of various kinds, please add yourself to the list, along with some indication

Re: Setting the encoding in the basic auth header

2007-06-12 Thread Martin v. Löwis
When I enter character \xf1 as the username which is outside ascii but within iso-8859-1 Firefox 2.0 sends this as \xf1 IE 7 also sends this as \xf1 But the utf-8 encoding is \xc3\xb1 If I enter character 0BA4 (TAMIL LETTER TA) which is outside iso-8859-1 Firefox 2 sends this as \xa4

Re: Setting the encoding in the basic auth header

2007-06-12 Thread Martin v. Löwis
It seems that both browsers are using the iso-8859-1 charset. Is there any way I can get them to encode the data with utf-8 instead? As a further follow-up, see https://bugzilla.mozilla.org/show_bug.cgi?id=41489 They explain that *TEXT is defined in RFC 2616, which specifies that non-ASCII

Re: Setting the encoding in the basic auth header

2007-06-12 Thread Siddharta .
On Jun 12, 11:20 am, Martin v. Löwis [EMAIL PROTECTED] wrote: As a further follow-up, see https://bugzilla.mozilla.org/show_bug.cgi?id=41489 Wow, thanks a lot for the link. Just had a look at it. The thread runs from 2000 to 2007!! 7 years!! What a complete mess :) Guess I'll just have to

Floating Number format problem

2007-06-12 Thread 人言落日是天涯,望极天涯不见家
How could I format the float number like this: (keep 2 digit precision) 1.002 = 1 1.12 = 1.12 1.00 = 1 1.567 = 1.57 2324.012 = 2324.01 I can not find any Formatting Operations is able to meet my requirement. Any suggestion will be appreciated. --

Adding a DB regs to a wx listbox

2007-06-12 Thread Marcpp
Hi, I need add to a listbox a list of items extracted from a database. This is that I've do: class tasques(wx.Frame): def __init__(self, *args, **kwds): self.list_box_1_copy = wx.ListBox(self, -1, choices=[], style=wx.LB_SINGLE|wx.LB_ALWAYS_SB) ... How I add the list to choices?

Re: Floating Number format problem

2007-06-12 Thread ici
On Jun 12, 10:10 am, [EMAIL PROTECTED] wrote: How could I format the float number like this: (keep 2 digit precision) 1.002 = 1 1.12 = 1.12 1.00 = 1 1.567 = 1.57 2324.012 = 2324.01 I can not find any Formatting Operations is able to meet my requirement. Any suggestion

Calling for Python Writers/Authors

2007-06-12 Thread Jeff Rush
For those who write books and articles, I've established a wiki page just as we already have a page for those who offer training services for Python. If you would like to be reachable by those needing writing services of various kinds, please add yourself to the list, along with some indication

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-06-12 Thread Joachim Durchholz
Twisted schrieb: On Jun 11, 5:36 pm, Tim Bradshaw [EMAIL PROTECTED] wrote: I think it's just obvious that this is the case. What would *stop* you writing maintainable Perl? For starters, the fact that there are about six zillion obscure operators represented by punctuation marks, instead

Re: A gotcha: Python pain point?

2007-06-12 Thread Terry Reedy
Beorn [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Consider this example: | | def funcs(x): | ... for i in range(5): | ... def g(): return x + i | ... yield g | | I would expect the value of x used in g to be that at the function | declaration time, as if

How can I parse False from c extension?

2007-06-12 Thread Allen
From python command, I call C extension method import PyRPC PyRPC.addBool(False) In C extension, I know parse integer value like this: PyArg_ParseTuple(args, i, nValue); But, how can I parse the False value? Regards, Allen Chen -- http://mail.python.org/mailman/listinfo/python-list

Re: The Concepts and Confusions of Prefix, Infix, Postfix and Fully Functional Notations

2007-06-12 Thread Thomas F. Burdick
On Jun 11, 11:36 pm, Tim Bradshaw [EMAIL PROTECTED] wrote: On Jun 11, 8:02 am, Twisted [EMAIL PROTECTED] wrote: On Jun 11, 2:42 am, Joachim Durchholz [EMAIL PROTECTED] wrote: It is possible to write maintainable Perl. Interesting (spoken in the tone of someone hearing about a purported

Re: python-ldap for Python 2.5 on Windows?

2007-06-12 Thread Benedict Verheyen
Waldemar Osuch schreef: snip I have also build it on XP SP2. I have wrapped the files from setup.py build and all required .dll using Inno Setup. Maybe Vista does not like the executable produced by Inno. If you still want to try then unzip the following:

Re: Python's only one way to do it philosophy isn't good?

2007-06-12 Thread Antoon Pardon
On 2007-06-11, Terry Reedy [EMAIL PROTECTED] wrote: Antoon Pardon [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | On 2007-06-09, Terry Reedy [EMAIL PROTECTED] wrote: | For him to imply that Python is anti-flexibility is wrong. Very wrong.. | He should look in a mirror. See

Re: Autocompletion in interactive mode doesn't work in 2.5.1

2007-06-12 Thread jitudon
On Jun 12, 9:36 am, Papalagi Pakeha [EMAIL PROTECTED] wrote: Hi all, How can I turn on autocompletion when I push tab in python 2.5.1 interactive mode? E.g. to give me a list of all methods and attributes of a given object. It works great on my Linux / Ubuntu 7.04 installation but doesn't

Re: Floating Number format problem

2007-06-12 Thread kelvin.you
On 6 12 , 3 16 , ici [EMAIL PROTECTED] wrote: On Jun 12, 10:10 am, [EMAIL PROTECTED] wrote: How could I format the float number like this: (keep 2 digit precision) 1.002 = 1 1.12 = 1.12 1.00 = 1 1.567 = 1.57 2324.012 = 2324.01 I can not find any Formatting

Re: New mailing list mirrors

2007-06-12 Thread Clement
In proejct i need a program having two thread. One is server thread will listen on a port. and aniother one is to controll some opertion in the system.. The server therad will get the comment and the and the another thread will do some opertion based on the commend.. How to implemten it.. I have

Re: A gotcha: Python pain point?

2007-06-12 Thread Diez B. Roggisch
James Stroud wrote: Beorn wrote: Consider this example: def funcs(x): ... for i in range(5): ... def g(): return x + i ... yield g I would expect the value of x used in g to be that at the function declaration time, as if you've pass g a (x=x) argument,

Re: A gotcha: Python pain point?

2007-06-12 Thread Terry Reedy
James Stroud [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] | Beorn wrote: | Consider this example: | | def funcs(x): |... for i in range(5): |... def g(): return x + i |... yield g | | [ fun() for fun in list(funcs(1)) ] |[5, 5, 5, 5, 5]

Re: A gotcha: Python pain point?

2007-06-12 Thread Diez B. Roggisch
Beorn wrote: Consider this example: def funcs(x): ... for i in range(5): ... def g(): return x + i ... yield g I would expect the value of x used in g to be that at the function You mean i here, don't you? declaration time, as if you've pass g a (x=x)

Re: Adding a DB regs to a wx listbox

2007-06-12 Thread Jorgen Bodde
self.list_box_1_copy.Append( your_item ) In the wxWidgets help: http://www.wxwidgets.org/manuals/2.8.0/wx_wxcontrolwithitems.html#wxcontrolwithitems And in the wxPython help: http://www.wxpython.org/docs/api/wx.ItemContainer-class.html Regards, - Jorgen On 6/12/07, Marcpp [EMAIL PROTECTED]

Fight Stopping AIDS, Let's Do it...

2007-06-12 Thread a . kaur11
Hi Friends, Let's Stop AIDS, it's increasing like a forest fire... See the page below and learn more about it. www.chulbul.com/aids.htm Let's Know more about stopping AIDS today !! --- Join the Revolution !! http://www.orkut.com/Community.aspx?cmm=27495757 --

Re: How can I parse False from c extension?

2007-06-12 Thread Gabriel Genellina
En Tue, 12 Jun 2007 05:07:13 -0300, Allen [EMAIL PROTECTED] escribió: From python command, I call C extension method import PyRPC PyRPC.addBool(False) In C extension, I know parse integer value like this: PyArg_ParseTuple(args, i, nValue); But, how can I parse the False value? Parse

Re: Pasting an image from clipboard in Tkinter?

2007-06-12 Thread Eric Brunel
On Mon, 11 Jun 2007 14:23:48 +0200, exhuma.twn [EMAIL PROTECTED] wrote: As many might know, windows allows to copy an image into the clipboard by pressing the Print Screen button on the keyboard. Is it possible to paste such an image from the clipboard into a Text widget in Tkinter? Here is my

Thunderbird access to this newsgroup

2007-06-12 Thread Rostfrei
Hello! I'm writing this message over Google web access. I'm trying to access to the comp.lang.python newsgroup trough the Thunderbird, but I just can't configure it properly. What is the news server for this newsgroup. If I ping comp.lang.python it is not resolved. For instance I had no problem

Re: Multiline lamba implementation in python.

2007-06-12 Thread exhuma.twn
On Jun 12, 5:57 am, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 12 Jun 2007 00:02:37 -0300, Josh Gilbert [EMAIL PROTECTED] escribió: I don't expect multiline lambdas to be added to Python. I'm not so sure that that's a bad thing. Regardless, isn't it possible to write your own

Re: Floating Number format problem

2007-06-12 Thread Gabriel Genellina
En Tue, 12 Jun 2007 05:46:25 -0300, [EMAIL PROTECTED] escribió: On 6 12 , 3 16 , ici [EMAIL PROTECTED] wrote: On Jun 12, 10:10 am, [EMAIL PROTECTED] wrote: How could I format the float number like this: (keep 2 digit precision) 1.002 = 1 1.12 = 1.12 print %.02f %

for ... else ?

2007-06-12 Thread exhuma.twn
On Jun 12, 6:57 am, Gabriel Genellina [EMAIL PROTECTED] wrote: [...] for number in range(10,100): is_prime = True for divisor in range(2,number): if number % divisor == 0: is_prime = False break if is_prime: print number, Next

Accessing attributes

2007-06-12 Thread Jeff Rollin
Hi there. I'm working with the Python Tutorial Byte of Python at swaroopch.info. I have created the attached file, but when I execute: % objvar.py I get the error message: (Initializing Calamity Jane) Traceback (most recent call last): File /home/jef/bin/objvar.py, line 49, in module

Re: Pasting an image from clipboard in Tkinter?

2007-06-12 Thread exhuma.twn
On Jun 12, 11:24 am, Eric Brunel [EMAIL PROTECTED] wrote: On Mon, 11 Jun 2007 14:23:48 +0200,exhuma.twn [EMAIL PROTECTED] wrote: As many might know, windows allows to copy an image into the clipboard by pressing the Print Screen button on the keyboard. Is it possible to paste such an image

Re: How can I parse False from c extension?

2007-06-12 Thread Allen
On 6 12 , 5 21 , Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 12 Jun 2007 05:07:13 -0300, Allen [EMAIL PROTECTED] escribió: From python command, I call C extension method import PyRPC PyRPC.addBool(False) In C extension, I know parse integer value like this:

Re: Floating Number format problem

2007-06-12 Thread Marc Christiansen
Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 12 Jun 2007 05:46:25 -0300, [EMAIL PROTECTED] escribió: On 6 12 , 3 16 , ici [EMAIL PROTECTED] wrote: On Jun 12, 10:10 am, [EMAIL PROTECTED] wrote: How could I format the float number like this: (keep 2 digit precision)

Accessing attributes?

2007-06-12 Thread Jeff Rollin
Hi there. I'm working with the Python Tutorial Byte of Python at swaroopch.info. I have created the following file: #!/usr/bin/env python # Filename: objvar.py class Person: Represents a person. population = 0

In C extension .pyd, sizeof INT64 = 4?

2007-06-12 Thread Allen
My C extension works wrong, and debug it, found that sizeof (INT64) = 4, not 8. I compile on Windows XP platform. Please tell me how to fix it to support INT64? Thanks. -- http://mail.python.org/mailman/listinfo/python-list

Re: pyExcelerator and multiple worksheets

2007-06-12 Thread John Machin
On Jun 12, 10:58 am, [EMAIL PROTECTED] wrote: I'm using pyExcelerator to take a folder of CSV files and create Excel workbooks for all of them, then generate an Excel workbook with the data from all of them. Everything up until here works great; next, I make a second worksheet on the last

Re: Accessing attributes

2007-06-12 Thread Marc Christiansen
Jeff Rollin [EMAIL PROTECTED] wrote: I'm working with the Python Tutorial Byte of Python at swaroopch.info. I have created the attached file, but when I execute: % objvar.py I get the error message: (Initializing Calamity Jane) Traceback (most recent call last): File

Newsgroup query

2007-06-12 Thread Jeff Rollin
Hi. You may have just seen that I posted a more-or-less identical message to the group. This was because the message w/ the attached file didn't show up for me - but I also just got a reply which references the message with the attached file. Why do I not see my messages with attached files in

Re: Accessing attributes

2007-06-12 Thread Jeff Rollin
In the last episode, on Tuesday 26 Sivan 5767 11:09, Marc Christiansen wrote: The indentation of __del__, say_hi and how_many is wrong. You define them inside __init__. Move them to the same indentation level as __init__ and all should work. Thanks very much. Jeff --

Re: for ... else ?

2007-06-12 Thread Nis Jørgensen
exhuma.twn skrev: for number in range(10,100): for divisor in range(2,number): if number % divisor == 0: break else: print number, Oh my. Would it not be an idea to rename this else into a finally? As Gabriel points out, the else-block gets

Re: Newsgroup query

2007-06-12 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Jeff Rollin wrote: Why do I not see my messages with attached files in the newsgroup, and is there any way to configure this? No, most news servers strip attachments from postings in non-binary groups. It's a plain text medium. Ciao, Marc 'BlackJack' Rintsch --

Re: Newsgroup query

2007-06-12 Thread Jeff Rollin
In the last episode, on Tuesday 26 Sivan 5767 11:21, Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Jeff Rollin wrote: Why do I not see my messages with attached files in the newsgroup, and is there any way to configure this? No, most news servers strip attachments from postings in

Re: Thunderbird access to this newsgroup

2007-06-12 Thread Nis Jørgensen
Rostfrei skrev: Hello! I'm writing this message over Google web access. I'm trying to access to the comp.lang.python newsgroup trough the Thunderbird, but I just can't configure it properly. What is the news server for this newsgroup. If I ping comp.lang.python it is not resolved. For

Re: Accessing attributes?

2007-06-12 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Jeff Rollin wrote: (Initializing Calamity Jane) Traceback (most recent call last):   File /home/jef/bin/objvar.py, line 49, in module     Person.how_many() AttributeError: class Person has no attribute 'how_many' Where am I going wrong? Looking at the indention of

Re: A gotcha: Python pain point?

2007-06-12 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Terry Reedy wrote: | Should I import this to see how | many principles this behavior violates? ??? If you meant 'report' (on SF), please do not. I think he meant ``import this`` at the Python interpreter. Ciao, Marc 'BlackJack' Rintsch --

Re: Floating Number format problem

2007-06-12 Thread Peter Otten
Marc Christiansen wrote: Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 12 Jun 2007 05:46:25 -0300, [EMAIL PROTECTED] escribió: On 6 12 , 3 16 , ici [EMAIL PROTECTED] wrote: On Jun 12, 10:10 am, [EMAIL PROTECTED] wrote: How could I format the float number like this:

Re: Floating Number format problem

2007-06-12 Thread John Machin
On Jun 12, 8:04 pm, Marc Christiansen [EMAIL PROTECTED] wrote: Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 12 Jun 2007 05:46:25 -0300, [EMAIL PROTECTED] escribió: On 6 12 , 3 16 , ici [EMAIL PROTECTED] wrote: On Jun 12, 10:10 am, [EMAIL PROTECTED] wrote: How

Re: Autocompletion in interactive mode doesn't work in 2.5.1

2007-06-12 Thread Papalagi Pakeha
On 6/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: On Jun 12, 9:36 am, Papalagi Pakeha wrote: Hi all, How can I turn on autocompletion when I push tab in python 2.5.1 interactive mode? E.g. to give me a list of all methods and attributes of a given object.

Re: Postpone creation of attributes until needed

2007-06-12 Thread Steven D'Aprano
On Mon, 11 Jun 2007 22:35:46 -0700, Frank Millman wrote: On Jun 12, 1:46 am, Steven D'Aprano [EMAIL PROTECTED] wrote: You haven't told us what the 'compute' method is. Or if you have, I missed it. Sorry - I made it more explicit above. It is the method that sets up all the missing

Re: Python's only one way to do it philosophy isn't good?

2007-06-12 Thread Neil Cerutti
On 2007-06-12, Antoon Pardon [EMAIL PROTECTED] wrote: On 2007-06-11, Terry Reedy [EMAIL PROTECTED] wrote: More so than supporters of most other languages, in particular Scheme? Well to my knowledge (which could be vastly improved), scheme doesn't have some Zen-rules that include something

Re: Floating Number format problem

2007-06-12 Thread Marc Christiansen
Peter Otten [EMAIL PROTECTED] wrote: Marc Christiansen wrote: Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 12 Jun 2007 05:46:25 -0300, [EMAIL PROTECTED] escribió: On 6 12 , 3 16 , ici [EMAIL PROTECTED] wrote: On Jun 12, 10:10 am, [EMAIL PROTECTED] wrote: How

Re: for ... else ?

2007-06-12 Thread kaens
On 6/12/07, Nis Jørgensen [EMAIL PROTECTED] wrote: exhuma.twn skrev: for number in range(10,100): for divisor in range(2,number): if number % divisor == 0: break else: print number, Oh my. Would it not be an idea to rename this else into

Re: In C extension .pyd, sizeof INT64 = 4?

2007-06-12 Thread Allen
On 6 12 , 6 03 , Allen [EMAIL PROTECTED] wrote: My C extension works wrong, and debug it, found that sizeof (INT64) = 4, not 8. I compile on Windows XP platform. Please tell me how to fix it to support INT64? Thanks. I find it is strange. In an exe win32 console project, sizeof(INT64) = 8.

Re: for ... else ?

2007-06-12 Thread Gabriel Genellina
En Tue, 12 Jun 2007 06:34:49 -0300, exhuma.twn [EMAIL PROTECTED] escribió: On Jun 12, 6:57 am, Gabriel Genellina [EMAIL PROTECTED] wrote: for number in range(10,100): for divisor in range(2,number): if number % divisor == 0: break else: print

Re: Multiline lamba implementation in python.

2007-06-12 Thread Carsten Haese
On Tue, 12 Jun 2007 02:29:31 -0700, exhuma.twn wrote lambdas are to be removed in Py3k IIRC. No. From http://www.python.org/dev/peps/pep-3099/, At one point lambda was slated for removal in Python 3000. Unfortunately no one was able to come up with a better way of providing anonymous functions.

Re: Postpone creation of attributes until needed

2007-06-12 Thread Gabriel Genellina
En Tue, 12 Jun 2007 08:18:40 -0300, Steven D'Aprano [EMAIL PROTECTED] escribió: On Mon, 11 Jun 2007 22:35:46 -0700, Frank Millman wrote: Because, as I have tried to explain elsewhere (probably not very clearly), not all the information required to perform compute() is available at __init__

Re: lists - append - unique and sorted

2007-06-12 Thread rhXX
On Jun 8, 12:17 am, Delaney, Timothy (Tim) [EMAIL PROTECTED] wrote: Terry Reedy wrote: Dan Bishop [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] If you don't need the list to be sorted until you're done building it, you can just use: lst = sorted(set(lst)) ?? looks same as

Re: In C extension .pyd, sizeof INT64 = 4?

2007-06-12 Thread Gabriel Genellina
En Tue, 12 Jun 2007 08:39:43 -0300, Allen [EMAIL PROTECTED] escribió: PyObject* method(PyObject* self, PyObject *args) { INT64 nValue; /* LINE_HERE */ INT32 nRet; nRet = DoSomeCOperations(nValue); return PyBuildValue(i, nRet); } If I changed INT64 nValue to be static INT64

Re: SimplePrograms challenge

2007-06-12 Thread Rob Wolfe
Steve Howell wrote: Hi, I'm offering a challenge to extend the following page by one good example: http://wiki.python.org/moin/SimplePrograms What about simple HTML parsing? As a matter of fact this is not language concept, but shows the power of Python standard library. Besides, that's very

httplib / connection

2007-06-12 Thread rhXX
hi all, i'm using this tutorial example import httplib h = httplib.HTTP(www.python.org) h.putrequest('GET','/index.html') h.putheader('User-Agent','Lame Tutorial Code') h.putheader('Accept','text/html') h.endheaders() errcode,errmsg, headers = h.getreply() f = h.getfile() # Get file object for

popen e pclose on python 2.3 question

2007-06-12 Thread Flyzone
I need to run a network program and return output in a variable name without use temporany file. So i tought to use popen (i'm using python 2.3, i can't upgrade). RESULT = os.popen('command'+HOST, 'r') I have a problem about it: i need to kill the child if the program take more than 300 ms, but i

Build problem, pyopenssl on win32 vs2003.

2007-06-12 Thread Darrin Thompson
I've been trying to build pyOpenSSL on Windows with Visual Studio 2003. I've hit the message below: building 'OpenSSL.SSL' extension creating build\temp.win32-2.5\Release\src\ssl C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c /nologo /Ox /MD /W3 /GX /DNDEBUG

Re: Python optimization (was Python's only one way to do it philosophy isn't good?)

2007-06-12 Thread Diez B. Roggisch
John Nagle wrote: Diez B. Roggisch wrote: Regardless of the possibility of speeding it up - why should one want this? Coding speed is more important than speed of coding in 90%+ of all cases. When you have to start buying more servers for the server farm, it's a real pain. I'm

Re: httplib / connection

2007-06-12 Thread rhXX
On Jun 12, 2:09 pm, rhXX [EMAIL PROTECTED] wrote: hi all, i'm using this tutorial example import httplib h = httplib.HTTP(www.python.org) h.putrequest('GET','/index.html') h.putheader('User-Agent','Lame Tutorial Code') h.putheader('Accept','text/html') h.endheaders() errcode,errmsg,

Re: popen e pclose on python 2.3 question

2007-06-12 Thread Flyzone
i need to kill the child if the program take more than 300 ms, but i need also to wait this 300 ms to have the reply. I reply by myself: from popen2 import Popen3 cmd = Popen3('command','r') waiting=0 while (cmd.poll()==-1): time.sleep(0.1) waiting+=1 if (waiting3):

Re: Multiline lamba implementation in python.

2007-06-12 Thread Facundo Batista
Josh Gilbert wrote: I don't expect multiline lambdas to be added to Python. I'm not so sure that that's a bad thing. Regardless, isn't it possible to write your own Yes, it is a bad thing. Why? Because it would another way to do something you can do in other way. The *only* big value of

Excel file interface for Python 2.3?

2007-06-12 Thread Hamilton, William
I'm in need of a module that will let me create Excel workbooks from within Python. Something like PyExcelerator, but it needs to work with Python 2.3. (A third-party limitation that I have no control over.) Can anyone point me to what I need? All my searches keep leading back to PyExcelerator.

Re: In C extension .pyd, sizeof INT64 = 4?

2007-06-12 Thread Allen
On 6 12 , 8 08 , Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 12 Jun 2007 08:39:43 -0300, Allen [EMAIL PROTECTED] escribió: PyObject* method(PyObject* self, PyObject *args) { INT64 nValue; /* LINE_HERE */ INT32 nRet; nRet = DoSomeCOperations(nValue); return

Re: Excel file interface for Python 2.3?

2007-06-12 Thread John Machin
On Jun 12, 11:01 pm, Hamilton, William [EMAIL PROTECTED] wrote: I'm in need of a module that will let me create Excel workbooks from within Python. Something like PyExcelerator, but it needs to work with Python 2.3. (A third-party limitation that I have no control over.) Can anyone point me

Re: How to get inputs for a python program that run from another python program

2007-06-12 Thread pyscottishguy
On Jun 11, 7:47 am, pradeep nair [EMAIL PROTECTED] wrote: I would like to know how to pass keyboard input for a python script which is ran by another script. for eg: hello1.py: import os if __name__=='__main__': print I will call this other program called hello.py

Re: Accessing attributes?

2007-06-12 Thread BartlebyScrivener
On Jun 12, 5:04 am, Jeff Rollin [EMAIL PROTECTED] wrote: Where am I going wrong? Many TIA for any help. Look at your code, then look at swaroop's http://tinyurl.com/2v5zze Line up all your defs at the same indent and they should work. -- http://mail.python.org/mailman/listinfo/python-list

Re: Excel file interface for Python 2.3?

2007-06-12 Thread kyosohma
On Jun 12, 8:01 am, Hamilton, William [EMAIL PROTECTED] wrote: I'm in need of a module that will let me create Excel workbooks from within Python. Something like PyExcelerator, but it needs to work with Python 2.3. (A third-party limitation that I have no control over.) Can anyone point me

Re: Excel file interface for Python 2.3?

2007-06-12 Thread kyosohma
On Jun 12, 8:38 am, [EMAIL PROTECTED] wrote: On Jun 12, 8:01 am, Hamilton, William [EMAIL PROTECTED] wrote: I'm in need of a module that will let me create Excel workbooks from within Python. Something like PyExcelerator, but it needs to work with Python 2.3. (A third-party limitation

Re: for ... else ?

2007-06-12 Thread Chris Mellon
On 6/12/07, Gabriel Genellina [EMAIL PROTECTED] wrote: En Tue, 12 Jun 2007 06:34:49 -0300, exhuma.twn [EMAIL PROTECTED] escribió: On Jun 12, 6:57 am, Gabriel Genellina [EMAIL PROTECTED] wrote: for number in range(10,100): for divisor in range(2,number): if number %

file open default location

2007-06-12 Thread T. Crane
Hi, How is the default path chosen in this instance: myFile = file('test.txt','w') Here I'm opening/creating a file but I have not specified the exact path, so how does Python determine where to 'put' this file? More to the point, how do I change what the default path is? Right now it's a

Re: file open default location

2007-06-12 Thread kyosohma
On Jun 12, 8:42 am, T. Crane [EMAIL PROTECTED] wrote: Hi, How is the default path chosen in this instance: myFile = file('test.txt','w') Here I'm opening/creating a file but I have not specified the exact path, so how does Python determine where to 'put' this file? More to the point, how

Re: file open default location

2007-06-12 Thread T. Crane
[EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Jun 12, 8:42 am, T. Crane [EMAIL PROTECTED] wrote: Hi, How is the default path chosen in this instance: myFile = file('test.txt','w') Here I'm opening/creating a file but I have not specified the exact path, so how does

Re: Thunderbird access to this newsgroup

2007-06-12 Thread Ben Finney
Rostfrei [EMAIL PROTECTED] writes: What is the news server for this newsgroup. Usenet newsgroups are redistributed over many servers worldwide. URL:http://en.wikipedia.org/wiki/Usenet If I ping comp.lang.python it is not resolved. That's right. It's the name of a Usenet newsgroup, not

Re: file open default location

2007-06-12 Thread Richard Brodie
T. Crane [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] As an aside, I forgot to mention above that I'm using Windows XP. Any other ideas or possible reasons that it would not choose my script location as the default location to save something? If you open a DOS window and

Re: Multiline lamba implementation in python.

2007-06-12 Thread Kay Schluehr
On 12 Jun., 14:57, Facundo Batista [EMAIL PROTECTED] wrote: Remember that the *only* difference between the two functions is that one is anonymous, and for other you have to came up with a name (name that if is well thought, actually adds readibility to your code). The difference is that one

Re: file open default location

2007-06-12 Thread T. Crane
As an aside, I forgot to mention above that I'm using Windows XP. Any other ideas or possible reasons that it would not choose my script location as the default location to save something? If you open a DOS window and run Python from there, it will write the files in whatever directory

Leo 4.4.3 beta 2 released

2007-06-12 Thread Edward K Ream
Leo 4.4.3 beta 2 is available at: http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106 Leo is a text editor, data organizer, project manager and much more. See: http://webpages.charter.net/edreamleo/intro.html The highlights of Leo 4.4.3: -

Re: file open default location

2007-06-12 Thread Tim Golden
T. Crane wrote: myFile = file('test.txt','w') Here I'm opening/creating a file but I have not specified the exact path, so how does Python determine where to 'put' this file? More to the point, how do I change what the default path is? Right now it's a networked drive that should not

Convert String to Int and Arithmetic

2007-06-12 Thread tereglow
Hello, I am a complete newbie to Python and am accustomed to coding in PHP/ Perl/Shell. I am trying to do the following: I have a string: cpuSpeed = 'Speed: 10' What I would like to do is extract the '10' from the string, and divide that by 1000 twice to get the speed of a

Re: Convert String to Int and Arithmetic

2007-06-12 Thread kyosohma
On Jun 12, 9:32 am, tereglow [EMAIL PROTECTED] wrote: Hello, I am a complete newbie to Python and am accustomed to coding in PHP/ Perl/Shell. I am trying to do the following: I have a string: cpuSpeed = 'Speed: 10' What I would like to do is extract the '10' from the

Re: Convert String to Int and Arithmetic

2007-06-12 Thread Kay Schluehr
On 12 Jun., 16:32, tereglow [EMAIL PROTECTED] wrote: Hello, I am a complete newbie to Python and am accustomed to coding in PHP/ Perl/Shell. I am trying to do the following: I have a string: cpuSpeed = 'Speed: 10' What I would like to do is extract the '10' from the

Re: file open default location

2007-06-12 Thread kyosohma
On Jun 12, 9:09 am, Richard Brodie [EMAIL PROTECTED] wrote: T. Crane [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] As an aside, I forgot to mention above that I'm using Windows XP. Any other ideas or possible reasons that it would not choose my script location as the

Re: Multiline lamba implementation in python.

2007-06-12 Thread George Sakkis
On Jun 12, 10:12 am, Kay Schluehr [EMAIL PROTECTED] wrote: On 12 Jun., 14:57, Facundo Batista [EMAIL PROTECTED] wrote: Remember that the *only* difference between the two functions is that one is anonymous, and for other you have to came up with a name (name that if is well thought,

Pattern Classification Frameworks?

2007-06-12 Thread Evan Klitzke
Hi all, What frameworks are there available for doing pattern classification? I'm generally interested in the problem of mapping some sort of input to one or more categories. For example, I want to be able to solve problems like taking text and applying one or more tags to it like romance,

Re: Convert String to Int and Arithmetic

2007-06-12 Thread tereglow
On Jun 12, 10:46 am, Kay Schluehr [EMAIL PROTECTED] wrote: On 12 Jun., 16:32, tereglow [EMAIL PROTECTED] wrote: Hello, I am a complete newbie to Python and am accustomed to coding in PHP/ Perl/Shell. I am trying to do the following: I have a string: cpuSpeed = 'Speed: 10'

cgi.FieldStorage() not working on Windows

2007-06-12 Thread arorap
I've mod_php installed with Apache 2.2. In one of my folders, I'm using the cgihandler as the PythonHandler as my target host runs python only as CGI. Here cgi.FieldStorage() doesn't seem to work. I can see the form data in sys.stdin but cgi.FieldStorage() returns an empty dictionary. Here's the

Re: Convert String to Int and Arithmetic

2007-06-12 Thread Evan Klitzke
On 6/12/07, tereglow [EMAIL PROTECTED] wrote: Basically, I want to come out with 1000 for the above string. Any help would be appreciated. Tom There are any number of techniques you can use to parse out the integer part of the string -- the most generic is to use the re module to match

Re: Pattern Classification Frameworks?

2007-06-12 Thread Diez B. Roggisch
Evan Klitzke wrote: Hi all, What frameworks are there available for doing pattern classification? I'm generally interested in the problem of mapping some sort of input to one or more categories. For example, I want to be able to solve problems like taking text and applying one or more tags

Re: Multiline lamba implementation in python.

2007-06-12 Thread Kay Schluehr
On 12 Jun., 16:54, George Sakkis [EMAIL PROTECTED] wrote: On Jun 12, 10:12 am, Kay Schluehr [EMAIL PROTECTED] wrote: On 12 Jun., 14:57, Facundo Batista [EMAIL PROTECTED] wrote: Remember that the *only* difference between the two functions is that one is anonymous, and for other you have

a question about unicode in python

2007-06-12 Thread hzqij
i have a python source code test.py # -*- coding: UTF-8 -*- # s is a unicode string, include chinese s = u'张三' then i run $ python test.py UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid data by in python interactive, it is right s = u'张三' why? --

Re: Postpone creation of attributes until needed

2007-06-12 Thread Frank Millman
On Jun 12, 1:18 pm, Steven D'Aprano [EMAIL PROTECTED] wrote: On Mon, 11 Jun 2007 22:35:46 -0700, Frank Millman wrote: On Jun 12, 1:46 am, Steven D'Aprano [EMAIL PROTECTED] wrote: You haven't told us what the 'compute' method is. Or if you have, I missed it. Sorry - I made it more

how to kill a process

2007-06-12 Thread Richard Rossel
Hi Fellows, I have a problem with process termination. I have a python code that apache runs through a django interface. The code is very simple, first, it creates a process with the subprocess.Popen call, and afterwards, (using a web request) the python code uses the PID of the previously created

Re: a question about unicode in python

2007-06-12 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], hzqij wrote: i have a python source code test.py # -*- coding: UTF-8 -*- # s is a unicode string, include chinese s = u'张三' then i run $ python test.py UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid data by in python

Forgetting an import

2007-06-12 Thread HMS Surprise
I imported a set of functions from a file I wrote to interpreter shell: from myFile import * Now if I change functions in this file how can I make python forget it so I can force a fresh import? thanx, jh -- http://mail.python.org/mailman/listinfo/python-list

Re: Article on wxPython ToolKit for Mac OS X

2007-06-12 Thread miah_gbg
On May 3, 9:46 pm, James Stroud [EMAIL PROTECTED] wrote: miah_gbg wrote: Hi there! Just wanted to let people know in this group that I have recently (April 24th) published an introductory article on wxPython and Mac OS X. It is available here:http://www.macdevcenter.com/ Hope someone

Re: a question about unicode in python

2007-06-12 Thread WolfgangZ
hzqij schrieb: i have a python source code test.py # -*- coding: UTF-8 -*- # s is a unicode string, include chinese s = u'张三' then i run $ python test.py UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1: invalid data by in python interactive, it is right s

  1   2   3   >