pyOpenSSL is a wrapper around a subset of the OpenSSL API, including support
for X509 certificates, public and private keys, and and SSL connections.
pyOpenSSL 0.7 fixes a number of memory leaks and memory corruption issues. It
also exposes several new OpenSSL APIs to Python:
*
Greetings,
I'm pleased to announce that the registration for the first-annual
EuroSciPy Conference is now open.
http://scipy.org/EuroSciPy2008
Please take advantage of the early-bird rate and register soon. We'd
love to have an early idea of attendance so that we can scale the
venue
Chicago Python User Group
=
Come join us for our best meeting ever!
When
Tuesday, April 15th, ~7pm **NOTE: TUESDAY MEETING** NO Meeting on
Thursday
Topics
--
* Web2py (Massimo Di Pierro)
* Google AppEngine Introduction / Open Discussion (Ian Bicking)
*
On Apr 10, 5:18 pm, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Thu, 10 Apr 2008 05:45:41 -0300, ZeeGeek [EMAIL PROTECTED] escribió:
On Apr 10, 4:31 pm, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Wed, 09 Apr 2008 23:12:00 -0300, ZeeGeek [EMAIL PROTECTED]
escribió:
It seems that
Hi,
using pty.spawn() it seems that stderr output of the spawned process is
directed to stdout. Is there a way to keep stderr separate and only direct
stdin and stdout to the pty?
TIA,
w best regards,
Wilbert Berendsen
--
http://www.wilbertberendsen.nl/
You must be the change you wish to see
Great, that was the answer I was looking for, thank you. I'll respond with
how well it works.
On Thu, Apr 10, 2008 at 12:16 AM, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Wed, 09 Apr 2008 13:31:22 -0300, Patrick Stinson
[EMAIL PROTECTED] escribió:
Well, I eventually want to add an import
Heyas
So first off I know that CDATA is generally hated and just shouldn't
be done, but I'm simply required to parse it and spit it back out.
Parsing is pretty easy with lxml, but it's the spitting back out
that's giving me issues. The fact that lxml strips all the CDATA
stuff off isnt really a
郭勇军 schrieb:
Hello:
My OS is Linux, I compile my dynamic link libraries , and
want to call the function of my dynamic library through python!
How can I realize the function? Please give me some advices! Thanks
If the module has a plain C-interface, consider using ctypes
On Apr 11, 6:06 am, casevh [EMAIL PROTECTED] wrote:
On Apr 10, 9:28 pm, bdsatish [EMAIL PROTECTED] wrote:
How does (a/b) work when both 'a' and 'b' are pure integers ?
Python defines the quotient and remainder from integer division so
that a = qb + r and 0=r abs(b). C/C++ lets the
On Friday 11 April 2008, David Cook wrote:
On 2008-04-10, Paul Rubin http wrote:
Well, it's a trade-off, the person wanted a cross platform gui and the
#1 hurdle for something like PyQt4 is getting it to work on each of
the platforms you desire to run on.
Installing Pyqt on windows
Phil Thompson [EMAIL PROTECTED] writes:
Installing Pyqt on windows involves a couple click to install EXEs. On
Linux, one uses yum or apt. Only on Mac is it marginally a bit harder.
Actually, on Windows it's only one .exe as the PyQt GPL binary installer
includes Qt and all it's tools
I am trying to write a matching engine for a matching language for a
filtering proxy compatible with that of The Proxomitron. The matching
language is basically an extended superset of shell-style globs, with
functionality comparable to regexps (see
2008/4/11, Evan [EMAIL PROTECTED]:
Hope this hasn't been posted hundreds of times. I'm new for this.
Before using python for this kind of script, I was using TCL to write
down a command line based interactive program. it likes a tclsh,
or python command, after that, you can work under a
hi i use this programme in my application django:
import structMASK_CCITT = 0x1021 # CRC-CCITT mask (ISO 3309, used in X25,
HDLC)MASK_CRC16 = 0xA001 # CRC16 mask (used in ARC files)def updcrc(crc,
data, mask=MASK_CRC16): data_length = len(data) unpackFormat = '%db' %
Another xkcd plug for Python: http://xkcd.com/409/
--
http://mail.python.org/mailman/listinfo/python-list
Stefan Behnel wrote:
It's not as trivial as it sounds. Removing the CDATA sections in the parser is
just for fun.
... *not* just for fun ...
obviously ...
Stefan
--
http://mail.python.org/mailman/listinfo/python-list
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
If I want to round to the nearest even, that is
my_round(1.5) = 2# As expected
my_round(2.5) = 2# Not 3, which is an odd num
I'm interested in rounding numbers of the
Michel Bouwmans wrote:
I don't think HTMLParser was doing anything wrong here. I needed to parse a
HTML document, but it contained script-blocks with document.write's in
them. I only care for the content outside these blocks but HTMLParser will
choke on such a block when it isn't encapsulated
Silfheed wrote:
So first off I know that CDATA is generally hated and just shouldn't
be done, but I'm simply required to parse it and spit it back out.
Parsing is pretty easy with lxml, but it's the spitting back out
that's giving me issues. The fact that lxml strips all the CDATA
stuff off
On Apr 11, 10:16 am, Floris Bruynooghe [EMAIL PROTECTED]
wrote:
On Apr 10, 5:09 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote:
On Apr 10, 3:37 pm, Floris Bruynooghe [EMAIL PROTECTED]
wrote:
On Apr 7, 2:19 pm, Andrii V. Mishkovskyi [EMAIL PROTECTED] wrote:
2008/4/7, Floris
Evan napisał(a):
Hope this hasn't been posted hundreds of times. I'm new for this.
Before using python for this kind of script, I was using TCL to write
down a command line based interactive program. it likes a tclsh,
or python command, after that, you can work under a prompt, for
On 11 avr, 12:14, bdsatish [EMAIL PROTECTED] wrote:
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
If I want to round to the nearest even, that is
my_round(1.5) = 2# As expected
my_round(2.5) = 2# Not 3, which is
Hope this hasn't been posted hundreds of times. I'm new for this.
Before using python for this kind of script, I was using TCL to write
down a command line based interactive program. it likes a tclsh,
or python command, after that, you can work under a prompt, for
example, - , and then you
On Apr 10, 5:09 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote:
On Apr 10, 3:37 pm, Floris Bruynooghe [EMAIL PROTECTED]
wrote:
On Apr 7, 2:19 pm, Andrii V. Mishkovskyi [EMAIL PROTECTED] wrote:
2008/4/7, Floris Bruynooghe [EMAIL PROTECTED]:
Have been grepping all over the place and
On 10 Apr, 18:03, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
On Thu, 10 Apr 2008 07:37:08 -0700, skanemupp wrote:
i know how to do this already. the problem is i want the text to stay
in the windowa nd not start overwriting Answer:.
Then don't use `place()` but let Tkinter handle the
On Apr 11, 11:19 am, Floris Bruynooghe [EMAIL PROTECTED]
wrote:
[...]
Unfortunatly both this one and the one I posted before work when I try
them out on the commandline but both fail when I try to use them in a
module. And I just can't figure out why.
This in more detail: Imaging mod.py:
couldn't you just do.
#untested
new_round(n):
answer = round(n)
# is answer now odd
if answer % 2:
return answer - 1
else:
return answer
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 11, 1:19 pm, [EMAIL PROTECTED] wrote:
couldn't you just do.
#untested
new_round(n):
answer = round(n)
# is answer now odd
if answer % 2:
return answer - 1
else:
return answer
Whoops, this also affects odd numbers...
Will try and find a GOOD solution later...
Paul McGuire [EMAIL PROTECTED] wrote in news:869c25d9-e4d3-
[EMAIL PROTECTED]:
Another xkcd plug for Python: http://xkcd.com/409/
So Python is on a collision course with Calvin and Hobbes!
Adrian
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 11, 3:27 pm, [EMAIL PROTECTED] wrote:
On 11 avr, 12:14, bdsatish [EMAIL PROTECTED] wrote:
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
If I want to round to the nearest even, that is
my_round(1.5) = 2# As
Hi,
I am new to this group. I have some question, it is listed below.
In my application I should send some data to hardware and it will give
response that response should log in one file. To do it first should send
data to port next receive response from port (hardware) so...
Queries:
1) Can we
Sanhita Mallick [EMAIL PROTECTED] wrote:
I have looked at that, and other similar ones all of
which are based on Graphviz.
Networkx is not based on graphviz.
My problem is that I myself am creating some large graphs
[...]
So I would like to use a graphical/visual method than typing out the
On Apr 11, 4:37 pm, Scott David Daniels [EMAIL PROTECTED] wrote:
bdsatish wrote:
The built-in function round( ) will always round up, that is 1.5 is
def rounded(v):
rounded = round(v)
if divmod(v, 1)[1] == .5 and divmod(rounded, 2)[1] == 1:
if v 0:
return
On Apr 11, 4:19 pm, [EMAIL PROTECTED] wrote:
couldn't you just do.
#untested
new_round(n):
answer = round(n)
# is answer now odd
if answer % 2:
return answer - 1
else:
return answer
It fails for negative numbers: For -2.5 it gives -4.0 as answer
whereas I expect -2.0
--
On Apr 11, 4:24 pm, [EMAIL PROTECTED] wrote:
On Apr 11, 1:19 pm, [EMAIL PROTECTED] wrote:
couldn't you just do.
#untested
new_round(n):
answer = round(n)
# is answer now odd
if answer % 2:
return answer - 1
else:
return answer
Whoops, this also affects odd
bdsatish wrote:
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
If I want to round to the nearest even, that is
my_round(1.5) = 2# As expected
my_round(2.5) = 2# Not 3, which is an odd num
I'm interested in
Another xkcd plug for Python: http://xkcd.com/409/
Damn it. There goes another 40 minutes of my life magically whisked away by
that more-addictive-than-crack 'RANDOM' button.
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 11, 12:14 pm, bdsatish [EMAIL PROTECTED] wrote:
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
If I want to round to the nearest even, that is
my_round(1.5) = 2# As expected
my_round(2.5) = 2# Not 3, which
Oh, that was a good hint! See inline
On Apr 11, 12:02 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote:
On Apr 11, 11:19 am, Floris Bruynooghe [EMAIL PROTECTED]
wrote:
[...]
Unfortunatly both this one and the one I posted before work when I try
them out on the commandline but both fail
On Apr 11, 2:05 pm, Gerard Flanagan [EMAIL PROTECTED] wrote:
On Apr 11, 12:14 pm, bdsatish [EMAIL PROTECTED] wrote:
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
If I want to round to the nearest even, that is
[EMAIL PROTECTED] a écrit :
Am I the only one that thinks this would be useful? :)
I'd really like to be able to use python 3.0's print statement in
2.x.
nitpick mode=pedantic
FWIW, the whole point is that in 3.0, print stop being a statement to
become a function...
/nitpick
--
HI Gerard,
I think you've taken it to the best possible implementation. Thanks !
On Apr 11, 5:14 pm, Gerard Flanagan [EMAIL PROTECTED] wrote:
In fact you can avoid the call to the builtin round:
def myround(x):
n = int(x)
if abs(x -
On 11 avr, 14:14, Gerard Flanagan [EMAIL PROTECTED] wrote:
On Apr 11, 2:05 pm, Gerard Flanagan [EMAIL PROTECTED] wrote:
On Apr 11, 12:14 pm, bdsatish [EMAIL PROTECTED] wrote:
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
On Apr 11, 5:33 pm, bdsatish [EMAIL PROTECTED] wrote:
HI Gerard,
I think you've taken it to the best possible implementation. Thanks !
On Apr 11, 5:14 pm, Gerard Flanagan [EMAIL PROTECTED] wrote:
In fact you can avoid the call to the builtin round:
sambasivareddy wrote:
Hi,
I am new to this group. I have some question, it is listed below.
In my application I should send some data to hardware and it will give
response that response should log in one file. To do it first should
send data to port next receive response from port
On Apr 10, 8:05 pm, Andrew Warkentin [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] wrote:
In Python, is it possible to add classes to a module at run-time?
Say I have a module foo and a module bar. Foo has class A and B, and
bar has class C. I want to add class C to foo so I can access it as
On Apr 11, 2:14 pm, bdsatish [EMAIL PROTECTED] wrote:
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
If I want to round to the nearest even, that is
my_round(1.5) = 2# As expected
my_round(2.5) = 2# Not 3, which
ha bo wrote:
hi i use this programme in my application django:
import struct
MASK_CCITT = 0x1021 # CRC-CCITT mask (ISO 3309, used in X25, HDLC)
MASK_CRC16 = 0xA001 # CRC16 mask (used in ARC files)
def updcrc(crc, data, mask=MASK_CRC16):
data_length = len(data)
Nope. Do not see it. My ugly stupid way works. I guess I will just proceed
with that and write my howto accordingly.
Victor
On Thu, Apr 10, 2008 at 9:01 PM, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Thu, 10 Apr 2008 14:04:43 -0300, Victor Subervi
[EMAIL PROTECTED] escribió:
Well, what I
On Apr 11, 12:15 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Thu, 10 Apr 2008 18:45:04 -0300, Huayang Xia [EMAIL PROTECTED]
escribió:
I am trying to use ctypes to call dll functions. One of the functions
requires argument struct IDispatch* . I do have a PyIDispatch object
in python.
After IronPython, Python + iron :
http://www.golfermania.com/SnakeEyes/PYTHON-PLUS-IRON.jpg
;o)
Michel Claveau
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 11, 9:45 am, bdsatish [EMAIL PROTECTED] wrote:
On Apr 11, 5:33 pm, bdsatish [EMAIL PROTECTED] wrote:
HI Gerard,
I think you've taken it to the best possible implementation. Thanks !
On Apr 11, 5:14 pm, Gerard Flanagan [EMAIL PROTECTED] wrote:
In fact you can avoid the call to
Victor Subervi wrote:
Nope. Do not see it. My ugly stupid way works. I guess I will just
proceed with that and write my howto accordingly.
Victor
OK, but be prepared for some pretty scathing feedback. You will make it
clear you do not understand the web. I'd suggest a little more reading
Huayang Xia wrote:
On Apr 11, 12:15 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Thu, 10 Apr 2008 18:45:04 -0300, Huayang Xia [EMAIL PROTECTED]
escribió:
I am trying to use ctypes to call dll functions. One of the functions
requires argument struct IDispatch* . I do have a PyIDispatch
You should use Python with R. Google for Rpy, this is the best
Graphing you can do with Python
On Apr 11, 7:40 am, Philipp Pagel [EMAIL PROTECTED]
wrote:
Sanhita Mallick [EMAIL PROTECTED] wrote:
I have looked at that, and other similar ones all of
which are based on Graphviz.
Networkx is
thank you i did find solution i did have just change:
unpackedData = struct.unpack(unpackFormat, data) to
unpackedData = struct.unpack(unpackFormat, data.decode('string_escape'))
From: [EMAIL PROTECTED]
Subject: Python-list Digest, Vol 55, Issue 179
To: python-list@python.org
On Apr 11, 5:49 pm, hdante [EMAIL PROTECTED] wrote:
On Apr 11, 9:45 am, bdsatish [EMAIL PROTECTED] wrote:
On Apr 11, 5:33 pm, bdsatish [EMAIL PROTECTED] wrote:
HI Gerard,
I think you've taken it to the best possible implementation. Thanks !
On Apr 11, 5:14 pm, Gerard Flanagan
On Apr 11, 1:40 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Thu, 10 Apr 2008 05:06:42 -0700 (PDT), [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
okay, that explains it...
could you provide a working example of a two-room game using your
method please so I can
On Apr 11, 9:47 am, Tim Golden [EMAIL PROTECTED] wrote:
Huayang Xia wrote:
On Apr 11, 12:15 am, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Thu, 10 Apr 2008 18:45:04 -0300, Huayang Xia [EMAIL PROTECTED]
escribió:
I am trying to use ctypes to call dll functions. One of the functions
On Apr 11, 10:16 am, [EMAIL PROTECTED] wrote:
On Apr 11, 1:40 am, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Thu, 10 Apr 2008 05:06:42 -0700 (PDT), [EMAIL PROTECTED]
declaimed the following in comp.lang.python:
okay, that explains it...
could you provide a working example of a
greg_kr [EMAIL PROTECTED] wrote:
You should use Python with R. Google for Rpy, this is the best
Graphing you can do with Python
The OP was refering to graph as in 'graph-theory', not plotting data. Of
course, R has some packages for dealing with graphs in the former sense
but I don't think
On Apr 11, 11:13 am, Ivan Illarionov [EMAIL PROTECTED]
wrote:
Shorter version:
def round3k(x):
return x % 1 != 0.5 and round(x) or round(x / 2.) * 2.
Strangely, a faster version is:
def fast_round(x):
if x % 1 != 0.5: return round(x)
return 2.0*round(x/2.0)
nums = [ 0, 2,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gabriel Genellina wrote:
Another annoying thing with the Qt license is that you have to choose it
at the very start of the project. You cannot develop something using the
open source license and later decide to switch to the commercial licence
Steve Holden wrote:
Michel Bouwmans wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Mike Driscoll wrote:
On Apr 10, 12:05 pm, Michel Bouwmans [EMAIL PROTECTED] wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Paul Rubin wrote:
Chris Stewart [EMAIL PROTECTED] writes:
I've
On Apr 11, 6:14 pm, bdsatish [EMAIL PROTECTED] wrote:
The built-in function round( ) will always round up, that is 1.5 is
rounded to 2.0 and 2.5 is rounded to 3.0.
If I want to round to the nearest even, that is
my_round(1.5) = 2# As expected
my_round(2.5) = 2# Not 3, which
[EMAIL PROTECTED] wrote:
ok but i have trouble using grid. if i try to use a Label witht he
text answer in the following code it doenst work very well.
Can you describe have trouble? What sort of trouble -- syntax errors,
the text never shows up, etc?
Following is my attempt to use a label
[EMAIL PROTECTED] commented about rounding towards even numbers
from mid-way between integers as opposed to for instance always rounding
up in those cases:
Strange request though, why do you need it that way, because 2.5 is
CLOSER to 3 than to 2...
That's exactly how I was taught to do
Try Google Chart with python wrapper:
http://pygooglechart.slowchop.com/
http://code.google.com/apis/chart/
On Thu, Apr 10, 2008 at 10:05 AM, Sanhita Mallick [EMAIL PROTECTED] wrote:
Hi.
I am a newbie to Python. I am trying to implement a
Python code for graph manipulation. My graphs are
On Thu, Apr 10, 2008 at 8:25 PM, Carl Banks [EMAIL PROTECTED] wrote:
On Apr 10, 2:20 pm, Tommy Nordgren [EMAIL PROTECTED] wrote:
On 9 apr 2008, at 03.01, [EMAIL PROTECTED] wrote:
okay, I'm having this one problem with a text adventure game. It's
kind of hard to explain, but I'll do
I am in need for a Sr. Lead Architect for an outstanding company
located in NYC. The company has been outsourcing their technology to
California and are bringing the office to NYC. The company is looking
for an individual who can build and manage the technolgy team in NYC.
Individual must be a
This question was posed to me today. Given a C/C++ program we can clearly
embed a Python interpreter in it. Is it possible to fire up multiple
interpreters in multiple threads? For example:
C++ main
thread 1
Py_Initialize()
thread 2
Py_Initialize()
Hi,
Here is a simple prog that I can run from the Python shell and it runs fine but
when I double click the 'filename.py' ,
it does not execute the ping statement, and seems like it is stuck at the
following output:
Fri Apr 11 12:16:09 2008
Testing 192.168.0.1
The prog is as follows:
I'm running Python 2.5.2 on Windows XP and need to interface with R,
so I downloaded the R 2.6.2 statistical package and installed it, and
did the same for RPy 1.02 (i made sure I got the version for Python
2.5 and R 2.62.). When I go to the Python command line and type
from rpy import *
I get
[EMAIL PROTECTED] schrieb:
This question was posed to me today. Given a C/C++ program we can clearly
embed a Python interpreter in it. Is it possible to fire up multiple
interpreters in multiple threads? For example:
C++ main
thread 1
Py_Initialize()
pyOpenSSL is a wrapper around a subset of the OpenSSL API, including support
for X509 certificates, public and private keys, and and SSL connections.
pyOpenSSL 0.7 fixes a number of memory leaks and memory corruption issues. It
also exposes several new OpenSSL APIs to Python:
*
On Apr 11, 11:47 am, [EMAIL PROTECTED] wrote:
I'm running Python 2.5.2 on Windows XP and need to interface with R,
so I downloaded the R 2.6.2 statistical package and installed it, and
did the same for RPy 1.02 (i made sure I got the version for Python
2.5 and R 2.62.). When I go to the Python
On Apr 11, 9:24 am, [EMAIL PROTECTED] wrote:
This question was posed to me today. Given a C/C++ program we can clearly
embed a Python interpreter in it. Is it possible to fire up multiple
interpreters in multiple threads? For example:
C++ main
thread 1
2008/4/11, [EMAIL PROTECTED] [EMAIL PROTECTED]:
This question was posed to me today. Given a C/C++ program we can clearly
embed a Python interpreter in it. Is it possible to fire up multiple
interpreters in multiple threads? For example:
C++ main
thread 1
Hi again,
Stefan Behnel wrote:
Silfheed wrote:
So first off I know that CDATA is generally hated and just shouldn't
be done, but I'm simply required to parse it and spit it back out.
Parsing is pretty easy with lxml, but it's the spitting back out
that's giving me issues. The fact that lxml
I have worked on this many hours a day for two weeks. If there is an easier
way to do it, just take a minute or two and point it out. Have you heard of
the Law of Diminishing Returns? I have passed it long ago. I no longer want
to waste time trying to guess at what you are trying to tell me.
Does anyone know how to determine the window status (Running or Not
Responding)? I've tried various methods with no success...
This would be on a variety of Windows systems, but all at least XP,
and mostly server 2003. Everyone will have Python 2.5.1 on them, and
the script would be running
Henry Chang wrote:
Try Google Chart with python wrapper:
http://pygooglechart.slowchop.com/
http://code.google.com/apis/chart/
Wrong kind of graph.
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt
[EMAIL PROTECTED] wrote:
Strange request though, why do you need it that way, because 2.5 is
CLOSER to 3 than to 2...
Uhhh, no it isn't. (3 - 2.5) == (2.5 - 2)
--
Robert Kern
I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad
Thanks a mill - works like a charm!
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 11, 10:29 am, hdante [EMAIL PROTECTED] wrote:
Strangely, a faster version is:
def fast_round(x):
if x % 1 != 0.5: return round(x)
return 2.0*round(x/2.0)
You should be a little bit careful with the test
x%1 == 0.5 if x might be negative:
x = -0.5 + 2**-54
x # not an
On Apr 10, 3:54 am, Chris Stewart [EMAIL PROTECTED] wrote:
...
Next, what would you say is the best framework I should look into?
I'm curious to hear opinions on that.
GUI-programming in Python is a neanderthal experience. What one may
love with console scripts is turned upside-down. Projects
Hi,
I'd like to assign the value of an attribute in __init__ as the default
value of an argument in a method. See below:
class aphorisms():
def __init__(self, keyword):
self.default = keyword
def franklin(self, keyword = self.default):
return A %s in time saves nine. %
Hi,You will only have one the different static Python variables,
so this is not possible.
Thanks, that's pretty much what I expected...
Skip
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 10, 1:05 pm, Sanhita Mallick [EMAIL PROTECTED] wrote:
Hi.
I am a newbie to Python. I am trying to implement a
Python code for graph manipulation. My graphs are
about 200-500 nodes big. Excepting for the short basic
graph implementation info on Python.org, where can I
find more in
On Apr 11, 10:19 pm, Mikael Olofsson [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] commented about rounding towards even numbers
from mid-way between integers as opposed to for instance always rounding
up in those cases:
Strange request though, why do you need it that way, because 2.5 is
Kevin Takacs wrote:
Hi,
I'd like to assign the value of an attribute in __init__ as the default
value of an argument in a method. See below:
class aphorisms():
def __init__(self, keyword):
self.default = keyword
def franklin(self, keyword = self.default):
Rune Strand wrote:
On Apr 10, 3:54 am, Chris Stewart [EMAIL PROTECTED] wrote:
...
Next, what would you say is the best framework I should look into?
I'm curious to hear opinions on that.
GUI-programming in Python is a neanderthal experience. What one may
love with console scripts is turned
On Apr 11, 7:20 pm, Kevin Takacs [EMAIL PROTECTED] wrote:
Hi,
I'd like to assign the value of an attribute in __init__ as the default
value of an argument in a method. See below:
class aphorisms():
def __init__(self, keyword):
self.default = keyword
def franklin(self,
how do i profile a program? i found out that there are some profilers
included in the standard library but couldnt really figure out how to
access/use them
--
http://mail.python.org/mailman/listinfo/python-list
Victor Subervi wrote:
I have worked on this many hours a day for two weeks. If there is an
easier way to do it, just take a minute or two and point it out. Have
you heard of the Law of Diminishing Returns? I have passed it long ago.
I no longer want to waste time trying to guess at what you
On Apr 11, 2008, at 11:35 AM, [EMAIL PROTECTED] wrote:
I'd like to assign the value of an attribute in __init__ as the
default
value of an argument in a method. See below:
Are you sure? You will not get fresh values with each call in Python
as you would in other languages.
Why not just
On Apr 11, 1:45 pm, rdahlstrom [EMAIL PROTECTED] wrote:
Does anyone know how to determine the window status (Running or Not
Responding)? I've tried various methods with no success...
This would be on a variety of Windows systems, but all at least XP,
and mostly server 2003. Everyone will
Hi all,
I'm a beginner to Python, so please bear with me.
Is there a way of guarenteeing that all created threads in a program are
finished before the main program exits? I know that using join() can
guarentee this, but from the test scripts I've run, it seems like join()
also forces each
On Apr 11, 2:49 pm, [EMAIL PROTECTED] wrote:
how do i profile a program? i found out that there are some profilers
included in the standard library but couldnt really figure out how to
access/use them
Did you actually read the docs ? There is an example in the stdlib
documentation:
On Apr 11, 1:49 pm, [EMAIL PROTECTED] wrote:
how do i profile a program? i found out that there are some profilers
included in the standard library but couldnt really figure out how to
access/use them
Are you talking about using PyChecker or nose or what? In other words,
do you want to check
1 - 100 of 202 matches
Mail list logo