Re: [Tutor] wav audio playback

2007-02-25 Thread Adam Pridgen
You are getting these errors because the API for Python varies by release (e.g. 2.4 to 2.5) due to additions, bug fixes, etc.. The warning you are receiving is letting you know that it was compiled and meant to be run on Python 2.4, and also subtly warning that problems may arise when you run or

[Tutor] python shell not working like it used to

2007-02-25 Thread Jeff Peery
hello, I just upgraded to python 2.5 and wxpython 2.6. I'm not sure the correct list for this but I'm trying to shove some variables into a py shell using the below code. this worked pretty well before, but now it gives me an error on the last line of my brief example. The error is: 'dict'

[Tutor] wav audio playback

2007-02-25 Thread Isaac
hello from a programming newbie. I am writing a metronome function. Currently, I am using a hack with the system bell: [code] def tick(rate): while true: #do until C-c print '\a' #system bell inside terminal time.sleep(rate) #pause at desired rate [/code] I would like to use an

Re: [Tutor] miniwiki 1.3 BETA bugs

2007-02-25 Thread Kirk Z Bailey
RE leaves me totally confuzzzeddded. Yep, so confuised I'm having trouble spelling it. Sp this one line will replace both words and give a reliable result? Barnaby Scott wrote: [snip] > No idea if it has anything to do with your problem, but it struck me > that the iswikiword() function (and pr

Re: [Tutor] List and comprehension questions

2007-02-25 Thread Bob Gailer
Kent Johnson wrote: > Smith, Jeff wrote: > >> I'm getting use to using list iteration and comprehension but still have >> some questions. >> >> 1. I know to replace >> for i in range(len(list1)): >> do things with list1[i] >> with >> for li in list1: >> do things with li

Re: [Tutor] Embedding Python

2007-02-25 Thread Dj Gilcrease
On 2/25/07, Dave Kuhlman <[EMAIL PROTECTED]> wrote: > If you have not already, you will want to look at SWIG > (http://www.swig.org/). SWIG will generate C or C++ code from a > header file containing structs and classes and function > declarations. That generated code can then be compiled and lin

Re: [Tutor] Embedding Python

2007-02-25 Thread Dave Kuhlman
On Sat, Feb 24, 2007 at 02:50:41AM -0800, Dj Gilcrease wrote: > I am attempting to embed Python in a C++ app and have a question > before I get too far into it. > > Is is possible to to dynamically create an extension module? > eg, I want a module name spam and I have a stuct that contains all my

Re: [Tutor] Group sequence pairwise

2007-02-25 Thread Christopher Arndt
David Perlman schrieb: > I found this by "using Google". You should be able to make a simple > modification (I can think of a couple of ways to do it) to have it > pad the end with "None". It is 100% iterator input and output. > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/30327

Re: [Tutor] List and comprehension questions

2007-02-25 Thread Kent Johnson
Smith, Jeff wrote: > I'm getting use to using list iteration and comprehension but still have > some questions. > > 1. I know to replace > for i in range(len(list1)): > do things with list1[i] > with > for li in list1: > do things with li > but what if there are two lists t

[Tutor] List and comprehension questions

2007-02-25 Thread Smith, Jeff
I'm getting use to using list iteration and comprehension but still have some questions. 1. I know to replace for i in range(len(list1)): do things with list1[i] with for li in list1: do things with li but what if there are two lists that you need to access in sync. Is the

Re: [Tutor] Group sequence pairwise

2007-02-25 Thread David Perlman
I found this by "using Google". You should be able to make a simple modification (I can think of a couple of ways to do it) to have it pad the end with "None". It is 100% iterator input and output. http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/303279 On Feb 25, 2007, at 7:06 AM, C

Re: [Tutor] geeks like us and the rest of THEM

2007-02-25 Thread David Perlman
Keep in mind that things generally become extremely reliable only after extensive real-world testing. TANSTAAFL On Feb 25, 2007, at 1:14 AM, Kirk Bailey wrote: > This has to be baby carriage reliable and simple for the business road > warrior who has not a geekified bone in their body. --

Re: [Tutor] Group sequence pairwise

2007-02-25 Thread Christopher Arndt
Luke Paireepinart schrieb: > Christopher Arndt wrote: >> I have tried to find a solution, using itertools, but I'm not very >> experienced in functional stuff, so I got confused. > Do you mean you're not experienced in using functions or do you mean > you're inexperienced at functional programmin

Re: [Tutor] Group sequence pairwise

2007-02-25 Thread Luke Paireepinart
Christopher Arndt wrote: > Given a sequence, how can I group it pairwise, so that I get > > [(s0, s1), (s2, s3), ... , (sn-1, sn)] > > or, if len(s)%2 != 0 > > [(s0, s1), (s2, s3), ... , (sn, None)] > > > I have tried to find a solution, using itertools, but I'm not very > experienced in functional

[Tutor] Group sequence pairwise

2007-02-25 Thread Christopher Arndt
Given a sequence, how can I group it pairwise, so that I get [(s0, s1), (s2, s3), ... , (sn-1, sn)] or, if len(s)%2 != 0 [(s0, s1), (s2, s3), ... , (sn, None)] I have tried to find a solution, using itertools, but I'm not very experienced in functional stuff, so I got confused. There is a reci

Re: [Tutor] geeks like us and the rest of THEM

2007-02-25 Thread Alan Gauld
"Kirk Bailey" <[EMAIL PROTECTED]> wrote > couple. A solid and drool-proof server is the remaining leg of the Take a look at xitami http://www.xitami.com/download.htm Free, small, flexible, configurable and fast being written in C. HTH, Alan G.