Re: Keyboard input

2010-01-31 Thread Mr.SpOOn
2010/1/29 Gabriel Genellina : > > That's strange. If you're using Linux, make sure you have the readline > package installed. I'm using Linux. Ubuntu. I checked on synaptic and I have readline-common. Do you mean something else? Anyway I tried running the program in the iPython shell and it works

Keyboard input

2010-01-29 Thread Mr.SpOOn
Hi, I need to get keyboard input in a python program. I need it to let the user choose some options, for example: 1) option 1 2) option 2 3) option 3 and then to input some data to the program. I'm using the raw_input method and it works fine, but I noted that I can't use backspace and when I ac

Re: Logic operators with "in" statement

2009-11-17 Thread Mr.SpOOn
Thanks everybody for all the answers and explanations. In the end maybe it is simpler if I use sets for these tests. Thanks again. -- http://mail.python.org/mailman/listinfo/python-list

Re: Logic operators with "in" statement

2009-11-16 Thread Mr.SpOOn
Sorry for replying to myself, but I think I understood why I was wrong. The correct statement should be something like this: In [13]: ('b3' and '5') in l or ('3' and 'b3') in l Out[13]: True -- http://mail.python.org/mailman/listinfo/python-list

Logic operators with "in" statement

2009-11-16 Thread Mr.SpOOn
Hi, I'm trying to use logical operators (or, and) with the "in" statement, but I'm having some problems to understand their behavior. In [1]: l = ['3', 'no3', 'b3'] In [2]: '3' in l Out[2]: True In [3]: '3' and '4' in l Out[3]: False In [4]: '3' and 'no3' in l Out[4]: True This seems to work a

Re: Getting input the scanf way

2009-07-03 Thread Mr.SpOOn
Thanks, I think raw_input() will work just fine for my needs. -- http://mail.python.org/mailman/listinfo/python-list

Getting input the scanf way

2009-07-01 Thread Mr.SpOOn
Hi, I need to do some kind of interactive command line program. I mean: I run the program, it asks me for input, I type something and then I get the output or other questions. I'm not sure what is the right way to achieve this. Thanks, Carlo -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-25 Thread Mr.SpOOn
2009/5/25 LittleGrasshopper : > I know Google (as a matter I read this group from Google.) I was > hoping for some new insightful responses. It's just too hot to start a flame :P -- http://mail.python.org/mailman/listinfo/python-list

Re: Music knowledge representation

2008-09-29 Thread Mr.SpOOn
On Mon, Sep 29, 2008 at 10:56 PM, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: >> I can't estabilish which note is higher, because all the analysis part >> is octave independent. Anyway thanks for the ideas. > > I'm not sure I understand this. You either have to assume that the > first note is the

Re: Music knowledge representation

2008-09-29 Thread Mr.SpOOn
On Mon, Sep 29, 2008 at 6:49 PM, D'Arcy J.M. Cain <[EMAIL PROTECTED]> wrote: > On Sun, 28 Sep 2008 16:37:11 +0200 > "Mr.SpOOn" <[EMAIL PROTECTED]> wrote: >> Hi, >> I'm working on an application to analyse music (melodies, chord sequences >>

Re: Music knowledge representation

2008-09-28 Thread Mr.SpOOn
On Sun, Sep 28, 2008 at 8:59 PM, Aaron Castironpi Brady <[EMAIL PROTECTED]> wrote: > Here is a link to someone else's design they asked about on the > newsgroup a couple weeks ago. > > http://groups.google.com/group/comp.lang.python/browse_thread/thread/ecffaa827984866d/921cba3084b984dc?lnk=st&q=s

Music knowledge representation

2008-09-28 Thread Mr.SpOOn
Hi, I'm working on an application to analyse music (melodies, chord sequences etc.) I need classes to represent different musical entities. I'm using a class Note to represent all the notes. Inside it stores the name of the natural version of the note (C, D, E, F...) and an integer to calculate th

Override the '+' symbol

2008-09-21 Thread Mr.SpOOn
Hi, how can I override the '+' symbol (and other math symbols) so that it can have a new behavior when applied to some objects? -- http://mail.python.org/mailman/listinfo/python-list

parse a midi file

2008-09-16 Thread Mr.SpOOn
Hi, I need to parse a midi file with Python. What I exactly need is the possibility to distinguish all notes in all channels in a midi file and put them in a list or something. I've found this: http://groups.google.com/group/alt.sources/msg/22467419ad4bf416 I'm not sure how it does work, but loo