On 2006-07-26 19:08:44, Carl J. Van Arsdall wrote:
> Also, threading's condition and event constructs are used a lot
> (i talk about it somewhere in that thing I wrote). They are easy to use
> and nice and ready for me, with a server wouldn't I have to have things
> poll/wait for messages?
Ho
Gerhard Fiedler wrote:
> On 2006-07-26 19:08:44, Carl J. Van Arsdall wrote:
>
>
>> Also, threading's condition and event constructs are used a lot
>> (i talk about it somewhere in that thing I wrote). They are easy to use
>> and nice and ready for me, with a server wouldn't I have to have thi
Thank you all for the replies, i now have a better solution.
Cheers
--
http://mail.python.org/mailman/listinfo/python-list
Sybren Stuvel wrote:
> It has nothing to do with the print command, and everything with
> floating point precision. See http://docs.python.org/tut/node16.html
how about the discrepancy between
>>> print 1.2345
1.2345
>>> print "%10.3f" % 1.2345# seems like a bug
1.234
the first one
[EMAIL PROTECTED] wrote:
> how about the discrepancy between
>
> >>> print 1.2345
>
> 1.2345
>
> >>> print "%10.3f" % 1.2345# seems like a bug
>
> 1.234
>
> the first one, print knows enough to recognize and print it as 1.2345.
> however, in the second line, when it is round off, it doesn
Bruno Desthuilliers wrote:
> Gerhard Fiedler wrote:
> > On 2006-07-25 04:06:24, Steve Holden wrote:
> >
> >
> >>Dennis Lee Bieber wrote:
> >>
> >>>On Mon, 24 Jul 2006 17:35:50 -0300, Gerhard Fiedler <[EMAIL PROTECTED]>
> >>>declaimed the following in comp.lang.python:
> >>>
> >>>
> It is surpr
Whenever I try to use the FreeSans font with SDL,
either through PyGame or Soya, I get disappointing
results. The characters come out slightly
higglety-pigglety -- randomly displaced up or down
a pixel or so from the baseline.
Something about the calculation of the font height
seems to be off, too
[EMAIL PROTECTED] wrote:
> I do understand (and verified) that if I define f2 within f1, it works
> as expected. But in the "learning pyton 2nd edition" at page 205 it is
> said that "Programs are much simpler if you do not nest defs within
> defs" (juste before the code mentioned in my initial me
Hi all,
ive been trying to create a thumbnail using the ffmpeg converter
running the ffmpeg.exe using the subprocess module with the following
code
>>> import subprocess
>>> p = subprocess.Popen(["ffmpeg.exe -i video.mpg", "-f mjpeg -ss 5 -vframes
>>> 1 -s 160x120 -an video.gif"], shell=True, s
>> >>> r = re.compile(r'(?:\([^\)]*\)|\[[^\]]*\]|\S)+')
>> >>> r.findall(s)
>>['(a c)b(c d)', 'e']
>
> Ah, it's exactly what I want! I thought the left and right
> sides of "|" are equal, but it is not true.
In theory, they *should* be equal. I was baffled by the nonparity
of the situation. Yo
Patch / Bug Summary
___
Patches : 401 open ( +3) / 3342 closed ( +8) / 3743 total (+11)
Bugs: 896 open ( -8) / 6035 closed (+24) / 6931 total (+16)
RFE : 224 open ( +2) / 233 closed ( +2) / 457 total ( +4)
New / Reopened Patches
__
pkgutil.w
Greg Ewing wrote:
> Whenever I try to use the FreeSans font with SDL,
> either through PyGame or Soya, I get disappointing
> results. The characters come out slightly
> higglety-pigglety -- randomly displaced up or down
> a pixel or so from the baseline.
>
> Something about the calculation of the
I know this is a trivial function, and I've now spent more time
searching for a surely-already-reinvented wheel than it would take to
reinvent it again, but just in case... is there a published,
open-source, function out there that takes a string in the form of
"hh:mm:ss" (where hh is 00-23, mm is
Paul McGuire wrote:
> Comparitive timing of pyparsing vs. re comes in at about 2ms for pyparsing,
> vs. 0.13 for re's, so about 15x faster for re's. If psyco is used (and we
> skip the first call, which incurs all the compiling overhead), the speed
> difference drops to about 7-10x. I did try com
John Henry wrote:
>
>>Carl,
>> OS writers provide much more tools for debugging, tracing, changing
>>the priority of, sand-boxing processes than threads (in general) It
>>*should* be easier to get a process based solution up and running
>>andhave it be more robust, when compared to a threaded sol
On 2006-07-26 21:38:06, Carl J. Van Arsdall wrote:
>>> Also, threading's condition and event constructs are used a lot
>>> (i talk about it somewhere in that thing I wrote). They are easy to use
>>> and nice and ready for me, with a server wouldn't I have to have things
>>> poll/wait for messa
Carl J. Van Arsdall wrote:
> Alright, based a on discussion on this mailing list, I've started to
> wonder, why use threads vs processes.
In many cases, you don't have a choice. If your Python program
is to run other programs, the others get their own processes.
There's no threads option on that.
[EMAIL PROTECTED] wrote:
> I know this is a trivial function, and I've now spent more time
> searching for a surely-already-reinvented wheel than it would take to
> reinvent it again, but just in case... is there a published,
> open-source, function out there that takes a string in the form of
> "h
On Wed, 2006-07-26 at 20:18 -0700, John Machin wrote:
> [EMAIL PROTECTED] wrote:
> > I know this is a trivial function, and I've now spent more time
> > searching for a surely-already-reinvented wheel than it would take to
> > reinvent it again, but just in case... is there a published,
> > open-so
Gerhard Fiedler wrote:
> Carl J. Van Arsdall wrote:
> > Well, I guess I'm thinking of an event driven mechanism, kinda like
> > setting up signal handlers. I don't necessarily know how it works under
> > the hood, but I don't poll for a signal. I setup a handler, when the
> > signal comes, if it
> >
> > >>> print "%10.3f" % 1.2345# seems like a bug
> >
> > 1.234
> >
> > the first one, print knows enough to recognize and print it as 1.2345.
> > however, in the second line, when it is round off, it doesn't know it
> > is 1.2345 any more.
That is because it isn't 1.2345 anymore. 1.2
Sybren Stuvel wrote:
>
> Steve Jobless enlightened us with:
> > The first case can be just a typo, like:
> >
> > x.valeu = 5
> >
> > I make typos all the time. Without a spell checker, this message
> > would be unreadable :).
>
> Then learn to read what you type, as you type it. Typing without
Carl Banks wrote:
> Greg Ewing wrote:
> > The characters come out slightly
> > higglety-pigglety -- randomly displaced up or down
> > a pixel or so from the baseline.
> It would depend on how you're displaying them, I would think.
I've seen the same thing happen two different ways:
* Rendering wi
Hey Steve,
Yes, I agree with you. The lack of checking can get confusing fast.
It's not about typing without errors. Regardless of how you train as
long as you're human you WILL make typos.
Also having to check whether a name has already existed can be a major
pain in the butt with Python. With J
Peter Otten wrote:
> [EMAIL PROTECTED] wrote:
> Bound methods are limited to one implicit parameter. What you need is
> partial function application:
>
> >>> def f(a, b, c):
> ... return a + b + c
> ...
> >>> def partial(f, *args):
> ... def g(*more):
> ... return f(*args+more
Paddy wrote:
> Hi,
> I am trying to work out why I get UnboundLocalError when accessing an
> int from a function where the int is at the global scope, without
> explicitly declaring it as global but not when accessing a list in
> similar circumstances.
>
> The documentation: http://docs.python.org
I copied the lines
f=open('/tmp/workfile', 'w')
print f
f.close()
from Python 2.4 Documentation 7.2. But it said IOerror No such file or
directory" '/tmp/workfile'
Is it something about the os? I'm using Python 2.4 under WinXP.
Thanks. Without / I can open it.
--
http://mail.python.org/mail
"Carl J. Van Arsdall" <[EMAIL PROTECTED]> wrote:
8<
| point). Its not only important that the threads die, but that they die
| with grace. There's lots of cleanup work that has to be done when
| things exit or things end up in an
HI,
I'm having trouble writing to a MySql db using python and the MySQLdb
module. Here is the code:
import MySQLdb
base = MySQLdb.connect(host="localhost", user="blah", passwd="blah",
db="test_py")
cursor = base.cursor()
cursor.execute("INSERT INTO table (field) VALUES (int)")
this does not work
manuhack wrote:
> I copied the lines
>
> f=open('/tmp/workfile', 'w')
> print f
> f.close()
>
> from Python 2.4 Documentation 7.2. But it said IOerror No such file or
> directory" '/tmp/workfile'
>
> Is it something about the os? I'm using Python 2.4 under WinXP.
> Thanks. Without / I can open
How about write mode? Changing r to w doesn't work...
[EMAIL PROTECTED] wrote:
> manuhack wrote:
> > I copied the lines
> >
> > f=open('/tmp/workfile', 'w')
> > print f
> > f.close()
> >
> > from Python 2.4 Documentation 7.2. But it said IOerror No such file or
> > directory" '/tmp/workfile'
> >
Russell Warren:
> I'm actually running both... but I would think that once os.remove
> returns that the file is actually gone from the hdd. Why would either
> application be blocking access to a non-existent file?
Does it actually tell you the target is the problem? I see an
"OSError: [Errn
201 - 232 of 232 matches
Mail list logo