Re: Visualizing a wav file?

2007-07-11 Thread Wim Vogelaar
Perhaps you can use parts/routines of Audacity.
See: http://en.wikipedia.org/wiki/Audacity

Wim Vogelaar, http://home.wanadoo.nl/w.h.vogelaar/ 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IndentationError: unexpected indent

2007-06-16 Thread Wim Vogelaar

> How is he supposed to run MS notepad on X11? :)
>
I am saying MS notepad, but any software (running on Linux) showing you 
clearly the tabs will help.

It would also be very convenient when python would deal with tabs in a human 
friendly way.

Wim Vogelaar,  http://home.wanadoo.nl/w.h.vogelaar/ 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IndentationError: unexpected indent

2007-06-16 Thread Wim Vogelaar
> Note: for your indentation problem, try to use an editor allowing to 
> display tab and spaces and then identify the problem location, or replace 
> all tabs by 4 spaces and configure the editor to only use spaces.

It would be very helpful when Python would warn you when there are tabs in 
your source.

So instead of only saying: "IndentationError: unexpected indent"
there could be an additional message saying: "there are tab characters in 
that line, please remove them".

Wim Vogelaar, http://home.wanadoo.nl/w.h.vogelaar/


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: IndentationError: unexpected indent

2007-06-14 Thread Wim Vogelaar
You have possibly unvisible tab characters in your file.
Just copy your lines to the simple MS notepad and try again.

Wim Vogelaar, http://home.wanadoo.nl/w.h.vogelaar/


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can python create a dictionary from a list comprehension?

2007-05-28 Thread Wim Vogelaar

>
> why this output isn't ordered, giving:
> {2: 3, 4: 5, 6: 7, 8: 9, 10: 11 }
>
>

I made the original list two elements longer: a = 
[1,2,3,4,5,6,7,8,9,10,11,12]

and to my surprise the output is now ordered, giving: {2: 3, 4: 5, 6: 7, 8: 
9, 10: 11, 12: 13}

I am running ActiveState ActivePython 2.5

 


-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Can python create a dictionary from a list comprehension?

2007-05-28 Thread Wim Vogelaar
> Example:
>
> a = [1,2,3,4,5,6,7,8,9,10]
>
> aDict = dict([(x,x+1) for x in a if x%2==0])
>
> print aDict
>

When I run this program I get:
{8: 9, 2: 3, 4: 5, 10: 11, 6: 7}

why this output isn't ordered, giving:
{2: 3, 4: 5, 6: 7, 8: 9, 10: 11 }



-- 
http://mail.python.org/mailman/listinfo/python-list