Re: Python-list Digest, Vol 88, Issue 67

2011-01-26 Thread willie...@gmail.com
Sent from my LG phone python-list-requ...@python.org wrote: >Send Python-list mailing list submissions to > python-list@python.org > >To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-list >or, via email, send a message with su

Re: Python-list Digest, Vol 88, Issue 69

2011-01-26 Thread willie...@gmail.com
Sent from my LG phone python-list-requ...@python.org wrote: >Send Python-list mailing list submissions to > python-list@python.org > >To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-list >or, via email, send a message with su

Re: Python-list Digest, Vol 88, Issue 69

2011-01-26 Thread willie...@gmail.com
Sent from my LG phone python-list-requ...@python.org wrote: >Send Python-list mailing list submissions to > python-list@python.org > >To subscribe or unsubscribe via the World Wide Web, visit > http://mail.python.org/mailman/listinfo/python-list >or, via email, send a message with su

time function problem

2008-11-27 Thread willie
My code: from time import time def leibniz(terms): acc = 0.0 num = 4.0 # numerator value remains constant in the series den = 1 count = 0 start_time = 0.0 for aterm in range(terms): nextterm = num/den * (-1)**aterm # (-1) allows fractions to alternate

Re: Using lambda with a Pmw.ComboBox

2007-01-18 Thread Willie
I will post a sample tomorrow AM. James Stroud wrote: > Can you show us your code? Your question is ambiguous to me. Comboboxes > do not hold widgets but display text. -- http://mail.python.org/mailman/listinfo/python-list

Using lambda with a Pmw.ComboBox

2007-01-18 Thread Willie
. Can someone refer me to some code which shows this in action? I have searched the web for a solution, without any luck. Thanks, Willie -- http://mail.python.org/mailman/listinfo/python-list

unicode, bytes redux

2006-09-24 Thread willie
(beating a dead horse) Is it too ridiculous to suggest that it'd be nice if the unicode object were to remember the encoding of the string it was decoded from? So that it's feasible to calculate the number of bytes that make up the unicode code points. # U+270C # 11100010 10011100 10001100 buf =

byte count unicode string

2006-09-20 Thread willie
>willie wrote: >> >> Thanks for the thorough explanation. One last question >> about terminology then I'll go away :) >> What is the proper way to describe "ustr" below? >> >>> ustr = buf.decode('UTF-8') >> >&

byte count unicode string

2006-09-20 Thread willie
Martin v. Löwis: >willie schrieb: > >> Thank you for your patience and for educating me. >> (Though I still have a long way to go before enlightenment) >> I thought Python might have a small weakness in >> lacking an efficient way to get the number of bytes

byte count unicode string

2006-09-20 Thread willie
John Machin: >Good luck! Thank you for your patience and for educating me. (Though I still have a long way to go before enlightenment) I thought Python might have a small weakness in lacking an efficient way to get the number of bytes in a "UTF-8 encoded Python string object" (proper?), but I'v

byte count unicode string

2006-09-20 Thread willie
John Machin: >You are confusing the hell out of yourself. You say that your web app >deals only with UTF-8 strings. Where do you get "the unicode string" >from??? If name is a utf-8 string, as your comment says, then len(name) >is all you need!!! # I'll go ahead and concede defeat since you

byte count unicode string

2006-09-20 Thread willie
>willie wrote: >> Marc 'BlackJack' Rintsch: >> >> >In <[EMAIL PROTECTED]>, willie wrote: >> >> # What's the correct way to get the >> >> # byte count of a unicode (UTF-8) string? >> >> # I couldn't

byte count unicode string

2006-09-20 Thread willie
Marc 'BlackJack' Rintsch: >In <[EMAIL PROTECTED]>, willie wrote: >> # What's the correct way to get the >> # byte count of a unicode (UTF-8) string? >> # I couldn't find a builtin method >> # and the following is memory ine

byte count unicode string

2006-09-19 Thread willie
# What's the correct way to get the # byte count of a unicode (UTF-8) string? # I couldn't find a builtin method # and the following is memory inefficient. ustr = "example\xC2\x9D".decode('UTF-8') num_chars = len(ustr)# 8 buf = ustr.encode('UTF-8') num_bytes = len(buf) # 9 # Thanks.

Way off Question - VATSIM - query

2006-09-14 Thread Willie Whelan
Hi, I know this is a way off question, but does anyone have any info on querying a vatsim server. www.vatsim.net. I would just like to query a server to see what clients are connected. Thanks Willie -- http://mail.python.org/mailman/listinfo/python-list

Forcing a stack trace from the command line?

2005-10-13 Thread Willie Walker
Hi: I'm working on Orca, a screen reader for the GNOME platform, and it's being done in Python. Python is working really for us right now and I'm quite happy with many aspects of it. Is there a function like CTRL-Backspace in Python? There is a hang in my code somewhere and I'm unable to find i

Re: Threading and serial port access

2005-06-18 Thread willie
Diez wrote: > Apart from that the approach you use is wasting resources - if you are > concerned about that (or better style...) use e.g. twisted with the > serial and parallel support and its so-called select reactor. The idea > behind that concept is that the OS is responsible for scannig IO-Por

Threading and serial port access

2005-06-18 Thread willie
Hi, I'm writing a program which requires the use of three serial ports and one parallel port. My application has a scanning devices on each port, which I can access fine with pyserial. However, I'm unsure of how exactly I should be designing the program, I thought I could use threading to start