Dan Bishop wrote:
Shane Hathaway wrote:
pythonchallenge wrote:
For the riddles' lovers among you, you are most invited to take
part
in the Python Challenge, the first python programming riddle on
the
net.
You are invited to take part in it at:
http://www.pythonchallenge.com
Jeremy Bowers wrote:
No matter how you slice it, this is not a Python problem, this is an
intense voice recognition algorithm problem that would make a good
PhD thesis.
No, my goal is nothing relative to voice recognition. Sorry that I
haven't described my question clearly. We are not
I can't understand why name a graph library 'nework' :)
--
http://mail.python.org/mailman/listinfo/python-list
A few days ago Tom Mortimer wrote:
A quick question - can anyone tell me how to interpret negative time
values in pstats.Stats.print_stats() output?
See http://docs.python.org/lib/profile-limits.html
After the profiler is calibrated, it will be more accurate (in a least
square sense), but
A few days ago stephan wrote:
Im am using PyRun_SimpleString() inside a BCB 5.0 GUI app
on win32.
Never used it so can only offer a suggestion.
For this I have a button called stop, and when
the user executes it, I generate an exeption by
calling:
PyRun_SimpleString(raise
phil wrote:
def __del__(s):
line.count = line.count - 1
## delete the line object if the
## class instance is deleted
s.glob.can.delete(s.obj)
After the rotation I check line.count and it is 3
Did you know that exceptions are ignored in the __del__() method?
One way to verify that
Hi,
I have a script.py that is converted to .exe using py2exe. From another
script I call script.exe and would like to be able to run this
script.exe in the background (as well as in console -- giving the user
some simple options). How can I make this happen?
thanks,
Harlin
--
Let's say you have a SocketServer with the threading mix-in and you
run serve_forever on it. How can you shut it down, or rather, how can
it even shut itself down? Even if you use a handle_request loop
instead of serve_forever, it still seems difficult:
class myserver(ThreadingMixIn,
praba kar wrote:
I want to know whether Python is compiler language
or interpreted language. If Python is interpreter
language why compilation is there.
That distinction is implementation dependent and
not an aspect of the language. How would that knowledge
affect your decisions or thoughts
George Sakkis wrote:
What's the fastest and most elegant equivalent of zip() in
Numeric/Numarray between two equally sized 1D arrays ? That is, how to
combine two (N,)-shaped arrays to one (N,2) (or (2,N)) shaped ? I
expect the fastest and the most elegant idiom to be identical, as it is
M.E.Farmer wrote:
I found an excellent example that was posted by the F-bot.
Fredrik LundhMay 26 2000
Python has since grown the cgitb module. Putting
import cgitb; cgitb.enable()
at the top of your cgi script may be even more convenient than using the
Lundhian wrapper.
Peter
--
[EMAIL PROTECTED] wrote:
Thank you, it works, but I guess not all the way:
but I need to remove the first - between 18:20:42 and 0.024329 but not
the others.
Read the documentation for the string methods.
http://docs.python.org/lib/string-methods.html
replace(old, new[, count])
Jeremy Bowers wrote:
No matter how you slice it, this is not a Python problem, this is an
intense voice recognition algorithm problem that would make a good
PhD thesis.
Qiangning Hong wrote:
No, my goal is nothing relative to voice recognition. Sorry that I
haven't described my question
Dan Bishop wrote:
Dan Bishop wrote:
Correction: Now I'm stuck on Level 11. I think I'm supposed to do
something with the pixels in the image, but what?
Me too. I've tried making different images out of the even and the odd
pixels, but nothing interesting happened. I tried to combine both images
Paul Rubin wrote:
Let's say you have a SocketServer with the threading mix-in and you
run serve_forever on it. How can you shut it down, or rather, how can
it even shut itself down?
I looked at CherryPy's server because I know it uses Python's
BaseHTTPServer which is derived from
John Machin wrote:
[Michael Hoffman]:
What if the input is UTF-16? Your solution won't work for that. And there
are certainly UTF-16 CSV files out in the wild.
The csv module docs do say that Unicode is not supported.
This does appear to work, however, at least for data that could in
fact be
Hi all, which should be install? Really confused @@...
Is that mean unicode version used for programming in language other than
English?
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 30 Apr 2005 23:11:48 -0400, Steve Holden [EMAIL PROTECTED]
wrote:
John Machin wrote:
If the job at hand is simulating awk's file reading habits, yes then
fileinput is convenient. However if the job at hand involves anything
like real-world commercial data processing requirements then
monkey wrote:
Hi all, which should be install? Really confused @@...
Unicode.
Is that mean unicode version used for programming in language other than
English?
No. The Unicode version allows the underlying wxWidgets GUI toolkit to
use Unicode text. You want this.
On certain platforms, older
Kay SchluehrWhat is wrong with the other librarys that they can't be
approved?
I presume there are so many kinds of graphs, that one data structure
doesn't fit all... On the other hand, I think that trying to design a
too much general data structure can have some drawbacks. I've tried a
Hello,
We released an open source complete ERP CRM in Python;
http://tinyerp.org
The main features are;
. customers/suppliers relationship managment,
. accounting (analytic financial),
. stock management,
. sales purchases managment,
. tasks automation,
. marketing campaign,
Hi,
Is there a program for editing shelve databases?
Amir
--
http://mail.python.org/mailman/listinfo/python-list
Roel Schroeven wrote:
Dan Bishop wrote:
Dan Bishop wrote:
Correction: Now I'm stuck on Level 11. I think I'm supposed to do
something with the pixels in the image, but what?
Me too.
There's a new image on the website now (still the same name though); I
solved the riddle now :-)
There's no
Qiangning Hong wrote:
I want to make an app to help students study foreign language. I want
the following function in it:
The student reads a piece of text to the microphone. The software
records it and compares it to the wave-file pre-recorded by the
teacher, and gives out a score to indicate
Many Thanks ( :
Hi all, which should be install? Really confused @@...
Unicode.
Is that mean unicode version used for programming in language other than
English?
No. The Unicode version allows the underlying wxWidgets GUI toolkit to
use Unicode text. You want this.
On certain
I'm using PIL to generate some images which may be rotated at the
user's option. When they are rotated, the original image is cropped
in the new image (which is fine), and the corners are black (which
is not, in this case). I can't find any documented way to change
the default fill color (if
Hi,
I've been testing the standard dialog boxes in tkMessageBox under IDLE.
If I type for example, tkMessageBox.askyesno('test', 'test'), the dialog box
comes up fine but another window also appears. I'm guessing this is the
parent window of the message box. If I click on either of the yes/no
Peter Otten [EMAIL PROTECTED] wrote:
George Sakkis wrote:
What's the fastest and most elegant equivalent of zip() in
Numeric/Numarray between two equally sized 1D arrays ? That is, how
to
combine two (N,)-shaped arrays to one (N,2) (or (2,N)) shaped ? I
expect the fastest and the most
I actually tried mapping the PID to an integer value and it still
didn't work. At any rate, I found another way to do it. Thanks anyways.
--
http://mail.python.org/mailman/listinfo/python-list
Nathan,
From what I've seen I'm afraid this is the way it is. If you call an
instance of tkMessageBox and you don't have a 'master' Tk instance
running, it will create its own.
Still, I'm sure with a bit of voodoo you can hide the self created tk
window while showing the message box. If you find
George Sakkis wrote:
Though not the fastest to execute; using concatenate instead of
initializing an array from a list [a,a] is more than 2,5 time faster in
my system (~4.6 vs 11.8 usec per loop according to timeit.py), and it's
not harder either.
That surprises me. I would expect
Hi,
I am writing a POV-RAY editor with Python using either QT or GTK as GUI
'wrapper'. ( I am still trying both )
* * * * PYGTK * * * *
I have downloaded PygtkScintilla-1.99.5.
There is a lexPOV.cxx file in the package, but I can not find any POV
keywords in any file ( there are about 150 POV
[Qiangning Hong]
I just want to compare two sound WAVE file, not what the students or
the teacher really saying. For example, if the teacher recorded his
standard pronouncation of god, then the student saying good will
get a higher score than the student saying evil because good
sounds
Steve Holden [EMAIL PROTECTED] writes:
John J. Lee wrote:
[...]
I'm hesitant to label everybody who disagrees with you (and me) on
that a zealot. Though I tend to take the same side you do, I'm not
[...]
Well, we appear to agree. Please note I wasn't labelling anyone a
zealot, simply
I'm looking for a Python interpreter written in BASIC, preferably
Visual Basic, and one written in VBA would be best of all. An
alternative would be a Python-2-Basic compiler.
Unfortunately I have to develop some special purpose code in an
organization where my only development environment is
Ville Vainio [EMAIL PROTECTED] writes:
John == John J Lee [EMAIL PROTECTED] writes:
John Dave Cook [EMAIL PROTECTED] writes:
John What are those compelling features of Pydev, for an emacs
John user?
http://pydev.sourceforge.net/features.html
Code completion and debugger
You have two choices:
1) You can use Windows Scheduler to run the script in the
background. I have lots of scripts that I do this with.
2) You can convert the script into a Windows Service, which
will run in the background continuously.
I know of no way to manually start something in the
Hello sdhyok,
Now, I am in the situation to run the same program but on several
different machines with the same Linux OS. To avoid the reinstallation,
I like to pack up all shared libraries into a directory. Is there a
good way to track down all shared libraries required to run a Python
Hello Heiko,
Am Samstag, 30. April 2005 14:26 schrieb [EMAIL PROTECTED]:
If you run on unix you can use the signal module to intercept a kill -
see http://docs.python.org/lib/node368.html for a quick example
You cannot intercept a kill (that's the whole meaning of SIGKILL, rather than
Nathan wrote:
Hi,
I've been testing the standard dialog boxes in tkMessageBox under
IDLE.
If I type for example, tkMessageBox.askyesno('test', 'test'), the
dialog box
comes up fine but another window also appears. I'm guessing this is
the
parent window of the message box. If I click on
I don't think this is going to happen.
Applications that drive MS Office applications merely call COM
objects that perform the actual operations. It doesn't really
matter what language calls the COM objects, they are the same
objects all the time. If they don't like the installation
of the
Axel Straschil wrote:
Hello!
Why not:
class A:
def a_lengthy_method(self, params):
# do some work depending only on data in self and params
class B(A): pass
?
Lg,
AXEL.
As a rough guess, I think the original poster was wondering how to
include *one* specific method from class A
If you need just a single method once, don't use a mixin; just do
B.meth = A.meth.im_func. Do not underestimate the burden of
mixins on people reading your code (at least, for me it is burden,
since I have to draw the inheritance tree in my mind, look at which
methods are involved, wonder about
This is a network app, written in wxPython and the socket module. This
is what I want to happen:
GUI app starts. User clicks a button to 'start' the work of the app.
When start is pressed, a new thread is spawned (threading module) and
this thread starts listening for data on a socket. When
In article [EMAIL PROTECTED],
Engineer [EMAIL PROTECTED] wrote:
.
.
.
The security 'droids have decided that since the MS Office Suite is a
standard application then software written in MS Office VBA must be
safe. Any other
fo [EMAIL PROTECTED] writes:
How would I get the worker thread to open a GUI window in the main GUI
thread? After that GUI window is open, how can I send and recv messages
from/to the GUI window?
First of all the favorite Pythonic way to communicate between threads
is with synchronized
Cameron Laird wrote:
In article [EMAIL PROTECTED],
Engineer [EMAIL PROTECTED] wrote:
.
.
.
The security 'droids have decided that since the MS Office Suite is
a
standard application then software written in MS Office VBA
Qiangning Hong [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I want to make an app to help students study foreign language. I want
the following function in it:
The student reads a piece of text to the microphone. The software
records it and compares it to the wave-file
On 01 May 2005 10:09:56 -0700, Paul Rubin http://phr.cx@nospam.invalid wrote:
fo [EMAIL PROTECTED] writes:
How would I get the worker thread to open a GUI window in the main GUI
thread? After that GUI window is open, how can I send and recv messages
from/to the GUI window?
First of all the
Hi all!
Although it's slightly OT: I've written PAM, NSS and PPPd plugins which do
authentication (and other things) against a running Python daemon,
communicating via a Unix domain socket.
For the C part of the whole adventure (the modules for PAM, NSS and PPPd), I'd
love to have some form
Cameron Laird skrev:
In article [EMAIL PROTECTED],
Engineer [EMAIL PROTECTED] wrote:
.
.
.
The security 'droids have decided that since the MS Office Suite is a
standard application then software written in MS Office VBA must be
safe. Any other development environments (such as Java, Perl,
Hi !
VBA is at the end of his lifetime. The next MS-Office will not have VBA
(because dotNet).
You should really adopt Python.
@-salutations
--
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
Paul Let's say you have a SocketServer with the threading mix-in and
Paul you run serve_forever on it. How can you shut it down, or rather,
Paul how can it even shut itself down? Even if you use a
Paul handle_request loop instead of serve_forever, it still seems
Paul
Skip Montanaro [EMAIL PROTECTED] writes:
I use precisely that scheme with (I think *) no problem. The only maybe
significant difference I see is that I subclass ThreadingMixin so that it
creates daemon threads: ...
According to the docs, you don't need the subclass, you can just set the
Hi I have been trying to wrap a c library called FreeImage for python
and am having trouble with a couple of functions.
One function is
FreeImage_Load which takes parameters (enum, const char*, int)
I have wrapped the function with the following code
static PyObject *
freeimage_load(PyObject
Glenn Pierce wrote:
if (!PyArg_ParseTuple(args, isi, format, filename, flags))
return NULL;
Shouldn't that be filename ? See
http://docs.python.org/ext/parseTuple.html
for examples.
dib = FreeImage_Load(format, filename, flags);
Also I have little Idea what
It seems to me that there is no way to create a new instance of Internet
Explorer (if there are already some IE windows opened).
Does anyone know a possible solution? Or a workaround (without using
startfile, maybe?) that will force IE to create a new instance?
Should I suppose no solution
I am going to be working with some people on a project that is going to be
done over the internet. I am looking for a good method of keeping everyone's
code up to date and have everyone be able to access all the code including
all the changes and be able to determine what parts of the code were
I already know C/C++ programming and now wish to learn Python to do
scripting for some games that are coming out. What book would you recommend.
I am thinking Teach Your Self Python in 24 Hours is probably the best place
to start...
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 01 May 2005 20:16:40 GMT, John Smith [EMAIL PROTECTED] wrote:
I am going to be working with some people on a project that is going to be
done over the internet. I am looking for a good method of keeping everyone's
code up to date and have everyone be able to access all the code including
On Sun, 01 May 2005 20:18:39 GMT, John Smith [EMAIL PROTECTED] wrote:
I already know C/C++ programming and now wish to learn Python to do
scripting for some games that are coming out. What book would you recommend.
I am thinking Teach Your Self Python in 24 Hours is probably the best place
to
john
you might check out trac and subversion/svn... CVS is often used as well...
keep in mind that any app equires that you be willing to out in a certain
amount of time for the admin of the project tool. if what you're creating is
open source, you might as well go ahead and use the
In article [EMAIL PROTECTED],
John Smith [EMAIL PROTECTED] wrote:
I already know C/C++ programming and now wish to learn Python to do
scripting for some games that are coming out. What book would you
recommend.
I am thinking Teach Your Self Python in 24 Hours is probably the best
place to
I'm trying to compile a package from source and whenever I tried to
compile, distutils gave me error about not have VC7. However, I've got
VB7 and so I've also got the VC7 compiler that came in the installation.
BTW, I've got Visual Studio .NET 2003 and Python 2.4.1. I tried looking
the
Hi All--
On Sun, 01 May 2005 20:18:39 GMT, John Smith [EMAIL PROTECTED] wrote:
I already know C/C++ programming and now wish to learn Python to do
scripting for some games that are coming out. What book would you recommend.
I am thinking Teach Your Self Python in 24 Hours is probably the
i have the following code:
Ui.py:
import Tkinter as Tk
import UiMainScreen
UiMainScreen.py:
class UiMainScreen( Tk.Frame ):
and i get the following error:
File UiMainScreen.py, line 1, in ?
class UiMainScreen(Tk.Frame):
NameError: name 'Tk' is not defined
isn't Tk supposed to be
Qiangning Hong wrote:
I want to make an app to help students study foreign language. I
want
the following function in it:
The student reads a piece of text to the microphone. The software
records it and compares it to the wave-file pre-recorded by the
teacher, and gives out a score to
Peter Otten [EMAIL PROTECTED] wrote:
George Sakkis wrote:
Though not the fastest to execute; using concatenate instead of
initializing an array from a list [a,a] is more than 2,5 time
faster in
my system (~4.6 vs 11.8 usec per loop according to timeit.py), and
it's
not harder either.
I'd like to second the recommendation for the Python Cookbook. As an
experienced programmer, you'll learn a lot by osmosis.
Michael
--
http://mail.python.org/mailman/listinfo/python-list
Amir Michail [EMAIL PROTECTED] writes:
Hi,
Is there a program for editing shelve databases?
Amir
I doubt it. A shelf is basically just a file-based dictionary, where
the keys must be strings, while the values can be arbitrary objects.
An editor could handle the keys, but most likely not
Hello John,
If you just want a repository for one project and you don't want to
admin the whole server [which is a job in itself], you can use
Sourceforge's CVS server. They'll also let you host the project on
their servers.
If you want to setup your own SCM, you can try Subversion, GNU Arch, or
fo [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
This is a network app, written in wxPython and the socket module. This
is what I want to happen:
I'm not sure if this will help you, but it solved what was, for me, a
more general problem: not (normally) being able to issue
Gabriel B. [EMAIL PROTECTED] writes:
i have the following code:
Ui.py:
import Tkinter as Tk
import UiMainScreen
UiMainScreen.py:
class UiMainScreen( Tk.Frame ):
and i get the following error:
File UiMainScreen.py, line 1, in ?
class UiMainScreen(Tk.Frame):
NameError:
Hello Andrea,
I have played around for a few seconds and have a few suggestions.
The code is a little baffling it appears that there is no way to do
that on windows.
I have looked into Internet Explorer and have found that there is an
option in Internet Explorer that controls this.
In Internet
Trying to create the lopsided diamond inheritance below:
class B(object):pass
class D1(B):pass
class D2(D1):pass
class D(D1, D2):pass
Traceback (most recent call last):
File stdin, line 1, in ?
TypeError: Error when calling the metaclass bases
Cannot create a consistent method
From: Leif Biberg Kristensen [EMAIL PROTECTED]>
Date: May 1, 2005 2:13:43 PM EDT
To: python-list@python.org
Subject: Re: My personal candidate for QOTW (was: Python interpreter in Basic or a Python-2-Basic translator.)
Cameron Laird skrev:
In article [EMAIL PROTECTED]>,
Engineer [EMAIL
Look inthe demo that comes with wxPython it is in tree process and
events - threads .
There is a nice demo of PostEvent().
Another way would be to use Queues as others have mention .
You can create a new frame and have it call the queue for data.
M.E.Farmer
--
chris patton wrote:
import sys
class stuff:
... things = []
... def write(self, string):
... self.things.append(string)
...
def_stdout = sys.stdout
sys.stdout = stuff()
print 'this is a string.'
print 'This is another string.'
sys.stdout = def_stdout
print
Print is the culprit here. Note item 2.
help('print')
6.6 The print statement
print_stmt::=print ( [expression[1] (, expression[2])*
[,]]
| expression[3] [(, expression[4])+ [,]] )
Download entire grammar as text.[5]
print evaluates each
M.E.Farmer:
Your answer lies somewhere in this page ;)
http://www.python.org/2.2.2/descrintro.html
M.E.Farmer
delegate.py (use PyPI) may also be useful.
-Robert Dick-
--
http://mail.python.org/mailman/listinfo/python-list
Class Req:
def __init__(s,headers):
s.headers = headers
referer =\
property(lambda s:s.headers['Connection'],
lambda s,v:s.headers.__setitem__('referer',v))
each thread has its own instance of class Req, Req instances are not shared
between threads
--
I use precisely that scheme with (I think *) no problem. The only
maybe significant difference I see is that I subclass ThreadingMixin
so that it creates daemon threads: ...
Paul According to the docs, you don't need the subclass, you can just
Paul set the daemon_threads
Frank Millman wrote:
It is certainly possible to store the entire report in memory, using a
two-dimensional list (page/line), but if a report runs into hundreds of
pages, I am concerned at the amount of memory this would require.
Perhaps I am being old-fashioned - with todays memory of at
Andrew Dalke [EMAIL PROTECTED] writes:
which means it went a different route. Looks like a
request comes in and is put to a work queue. Clients get
from it. There's a special work queue item to tell
the threads to stop.
Well, ok, so the worker threads stop. How do you get the listener
For someone expereinced like you, I recommend Dive into Python. It is
available online.
There's also a very good tutorial which is aimed to both, beginners and
experienced programmers, that can give you a very complete and high
level overview of the python language: A byte of Python. Also
kennywiggin wrote:
.flac: ERROR while decoding data
state = FLAC__STREAM_DECODER_READ_FRAME
The script fails to decode any more flac files until the vm
crashes from having too many open files.
Whoa! Time to start using file.close() after you're done with each
file.
If that doesn't fix
Fabien:
There is a lexPOV.cxx file in the package, but I can not find any POV
keywords in any file ( there are about 150 POV keywords). Did i miss it,
and if not, how do I create one and include it for the library building ?
The Scintilla web site, documentation and mailing list are:
Hi,
I am a newbie to Python. With a background in Java, I was attempting
to write static methods in the class without the self as the first
parameter, when I got an error. I did a search for the same on Google
and found out that there was no consistent approach to this. I would
like to know what
Hi,..I found it difficult to display data from a dictionary using GUI.
What widget should I use? I tried using text widget, but I couldn't get
the display I want. I need the display to look like this
file name size agelocation
Kris [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Hi,
I am a newbie to Python. With a background in Java, I was attempting
to write static methods in the class without the self as the first
parameter, when I got an error. I did a search for the same on Google
and found out
Roel Schroeven [EMAIL PROTECTED] writes:
There's no level 12 yet though.
Now there's a 12 and a 13 (at least!).
Dan
--
http://mail.python.org/mailman/listinfo/python-list
I am getting socket error for large file transfer on windows
(100MB+)
Working fine for files 50MB.
Everything is working fine on mac..
File C:\Python23\lib\httplib.py, line 576, in
send
self.sock.sendall(str)
File string, line 1, in sendall
socket.error: (10055, 'No buffer
On Mon, 02 May 2005 12:52:30 +1000, Derek Thomson [EMAIL PROTECTED] wrote:
Hi,
I frequently have to debug some fairly tricky Python multi-threaded
code, and I need some help using the debugger to help me diagnose the
problems when they occur. Yes, I know that the best option with threaded
code
Hi
I am writing a program that allows a user to annotate text documents,
and later html, html variants, and PDF files. My program is able to
load multiple documents at once and creat linked anotations between
these documents. Therefore i want to create a custom system to save the
files. Ideally I
I knew it was a feature but had only a few minutes to answer and was
playing it safe ;)
You would be surprised how many answers you can squeeze out of that one
URL.
That whole page is worth a month of study( for me anyway ).
I am still trying to grasp the 'purpose' of classmethods.
Michele
Awesome! works perfectly on win2k - I.E 6
Python makes COM almost readable ;)
M.E.Farmer
--
http://mail.python.org/mailman/listinfo/python-list
Am Montag, 2. Mai 2005 04:35 schrieb Thomas:
I am getting socket error for large file transfer on windows (100MB+)
Get an operating system... :-)
No, seriously, I think that the problem might be that WinSock doesn't block
the sending process while it can't send out the data. Thus: the internal
I played around with it.
import pythoncom
from win32com.client import Dispatch
def webbrowser(url=None):
ie =
Feature Requests item #1184678, was opened at 2005-04-17 19:05
Message generated for change (Comment added) made by poromenos
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=355470aid=1184678group_id=5470
Category: None
Group: None
Status: Open
Resolution: Rejected
99 matches
Mail list logo