En Sun, 26 Oct 2008 12:13:08 -0200, Christian Heimes <[EMAIL PROTECTED]>
escribió:
?? wrote:
Any ideas?
Code 1:
from __future__ import print_function, unicode_literals
import sys
print(type('HELLO, WORLD!'), file=sys.stderr)
You have to do each future import in a separate line:
>>>
David Cournapeau wrote:
On Mon, Oct 27, 2008 at 10:52 AM, James Mills
<[EMAIL PROTECTED]> wrote:
On Mon, Oct 27, 2008 at 4:12 AM, Benjamin Kaplan
+1 This thread is stupid and pointless.
Even for a so-called cold startup 0.5s is fast enough!
Not if the startup is the main cost for a command you
On Mon, Oct 27, 2008 at 3:15 PM, David Cournapeau <[EMAIL PROTECTED]> wrote:
> Not if the startup is the main cost for a command you need to repeat many
> times.
Seriously if you have to spawn and kill python
processes that many times for an initial cold
startup and subsequent warm startups to be
On Mon, Oct 27, 2008 at 10:52 AM, James Mills
<[EMAIL PROTECTED]> wrote:
> On Mon, Oct 27, 2008 at 4:12 AM, Benjamin Kaplan
> +1 This thread is stupid and pointless.
> Even for a so-called cold startup 0.5s is fast enough!
Not if the startup is the main cost for a command you need to repeat many t
jordilin <[EMAIL PROTECTED]> wrote:
Is there any way to capture the keyboard events ESC, page up (next
page), page down (previous page) in Python?. I mean, how can I capture
if user presses one of those keys in a terminal based application? I
was thinking about pygame.key.get_pressed from the p
Lawrence D'Oliveiro wrote:
> In message <[EMAIL PROTECTED]>, Steven D'Aprano
> wrote:
>
>> I disagree. Triple-quoted strings are exactly the same as other strings:
>> they capture *exactly* what you put in them ...
>
> But that conflicts with the use of whitespace for indentation rules. Other
>
Michael Torrie wrote:
> Carl K wrote:
>> I need to convert pdf to png, which imagemagic convert does, I think by using
>> ghostscript. a little over a year ago I tried with some imagemagic (there
>> are
>> at least 2 i think) and neither seemed close to working (for pdf that is.)
>> any
>> idea
Carl K wrote:
> I need to convert pdf to png, which imagemagic convert does, I think by using
> ghostscript. a little over a year ago I tried with some imagemagic (there are
> at least 2 i think) and neither seemed close to working (for pdf that is.)
> any
> idea if pdf conversion is working?
p
On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote:
> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
> dicts of Python 3.0, like:
Because nobody bothered to backport it.
>
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}
>
> Bye,
> bearophile
--
http://mail.python.org/m
On Oct 25, 3:13 am, [EMAIL PROTECTED] wrote:
> I'd like to know why Python 2.6 doesn't have the syntax to create sets/
> dicts of Python 3.0, like:
Because nobody bothered to backport it.
>
> {x*x for x in xrange(10)}
> {x:x*x for x in xrange(10)}
>
> Bye,
> bearophile
--
http://mail.python.org/m
On Mon, Oct 27, 2008 at 12:03 PM, Andy O'Meara <[EMAIL PROTECTED]> wrote:
> I think we miscommunicated there--I'm actually agreeing with you. I
> was trying to make the same point you were: that intricate and/or
> large structures are meant to be passed around by a top-level pointer,
> not using a
> > And in the case of hundreds of megs of data
>
> ... and I would be surprised at someone that would embed hundreds of
> megs of data into an object such that it had to be serialized... seems
> like the proper design is to point at the data, or a subset of it, in a
> big buffer. Then data tran
On Mon, Oct 27, 2008 at 3:45 AM, BJörn Lindqvist <[EMAIL PROTECTED]> wrote:
> Pedro was talking about cold startup time:
>
> $ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
> $ time python -c "pass"
>
> real0m0.627s
> user0m0.016s
> sys 0m0.008s
$ sudo sh -c "echo 3 > /proc/sys/vm/dro
Laszlo Nagy wrote:
>
>> Also, the other question is the operation st = 'ThreadBWasHere' is
>> atomic?
> I think this is the same question. And I believe it is not atomic,
> because it is actually rebinding a name. Consider this:
>
> a,b = b,a
>
> This will rebind both a and b. In order to be co
On Mon, Oct 27, 2008 at 4:12 AM, Benjamin Kaplan
<[EMAIL PROTECTED]> wrote:
> You must be in a real big hurry if half a second matters that much to you.
> Maybe if it took 5 seconds for the interpreter to start up, I could
> understand having a problem with the start up time.
+1 This thread is stu
On Oct 24, 9:52 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> >> A c-level module, on the other hand, can sidestep/release
> >> the GIL at will, and go on it's merry way and process away.
>
> > ...Unless part of the C module execution involves the need do CPU-
> > bound work on another thread
Lawrence D'Oliveiro <[EMAIL PROTECTED]> writes:
> Software has no market value. Business models that try to assign it
> one are doomed to fight an uphill battle against market forces.
+1 QOTW.
--
\ “Yesterday I told a chicken to cross the road. It said, ‘What |
`\
k3xji wrote:
> Hi all,
>
> This will probably be a long question/short answer, sorry, but I have
> wandered net about the subject and really feel cannot find just enough
> information.I want to ask my question by giving an example to
> explicitly express my understanding which may be also wrong:
>
I am looking for a v4l (either version 1 or 2) module.
I tried to use ctypes with ghostscript and failed. I have a feeling trying to
use it with kernel modules would be even harder, so not exactly what "I" want to
do.
I just tried http://antonym.org/libfg and it segfaulted. (bugs reported)
I f
Grrr... I posted a ton of lengthy replies to you and other recent
posts here using Google and none of them made it, argh. Poof. There's
nothing that fires more up more than lost work, so I'll have to
revert short and simple answers for the time being. Argh, damn.
On Oct 25, 1:26 am, greg <[EMA
Hello folks, i have a string
eg
"(((A:1,B:1):3,C:3):4,((E:1,F:1):2,D:2):4)"
now i have to convert this string to
"(((A:1,B:1):2,C:3):1,((E:1,F:1):1,D:2):2)"
So i used the logic eg. taking the substring "1):3" and converting it to
"1):2"(3-1=2) so on for all the similar substrings.But i am not a
jordilin <[EMAIL PROTECTED]> wrote:
>
>Is there any way to capture the keyboard events ESC, page up (next
>page), page down (previous page) in Python?. I mean, how can I capture
>if user presses one of those keys in a terminal based application? I
>was thinking about pygame.key.get_pressed from the
I manage a team of 5 linux sysadmins and I am trying to transition us
from lengthy, mostly unreadable shell scripts to python scripting. After
a few tutorials, I have been infected with the unit testing bug.
Our scripts create custom versions of Fedora Core, build and deploy web
software, and tes
OSX 10.5.5
Python 2.5.1
I started up IDLE today and the bottom of the window was off of the
screen. I could not find a way to resize it. I closed all apps and
rebooted. After rebooting, IDLE will not start. Below is the
Traceback:
Traceback (most recent call last):
File "/Library/Frameworks
On Sun, Oct 26, 2008 at 11:19 PM, Pedro Borges <[EMAIL PROTECTED]> wrote:
> The scripts i need to run but be executed with no apparent delay specially
> when the text transforms are simple.
That makes no sense whatsoever!
If you are performing data conversion with
Python, interpreter startup time
Lie Ryan <[EMAIL PROTECTED]> wrote:
>
>Cookies?
Yes, please. I'll take two. Chocolate chip. With milk.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.
--
http://mail.python.org/mailman/listinfo/python-list
Using OS X 10.5.5
Python 2.5.1
IDLE was working, then all of a sudden, the window size went off of
the screen could not resize it. I closed IDLE and rebooted and
now IDLE will not start. Below is the Traceback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/V
In message <[EMAIL PROTECTED]>, Stef
Mientki wrote:
> ... although I realize closed source is not completely possibly in Python,
> but that's no problem if the program is large/complex enough compared to
> it's market value ;-)
Software has no market value. Business models that try to assign it o
Martin Vilcans wrote:
Hi list,
I'm wondering if there's a tool that can analyze a Python program
while it runs, and generate a database with the types of arguments and
return values for each function. In a way it is like a profiler, that
instead of measuring how often functions are called and ho
In message
<[EMAIL PROTECTED]>, Daniel
wrote:
> On Oct 17, 2:26 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED]
> central.gen.new_zealand> wrote:
>>
>> In message
>> <[EMAIL PROTECTED]>,
>> Daniel wrote:
>>
>>> Also, I think that Matlab's perferred language is Java.
>>
>> It has its own built-in langua
In message <[EMAIL PROTECTED]>, Robert Lehmann
wrote:
> I would feel greatly offended if I had to indent all *raw* data.
You mean raw strings?
--
http://mail.python.org/mailman/listinfo/python-list
In message <[EMAIL PROTECTED]>, Steven D'Aprano
wrote:
> I disagree. Triple-quoted strings are exactly the same as other strings:
> they capture *exactly* what you put in them ...
But that conflicts with the use of whitespace for indentation rules. Other
languages are freeform, and have strings t
This will rebind both a and b. In order to be correct, it MUST happen
in two phases: first calculate the right side, then do the rebind to
the names on the left side.
"rebind to the names" -> "rebind the names found on the left side, to
the objects calculated from the expressions on the righ
On Mon, Oct 27, 2008 at 6:54 AM, sonich <[EMAIL PROTECTED]> wrote:
> I need simple web crawler,
> I found Ruya, but it's seems not currently maintained.
> Does anybody know good web crawler on python or with python interface?
Simple, but it works. Extend it all you like.
http://hg.softcircuit.co
Also, the other question is the operation st = 'ThreadBWasHere' is
atomic?
I think this is the same question. And I believe it is not atomic,
because it is actually rebinding a name. Consider this:
a,b = b,a
This will rebind both a and b. In order to be correct, it MUST happen in
two phase
Benjamin Kaplan wrote:
I disagree. The extra time Python takes to start makes it unsuitable
for many uses. For example, if you write a simple text editor then
Pythons longer startup time might be to much.
You must be in a real big hurry if half a second matters that much to
you. M
Is there any way to capture the keyboard events ESC, page up (next
page), page down (previous page) in Python?. I mean, how can I capture
if user presses one of those keys in a terminal based application? I
was thinking about pygame.key.get_pressed from the pygame module, but
I don't feel really ha
Lawrence D'Oliveiro a écrit :
In message <[EMAIL PROTECTED]>, Steven D'Aprano
wrote:
Why is it a class attribute instead of an instance attribute?
Singleton class.
Possibly, yes (and I believe it is the case, but...). Or the OP doesnt
have a good enough understanding of Python's object mod
Larry Hale wrote:
> Thank you, again, Michael, for all your help many months ago.
>
> I *FINALLY* got a HowTo done up; please see
> http://wiki.python.org/moin/HowTo/FileMagic
>
> I've also emailed Mr. Hupp to see if he'll re-post the SWIG version;
> he's working on a newer binding (forget... ct
On Sun, Oct 26, 2008 at 9:54 PM, sonich <[EMAIL PROTECTED]> wrote:
> I need simple web crawler,
> I found Ruya, but it's seems not currently maintained.
> Does anybody know good web crawler on python or with python interface?
What about BeautifulSoup?
http://www.crummy.com/software/BeautifulSoup/
Hi all,
This will probably be a long question/short answer, sorry, but I have
wandered net about the subject and really feel cannot find just enough
information.I want to ask my question by giving an example to
explicitly express my understanding which may be also wrong:
So, let's have a string i
I need simple web crawler,
I found Ruya, but it's seems not currently maintained.
Does anybody know good web crawler on python or with python interface?
--
http://mail.python.org/mailman/listinfo/python-list
Thank you, again, Michael, for all your help many months ago.
I *FINALLY* got a HowTo done up; please see
http://wiki.python.org/moin/HowTo/FileMagic
I've also emailed Mr. Hupp to see if he'll re-post the SWIG version;
he's working on a newer binding (forget... ctypes??) and once that
one's work
Thank you, again, Michael, for all your help many months ago.
I *FINALLY* got a HowTo done up; please see
http://wiki.python.org/moin/HowTo/FileMagic
I've also emailed Mr. Hupp to see if he'll re-post the SWIG version;
he's working on a newer binding (forget... ctypes??) and once that
one's work
Hi all,
This will probably be a long question/short answer, sorry, but I have
wandered net about the subject and really feel cannot find just enough
information.I want to ask my question by giving an example to
explicitly express my understanding which may be also wrong:
So, let's have a string i
Hi All,
Wondering if you can tell me what I am missing. I am trying to move some
projects over to the Linux side and Tix is giving me a fit. Here's what I
get when I try to do something in Ubuntu relating to Tix. (Python 2.5)
>>> import Tix
>>> tk = Tix.Tk()
Traceback (most recent call last):
On Sun, Oct 26, 2008 at 1:45 PM, BJörn Lindqvist <[EMAIL PROTECTED]> wrote:
> 2008/10/26 James Mills <[EMAIL PROTECTED]>:
> > On Sun, Oct 26, 2008 at 11:23 AM, BJörn Lindqvist <[EMAIL PROTECTED]>
> wrote:
> >> How are you getting those numbers? 330 μs is still pretty fast, isn't
> >> it? :) Most d
Hi,
The next Iowa Python Users Group (AKA Pyowa) is nearly upon us. We
will be meeting November 3rd, from 7-9 p.m. at the following location:
Marshall County Sheriff's Office
2369 Jessup Ave
Marshalltown, IA 50158
At this meeting, we will be having a Crash Course of sorts for all the
new program
2008/10/26 James Mills <[EMAIL PROTECTED]>:
> On Sun, Oct 26, 2008 at 11:23 AM, BJörn Lindqvist <[EMAIL PROTECTED]> wrote:
>> How are you getting those numbers? 330 μs is still pretty fast, isn't
>> it? :) Most disks have a seek time of 10-20 ms so it seem implausible
>> to me that Ruby would be ab
asit wrote:
> what is XML-RPC System
Doesn't Wikipedia tell you that?
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 26 Oct 2008 17:51:29 +0100, Mr.SpOOn wrote:
> Hi,
> I'd like to use regular expressions to parse a string and accept only
> valid strings. What I mean is the possibility to check if the whole
> string matches the regex.
>
> So if I have:
>
p = re.compile('a*b*')
>
> I can match thi
Mr.SpOOn wrote in news:mailman.3069.1225039892.3487.python-
[EMAIL PROTECTED] in comp.lang.python:
> Hi,
> I'd like to use regular expressions to parse a string and accept only
> valid strings. What I mean is the possibility to check if the whole
> string matches the regex.
>
> So if I have:
>
>
what is XML-RPC System
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I'd like to use regular expressions to parse a string and accept only
valid strings. What I mean is the possibility to check if the whole
string matches the regex.
So if I have:
>>> p = re.compile('a*b*')
I can match this: 'aabbb'
>>> m = p.match('aabbb')
>>> m.group()
'aabbb'
flaviostz schrieb:
Hi,
I wrote this small program:
class Simples:
def minha_func (valor1, valor2):
return valor1 - valor2
mf = Simples()
x = mf.minha_func(2, 3)
print x
But when I try execute it, python interpreter gives me this error:
Traceback (most recent call last):
You forgot the self in minha_func.
--
[]'
- Walter
waltercruz.com
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I wrote this small program:
class Simples:
def minha_func (valor1, valor2):
return valor1 - valor2
mf = Simples()
x = mf.minha_func(2, 3)
print x
But when I try execute it, python interpreter gives me this error:
>>> Traceback (most recent call last):
File "/tmp/py91849
* Jesse (Sat, 25 Oct 2008 14:33:52 -0700 (PDT))
> cant seem to install this, using python 2.6, any known errors that
> wont let me select the python installation to use, just opens a blank
> dialog and wont let me continue..do i need to downgrade python??
Well, you could. But honestly, this is mor
?? wrote:
Any ideas?
Code 1:
from __future__ import print_function, unicode_literals
import sys
print(type('HELLO, WORLD!'), file=sys.stderr)
You have to do each future import in a separate line:
>>> from __future__ import unicode_literals
>>> from __future__ import print_function
>>> pr
Pedro Borges <[EMAIL PROTECTED]> writes:
> The scripts i need to run but be executed with no apparent delay
> specially when the text transforms are simple.
Basically you should keep the interpreter running and the script in
memory in that case.
--
http://mail.python.org/mailman/listinfo/python-li
Any ideas?
Code 1:
from __future__ import print_function, unicode_literals
import sys
print(type('HELLO, WORLD!'), file=sys.stderr)
Result 1:
Code 2:
from __future__ import unicode_literals, print_function
import sys
print(type('HELLO, WORLD!'), file=sys.stderr)
Result 2:
File "tmp.py",
Hi
I am behind a proxy server that needs proxy authentication. There are
a lot of libraries that come without proxy support. The function
below, which is part of the python-twitter library does HTTP
Authentication, and I can't figure out how to do this with a
ProxyBasicAuthHandler object. I'm pas
Hi All,
Pydev and Pydev Extensions 1.3.23 have been released
Details on Pydev Extensions: http://www.fabioz.com/pydev
Details on Pydev: http://pydev.sf.net
Details on its development: http://pydev.blogspot.com
Release Highlights in Pydev Extensions:
--
The scripts i need to run but be executed with no apparent delay
specially when the text transforms are simple.
On Oct 26, 2008, at 11:13 AM, James Mills wrote:
On Sun, Oct 26, 2008 at 11:23 AM, BJörn Lindqvist
<[EMAIL PROTECTED]> wrote:
How are you getting those numbers? 330 μs is still pr
On Oct 24, 8:44 pm, Mr.SpOOn <[EMAIL PROTECTED]> wrote:
> Hi,
> in an application I have to use some variables with fixed valuse.
>
> For example, I'm working with musical notes, so I have a global
> dictionary like this:
>
> natural_notes = {'C': 0, 'D': 2, 'E': 4 }
>
> This actually works fin
Hello.
How about this? I changed the if statements so the coordinates are
always updated, but only changed if within the right limits, otherwise
updated to the existing value. Now if you drag outside the limits of
one dimension, it still moves in the other dimension. Not sure if
that's what you
Hi list,
I'm wondering if there's a tool that can analyze a Python program
while it runs, and generate a database with the types of arguments and
return values for each function. In a way it is like a profiler, that
instead of measuring how often functions are called and how long time
it takes, it
On Sat, 25 Oct 2008 21:50:36 -0400, Terry Reedy wrote:
> Lie Ryan wrote:
>> On Sat, 25 Oct 2008 18:20:46 -0400, Terry Reedy wrote:
> Then why do you object to current
> mylist = linkedlist(data)
> and request the harder to write and implement
> mylist = list(data, implementation = 'lin
I want to connect to a Windows machine in my network , using ssh, I use
paramiko but I have problem in authentication, would you please help me?
1- I have installed freeSSHD in server machine? Is it necessery ? or may I
have to install another program?
2- I have entered server's Ip insted of hos
On Sun, 26 Oct 2008 00:53:18 +, Steven D'Aprano wrote:
[...]
> And how do you find an arbitrary object's creation point without
> searching the project's source code?
How is it better using the current way?
Asking the .implementation field isn't much harder than asking the type
(), and is much
On Thu, Oct 23, 2008 at 2:34 AM, ed <[EMAIL PROTECTED]> wrote:
> I'm trying to make a shortcut by doing this:
>
> t = Globals.ThisClass.ThisMethod
>
> Calling t results in an unbound method error.
>
> Is it possible to do what I want? I call this method in hundreds of
> locations and I'm trying to
On Sun, 26 Oct 2008 09:23:41 +, Duncan Booth wrote:
> Lie Ryan <[EMAIL PROTECTED]> wrote:
>
>> And as far as I know, it is impossible to implement a "press any key"
>> feature with python in a simple way (as it should be).
>
> "press any key" is a misfeature at the best of times. Quite apart
On Wed, 22 Oct 2008 12:34:26 -0400, ed wrote:
> I'm trying to make a shortcut by doing this:
>
> t = Globals.ThisClass.ThisMethod
>
> Calling t results in an unbound method error.
>
> Is it possible to do what I want? I call this method in hundreds of
> locations and I'm trying to cut down on
On Sun, Oct 26, 2008 at 11:23 AM, BJörn Lindqvist <[EMAIL PROTECTED]> wrote:
> How are you getting those numbers? 330 μs is still pretty fast, isn't
> it? :) Most disks have a seek time of 10-20 ms so it seem implausible
> to me that Ruby would be able to cold start in 47 ms.
$ time python -c "pas
"Andy O'Meara" Wrote:
>Um... So let's say you have a opaque object ref from the OS that
>represents hundreds of megs of data (e.g. memory-resident video). How
>do you get that back to the parent process without serialization and
>IPC? What should really happen is just use the same address spac
>>> As far as I can tell, it seems
>>> CPython's current state can't CPU bound parallelization in the same
>>> address space.
>> That's not true.
>>
>
> Um... So let's say you have a opaque object ref from the OS that
> represents hundreds of megs of data (e.g. memory-resident video). How
> do y
Lie Ryan <[EMAIL PROTECTED]> wrote:
> And as far as I know, it is impossible to implement a "press any key"
> feature with python in a simple way (as it should be).
"press any key" is a misfeature at the best of times. Quite apart from the
people who can't find the key with 'any' written on it
Rafe <[EMAIL PROTECTED]> wrote:
> Peter Oten pointed me in the right direction. I tried to reply to his
> post 2 times and in spite of GoogleGroups reporting the post was
> successful, it never showed up.
This is the third variant on your message that has shown up in the
newsgroup.
Please be aw
in 86949 20081024 205720 "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote:
>Steven D'Aprano wrote:
>
>>On Fri, 24 Oct 2008 14:53:19 +, Peter Pearson wrote:
>>
>>> On 24 Oct 2008 13:17:45 GMT, Steven D'Aprano wrote:
What are programmers coming to these days? When I was their age, we
>>>
On Sat, 25 Oct 2008 21:53:10 +, Lie Ryan wrote:
> Oh no, the two dict implementation would work _exactly_ the same from
> the outside, they are transparently interchangeable. Only the
> performance characteristic differs because of the different
> implementation.
They are not 100% interchange
80 matches
Mail list logo