Re: Unspecified problem sending serial data

2011-08-24 Thread Michiel Overtoom
On Aug 24, 2011, at 23:51, Dave Angel wrote: > On 08/24/2011 01:05 PM, Adrián Monkas wrote: >> What I want to do is send around 180KBytes via Serial port. Also have a look at pySerial, http://pyserial.sourceforge.net/ Greetings, -- "If you don't know, the thing to do is not to get scared, but

PythonAPI4FinancialData - Python code for grabbing the entire universe of Finance Yahoo tickers

2011-08-24 Thread Jiri Pik
Hello Python-list, for personal finance study, i found it critical to have as complete universe of yahoo tickers as possible. In fact, this seems to be a common problem if you google it. Thus, I have created a simple Python code (to be expanded shortly for all required functionality) whi

event :use command to replace bind

2011-08-24 Thread 守株待兔
here is my code ,it can run ,i want to make it simpler, to change three sentences to one, xb =Button(root, text='Fetch') xb.pack(side=LEFT) xb.bind("", partial(fetch, entries=ents)) i write: Button(root, text='Fetch',command=partial(fetch, entries=ents)).pack(side=LEFT)

Re: Weird interaction with nested functions inside a decorator-producing function and closuring of outer data...

2011-08-24 Thread Steven D'Aprano
Adam Jorgensen wrote: > Thanks :-) Sorry about the size, I wasn't sure what was relevant... We prefer that you don't top-post here, because it makes it hard to see context when people reply. In general, people asking questions should always try to reduce the problem to the simplest code that wil

Re: is there any principle when writing python function

2011-08-24 Thread Red John
> "We must constantly strive to remove multiplicity from our systems; > lest it consumes us!" > > s/multiplicity/rantingrick/ and I'm in full agreement. QFT -- http://mail.python.org/mailman/listinfo/python-list

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Ben Finney
Michael Hunter writes: > No, you use the RSS feed to notify interested parties that a new > podcast is available. You advertise the feed in a general way to get > new users. Those are different things. +1, except please make it a standard Atom feed instead of (or in addition to) the messy RSS.

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Michael Hunter
On Wed, Aug 24, 2011 at 3:41 PM, Ethan Furman wrote: [...] >> No, please don't announce the next one.  There should be a RSS feed. >> But please do announce the feed at regular intervals. Note, I didn't say announce the feed each release. In fact, I didn't even say announce the feed in this chan

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Ethan Furman
Michael Hunter wrote: On Wed, Aug 24, 2011 at 2:50 PM, Terry Reedy wrote: [...] You can find it at http://www.radiofreepython.com/ as of this very minute. >> What a treat. Thank you. Please announce the next one too. No, please don't announce the next one. There should be a RSS feed. But p

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Michael Hunter
On Wed, Aug 24, 2011 at 2:50 PM, Terry Reedy wrote: [...] >> You can find it at http://www.radiofreepython.com/ as of this very minute. > > What a treat. Thank you. Please announce the next one too. No, please don't announce the next one. There should be a RSS feed. But please do announce the fe

Unspecified problem sending serial data

2011-08-24 Thread Dave Angel
Former subject line: reading and writing files On 08/24/2011 01:05 PM, Adrián Monkas wrote: Hi. thanks for answering so soon. What i want to do is send around 180KBytes via Serial port. First of all i have been trying to read from a file this amount of information and copy to another file. Tha

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Terry Reedy
On 8/24/2011 12:15 AM, Larry Hastings wrote: Radio Free Python is a new monthly podcast focused on Python and its community. Episode 1 has just been released! It features a panel discussion with the PythonLabs team: * Barry Warsaw, * Fred Drake, * Guido van Rossum, * Roger Masse, * a

Re: I think I found 2 undocumented string format codes.

2011-08-24 Thread Alexander Kapps
On 24.08.2011 22:45, Bill wrote: My google-fu has failed me in finding info on %h and %l string formatting codes. '%h' %'hello' exceptions.ValueError: incomplete format '%l' %'hello' exceptions.ValueError: incomplete format Does anyone know what doing a "complete format" means? See http

Re: I think I found 2 undocumented string format codes.

2011-08-24 Thread rantingrick
On Aug 24, 3:45 pm, Bill wrote: > My google-fu has failed me in finding info on %h and %l string > formatting codes. Did it ever occur to you to peruse the docs? http://docs.python.org/library/stdtypes.html#string-formatting-operations Stop using the limited deprecated string interpolation and u

I think I found 2 undocumented string format codes.

2011-08-24 Thread Bill
My google-fu has failed me in finding info on %h and %l string formatting codes. >>> '%h' %'hello' exceptions.ValueError: incomplete format >>> '%l' %'hello' exceptions.ValueError: incomplete format Does anyone know what doing a "complete format" means? -- http://mail.python.org/mailman/listinf

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Michiel Overtoom
On Aug 24, 2011, at 06:15, Larry Hastings wrote: > Radio Free Python is a new monthly podcast focused on Python and its > community. Excellent initiative! I love to listen to podcasts about Open Source software and Python, on my MP3 player, while I take long walks in the countryside. I hope

Re: Learning Python

2011-08-24 Thread John Gordon
In <770aff9e-0879-40f5-ac86-f5098b9fd...@b9g2000prd.googlegroups.com> kangshu...@hotmail.com writes: > Hi all > could some one help me=EF=BC=9F > there is a piece of code: > def fib(x): > if x=3D=3D0 or x=3D=3D1: return 1 > else: return fib(x-1) + fib(x-2) > Could some one explain it fo

Re: there is a problem, holp someone could help me,thanks

2011-08-24 Thread rantingrick
On Aug 24, 10:59 am, kangshu...@hotmail.com wrote: > Now I have a problem and I holp someone can help me. > > def fib(x): >     if x==0 or x==1: return 1 >     else: return fib(x-1) + fib(x-2) This must be from "How not to program". Was this a personal pick or recommendation? -- http://mail.pyt

Re: Learning Python

2011-08-24 Thread kangshufan
Hi all could some one help me? there is a piece of code: def fib(x): if x==0 or x==1: return 1 else: return fib(x-1) + fib(x-2) Could some one explain it for me? I can't understand how it works. -- http://mail.python.org/mailman/listinfo/python-list

Re: there is a problem, holp someone could help me,thanks

2011-08-24 Thread nathan huang
hi John it's simple, let's make a little modification for the scipt: def fib(x): if x==0 or x==1: return 1 else: return fib(x-1) + fib(x-2) for i in range(10): print 'fib(%s): ' % i, fib(i) result: fib(0): 1 fib(1): 1 fib(2): 2 fib(3): 3 fib(4): 5 fib(5): 8 fib(6): 13 fib(7):

Re: Hiding token information from users

2011-08-24 Thread Nobody
On Tue, 23 Aug 2011 06:27:39 -0700, Tobiah wrote: > I am making QR codes that cell phone users scan in order to make use of an > application. Part of the information is a token that needs to be passed > on to the server, but I'd rather not allow a person examining the QR code > to be able to see

Re: there is a problem, holp someone could help me,thanks

2011-08-24 Thread John Gordon
In kangshu...@hotmail.com writes: > Hi everyone > I just study python for a few time. > Now I have a problem and I holp someone can help me. > There is a piece of code: > def fib(x): > if x==0 or x==1: return 1 > else: return fib(x-1) + fib(x-2) > Could you explain how it works? > Tha

there is a problem, holp someone could help me,thanks

2011-08-24 Thread kangshufan
Hi everyone I just study python for a few time. Now I have a problem and I holp someone can help me. There is a piece of code: def fib(x): if x==0 or x==1: return 1 else: return fib(x-1) + fib(x-2) Could you explain how it works? Thanks for you help. Vince -- http://mail.python.org/mai

Re: Learning Python

2011-08-24 Thread Den
On Aug 23, 7:46 pm, User wrote: > Hello all, > Does anyone have any good resources for learning Python? I know basic > Java and basic Python (loops, data types, if-then statements, etc), but > I want to delve into Python further. If anyone knows of any good books, > video tutorials, etc it would b

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Colin J. Williams
On 24-Aug-11 00:15 AM, Larry Hastings wrote: Radio Free Python is a new monthly podcast focused on Python and its community. Episode 1 has just been released! It features a panel discussion with the PythonLabs team: * Barry Warsaw, * Fred Drake, * Guido van Rossum, * Roger Masse, *

Re: Weird interaction with nested functions inside a decorator-producing function and closuring of outer data...

2011-08-24 Thread Adam Jorgensen
Thanks :-) Sorry about the size, I wasn't sure what was relevant... On 24 August 2011 15:29, Peter Otten <__pete...@web.de> wrote: > Adam Jorgensen wrote: > >> Hi all, I'm experiencing a weird issue with closuring of parameters >> and some nested functions I have inside two functions that >> retur

Re: Announcing a new podcast: Radio Free Python

2011-08-24 Thread Tim Chase
On 08/23/2011 11:15 PM, Larry Hastings wrote: Episode 1 has just been released! You can find it at http://www.radiofreepython.com/ as of this very minute. No Podcast/RSS feed...seriously? Downloaded manually and will listen later, but best left to podcatchers :) -tkc -- http://mail.pytho

Re: Weird interaction with nested functions inside a decorator-producing function and closuring of outer data...

2011-08-24 Thread Peter Otten
Adam Jorgensen wrote: > Hi all, I'm experiencing a weird issue with closuring of parameters > and some nested functions I have inside two functions that > return decorators. I think it's best illustrated with the actual code: You should have made an effort to reduce its size > # This decorator do

Re: Execute a method in a file in an egg

2011-08-24 Thread Sebastien Douche
On Wed, Aug 24, 2011 at 12:04, Gabriel Genellina wrote: >> Is there a way to do this from the command line? Thanks. > > Something like this? > > python -c "import the.module;the.module.someclass().method(arguments)" Or with console_scripts option in setup.py. -- Sebastien Douche Twitter : @sd

Weird interaction with nested functions inside a decorator-producing function and closuring of outer data...

2011-08-24 Thread Adam Jorgensen
Hi all, I'm experiencing a weird issue with closuring of parameters and some nested functions I have inside two functions that return decorators. I think it's best illustrated with the actual code: # This decorator doesn't work. For some reason python refuses to closure the *decode_args parameter

Re: Adding modified methods from another class without subclassing

2011-08-24 Thread John O'Hagan
On Tue, 23 Aug 2011 17:25:22 +1000 Steven D'Aprano wrote: > On Mon, 22 Aug 2011 11:08 pm John O'Hagan wrote: > > > On Mon, 22 Aug 2011 15:27:36 +1000 > > Steven D'Aprano wrote: > [...] > >> # Untested > >> class MySeq(object): > >> methods_to_delegate = ('__getitem__', '__len__', ...) > >>

Re: Adding modified methods from another class without subclassing

2011-08-24 Thread John O'Hagan
On Mon, 22 Aug 2011 20:38:30 +0200 Peter Otten <__pete...@web.de> wrote: > John O'Hagan wrote: > > > On Mon, 22 Aug 2011 11:32:18 +0200 > > Peter Otten <__pete...@web.de> wrote: > > > >> John O'Hagan wrote: > >> > >> > I have a class like this: > >> > > >> > class MySeq(): > >> > def __ini

Re: Execute a method in a file in an egg

2011-08-24 Thread Gabriel Genellina
En Tue, 23 Aug 2011 13:14:06 -0300, RVince escribió: Is there a way to do this from the command line? Thanks. Something like this? python -c "import the.module;the.module.someclass().method(arguments)" -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2011-08-24 Thread Muresan Alexandru Mihai
http://www.youtube.com/watch?v=tKTZoB2Vjuk On Wed, Aug 24, 2011 at 11:53 AM, becky_lewis wrote: > http://diveintopython.org/ is where you can get an online version of > the dive into python book. I found it useful when learning python :) > > Becky Lewis > > On Aug 24, 3:46 am, User wrote: > > H

Re: Learning Python

2011-08-24 Thread becky_lewis
http://diveintopython.org/ is where you can get an online version of the dive into python book. I found it useful when learning python :) Becky Lewis On Aug 24, 3:46 am, User wrote: > Hello all, > Does anyone have any good resources for learning Python? I know basic > Java and basic Python (loop