On 20/03/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
> > If the browser tries to execute the script you will need to go to
> > the file types setting in the browser and set .py to plain-text.
> >
> > This is what I need to do ... but, after looking at all the options
> > (within tools->Options), I st
Hallo
This is my first post, so hallo to everyone. Im just
a newbee with python so I hope my msg will make some sense. J
Is it possible to work with MP3 in python?
I’m looking for a library to modify MP3s (like
fade in, fade out, etc..). I know there are actually some libraries fo
Dear Python Tutors,
I have been looking for a good way to convert python code into a control
flow graph.
I know of Python functions that will convert an expression into an
abstract syntax tree (i.e. ast = parser.expr('(x+5)*5') then t =
ast.totuple() then t), but I am not sure how to obtain a
On 3/21/06, Johanna <[EMAIL PROTECTED]> wrote:
> Hallo
> This is my first post, so hallo to everyone. Im just a newbee with python so
> I hope my msg will make some sense.
>
> Is it possible to work with MP3 in python?
>
Pygame (http://www.pygame.org/docs/ref/music.html) apparently works
with mp3
** Copy of a reply sent only to Alan Gauld by mistake.
On 3/20/06, Alan Gauld <[EMAIL PROTECTED]> wrote:
> > If the browser tries to execute the script you will need to go to
> > the file types setting in the browser and set .py to plain-text.
> >
> > This is what I need to do ... but, after looki
To whom this may concern,
Attatched is the source code, which
demonstrates a
problem I am having making a GUI for my python project work. Both
files need to be in the same folder.
My code writes to a text file 'table.txt', and 'table.txt' is displayed in
On Tue, 2006-03-21 at 10:50 +0100, Johanna wrote:
> Hallo
>
>
>
> This is my first post, so hallo to everyone. Im just a newbee with
> python so I hope my msg will make some sense. J
>
>
>
> Is it possible to work with MP3 in python?
yumex lists
python-eyed3
python-mad
as p
I'm using xmltramp to process some U.S. House of Rep. vote data. I can get it to print what I want but when I try to write it to a text file I had all sorts of problems. Can someone tell me what I'm doing wrong? I've done quite a bit of searching for the solution but as a novice to Python I'm at a
Matt Dempsey wrote:
> I'm using xmltramp to process some U.S. House of Rep. vote data. I can
> get it to print what I want but when I try to write it to a text file I
> had all sorts of problems. Can someone tell me what I'm doing wrong?
>
> for each in range(votes):
>st= str(vd[each].legis
Hey all,
I would like to expand the "visual" representation of a tree
hierarchy, given below, where child-ness is defined by indentation,
and folder-ness is highlighted with a trailing '/'
Input (test.txt):
dir1/
file1
file2
1-1/
file3
file4
On Tue, 21 Mar 2006, Brian C. Lum wrote:
> I have been looking for a good way to convert python code into a control
> flow graph.
[text cut]
Hi Brian,
I think you may want to ask your question to the pypy folks, since your
question is a bit specialized. Check out pypy, which is an implemenat
stv wrote:
> I considered several brute-force solutions, but I persevered and came
> to, what I think, is a more Pythonic solution. What do you think?
Looks pretty sweet to me :-)
>
> import string
>
> def expand_tree(filetree):
> indent = '\t'
> stack = []
> for f in filetree:
> inden
> My code writes to a text file 'table.txt', and 'table.txt' is displayed in
> the GUI. The user can generate new data at the click of a button
> which re-writes 'table.txt', but I can only add the new table to the GUI
> window rather than 'update' the existing one.
class MoC:
def __init__(sel
I have a piece of code that wants a callback from a client:
The code looks like this right now:
class pawprints:
def __init__(self, callback_fun = None)
...
at the client calling site I have something like this:
def printme(modulename, codename, lineno, line):
...
paws = pa
> The list comp is fine but I don't think you need it
> at all, since you strip() the string before you
> add it to stack.
Ahh yes. I used the rstrip() in development, printing intermediary
output to stdout, so I could see what my input file-to-list looked
like (and it looked ugly with all those E
> I have a piece of code that wants a callback from a client:
>
> The code looks like this right now:
>
> class pawprints:
> def __init__(self, callback_fun = None)
> ...
>
>
> at the client calling site I have something like this:
>
> def printme(modulename, codename, lineno, line)
> > It seems backwards to me because because if I get the function
> > definition wrong in the client site then I get a traceback to the
> > callback site - which is meant to be an opaque library that the client
> > should not have to know about.
>
> Yes, what you're asking makes sense: we want to
I'm having a new problem with my House vote script. It's returning the following error: Traceback (most recent call last): File "C:/Python24/evenmorevotes", line 20, in -toplevel- f.write(nm+'*'+pt+'*'+vt+'*'+md['vote-result'][0]+'*'+md['vote-desc'][0]+'*'+'\n')
UnicodeEncodeError: 'ascii' code
On Tue, 21 Mar 2006, Matt Dempsey wrote:
> I'm having a new problem with my House vote script. It's returning the
> following error:
>
> Traceback (most recent call last):
> File "C:/Python24/evenmorevotes", line 20, in -toplevel-
> f.write
> (nm+'*'+pt+'*'+vt+'*'+md['vote-result'][0]+'*'+
On 3/21/06, stv <[EMAIL PROTECTED]> wrote:
>
> import string
>
> def expand_tree(filetree):
> indent = '\t'
> stack = []
> for f in filetree:
> indents = f.count(indent)
> while len(stack) > indents: stack.pop()
> stack.append(f.strip())
> yield string.join(stack,'')
> if
> A friend of mine showed me where the unicode is showing up but we still
> can't get script to work right. We tried encoding the appropriate
> variable but it still is spitting back the error. Would I just have:
> u'\u201c'.encode('utf8') in my script or should it be
> md['vote-desc'][0].encode('
Hi all,
i am new to programming language and python. I wonder how to get a line text
from input file.
Thanks,
sophon
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Hi all,
How can i set a value to a bytes of block of memory. In C, i think they use
memset like this.
Thanks,
Sophon
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Johanna wrote:
> Hallo
>
>
>
> This is my first post, so hallo to everyone. Im just a newbee with
> python so I hope my msg will make some sense. J
>
>
>
> Is it possible to work with MP3 in python?
>
> I’m looking for a library to modify MP3s (like fade in, fade out,
> etc..). I know th
Keo Sophon wrote:
> Hi all,
>
> How can i set a value to a bytes of block of memory. In C, i think they use
> memset like this.
Python does not support direct access to memory, you will need to use
another language or maybe a C extension to Python to do this.
Kent
Keo Sophon wrote:
> Hi all,
>
> i am new to programming language and python. I wonder how to get a line text
> from input file.
The simplest Python idiom to do something with each line of a file is this:
for line in open('somefile.txt'):
# do something with line
You can find out more he
On Tue, Mar 21, 2006 at 09:35:15PM -0500, Bill Burns wrote:
> Johanna wrote:
> > Is it possible to work with MP3 in python?
> >
> > I?m looking for a library to modify MP3s (like fade in, fade out,
> > etc..).
>
> You may want to have a look at PyMedia:
>
> http://www.pymedia.org/
I agree wit
On Wed, 22 Mar 2006, Keo Sophon wrote:
> i am new to programming language and python. I wonder how to get a line
> text from input file.
Hi Sophon,
You may want to look at:
http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
Many of the tutorials there talk about reading from files
On Tue, 21 Mar 2006, Kent Johnson wrote:
> > How can i set a value to a bytes of block of memory. In C, i think
> > they use memset like this.
Hi Sophon,
Secondary question: why are you trying to do this? Are you trying to
represent a collection or "array" of things?
Some concepts in C aren
> On Tue, 21 Mar 2006, Kent Johnson wrote:
> > > How can i set a value to a bytes of block of memory. In C, i think
> > > they use memset like this.
Whoops, sorry about that Kent! I completely messed up the attribution
when cutting-and-pasting.
Hi
I am new to python and I am going through the URL
http://www.ibiblio.org/obp/thinkCSpy/index.htm, At the moment
I am going through the Chapter 7 Strings, I am stuck with understanding
slice which is a part of a String, I am not able to understand how it functions
Awaiting your earnest reply
T
> I am new to python and I am going through the URL
> http://www.ibiblio.org/obp/thinkCSpy/index.htm, At the moment I am going
> through the Chapter 7 Strings, I am stuck with understanding slice which
> is a part of a String, I am not able to understand how it functions
Hello,
A "slice" takes
On 3/22/06, Danny Yoo <[EMAIL PROTECTED]> wrote:
>
> > I am new to python and I am going through the URL
> > http://www.ibiblio.org/obp/thinkCSpy/index.htm, At the moment I am going
> > through the Chapter 7 Strings, I am stuck with understanding slice which
> > is a part of a String, I am not able
On Wed, March 22, 2006 12:11 pm, Kaushal Shriyan wrote:
> Hi
>
> I am new to python and I am going through the URL
> http://www.ibiblio.org/obp/thinkCSpy/index.htm, At the moment
> I am going through the Chapter 7 Strings, I am stuck with understanding
> slice which is a part of a String, I am not
34 matches
Mail list logo