[Tutor] Buffering when reading files !

2009-08-03 Thread Mohannad Mohammad
Hello Tutor, I have a question about reading files using: file = open("filename.txt", "r", ) The third argument ( . ) filled by buffering status, 0 or 1 or negative value or positive value greater than 1. I know the meaning of every value. but my question about the meaning o

Re: [Tutor] nonlinear fittinig

2009-08-03 Thread Muhammad Ali
Don't know about nlinfit but you can check numpy, scipy and matplotlib that provide matlab like functionality. Ali On Mon, Aug 3, 2009 at 11:20 PM, Alireza Alemi wrote: > Dear All > > I am not sure if here is the right place to ask this question. > Anyway, the question is: Is there a pythonic

Re: [Tutor] [pygame] why does my window not close?

2009-08-03 Thread Muhammad Ali
Hi, I have the same problem running pygame programs from the interpreter. I now just put a shebang line on top of the script like #!/usr/bin/env python and do chmod +x on the script and then run it from the terminal by doing ./script.py or double clicking on the file. It works fine when run dire

[Tutor] New Issues with REGEX Greediness: (gpo)

2009-08-03 Thread ron
psst, there is NO standardized reg-ex. you've been living in a perl bubble. undoubtedly other people will have better advice. "Life can only be understood backwards; But it must be lived forwards" --S.K. ___ Tutor maillist - Tutor@python.or

[Tutor] nonlinear fittinig

2009-08-03 Thread Alireza Alemi
Dear All I am not sure if here is the right place to ask this question. Anyway, the question is: Is there a pythonic counterpart for Matlab nonlinear fitting ( which is " nlinfit() " function )? Thanks, Alireza ___ Tutor maillist - Tutor@python.o

Re: [Tutor] Question about the FONT in Tkinter

2009-08-03 Thread Kent Johnson
On Sat, Aug 1, 2009 at 12:12 PM, Mohannad Mohammad wrote: > Kindly refer to the attached photo. > There are two sentences appearing when the user checked two checkbutton, I > make it as a practice. > ok > I want to change the font of these two sentences. how? >     self.box = Text(self, width

Re: [Tutor] How to pass arguments to struct.pack()?

2009-08-03 Thread Alan Gauld
"prasad rao" wrote I am finding it difficult to pass arguments to struct.pack(). You are not actually passing argments to struct.pack you are trying to access a non existent tuple() method of struct.pack. Hence the error message. But your code has several strangenesses... so simplifying

[Tutor] How to pass arguments to struct.pack()?

2009-08-03 Thread prasad rao
Hello I am finding it difficult to pass arguments to struct.pack(). Please some one tell me how to do it. >>> def structpack(alist): import struct a='%di'%len(alist) print a b=[a] print alist print b

Re: [Tutor] New Issues with REGEX Greediness:

2009-08-03 Thread Jerry Hill
On Sun, Aug 2, 2009 at 2:55 PM, gpo wrote: > > Python: > line='>Checking Privilege for UserId: > {874BE70A-194B-DE11-BE5C-000C297901A5}, PrivilegeId: {prvReadSdkMessage}. > Returned hr = 0' > (re.search('(\w+)\:.+.{8}-.{4}-.{4}-.{4}-.{12}',line)).group(0) > RESULT > 'UserId: {874BE70A-194B-DE11-BE5