> button[num] = Tkinter.Button(frame,text = returnstring,
> command=callback(returnstring))#
I understand this part of it
def callback(text):
def handler(event):
print text
It stopped calling it automaticaly but will not do anything when I
click on the button. Does something have to cha
C:\dex_tracker\csdlist.py bay-at-night.csd
Traceback (most recent call last):
File "C:\dex_tracker\csdlist.py", line 58, in
root.mainloop()
File "C:\Python25\lib\lib-tk\Tkinter.py", line 1023, in mainloop
self.tk.mainloop(n)
File "../../..\Pmw\Pmw_1_2\lib\PmwBase.py", line 1751, in __call__
Fil
oyekomova wrote:
> Thanks for your note. I have 1Gig of RAM. Also, Matlab has no problem
> in reading the file into memory. I am just running Istvan's code that
> was posted earlier.
You have a CSV file of about 520 MiB, which is read into memory. Then
you have a list of list of floats, created b
Thanks Steven.
--
http://mail.python.org/mailman/listinfo/python-list
"Graham Dumpleton" <[EMAIL PROTECTED]> writes:
> All headers which come from the client are available through the
> 'headers_in'
> attribute of the request object. Eg.
>
> def handler(req):
> ct = req.headers_in.get('Content-Type')
> ...
Thanks - it's even mentioned in the mod_python m
"Torabisu" <[EMAIL PROTECTED]> wrote:
>
> Hendrik van Rooyen wrote:
> > What do you want done? - I am only a thousand miles away...
> >
>
> If I can just get my Python teleporter sorted out, distance will be no
> problem... A little buggy at the moment though... Poor John, I told
> him not
Sexy Vidz http://sexyvidz.info don't miss these free sexy
video downloads.
--
http://mail.python.org/mailman/listinfo/python-list
"Nick Maclaren" <[EMAIL PROTECTED]> wrote:
> The "cheap" means "cheap in hardware" - it needs very little logic,
> which is why it was used on the old, discrete-logic, machines.
>
> I have been told by hardware people that implementing IEEE 754 rounding
> and denormalised numbers needs a horrific
Section 6.3.1 of the RFC3501 explains the possible data items the
server will return after a SELECT command is issues. You can find
RFC3501 here http://www.isi.edu/in-notes/rfc3501.txt.
Try using the RECENT method to examine the "extra" data items returned
by SELECT. Here's an example
>>> M.respo
"Dennis Lee Bieber" <[EMAIL PROTECTED]> wrote:
> {My 8th grade teacher was a bit worried at seeing me with a slipstick
> ; and my HighSchool Trig/Geometry teacher only required 3 significant
> digits for answers -- even though half the class had calculators by
> then}
LOL - I haven't seen the w
[EMAIL PROTECTED] wrote:
> mat = [[9, 8, 12, 15], ..., [0, 0, 0, 5]]
>
> print min(el for row in mat for el in row if el > 0)
> ...
> If the OP needs the position he/she can do something like:
<< iterative solution >>
Or you can still use min by keeping the position after the value:
just for my hobby,
i'am looking in a way to try voice recongnition on linux with python
but with google i didn't find anything probant.
By the way does someones can give me some tips or url to digg in this
way particulary ?
Is there anyway to use python for voice recognition on linux ?
If yes wit
"robert" <[EMAIL PROTECTED]> wrote:
> Hendrik van Rooyen wrote:
> > So far I have only used dicts to pass functions around
> > in a relatively unimaginative static jump table like way...
>
>
> Probably one has just to see that one can a pass a function object
> (or any callable) around as an
From: "Nick Maclaren" <[EMAIL PROTECTED]> wrote:
> Financial calculations need decimal FIXED-point, with a precisely
> specified precision. It is claimed that decimal FLOATING-point
> helps with providing that, but that claim is extremely dubious.
> I can explain the problem in as much detail as
On Jan 13, 8:49 pm, "lee" <[EMAIL PROTECTED]> wrote:
> Can anyone tell me the basics about indentation in python..how we
> use it in loops and constructs..etc
It's just like indentation in other languages, except that it's
syntactically required.
--
http://mail.python.org/mailman/listinf
Gabriel Genellina wrote:
>... So `callback` should return a function, like this:
>
> def callback(text):
> def handler(event):
> print text
>
Even better than that:
def callback(text):
def handler(event):
print text
return handler
Otherwise callback ret
Thanks. Does it matter if I call shell commands os.system...etc in
calculate?
Thanks,
--j
[EMAIL PROTECTED] wrote:
> John wrote:
> > I want to do something like this:
> >
> > for i = 1 in range(0,N):
> > for j = 1 in range(0,N):
> >D[i][j] = calculate(i,j)
> >
> > I would like to now do th
Damn! That is bad news. So even if caclulate is independent for (i,j)
and
is computable on separate CPUs (parts of it are CPU bound, parts are IO
bound)
python cant take advantage of this?
Surprised,
--j
Paul Rubin wrote:
> "John" <[EMAIL PROTECTED]> writes:
> > I want to do something like this:
Damn! That is bad news. So even if caclulate is independent for (i,j)
and
is computable on separate CPUs (parts of it are CPU bound, parts are IO
bound)
python cant take advantage of this?
Surprised,
--Tom
Paul Rubin wrote:
> "John" <[EMAIL PROTECTED]> writes:
> > I want to do something like thi
<[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Instead of creating my buttons and waiting for me to press them to
> execute they are executing when I create them and won't do my callback
> when I press them.. thanks for any help in advance
This is a very frequent beginner's
"MR" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> I have a question about decorators, and I think an illustration would
> be helpful. Consider the following simple class:
>
> #begin code
> class Foo:
>def fooDecorator(f):
>print "fooDecorator"
>
>def _f(
John wrote:
> I want to do something like this:
>
> for i = 1 in range(0,N):
> for j = 1 in range(0,N):
>D[i][j] = calculate(i,j)
>
> I would like to now do this using a fixed number of threads, say 10
> threads.
> What is the easiest way to do the "parfor" in python?
>
> Thanks in advance for
lee wrote:
> Can anyone tell me the basics about indentation in python..how we
> use it in loops and constructs..etc
http://docs.python.org/tut/node5.html#SECTION00520
--
http://mail.python.org/mailman/listinfo/python-list
Instead of creating my buttons and waiting for me to press them to
execute they are executing when I create them and won't do my callback
when I press them.. thanks for any help in advance
button[num] = Tkinter.Button(frame,text = returnstring,
command=callback(returnstring))#
this line execute
[this revision supersedes what I posted to edu-sig
earlier today, a few typos fixed. Note that I'm not
actually signed up for Pycon at this time, just using
it as an exercise to polish my rap. All of the events,
persons and institutions mentioned herein are quite
real however].
===
Although I h
[Nick Maclaren]
>> ...
>> Yes, but that wasn't their point. It was that in (say) iterative
>> algorithms, the error builds up by a factor of the base at every
>> step. If it wasn't for the fact that errors build up, almost all
>> programs could ignore numerical analysis and still get reliable
>> a
Can anyone tell me the basics about indentation in python..how we
use it in loops and constructs..etc
--
http://mail.python.org/mailman/listinfo/python-list
"Steven D'Aprano" <[EMAIL PROTECTED]> escribió en el
mensaje
news:[EMAIL PROTECTED]
> On Fri, 12 Jan 2007 23:28:06 -0800, Paul Rubin wrote:
>
>> If it's that uniform I think you can just use __cmp__:
>
> Good point -- I had somehow picked up the mistaken idea that __cmp__ was
> depreciated in fav
Paul Rudin wrote:
> I'm have a little experiment with mod_python. I'm trying to figure out
> how to get hold of the original Content-Type header.
>
> In my config file I have:
>
>
> AddHandler mod_python .py
> PythonHandler atomserv
> PythonDebug On
> PythonAutoReload
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
pysqlite 2.3.1 released
===
I'm pleased to announce the availability of pysqlite 2.3.3. This is a
bugfix release.
Go to http://pysqlite.org/ for downloads, online documentation and
reporting bugs.
What is pysqlite?
pysqlite
On Sat, 13 Jan 2007 22:05:53 +, Neil Cerutti wrote:
>> Anyone want to argue that this is a worthwhile optimization? :)
>
> Perhaps. But first test it with "==".
Oh the ignominy! That's what happens when I run code at 6am :(
>>> x = CompareWithIdentity(1); y = CompareWithIdentity(1)
>>> time
Thanks a lot, it was that i need !!! Works very good !
[EMAIL PROTECTED] wrote:
> Roberto Bonvallet:
> > What output are you expecting from your example matrix? If you are
> > expecting
> > it to be 5 (the smallest positive element), using "min" is the way to do it:
> > >>> matrix = [[9, 8,
oyekomova> def read_test():
oyekomova> start = time.clock()
oyekomova> reader = csv.reader( file('data.txt') )
oyekomova> data = [ map(float, row) for row in reader ]
oyekomova> data = array(data, dtype = float)
oyekomova> print 'Data size', len(dat
Ok, the main idea is compare each element with others elements, and go
saving the minus element positive and his position (X,Y) in the matrix,
of course min function dont let me save this position (X,Y). I dont
know if its possible do that with min function.
jDSL
Roberto Bonvallet wrote:
>
> What
Roberto Bonvallet:
> What output are you expecting from your example matrix? If you are expecting
> it to be 5 (the smallest positive element), using "min" is the way to do it:
> >>> matrix = [[9, 8, 12, 15],
> ... [0, 11, 15, 18],
> ... [0, 0, 10, 13],
> ...
Thanks for your note. I have 1Gig of RAM. Also, Matlab has no problem
in reading the file into memory. I am just running Istvan's code that
was posted earlier.
import time, csv, random
from numpy import array
def make_data(rows=1E6, cols=6):
fp = open('data.txt', 'wt')
counter = range(co
Daniel Nogradi wrote:
> Since I'm starting to use sqlobject right now, if there is a
> similar ORM tool that is comparable but up to date and actively
> developed, that would be an option too. (Things like SQLAlchemy are
> wy to complicated and complex for my needs. :))
Perhaps not really an a
Dennis Lee Bieber wrote:
> On 13 Jan 2007 12:15:44 -0800, "John" <[EMAIL PROTECTED]> declaimed
> the following in comp.lang.python:
>
> >
> > I want to do something like this:
> >
> > for i = 1 in range(0,N):
> > for j = 1 in range(0,N):
> >D[i][j] = calculate(i,j)
> >
> > I would like to now
jairodsl wrote:
> How can I find the minus element greater than zero in a matrix, my
> matrix is
>
> matrix=
> [9,8,12,15],
> [0,11,15,18],
> [0,0,10,13],
> [0,0,0,5]
>
> I dont want to use "min" function because each element in the matrix is
> associated to (X,Y) position.
What output are you e
Hi,
How can I find the minus element greater than zero in a matrix, my
matrix is
matrix=
[9,8,12,15],
[0,11,15,18],
[0,0,10,13],
[0,0,0,5]
I dont want to use "min" function because each element in the matrix is
associated to (X,Y) position.
Thanks a lot.
jDSL
--
http://mail.python.org/mailma
Hello All,
I have a question about decorators, and I think an illustration would
be helpful. Consider the following simple class:
#begin code
class Foo:
def fooDecorator(f):
print "fooDecorator"
def _f(self, *args, **kw):
return f(self, *args, **kw)
retur
Thanks
--
http://mail.python.org/mailman/listinfo/python-list
oyekomova wrote:
> Thanks to everyone for their excellent suggestions. I was able to
> acheive the following results with all your suggestions. However, I am
> unable to cross file size of 6 million rows. I would appreciate any
> helpful suggestions on avoiding memory errors. None of the solutions
On 2007-01-13, Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> On Sat, 13 Jan 2007 10:04:17 -0600, Paul McGuire wrote:
> [snip]
>
> Surely this is only worth doing if the comparison is expensive?
> Testing beats intuition, so let's find out...
>
> class Compare:
> def __init__(self, x):
>
"John" <[EMAIL PROTECTED]> writes:
> I want to do something like this:
>
> for i = 1 in range(0,N):
> for j = 1 in range(0,N):
>D[i][j] = calculate(i,j)
>
> I would like to now do this using a fixed number of threads, say 10
> threads. What is the easiest way to do the "parfor" in python?
I
piotr wrote:
> On Sat, 13 Jan 2007 16:42:16 -0200, Jorge Godoy wrote:
>
>> Take a look at Kid (http://www.kid-templating.org/) and Genshi
>> (http://genshi.edgewall.org/).
>
> I've already done a short look at kid, but to be honest I don't like it's
> XML/Python syntax. I strongly prefer idea fro
John> I want to do something like this:
John> for i = 1 in range(0,N):
John> for j = 1 in range(0,N):
John>D[i][j] = calculate(i,j)
John> I would like to now do this using a fixed number of threads, say
John> 10 threads. What is the easiest way to do the "parfor" in
> > To my knowledge, the 0.8.x series is the current line of development, and
> > has
> > made major progress over the previous versions. What makes you think it will
> > be stopped developing? And where does a sqlobject2 come from?
>
> http://www.sqlobject.org/2/
Yes, that's what I meant. The we
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
> To my knowledge, the 0.8.x series is the current line of development, and has
> made major progress over the previous versions. What makes you think it will
> be stopped developing? And where does a sqlobject2 come from?
http://www.sqlobject.org/2/
Daniel Nogradi schrieb:
> Hi list,
>
> I get loads of DeprecationWarnings while using sqlobject 0.8.0b1 with
> python 2.5. Does this mean that the sqlobject project is not very up
> to date? Or should I just ignore them and happily use it? In general,
> what's the status of sqlobject, will it be d
I want to do something like this:
for i = 1 in range(0,N):
for j = 1 in range(0,N):
D[i][j] = calculate(i,j)
I would like to now do this using a fixed number of threads, say 10
threads.
What is the easiest way to do the "parfor" in python?
Thanks in advance for your help,
--j
--
http://ma
python-dev Summary for 2006-12-01 through 2006-12-15
.. contents::
[The HTML version of this Summary is available at
http://www.python.org/dev/summary/2006-12-01_2006-12-15]
=
Announcements
=
Some of you may know tha
Thanks to everyone for their excellent suggestions. I was able to
acheive the following results with all your suggestions. However, I am
unable to cross file size of 6 million rows. I would appreciate any
helpful suggestions on avoiding memory errors. None of the solutions
posted was able to cross
On Fri, 12 Jan 2007 23:28:06 -0800, Paul Rubin wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> class Parrot:
>> def __eq__(self, other):
>> return self.plumage() == other.plumage()
>> def __ne__(self, other):
>> return self.plumage() != other.plumage()
>> def __
On Sat, 13 Jan 2007 10:04:17 -0600, Paul McGuire wrote:
> Just a side note on writing these comparison operators. I remember when
> learning Java that this was really the first time I spent so much time
> reading about testing-for-identity vs. testing-for-equality. The Java
> conventional pra
On Sat, 13 Jan 2007 16:42:16 -0200, Jorge Godoy wrote:
> Take a look at Kid (http://www.kid-templating.org/) and Genshi
> (http://genshi.edgewall.org/).
I've already done a short look at kid, but to be honest I don't like it's
XML/Python syntax. I strongly prefer idea from SimpleTAL or HTMLTempla
On Jan 13, 11:35 am, Kajsa Anka <[EMAIL PROTECTED]> wrote:
> Before I re-invent something I would like to ask if there exists some code
> that can be used for create the HTML code for a calendar which I then can
> include on a web page.
>
> The module in the standard library can create a calendar b
piotr <[EMAIL PROTECTED]> writes:
(...)
> for user was not empty call function again with argument "user/name"
> then engine should replace specific placeholders with results of my
> callback function
> obviously this is just example syntax, I hope you catch the idea
>
> that would be nice if eng
On Jan 13, 12:52 am, Steven D'Aprano
<[EMAIL PROTECTED]> wrote:
> I'm writing a class that implements rich comparisons, and I find myself
> writing a lot of very similar code. If the calculation is short and
> simple, I do something like this:
>
> class Parrot:
> def __eq__(self, other):
>
> Looks interesting, but is there any way to use this for a cluster of
> machines over a network (not smp)?
Networking capabilities will be included in the next release of
Parallel Python software (http://www.parallelpython.com), which is
coming soon.
> Couldn't you just provide similar convenie
Hi,
I'm looking for a template engine that can give me names of required
variables in parse time.
Calculation of a value for a specific variable name could be possibly done
in specified callback function.
For example:
$title
#if user
hello $user/name
#else
hello guest
#endif
Before I re-invent something I would like to ask if there exists some code
that can be used for create the HTML code for a calendar which I then can
include on a web page.
The module in the standard library can create a calendar but I would like
display my schedule.
My idea is that it would
[EMAIL PROTECTED] wrote:
> Chris wrote:
> > I know this probably seems trivial, but I can't seem to find the bug in
> > my alphabeta search implementation.
>
> This is another alphabeta implementation (all the nicest algorithms are
> inside this AIMA codebase):
> http://aima.cs.berkeley.edu/python/
"Paul McGuire" <[EMAIL PROTECTED]> wrote:
> In Python, this would look like:
>
> class Parrot:
> def __eq__(self, other):
> return self is other or self.plumage() == other.plumage()
> def __ne__(self, other):
> return self is not other and self.plumage() != other.plumage()
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Steven D'Aprano wrote:
>
>> I'm writing a class that implements rich comparisons, and I find myself
>> writing a lot of very similar code. If the calculation is short and
>> simple, I do something like this:
>>
>>
>> cla
Hello List,
I am using difflib.HtmlDiff and it provides great functionality.
Unfortunately it is too slow for my purpose.
Is anyone aware of an alternative ?
- a C-implementation lying around somewhere ?
- perhaps an external tool into which I can pipe my data ?
Intra-line differences are import
"Facundo Batista" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> metaperl wrote:
>
>> File "/sw/lib/python2.5/csv.py", line 120, in _dict_to_list
>> raise ValueError, "dict contains fields not in fieldnames"
>>
>>
>> --- it would be nice if it said what field it was
>
>
Jorge Godoy wrote:
> "PaoloB" <[EMAIL PROTECTED]> writes:
>
> > Hi everyone,
> >
> > I am searching for a python library for barcode recognition. We have
> > developed a rather complex application for document tracking and
> > document management in python/Zope, called PAFlow (www.paflow.it:
> > s
Hi list,
I get loads of DeprecationWarnings while using sqlobject 0.8.0b1 with
python 2.5. Does this mean that the sqlobject project is not very up
to date? Or should I just ignore them and happily use it? In general,
what's the status of sqlobject, will it be dropped altogether after
sqlobject2 i
"Rob Wolfe" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> Imbaud Pierre <[EMAIL PROTECTED]> writes:
>
>> I am willing to retrieve the file an imported module came from;
>> module.__file__, or inspect.getfile(module) only gives me the
>> relative file name. How do I determine
"Duncan Booth" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> It sounds like the registry entry for running Python files is messed up.
> Can you go to a command line and see what the command 'ftype Python.File'
> displays? (Assuming that command lines and ftype still work on V
"Lad" <[EMAIL PROTECTED]> escribió en el mensaje
news:[EMAIL PROTECTED]
> mpeg = "mpeg.exe -i %s codec mp3 -s 320x240 %s" % (sourcefile,
> targetfile)
> stdin, stdout, stderr = os.popen3(mpeg)
> mpegresult = stdout.read()
> mpegerrors = stderr.read()
> stdin.close(); stdout.close(); stderr.close
"PaoloB" <[EMAIL PROTECTED]> writes:
> Hi everyone,
>
> I am searching for a python library for barcode recognition. We have
> developed a rather complex application for document tracking and
> document management in python/Zope, called PAFlow (www.paflow.it:
> sorry, most of the information is in
Chris wrote:
> I know this probably seems trivial, but I can't seem to find the bug in
> my alphabeta search implementation.
This is another alphabeta implementation (all the nicest algorithms are
inside this AIMA codebase):
http://aima.cs.berkeley.edu/python/games.html
Later when you program wor
> I am searching for a python library for barcode recognition. We have
> developed a rather complex application for document tracking and
> document management in python/Zope, called PAFlow (www.paflow.it:
> sorry, most of the information is in Italian...).
>
> As our project is completely free sof
On 13 Jan 2007 02:01:11 -0800, Tim Golden <[EMAIL PROTECTED]> wrote:
> Thierry Lam wrote:
> > I'm using the WMI library for python and I was able to connect to
> > another computer on the network with the following line:
> >
> > c = wmi.WMI(computer="the-network-computer", user="hello",
> > passwor
Stef,
I never used Python4Delphi but I added it to the
list-of-things-to-examine :)
FOR ALL: I created google group for Portable Python
http://groups-beta.google.com/group/portablepython and posted few items
for discussion there :) Please if you have ideas/suggestions post it
there!
grtz
Perica
Hendrik van Rooyen wrote:
> "Torabisu" <[EMAIL PROTECTED]> wrote:
>
>
> >
> > billie wrote:
> > > Torabisu wrote:
> > >
> > > > Its quite weird, we're looking for Python skills but are battling to
> > > > find at the moment... Normally Python on its own will probably not
> > > > land you a job, b
> and something like Enthought edition will be there :) with even more
> packages and options :) at least that is my goal for the future :) But
> I must say I will also always be carefull with size of the distro :)
> thats also important right? :)
Coming from MatLab, that's not the most important t
In article <[EMAIL PROTECTED]>,
"Simon Brunning" <[EMAIL PROTECTED]> writes:
|> >
|> > Financial calculations need decimal FIXED-point, with a precisely
|> > specified precision. It is claimed that decimal FLOATING-point
|> > helps with providing that, but that claim is extremely dubious.
|> > I
yes on both last messages :)
More platforms will be included if there is enoug people interested in
that.
and something like Enthought edition will be there :) with even more
packages and options :) at least that is my goal for the future :) But
I must say I will also always be carefull with size
In article <[EMAIL PROTECTED]>,
"Hendrik van Rooyen" <[EMAIL PROTECTED]> writes:
|>
|> *grin* - I was around at that time, and some of the inappropriate habits
|> almost forced by the lack of processing power still linger in my mind,
|> like - "Don't use division if you can possibly avoid it, - i
Thierry Lam wrote:
> I'm using the WMI library for python and I was able to connect to
> another computer on the network with the following line:
>
> c = wmi.WMI(computer="the-network-computer", user="hello",
> password="hello")
>
> Is there a way to write information to a file on that computer?
>
In article <[EMAIL PROTECTED]>,
Steven D'Aprano <[EMAIL PROTECTED]> writes:
|> >
|> > Some of the algebraic languages. (2/3)^(1/5) is held as such and
|> > manipulated appropriately.
|> >
|> > Yes, I know that's "cheating" :-)
|>
|> I see your smiley, and I still don't understand. Why on earth
Imbaud Pierre a écrit :
> I am willing to retrieve the file an imported module came from;
> module.__file__, or inspect.getfile(module) only gives me the
> relative file name. How do I determine the path?
> Its obviously possible from python: ipython displays the information
> (interactively: *modu
I'm have a little experiment with mod_python. I'm trying to figure out
how to get hold of the original Content-Type header.
In my config file I have:
AddHandler mod_python .py
PythonHandler atomserv
PythonDebug On
PythonAutoReload On
The file atomserv.py in that
I am willing to retrieve the file an imported module came from
module.__file__, or inspect.getfile(module) only gives me the
relative file name. How do I determine the path?
Its obviously possible from python: ipython displays the information
(interactively: *module?*).
NB: I saw the discussion abo
"Tim Roberts" wrote:
>wxDemos contains the demos. The "wx" module lives in
>site-packages\wx-2.8-msw-ansi. Did you leave that in?
Yes! Even on this computer I am writing now with - where the whole Python
programs stuff is in a programs folder, such as
C:\Programs\Python25\Lib\site-packages\wx
Hi everyone,
I am searching for a python library for barcode recognition. We have
developed a rather complex application for document tracking and
document management in python/Zope, called PAFlow (www.paflow.it:
sorry, most of the information is in Italian...).
As our project is completely free
89 matches
Mail list logo