DFW Pythoneer Meetings This Week

2005-11-08 Thread Jeff Rush
The Dallas-Ft. Worth Pythoneers are having three meetings this week. [1] Thursday, November 10th (i.e. Every Second Thursday) From 7 pm until 10 pm at Snuffer's Restaurant and Bar in Addison on Midway, we have a *social get-together*. Sure to be on the agenda is discussion about

Chicago Python Users Group, Thurs Nov 10

2005-11-08 Thread Ian Bicking
November topics are Remote, Generic and Random, just like us. We'll have presentations on PyRO (Python Remote Objects) by Fawad Halim, generic functions (as implemented in RuleDispatch) by Ian Bicking, and the standard library random module by Robert Ramsdell. There will also be time to chat,

Re: how to stop a loop with ESC key? [newbie]

2005-11-08 Thread Fredrik Lundh
mo [EMAIL PROTECTED] wrote: Can somebody explain how to stop a WHILE loop in running program by pressing ESC key? depends on the platform. on windows, you can use the mscvrt module: import msvcrt while ...: ... if msvcrt.kbhit() and msvcrt.getch() == chr(27):

Pywin32: How to import data into Excel?

2005-11-08 Thread Dmytro Lesnyak
Hello, I need to import some big data into Excel from my Python script. I have TXT file (~7,5 Mb). Im using Pywin32 library for that, but if I first try to read the TXT file and then save the values one by one like xlBook.Sheets(sheet_name).Cells(i,j).Value = value_from_TXT_file it

Re: how to stop a loop with ESC key? [newbie]

2005-11-08 Thread Leif K-Brooks
mo wrote: Can somebody explain how to stop a WHILE loop in running program by pressing ESC key? On Unix-like systems try: import termios, fcntl, sys, os fd = sys.stdin.fileno() oldterm = termios.tcgetattr(fd) newattr = termios.tcgetattr(fd) newattr[3] = newattr[3] ~termios.ICANON

image

2005-11-08 Thread Shi Mu
why the following code report the error: Traceback (most recent call last): File C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py, line 310, in RunScript exec codeObject in __main__.__dict__ File C:\Python23\Examples\AppB\text.py, line 24, in ? text.image_create(END,

Re: overloading *something

2005-11-08 Thread Bengt Richter
On Mon, 7 Nov 2005 20:39:46 -0800, James Stroud [EMAIL PROTECTED] wrote: On Monday 07 November 2005 20:21, Robert Kern wrote: James Stroud wrote: Hello All, How does one make an arbitrary class (e.g. class myclass(object)) behave like a list in method calls with the *something operator?

Re: Distributed Cache Server?

2005-11-08 Thread [EMAIL PROTECTED]
har nah, think I'll give BT a miss for this purpose. Yeah, know it was a loaded question (no specifics), but was really only thinking out aloud. The plans are: - Multiple copies of data on different machines (just thinking 2 copies of the data) - Load spread over multiple machines...

Re: overloading *something

2005-11-08 Thread Peter Otten
James Stroud wrote: I was attempting to re-define iter of a subclassed list, to find the magic method, but it didn't work. class List(list): ... def __iter__(self): return iter(abc) ... a = List([1,2,3]) list(a) ['a', 'b', 'c'] tuple(a) (1, 2, 3) list-to-tuple conversion is optimized

Re: socket receive file does not match sent file

2005-11-08 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: while True: data = f.read(8192) if not data: break else: s.send(data) What is the cause of the problem, can anyone tell me? using sendall instead of send should fix this. see the library reference for details: send(

Re: image

2005-11-08 Thread Fredrik Lundh
Shi Mu wrote: why the following code report the error: Traceback (most recent call last): File C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py, line 310, in RunScript exec codeObject in __main__.__dict__ File C:\Python23\Examples\AppB\text.py, line 24, in ?

Addressing the last element of a list

2005-11-08 Thread [EMAIL PROTECTED]
Isn't there an easier way than lst[len(lst) - 1] = ... ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Class Variable Access and Assignment

2005-11-08 Thread Magnus Lycka
Antoon Pardon wrote: Fine that goes both ways. I don't mind not being taken serious by people I have trouble taking serious my self. No doubt that goes for you too. You know Antoon, these internet communities aren't really like Speaker Corner in Hyde Park. You earn respect based on your merits,

Re: Addressing the last element of a list

2005-11-08 Thread [EMAIL PROTECTED]
Or alternatively: Is there a way to make reference to the last element of a list, to use as a shorthand: ref := lst[len(lst) - 1] # I know syntax is wrong, but you get the idea and then using the last element of the list by (assuming the element is a dict): ref[foo] = 42 ref[bar] = Ni! etc.

Re: image

2005-11-08 Thread Shi Mu
yes. I use both cmd and pythonwin to run it. why both of them can not work? On 11/8/05, Fredrik Lundh [EMAIL PROTECTED] wrote: Shi Mu wrote: why the following code report the error: Traceback (most recent call last): File

Re: Addressing the last element of a list

2005-11-08 Thread [EMAIL PROTECTED]
I knew there was an easy way :) Just to satisfy my curiousity: Is there a way to do something like the reference solution I suggest above? -- http://mail.python.org/mailman/listinfo/python-list

DFW Pythoneer Meetings This Week

2005-11-08 Thread Jeff Rush
The Dallas-Ft. Worth Pythoneers are having three meetings this week. [1] Thursday, November 10th (i.e. Every Second Thursday) From 7 pm until 10 pm at Snuffer's Restaurant and Bar in Addison on Midway, we have a *social get-together*. Sure to be on the agenda is discussion about

[OTAnn] Groups:New Developments at Roomity

2005-11-08 Thread shenanigans
I was interested in getting feedback from current communities of Roomity.com and let you know the recent improvements we are working on for better interface.Roomity.com v 1.5 is a web 2.01/RiA poster child community webapp. This new version adds broadcast video, social networking such as favorite

what the %?....

2005-11-08 Thread john boy
Hey can somebody tell me what the "%" function does...I am not math illiterate...its just a new symbol for meis it a divisor? remainder something another?? thanks -xray- Yahoo! FareChase - Search multiple travel sites in one click. --

Re: python server

2005-11-08 Thread Magnus Lycka
linuxpld wrote: I`m writing a program (server in future) in python. I would like to write it in such a way that I will be able to write gui in any language and connect to my python program and use functionality included with it. are there any libraries that I could use? Thee are many

Re: Addressing the last element of a list

2005-11-08 Thread Andreas Lobinger
Aloha, [EMAIL PROTECTED] wrote: Isn't there an easier way than lst[len(lst) - 1] = ... lst[-1] = ... Wishing a happy day LOBI -- http://mail.python.org/mailman/listinfo/python-list

[OTAnn] Feedback

2005-11-08 Thread shenanigans
I was interested in getting feedback from current mail group users.We have mirrored your mail list in a new application that provides a more aggregated and safe environment which utilizes the power of broadband.Roomity.com v 1.5 is a web 2.01 community webapp. Our newest version adds broadcast

Re: Addressing the last element of a list

2005-11-08 Thread Peter Otten
[EMAIL PROTECTED] wrote: Just to satisfy my curiousity: Is there a way to do something like the reference solution I suggest above? No. You cannot overload assignment. Of course, for mutable objects you can use the object as the reference to itself. Peter --

How to convert a number to hex number?

2005-11-08 Thread Hako
I try this command: import string string.atoi('78',16) 120 this is 120 not 4E. Someone can tell me how to convert a decimal number to hex number? Can print A, B, C,DEF. Thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.getmtime on winXP

2005-11-08 Thread Bengt Richter
On Tue, 08 Nov 2005 07:57:44 +0100, =?ISO-8859-1?Q?Jorg_R=F8dsj=F8?= [EMAIL PROTECTED] wrote: [sorry to those reading twice, but I just realised that I had posted this after mucking about with the date on my machine to try to figure this out -- so the message probably went into last months

Re: Lie Hetland book: Beginning Python..

2005-11-08 Thread Vittorio
Steve Holden [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: No, you actually did quite a creditable piece of debugging. The DB-API specifications allow database modules to substitute parameters into SQL commands in a number of different ways, and they are supposed to indicate the

Re: Addressing the last element of a list

2005-11-08 Thread [EMAIL PROTECTED]
what do you mean by alias ? a = b now both a and b refers to the same object. [EMAIL PROTECTED] wrote: So there is no way in Python to make an alias for an object? /David -- http://mail.python.org/mailman/listinfo/python-list

Re: Addressing the last element of a list

2005-11-08 Thread [EMAIL PROTECTED]
I just want an alias. Ideally, I don't want to deal with pointers or special reference types etc. After all, this is not C++ :) I just want to be able to make a reference to any old thing in Python. A list, an integer variable, a function etc. so that I, in complicated cases, can make a

Re: image

2005-11-08 Thread Fredrik Lundh
File C:\Python23\lib\lib-tk\Tkinter.py, line 2882, in image_create return self.tk.call( TclError: image pyimage4 doesn't exist works for me, when running it from a stock CPython interpreter. have you tried running the script outside the pywin environment? btw, the error message

Re: How to convert a number to hex number?

2005-11-08 Thread Daniel Evers
Hi! Try hex: hex(120) '0x78' Consider converting string - int using the int()-function: print int.__doc__ int(x[, base]) - integer Convert a string or number to an integer, if possible. A floating point argument will be truncated towards zero (this does not include a string representation of

Re: how to stop a loop with ESC key? [newbie]

2005-11-08 Thread mo
Thanks, I tryed your example: import msvcrt while 1: print '.' if msvcrt.kbhit() and msvcrt.getch() == chr(27): break but it doesn't work. It is running (Win2000), there is no messages about errors but there is no effect when pressing ESC key. What I am doing wrong? mo --

Re: Addressing the last element of a list

2005-11-08 Thread [EMAIL PROTECTED]
But if lst[42][pos] happens to hold an integer value, then a = lst[42][pos] will _copy_ that integer value into 'a', right? Changing 'a' will not change the value at lst[42][pos] -- http://mail.python.org/mailman/listinfo/python-list

RAW_INPUT-----NEVERMIND I FIGURED IT OUT

2005-11-08 Thread john boy
i had posted a previous question but I figured it out...thanks Yahoo! FareChase - Search multiple travel sites in one click. -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.getmtime on winXP

2005-11-08 Thread Jorg Rødsjø
Bengt Richter wrote: How did you format the number you got from os.path.getmtime? I'm not doing any formating at all. I am just looking at the numbers of seconds since epoch. Which is what makes it so strange. You might want to try some of the above. I'll do that. At the moment I'm looking

Re: Addressing the last element of a list

2005-11-08 Thread Bengt Richter
On 8 Nov 2005 01:12:07 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I knew there was an easy way :) Just to satisfy my curiousity: Is there a way to do something like the reference solution I suggest above? If the last element in the list was a dict, then you could do something like

Re: Addressing the last element of a list

2005-11-08 Thread Jerzy Karczmarczuk
Peter Otten wrote: [EMAIL PROTECTED] wrote: Just to satisfy my curiousity: Is there a way to do something like the reference solution I suggest above? No. You cannot overload assignment. I have the impression that this is not an issue, to overload assignments, which btw. *can* be

Re: Sending email in utf-8?

2005-11-08 Thread Max M
morphex wrote: That works, kinda. I get strange characters now like this Date: Mon, 7 Nov 2005 11:38:29 -0700 (MST) Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: Order confirmation Content-Type: text/plain; charset=utf-8

Re: Addressing the last element of a list

2005-11-08 Thread Bengt Richter
On 8 Nov 2005 01:43:43 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: But if lst[42][pos] happens to hold an integer value, then a = lst[42][pos] will _copy_ that integer value into 'a', right? Changing 'a' will not change the value at lst[42][pos] Right, but try an example: lst =

Re: Addressing the last element of a list

2005-11-08 Thread Peter Otten
Jerzy Karczmarczuk wrote: Peter Otten wrote: [EMAIL PROTECTED] wrote: Just to satisfy my curiousity: Is there a way to do something like the reference solution I suggest above? No. You cannot overload assignment. I have the impression that this is not an issue, to overload

Re: how to stop a loop with ESC key? [newbie]

2005-11-08 Thread Fredrik Lundh
mo [EMAIL PROTECTED] wrote: I tryed your example: import msvcrt while 1: print '.' if msvcrt.kbhit() and msvcrt.getch() == chr(27): break but it doesn't work. It is running (Win2000), there is no messages about errors but there is no effect when pressing ESC key. What I am

recursive function call

2005-11-08 Thread Nicolas Vigier
Hello, I have in my python script a function that look like this : def my_function(arg1, arg2, opt1=0, opt2=1, opt3=42): if type(arg1) is ListType: for a in arg1: my_function(a, arg2, opt1=opt1, opt2=opt2, opt3=opt3) return

Re: Addressing the last element of a list

2005-11-08 Thread [EMAIL PROTECTED]
If you want to do what you want(though I don't know why without a concrete example), just store a mutable object at lst[42][pos], like this : lst[42][pos] = [1] a = lst[42][pos] a[0] = 2 assert(lst[42][pos][0] == 2) [EMAIL PROTECTED] wrote: But if lst[42][pos] happens to hold an integer value,

Re: Addressing the last element of a list

2005-11-08 Thread Simon Brunning
On 8 Nov 2005 01:43:43 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: But if lst[42][pos] happens to hold an integer value, then a = lst[42][pos] will _copy_ that integer value into 'a', right? Nope. It will bind the name 'a' to the integer object. Changing 'a' will not change the

Re: Class Variable Access and Assignment

2005-11-08 Thread Antoon Pardon
Op 2005-11-08, Magnus Lycka schreef [EMAIL PROTECTED]: Antoon Pardon wrote: Fine that goes both ways. I don't mind not being taken serious by people I have trouble taking serious my self. No doubt that goes for you too. You know Antoon, these internet communities aren't really like Speaker

Re: PyFLTK - an underrated gem for GUI projects

2005-11-08 Thread Jeremy Sanders
aum wrote: But for smaller gui programs not needing the power of wx, I find I get the job done much more quickly and effortlessly with PyFLTK. Interesting. I've found PyQt very easy to use too. I wonder how they compare (providing you can GPL your app, of course). -- Jeremy Sanders

Re: Addressing the last element of a list

2005-11-08 Thread Peter Otten
[EMAIL PROTECTED] wrote: I just want an alias. Ideally, I don't want to deal with pointers or special reference types etc. After all, this is not C++ :) I just want to be able to make a reference to any old thing in Python. A list, an integer variable, a function etc. so that I, in

Re: Addressing the last element of a list

2005-11-08 Thread Jerzy Karczmarczuk
Peter Otten wrote cites me: I have the impression that this is not an issue, to overload assignments, which btw. *can* be overloaded, but the absence of *aliasing* (undiscriminate handling of pointers) in Python. Am I wrong? I think so. a = b will always make a a reference to (the same

Re: Sorting Documentation

2005-11-08 Thread [EMAIL PROTECTED]
For example, where can I find the official documentation on the list.sort() method? -- http://mail.python.org/mailman/listinfo/python-list

Re: recursive function call

2005-11-08 Thread Peter Otten
Nicolas Vigier wrote: Hello, I have in my python script a function that look like this : def my_function(arg1, arg2, opt1=0, opt2=1, opt3=42): if type(arg1) is ListType: for a in arg1: my_function(a, arg2, opt1=opt1, opt2=opt2,

Re: recursive function call

2005-11-08 Thread Duncan Booth
Nicolas Vigier wrote: I have in my python script a function that look like this : def my_function(arg1, arg2, opt1=0, opt2=1, opt3=42): if type(arg1) is ListType: for a in arg1: my_function(a, arg2, opt1=opt1, opt2=opt2,

any python module to calculate sin, cos, arctan?

2005-11-08 Thread Shi Mu
any python module to calculate sin, cos, arctan? -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting Documentation

2005-11-08 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote_ I want to read a little bit about sorting in Python (sorted() and method sort()). But I can't seem to find anything in the documentation at the homepage? sorted() is a function that works on arbitrary sequences, and is described in the built-in functions chapter:

RE: Pywin32: How to import data into Excel?

2005-11-08 Thread Tim Golden
[Dmytro Lesnyak] I need to import some big data into Excel from my Python script. I have TXT file (~7,5 Mb). I'm using Pywin32 library for that, but if I first try to read the TXT file and then save the values one by one like xlBook.Sheets(sheet_name).Cells(i,j).Value =

Re: what the %?....

2005-11-08 Thread Simon Brunning
On 07/11/05, john boy [EMAIL PROTECTED] wrote: Hey can somebody tell me what the % function does...I am not math illiterate...its just a new symbol for meis it a divisor? remainder something another?? For numeric values, it's the modulo operator - see http://docs.python.org/ref/binary.html

Re: Addressing the last element of a list

2005-11-08 Thread [EMAIL PROTECTED]
So there is no way in Python to make an alias for an object? /David -- http://mail.python.org/mailman/listinfo/python-list

Re: Pylab and pyserial plot in real time

2005-11-08 Thread Juho Schultz
[EMAIL PROTECTED] wrote: Hiya, I've got a PIC microcontroller reading me humidity data via rs232, this is in ASCII format. I can view this data easily using hyperterminal or pyserial and convert it to its value (relative humidty with ord(input)) But what im trying to do is plot the data

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Dennis Benzinger
Shi Mu schrieb: any python module to calculate sin, cos, arctan? Yes. Use the math module or the cmath module if you need mathematical functions for complex numbers. Bye, Dennis -- http://mail.python.org/mailman/listinfo/python-list

Re: Pywin32: How to import data into Excel?

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

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Simon Brunning
On 08/11/05, Shi Mu [EMAIL PROTECTED] wrote: any python module to calculate sin, cos, arctan? http://docs.python.org/lib/module-math.html I seem to be posting loads of links to the docs today... -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Juho Schultz
Shi Mu wrote: any python module to calculate sin, cos, arctan? math There are two versions of arctan: atan and atan2. atan2(y,x) does the quadrant selection you do not get from atan(y/x) -- http://mail.python.org/mailman/listinfo/python-list

Re: Sorting Documentation

2005-11-08 Thread Simon Brunning
On 8 Nov 2005 02:27:29 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I want to read a little bit about sorting in Python (sorted() and method sort()). But I can't seem to find anything in the documentation at the homepage? Sorted() is documented here -

Re: Addressing the last element of a list

2005-11-08 Thread Matt Hammond
On Tue, 08 Nov 2005 10:25:21 -, Jerzy Karczmarczuk [EMAIL PROTECTED] wrote: Would you please concentrate on - what I underlined - the sense of C aliasing, where you can make a pointer to point to anything, say, the 176th byte of a function code? Pretty much everything is referred

Re: how to stop a loop with ESC key? [newbie]

2005-11-08 Thread Mikael Olofsson
Fredrik Lundh wrote: works for me, when running it from a stock CPython interpreter in a windows console window, with focus set to that window. what environment are you using? Could be IDLE. The code Fredrik proposed works well for me in the Python console window, but not in IDLE (thats

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Mikael Olofsson
Shi Mu wrote: any python module to calculate sin, cos, arctan? Try module math. Or cmath if you want the functions to be aware of complex numbers. /MiO -- http://mail.python.org/mailman/listinfo/python-list

Re: Addressing the last element of a list

2005-11-08 Thread Giovanni Bajo
[EMAIL PROTECTED] wrote: I just want an alias. What you want is impossible. But there are many workarounds. I just want to be able to make a reference to any old thing in Python. A list, an integer variable, a function etc. so that I, in complicated cases, can make a shorthand. If myRef

Re: Sorting Documentation

2005-11-08 Thread Simon Brunning
On 8 Nov 2005 02:32:44 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: For example, where can I find the official documentation on the list.sort() method? http://docs.python.org/lib/typesseq-mutable.html -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ --

parabola

2005-11-08 Thread Shi Mu
Is there any sample code to draw parabola using Tkinter? -- http://mail.python.org/mailman/listinfo/python-list

Re: os.path.getmtime on winXP

2005-11-08 Thread Bengt Richter
On Tue, 08 Nov 2005 10:49:56 +0100, =?ISO-8859-1?Q?Jorg_R=F8dsj=F8?= [EMAIL PROTECTED] wrote: Bengt Richter wrote: How did you format the number you got from os.path.getmtime? I'm not doing any formating at all. I am just looking at the numbers of seconds since epoch. Which is what makes it

RE: Pywin32: How to import data into Excel?

2005-11-08 Thread Dmytro Lesnyak
Thanks a lot. It really works! Now, I can solve my problem and make my script faster! A few suggestions: + When trying to automate anything in Excel, it's usually illuminating to record a macro which does what you want, and then to translate that VBA code into Python. Yes, I also

Re: Addressing the last element of a list

2005-11-08 Thread Peter Otten
Jerzy Karczmarczuk wrote: Sure, I didn't want to claim that the assignment a=anything can be plainly overloaded. I interpreted your previous post as such a claim. No disagreement here then. Would you please concentrate on - what I underlined - the sense of C aliasing, where you can make a

Re: PYTHON LOOSING FOR JAVA???????

2005-11-08 Thread Jarek Zgoda
Fcamattti napisał(a): So I have a doubt. I'd like to know what do you think about the joint of efforts of Sun Microsystems and the Google to create a office web based. I sincerely enjoy the idea althoug I'd like to know what will be the future of this wonderful language called Python??

Sorting Documentation

2005-11-08 Thread [EMAIL PROTECTED]
I want to read a little bit about sorting in Python (sorted() and method sort()). But I can't seem to find anything in the documentation at the homepage? /David -- http://mail.python.org/mailman/listinfo/python-list

Writing Win32 shell extensions in python?

2005-11-08 Thread Thomas W
Well, is it possible to write Win32 shell extension in python? I want to create a virtual folder ( like gmailfs ) to serve files from a http-server ( and no, I cannot use webdav ) so that users can access them like normal files in Windows Explorer. Any hints or info about this would be highly

Re: Pywin32: How to import data into Excel?

2005-11-08 Thread BJ Swope
On 11/8/05, Dmytro Lesnyak [EMAIL PROTECTED] wrote: Hello, I need to import some big data into Excel from my Python script. I have TXT file (~7,5 Mb). I'm using Pywin32 library for that, but if I first try to read the TXT file and then save the values one by one like I have to

RE: Pywin32: How to import data into Excel?

2005-11-08 Thread Dmytro Lesnyak
I have to question the reasoning behind using Excel. That much data seems like it would be troublesome to manage in Excel. How good is Excel at working with that much data? Well,It's not that big data. As result, It willbe 52 X 25000 table and it works fine in Excel (f.e. I need to make

Re: Pylab and pyserial plot in real time

2005-11-08 Thread Jeremy Sanders
[EMAIL PROTECTED] wrote: Does anyone know of a module designed for ploting real time data thats more appropriate for the above mentioned task than pylab?? You could have a look at my plotting package, Veusz, which can be embedded in other apps. You can update the data in real time, as the

Re: how to stop a loop with ESC key? [newbie]

2005-11-08 Thread mo
Fredrik Lundh wrote: works for me, when running it from a stock CPython interpreter in a windows console window, with focus set to that window. what environment are you using? I use IDLE 1.0.3, Python 2.3.4 The same problem is when running in a win console. mo --

Re: Sorting Documentation

2005-11-08 Thread Xah Lee
[EMAIL PROTECTED] wrote: «I want to read a little bit about sorting in Python (sorted() and method sort()). But I can't seem to find anything in the documentation at the homepage?» if you want some detailed account on the sort method, see: http://www.xahlee.org/perl-python/sort_list.html Xah

Re: parabola

2005-11-08 Thread Salvatore
Here is an old piece of code I wrote when begining Python ;-) from Tkinter import * import string import Numeric from Canvas import Line import math class Tableau(Canvas): def __init__(self,master=None,size=400,col='black',colrep='red',colgrid='grey'):

Re: parabola

2005-11-08 Thread Salvatore
Here is an old piece of code I wrote to test Tkinter from Tkinter import * import string import Numeric from Canvas import Line import math class Tableau(Canvas): def __init__(self,master=None,size=400,col='black',colrep='red',colgrid='grey'):

Re: socket receive file does not match sent file

2005-11-08 Thread [EMAIL PROTECTED]
Thanks Fredrik Lundh, This is great! I've rewrote the code and it works! Thanks a lot. -- http://mail.python.org/mailman/listinfo/python-list

which feature of python do you like most?

2005-11-08 Thread [EMAIL PROTECTED]
which feature of python do you like most? I've heard from people that python is very useful. Many people switch from perl to python because they like it more. I am quite familiar with perl, I've don't lots of code in perl. Now, I was curious and interested in the python people. They certainly

Re: Writing Win32 shell extensions in python?

2005-11-08 Thread Fredrik Lundh
Thomas W [EMAIL PROTECTED] wrote: Well, is it possible to write Win32 shell extension in python? I want to create a virtual folder ( like gmailfs ) to serve files from a http-server ( and no, I cannot use webdav ) so that users can access them like normal files in Windows Explorer. Any

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Raymond L. Buvel
Shi Mu wrote: any python module to calculate sin, cos, arctan? The other answers in this thread point you to the standard modules. If you need arbitrary precision floating point versions of these functions check out: http://calcrpnpy.sourceforge.net/clnumManual.html --

Re: os.path.getmtime on winXP

2005-11-08 Thread Jorg Rødsjø
Bengt Richter wrote: By 'getmtime' you mean os.path.getmtime(fer_shure_or_absolute_path_to_file) right? Doesn't that get you an integer number of seconds? What GUI or win32file is showing you that integer so you see a 3600 sec difference? Or how are you seeing it? Could you paste an

Exposing a COM interface to embedded scripts via PythonCOM

2005-11-08 Thread cookie__raver
I have a host process that exposes a COM object to embedded Python scripts, and want it to appear to the Python scripts as a smart COM object, in the same way that Python COM provides. The Python scripts would then be able to use expected methods and properties, in the same way that one does with

Re: Is mod_python 3.1 good for commercial blogging/CMS?

2005-11-08 Thread Ben Sizer
Anthony L. wrote: 1. I want to use CGI through Publisher handler, instead of CGI handler or PSP. Despite the speed increase mod_python gives me, there is a problem of persistence that can be a problem when dealing with a site that will hosts potentially hundreds of simultaneous users. What

Re: recursive function call

2005-11-08 Thread Nicolas Vigier
Peter Otten said: Here is a non-recursive approach: def tolist(arg): if isinstance(arg, list): return arg return [arg] def f(arg1, arg2, more_args): for arg1 in tolist(arg1): for arg2 in tolist(arg2): # real code If it were my code I would omit the

Re: Web automation

2005-11-08 Thread Paul Boddie
Mike Meyer wrote: Paul Boddie [EMAIL PROTECTED] writes: The problem on non-Windows systems is the lack of a common (or enforced) technology for exposing application object models OS X has AppleScript. VM/CMS has Rexx. The Amiga had ARexx when MS was still peddling DOS. Plan 9 has files. I

Diff. between Class types and classic classes

2005-11-08 Thread venk
Hi, can some one properly explain the differences between class types and classic classes? ... Still face problems in identifying what is what. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python doc problem example: gzip module (reprise)

2005-11-08 Thread Xah Lee
Newsgroups: comp.lang.perl.misc From: Veli-Pekka Tätilä Date: Sat, 5 Nov 2005 17:25:35 +0200 Subject: Re: Python doc problem example: gzip module (reprise) Xah Lee wrote: Today i need to use Python to compress/decompress gzip files. snip However, scanning the doc after 20 seconds there's no

Re: Sending email in utf-8?

2005-11-08 Thread Fredrik Lundh
morphex [EMAIL PROTECTED] wrote: Date: Mon, 7 Nov 2005 11:38:29 -0700 (MST) Message-Id: [EMAIL PROTECTED] To: [EMAIL PROTECTED], [EMAIL PROTECTED] From: [EMAIL PROTECTED] Subject: Order confirmation Content-Type: text/plain; charset=utf-8 X-Bogosity: No, tests=bogofilter,

RE: Pywin32: How to import data into Excel?

2005-11-08 Thread Duncan Booth
Tim Golden wrote: [Dmytro Lesnyak] I need to import some big data into Excel from my Python script. I have TXT file (~7,5 Mb). I'm using Pywin32 library for that, but if I first try to read the TXT file and then save the values one by one like xlBook.Sheets(sheet_name).Cells(i,j).Value =

RE: Pywin32: How to import data into Excel?

2005-11-08 Thread Tim Golden
[Tim Golden] + When trying to automate anything in Excel, it's usually illuminating to record a macro which does what you want, and then to translate that VBA code into Python. [Duncan Booth] Another suggestion: when automating Excel, turn off the automatic recalculation (set

SPE IDE for Python

2005-11-08 Thread py
Anyone here use SPE (http://www.stani.be/python/spe/blog/). ...the IDE? Also, anyone know if it supports CVS or has a plugin for CVS? If not, what do you use to get your code into CVS (via an IDE preferably)? -- http://mail.python.org/mailman/listinfo/python-list

XML GUI

2005-11-08 Thread py
Looking for information on creating a GUI using a configuration file (like an XML file or something). Also, how do you map actions (button clicks, menu selections, etc) to the XML? Any other suggestions for building GUI's for Python projects...even Jython. Thanks --

Re: which feature of python do you like most?

2005-11-08 Thread Benji York
[EMAIL PROTECTED] wrote: I have no idea why people are so facinating with python. So I post this question: What do you use in your dairy work with python? I can't imagine why you're confused. -- Benji York -- http://mail.python.org/mailman/listinfo/python-list

Re: any python module to calculate sin, cos, arctan?

2005-11-08 Thread Matt Feinstein
On Tue, 08 Nov 2005 12:30:35 GMT, Raymond L. Buvel [EMAIL PROTECTED] wrote: Shi Mu wrote: any python module to calculate sin, cos, arctan? The other answers in this thread point you to the standard modules. If you need arbitrary precision floating point versions of these functions check out:

Re: Addressing the last element of a list

2005-11-08 Thread Steven D'Aprano
On Tue, 08 Nov 2005 01:31:31 -0800, [EMAIL PROTECTED] wrote: So there is no way in Python to make an alias for an object? Yes, sort of. Bind two names to the same mutable object: py x = [Something mutable] py y = x py y.append(this way comes.) py print x ['Something mutable', 'this way

Re: Addressing the last element of a list

2005-11-08 Thread Steven D'Aprano
On Tue, 08 Nov 2005 01:04:13 -0800, [EMAIL PROTECTED] wrote: Or alternatively: Is there a way to make reference to the last element of a list, to use as a shorthand: ref := lst[len(lst) - 1] # I know syntax is wrong, but you get the idea and then using the last element of the list by

  1   2   3   >