Hi list,
I'd like to split an ogg audio file into pieces (small enough to fit
in an audio cd). Can anybody suggest me a python module to do that?
Thanks,
Daniele
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
On Thu, Oct 2, 2008 at 3:52 AM, Daniele <[EMAIL PROTECTED]> wrote:
> Hi list,
> I'd like to split an ogg audio file into pieces (small enough to fit
> in an audio cd). Can anybody suggest me a python module to do that?
Perhaps PyOgg or oggpy:
http://ekyo.nerim.net/software/pyogg/
http://dingoskidn
Okay, I'm resurrecting this project. I did a little more work on it then
what you see here, but that ended up getting accidentally deleted, and I
haven't done anything with Python since.
I'm running into one problem already, and I haven't really added any extra
code. In the content (at this point,
room == start is a comparison (check if room is equal to start - doesn't
make a whole lot of sense to be doing that here). The "room" variable name
doesn't exist in the current namespace, so it can't be compared to start.
It looks like you wanted room = start.
On 10/2/08, nathan virgil <[EMAIL PR
Dear list,
I was just trying the following code:
for i in range(0, 10, 2):
print i
print "done!"
But I do get a syntax error, and I don't understand why:
>>> for i in range(0, 10, 2):
... print i
... print "done!"
File "", line 3
print "done!"
^
As far as I understand, t
You are having an issue with the interpreter. You can only submit 1 command
at a time to the interpreter.
Therefore, you need to finish your for loop and hit enter *twice* so that
the interpreter knows you're done with the loop.
The reason you're getting an error is it's trying to put your "print
note that I meant it's not tabbed correctly *to be part of the for loop*.
On Thu, Oct 2, 2008 at 9:42 AM, Luke Paireepinart <[EMAIL PROTECTED]>wrote:
> You are having an issue with the interpreter. You can only submit 1
> command at a time to the interpreter.
> Therefore, you need to finish your
jeremiah wrote:
Just wondering if anyone here would be interested in sharing a python
twill script? I'd just like to take a gander at how others are
engineering their scripts.
twill?
--
Bob Gailer
Chapel Hill NC
919-636-4239
When we take the time to be aware of our feelings and
needs
I am using python 2.5.2. Is there an alternative to idle that does not have
this problem?
(I also fixed that this was no longer a problem).
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
No that does not work. When I click on idle it just does not open - very
annoying.
--- On Thu, 2/10/08, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
From: Luke Paireepinart <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Idle and windows XP firewall
To: [EMAIL PROTECTED]
Cc: tutor@python.org
Date: Thur
On Thu, Oct 2, 2008 at 10:31 AM, David Holland <[EMAIL PROTECTED]>wrote:
> I am using python 2.5.2. Is there an alternative to idle that does not
> have this problem?
> (I also fixed that this was no longer a problem).
>
> Open IDLE without using the "edit with IDLE" link.
Or use a different edit
Where are you running it from? it needs some weird command line parameters,
so you probably need to use the shortcut in the start bar that Python made
for you.
On Thu, Oct 2, 2008 at 10:55 AM, David Holland <[EMAIL PROTECTED]>wrote:
> No that does not work. When I click on idle it just does not
I just using the short cut and nothing happens :(.
I have managed to do this before just not in my new job
--- On Thu, 2/10/08, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
From: Luke Paireepinart <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Idle and windows XP firewall
To: [EMAIL PROTECTED]
Cc: tuto
Try installing pythonwin, it's an editor by the guy that made the win32all
extensions.
Or use eclipse with Python plugin, maybe?
On Thu, Oct 2, 2008 at 11:31 AM, David Holland <[EMAIL PROTECTED]>wrote:
> I just using the short cut and nothing happens :(.
>
> I have managed to do this before just
On Thu, Oct 2, 2008 at 11:42 AM, David <[EMAIL PROTECTED]> wrote:
> Thanks, Luke, that makes sense.
>
This is only applicable to the interpreter, though. It's perfectly legal to
have a statement on the line immediately following a loop when you're
writing code files.
Also, please use "reply all"
That works thanks
--- On Thu, 2/10/08, Luke Paireepinart <[EMAIL PROTECTED]> wrote:
From: Luke Paireepinart <[EMAIL PROTECTED]>
Subject: Re: [Tutor] Idle and windows XP firewall
To: [EMAIL PROTECTED]
Cc: tutor@python.org
Date: Thursday, 2 October, 2008, 5:33 PM
Try installing pythonwin, it's an e
Hello,
I am trying to do some exercises in John Zelle's book (chapter 4).
I got stuck:
"Write a program that finds the average of a series of numbers entered
by the user. The program should first ask the user how many numbers
there are. Note: the average should always be a float, even if the u
On Thu, Oct 2, 2008 at 12:00 PM, David Holland <[EMAIL PROTECTED]> wrote:
>
> That works thanks
>
You should send e-mails to the list in plaintext, because it's really
hard to reply to your e-mails in HTML mode.
I mean, it's not hard for me to convert them, but it's just one of
those minor nuisance
On Thu, Oct 2, 2008 at 12:06 PM, David <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am trying to do some exercises in John Zelle's book (chapter 4).
> I got stuck:
>
> "Write a program that finds the average of a series of numbers entered by
> the user. The program should first ask the user how many n
On Fri, Oct 03, 2008 at 01:06:29AM +0800, David wrote:
> Hello,
>
> I am trying to do some exercises in John Zelle's book (chapter 4).
> I got stuck:
>
> Okay, I can ask how many number are to be added:
>
> numbers = input("How many number do you want me to calculate? ")
>
> If I then get a rep
[EMAIL PROTECTED] wrote on
10/02/2008 01:06:29 PM:
> Hello,
>
> I am trying to do some exercises in John Zelle's book (chapter 4).
> I got stuck:
>
> "Write a program that finds the average of a series of numbers entered
> by the user. The program should first ask the user how many numbers
>
Hello Christopher,
[EMAIL PROTECTED] wrote:
>
> Okay, I can ask how many number are to be added:
>
> numbers = input("How many number do you want me to calculate? ")
you should really use raw_input to get the info from the user,
and then convert it to a number.
numbers=int
Hello,
I am a little confused how multi-windows work in Tkinter. I am currently
using it while learning to program. Using it for single window apps/scripts
is fine. However what I dont understand is:
What is toplevel? Is it the same as Tk()? Do I initialise a root using Tk()
and then use toplevel
On Fri, Oct 03, 2008 at 01:38:48AM +0800, David wrote:
> Does that mean input() is obsolete (after all, Zelle's book is not the
> freshest on the shelf)? Or do they have different uses?
Depends on how you look at it.
input() automatically evaluates whatever the user types as a Python
expression
On Thu, Oct 02, 2008, Steve Willoughby wrote:
>On Fri, Oct 03, 2008 at 01:38:48AM +0800, David wrote:
>> Does that mean input() is obsolete (after all, Zelle's book is not the
>> freshest on the shelf)? Or do they have different uses?
>
>Depends on how you look at it.
>
>input() automatically eval
Cheers for the insights!
However, I just found out that changing input() to raw_input() breaks my
code:
This program takes the average of numbers you supply!!
How many numbers do you want me to work with? 2
You want me to take the average of 2 numbers.
Please type the numbers, separated by com
On Thu, Oct 02, 2008 at 10:54:56AM -0700, Bill Campbell wrote:
> Remember the cardinal rule NEVER TRUST USER INPUT! Always check
> for validity, and use methods that prevent malicious strings from
> allowing the user to get unauthorized access or change things
> they shouldn't.
Yes, I probably sh
On Fri, Oct 03, 2008 at 02:06:47AM +0800, David wrote:
> Cheers for the insights!
>
> However, I just found out that changing input() to raw_input() breaks my
> code:
Recall that we told you raw_input() returns a string, while
input() returns an integer if you typed an integer value.
So you nee
I am not sure how you got from the input to your variable i, it is a good
idea to post your code as well.
That said raw_input will return the user's input as a string which you
then need to convert to integers.
So the commas are brought in as well.
You can solve this in a couple of ways:
First,
Hello Steve,
thanks for all your help and comments.
What happens, though, is that with
numbers = int(raw_input("Please type the numbers, separated by commas: "))
my code is still defunct (whereas input() works):
Please type the numbers, separated by commas: 1,2
Traceback (most recent call las
Oh, great, this answers my question!
Thanks!
David
[EMAIL PROTECTED] wrote:
I am not sure how you got from the input to your variable i, it is a
good idea to post your code as well.
That said raw_input will return the user's input as a string which you
then need to convert to integers.
Hello Trask,
I have been working on the first program. I got the files to read and print out
the grades and averages, but when I write these files to the other txt file,
all that I get is:
10.0
10.0
10.0
10.0
10.0
10.0
10.0
10.0
10.0
10.0
I know it is something simple. I am just not seeing it
On Thu, Oct 02, 2008 at 09:41:37PM +, [EMAIL PROTECTED] wrote:
> for count in range (len(Grades)):
> grades_file_2.write(str("%.2f"% (len(Grades))) + "\n")
Look at what you're actually writing for each count.
See anything amiss the
On Oct 2, 2008, at 8:21 AM, bob gailer wrote:
jeremiah wrote:
Just wondering if anyone here would be interested in sharing a python
twill script? I'd just like to take a gander at how others are
engineering their scripts.
twill?
Twill is an http client automation tool. It's used quite a
You're doing a good job getting started with
programming here, keep getting the fundamentals
and then learn to refine those concepts over time.
But for future reference, here are some finer
points for you to keep in mind to improve your
style and get a more Pythonic approach:
On Thu, Oct 02, 200
2008/10/3 Glen Clark <[EMAIL PROTECTED]>:
> What is toplevel? Is it the same as Tk()? Do I initialise a root using Tk()
> and then use toplevel for any other windows? How do I switch between the
> Windows? And while I am on the subject what is a frame and why should I use
> it? atm the moment it ju
"David" <[EMAIL PROTECTED]> wrote
However, I just found out that changing input() to raw_input()
breaks my code:
You want to know the average of the numbers: 1,2
Traceback (most recent call last):
File "avgInput.py", line 13, in
add = add + i
TypeError: unsupported operand type(s) for +:
"David" <[EMAIL PROTECTED]> wrote
Does that mean input() is obsolete (after all, Zelle's book is not
the freshest on the shelf)? Or do they have different uses?
They have different uses and input is very convenient at the >>>
prompt
or when experimenting but in most cases is the wrong choic
"Glen Clark" <[EMAIL PROTECTED]> wrote
I am a little confused how multi-windows work in Tkinter. I am
currently
using it while learning to program. Using it for single window
apps/scripts
is fine. However what I dont understand is:
What is toplevel? Is it the same as Tk()?
In any GUI thee i
<[EMAIL PROTECTED]> wrote
I got the files to read and print out the grades and averages,
but when I write these files to the other txt file, all that I get
is:
10.0
10.0...
I know it is something simple. I am just not seeing it.
When the output doesn't vary like this you know you must be
wr
Hello list,
How trustworthy is the "randomness" generated by the random module? I
just wrote a script (with the help of some tutors here!) that finds the
largest streak in a series of coin flips.
My collected data:
100 coin flips = 6-7 streak (usually)
1000 coin flips = 10-12 streak (usually)
10
[Alec Henriksen]
> How trustworthy is the "randomness" generated by the random module?
Python uses the Mersenne Twister algorithm for generating
pseudo-random numbers, and that's one of the highest-quality methods
known. You can read more about it, e.g., here:
http://en.wikipedia.org/wiki/Me
42 matches
Mail list logo