It's my pleasure to announce the release of rst2pdf version 0.11, available at
http://code.google.com/p/rst2pdf/downloads/list
Rst2pdf is a tool to generate PDF files directly from restructured text
sources via reportlab.
This version includes many bugfixes and some new features compared to
Thanks, Chris. The best (and only) explanation I've heard so far. AS for
as editing the source code, that's beyond my gnubyness. I thought there
might be an easily accessible configuration file, but for the time I'll
use it as is.
I do wonder why in all these forum discussions about which Python
Join the friendly Python Global [ ALL FREE SW HW CULTURE]
community Meeting:
this Sunday, June 21, using VOIP,
10A - 6P Pacific USA time [GMT - 8? 7? hours] =
1P - 9P Eastern USA =
6P - 2A??? GMT - Daylight savings correction? +7 hours?
at the BerkeleyTIP Global Free SW HW Culture meeting
greg g...@cosc.canterbury.ac.nz (g) wrote:
g Philip Semanchuk wrote:
try:
sem.acquire() # User hits Ctrl + C while this is waiting
except:
print * I caught it!
Instead a KeyboardInterrupt error is propagated up to the interpreter
and the process is killed as if the try/except
Dudeja, Rajat wrote:
Hi,
I'm looking for a fascility that can check if the file is open on Windows XP
and if the file is open (say a notepad file is open), I want to close that file
(i.e the notepad application)
In short, this is far trickier than you might imagine.
It's come up a number of
Jure Erznožnik jure.erznoz...@gmail.com (JE) wrote:
JE Sorry, just a few more thoughts:
JE Does anybody know why GIL can't be made more atomic? I mean, use
JE different locks for different parts of code?
JE This way there would be way less blocking and the plugin interface
JE could remain the
Jure Erznožnik jure.erznoz...@gmail.com (JE) wrote:
JE I have shown my benchmarks. See first post and click on the link.
JE That's the reason I started this discussion.
JE All I'm saying is that you can get threading benefit, but only if the
JE threading in question is implemented in C plugin.
Ross Ridge rri...@csclub.uwaterloo.ca (RR) wrote:
RR By definition an I/O bound thread isn't CPU bound so won't benefit from
RR improved CPU resources.
But doing I/O is not the same as being I/O bound. And Python allows
multithreading when a thread does I/O even if that thread is not I/O
bound
In message 20090619134015.349ba...@malediction, Mike Kazantsev wrote:
On Fri, 19 Jun 2009 17:53:40 +1200
Lawrence D'Oliveiro l...@geek-central.gen.new_zealand wrote:
In message 20090618081423.2e035...@coercion, Mike Kazantsev wrote:
On Thu, 18 Jun 2009 10:33:49 +1200
Lawrence
In message j_q_l.19655$y61.10...@news-server.bigpond.net.au, Lie Ryan
wrote:
Lawrence D'Oliveiro wrote:
In message %zv_l.19493$y61.5...@news-server.bigpond.net.au, Lie Ryan
wrote:
Yeah, it might be possible to just mv the file from outside, but not
being able to enter a directory just
On Jun 19, 4:42 pm, Christian Heimes li...@cheimes.de wrote:
OdarR schrieb:
On 19 juin, 21:41, Carl Banks pavlovevide...@gmail.com wrote:
He's saying that if your code involves extensions written in C that
release the GIL, the C thread can run on a different core than the
Python-thread
On Jun 19, 4:35 pm, a...@pythoncraft.com (Aahz) wrote:
In article 157e0345-74e0-4144-a2e6-2b4cc854c...@z7g2000vbh.googlegroups.com,
Carl Banks pavlovevide...@gmail.com wrote:
I wish Pythonistas would be more willing to acknowledge the (few)
drawbacks of the language (or implementation, in
You might want to read about The Problem with Threads:
http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf
and then decide to switch to an appropriate concurrency model for your use
case.
and to a programming language that supports it.
--
While there are a lot of valid ways to do it, anything you do will change
the outcome of the probability anyway. I'm assuming you are just looking to
clamp the values.
Try this:
http://codepad.org/NzlmSMN9 (it runs the code, too)
==
# Clamp a normal
Paul LaFollette paul.lafolle...@gmail.com writes:
So, what I would like is some sort of object that is a kind of
everything but contains nothing, a unique minimal element of the
partial ordering imposed on the set of classes by the inheritance
heierarchy. Whilst I am not naive mathematically,
On 20 juin, 11:02, Carl Banks pavlovevide...@gmail.com wrote:
Here's the thing: not everyone complaining about the GIL is trying to
get the raw power of their machines. They just want to take
advantage of multiple cores so that their Python program runs
faster.
It would be rude and
Hi all,
Started a project year ago with hard goals in mind : Developing a game
server which can handle thousands of clients simultaneously.System
must be stable, scalable, efficient, and if the client need to migrate
the server to another OS, this will be a matter of time, if possible
without
I maintain a math hobby - magic square web page
_http://www.knechtmagicsquare.paulscomputing.com/_
(http://www.knechtmagicsquare.paulscomputing.com/)
A very bright fellow in England sent me a algorithm written in python to
solve a problem I was working on. I can't seem to get it to
On Jun 19, 7:00 am, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Fri, 19 Jun 2009 14:24:34 +0100, Aaron Brady castiro...@gmail.com
wrote:
You are not being any help, Rhodri, in your question.
To you, perhaps not. To me, it has at least had the effect of making
what you're trying
After my previous experiment I was curious how this works with
input(). I replaced the sem.acquire() with raw_input() and ran the same
tests. Now the inner exception is really taken so it works like the OP
expected. The exception, however is KeyboardInterrupt, not the special
exception from the
Chris Rebert wrote:
On Wed, Jun 17, 2009 at 11:23 PM, Jason Gervichgerv...@sbcglobal.net wrote:
Why does IDLE use two hash marks for comments (##)? Most other editors
(Geany, SPE) use a single hash mark (#) to designate comments.
I would guess to distinguish its (usually block) comments from
# Clamp a normal distribution outcome
import random
class applicant():
def __init__(self, x, y):
self.randomnum = clamp(random.normalvariate(x, y), 0, 100)
def clamp(input, min=0, max=100):
Clamps the input between min and max.
if input min, returns min
(sorry Vincent, I sent it to you but not the mailing list.)
Good luck, here are my answers:
Why not have clamp in the class? Because Clamp itself is a reusable
function. I was rather surprised it's not in the standard math module.
if __name__ == __main__ is only meaningful when the .py file
yell...@aol.com wrote:
I maintain a math hobby - magic square web page
http://www.knechtmagicsquare.paulscomputing.com/
A very bright fellow in England sent me a algorithm written in python to
solve a problem I was working on. I can't seem to get it to work ...
syntax problems
Karl Chen wrote:
I wanted to time something that uses with_statement, in python2.5.
Importing __future__ in the statement or the setup doesn't work
since it's not the beginning of the code being compiled. Other
than using a separate module, I could only come up with this:
Carl Here's the thing: not everyone complaining about the GIL is trying
Carl to get the raw power of their machines. They just want to take
Carl advantage of multiple cores so that their Python program runs
Carl faster.
If their code is CPU-bound it's likely that rewriting
Vincent Davis wrote:
I currently have something like this.
class applicant():
def __int__(self, x, y):
self.randomnum = normalvariate(x, y)
then other stuff
x, y are only used to calculate self.randomnum and this seems to
work. But I want self.randomnum to be 0 = randomnum = 100.
Hi all.
I need to use a function like the raw_input to read data from user
command line, but I really like to pre-compile the choice and I'm not
able to do this. There is some other function/module I can use?
I wanna to pre-compile the raw_input input line with the current working path.
--
--
Jason wrote:
Here's my general-purpose solution for doing this:
class Dict2Class(object):
Update like a dictionary, but expose the keys as class properties.
I'm afraid that's wrong. It's wrong twice:
* Properties are computed attributes. These are not, they are regular
Vincent Davis wrote:
I currently have something like this.
class applicant():
def __int__(self, x, y):
self.randomnum = normalvariate(x, y)
then other stuff
x, y are only used to calculate self.randomnum and this seems to
work. But I want self.randomnum to be 0 =
On 2009-06-19, Lie Ryan lie.1...@gmail.com wrote:
Grant Edwards wrote:
On 2009-06-19, Mitko Haralanov mi...@qlogic.com wrote:
I have a question about finding out whether a string contains
binary data?
All strings contain binary data.
Not quite, (python 2.x's) strings are binary data.
def __int__(self, x, y):
x = -1
while not 0 = x = 100:
x = normalvariate(x, y)
# do other stuff
That is the correct way to truncate a normal distribution.
Thanks for the response. But why would you set the mean to -1 to begin?
x = max(0, min(100, normalvariate(x,
Vincent Davis wrote:
# Clamp a normal distribution outcome
I don't know who you are quoting -- you should give attribution to them.
def clamp(input, min=0, max=100):
...
if input min:
return min
elif input max:
return max
else:
return input
An easier way to do this:
return min(100,
Kay Schluehr wrote:
You might want to read about The Problem with Threads:
http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf
and then decide to switch to an appropriate concurrency model for your use
case.
and to a programming language that supports it.
Maybe, yes. But many
Hi,
I'm wondering what would be the preferred way to solve the following
forward reference problem:
---
class BaseA(object):
def __init__(self):
return
class DebugA(BaseA):
def __init__(self):
return
# here I would have a prototype of
Hello again, everybody.
Thank you very much for your responses. You guessed right, I didn't
use the __hash__ method (and I forgot to mention that, sorry).
And unfortunately, I think I can't make them hashable, because the
objects are compared based on their attributes, which are in turn
other
Gustavo Narea wrote:
Hello again, everybody.
Thank you very much for your responses. You guessed right, I didn't
use the __hash__ method (and I forgot to mention that, sorry).
And unfortunately, I think I can't make them hashable, because the
objects are compared based on their
Lorenzo Di Gregorio wrote:
Hi,
I'm wondering what would be the preferred way to solve the following
forward reference problem:
You don't actually explain what is the problem. Fortunately, I'm good at
guessing, and I think I can guess what your problem is (see below):
Gustavo Narea wrote:
Hello again, everybody.
Thank you very much for your responses. You guessed right, I didn't
use the __hash__ method (and I forgot to mention that, sorry).
And unfortunately, I think I can't make them hashable, because the
objects are compared based on their attributes,
En Sat, 20 Jun 2009 12:50:41 -0300, Gustavo Narea m...@gustavonarea.net
escribió:
Thank you very much for your responses. You guessed right, I didn't
use the __hash__ method (and I forgot to mention that, sorry).
And unfortunately, I think I can't make them hashable, because the
objects are
On Sat, Jun 20, 2009 at 7:17 AM, Lucaluca...@gmail.com wrote:
Hi all.
I need to use a function like the raw_input to read data from user
command line, but I really like to pre-compile the choice and I'm not
able to do this. There is some other function/module I can use?
I wanna to
En Sat, 20 Jun 2009 11:17:01 -0300, Luca luca...@gmail.com escribió:
I need to use a function like the raw_input to read data from user
command line, but I really like to pre-compile the choice and I'm not
able to do this. There is some other function/module I can use?
I wanna to pre-compile
Quoting Steven,
Truncating with a while loop will result in something closer to this:
000: *
010: *
020: **
030:
040: ***
050: *
060: **
070:
080: *
090: **
100: *
which is far less distorted.
That is why I was thinking of a while loop.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jean-Paul Calderone wrote:
On Sat, 20 Jun 2009 00:07:27 GMT, Lie Ryan lie.1...@gmail.com wrote:
[snip]
Perhaps we should have more built-in/stdlib operations that can release
GIL safely to release GIL by default? And perhaps some builtin/stdlib
Lorenzo Di Gregorio wrote:
Hi,
I'm wondering what would be the preferred way to solve the following
forward reference problem:
---
class BaseA(object):
def __init__(self):
return
class DebugA(BaseA):
def __init__(self):
return
#
Luca wrote:
Hi all.
I need to use a function like the raw_input to read data from user
command line, but I really like to pre-compile the choice and I'm not
able to do this. There is some other function/module I can use?
I wanna to pre-compile the raw_input input line with the current working
patx wrote:
Could you use if elif statements? Don't understand what you mean really?
On Sat, Jun 20, 2009 at 3:01 PM, Dave Angel da...@ieee.org wrote:
Luca wrote:
Hi all.
I need to use a function like the raw_input to read data from user
command line, but I really like to
Dennis Lee Bieber wrote:
On Fri, 19 Jun 2009 17:52:05 -0700 (PDT), Terminator
manidevara...@gmail.com declaimed the following in
gmane.comp.python.general:
Hello,
My requierment is to get the Stick Tag value from the below o/p and
based on tag take different actions. What is the best way
Steven D'Aprano st...@removethis.cybersource.com.au (SD) wrote:
SD Lorenzo Di Gregorio wrote:
Hi,
I'm wondering what would be the preferred way to solve the following
forward reference problem:
SD You don't actually explain what is the problem. Fortunately, I'm good at
SD guessing, and I
On Jun 20, 8:43 pm, Dave Angel da...@ieee.org wrote:
Lorenzo Di Gregorio wrote:
Hi,
I'm wondering what would be the preferred way to solve the following
forward reference problem:
---
class BaseA(object):
def __init__(self):
return
On Jun 20, 2009, at 7:41 AM, Piet van Oostrum wrote:
After my previous experiment I was curious how this works with
input(). I replaced the sem.acquire() with raw_input() and ran the
same
tests. Now the inner exception is really taken so it works like the OP
expected. The exception, however
This is a small OT post, sorry.
Dennis Lee Bieber, may I ask why most or all your posts are set to No-
Archive?
HTTP://www.bestiaria.com/
I think there are other furries beside you around here.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
On 2009-06-20 11:27, MRAB wrote:
Gustavo Narea wrote:
Hello again, everybody.
Thank you very much for your responses. You guessed right, I didn't
use the __hash__ method (and I forgot to mention that, sorry).
And unfortunately, I think I can't make them hashable, because the
objects are
QOTW: ... open recursion with abstraction is supported in OOP but it
requires elaborate and rather tedious boilerplate in FP ... - Martin Odersky
http://www.nabble.com/Re%3A--scala--usefulness-of-OOP-p23273389.html
How to write a method that may act both as an instance method
On Jun 20, 9:27 am, MRAB pyt...@mrabarnett.plus.com wrote:
Gustavo Narea wrote:
Hello again, everybody.
Thank you very much for your responses. You guessed right, I didn't
use the __hash__ method (and I forgot to mention that, sorry).
And unfortunately, I think I can't make them
Arg, forgot to post to the mailing list again. -_-
On a smaller issue, don't you need to do:
class DebugA(BaseA):
def __init__(self):
BaseA.__init__(self)
return
As in, explicitly call the __init__ function when you initalise DebugA,
since DebugA extends BaseA?
I'm just
On Sat, 20 Jun 2009 21:26:56 +0100, Lorenzo Di Gregorio
lorenzo.digrego...@gmail.com wrote:
Thank you for your help: I'm working on a rather large source, but I
think I have isolated the problem now.
This listing generates an error:
---
class
Gustavo Narea wrote:
Hello again, everybody.
Thank you very much for your responses. You guessed right, I didn't
use the __hash__ method (and I forgot to mention that, sorry).
And unfortunately, I think I can't make them hashable, because the
objects are compared based on their attributes,
On Jun 20, 6:36 am, s...@pobox.com wrote:
Carl Here's the thing: not everyone complaining about the GIL is trying
Carl to get the raw power of their machines. They just want to take
Carl advantage of multiple cores so that their Python program runs
Carl faster.
If their code
Bruno Desthuilliers wrote:
cut
Short answer: this makes no sense.
Absolutely right, took me a while to figure that out though :-)
Lesson learned (again): If it really seems impossible to do something in
Python, it is likely the proposed solution is flawed.
--
MPH
http://blog.dcuktec.com
'If
Dennis Lee Bieber wrote:
On Sat, 20 Jun 2009 13:47:24 -0700 (PDT), Bearophile
bearophileh...@lycos.com declaimed the following in
gmane.comp.python.general:
This is a small OT post, sorry.
Dennis Lee Bieber, may I ask why most or all your posts are set to No-
Archive?
Taking into
Add:
Carl, Olivier co. - You guys know exactly what I wanted.
Others: Going back to C++ isn't what I had in mind when I started
initial testing for my project.
--
http://mail.python.org/mailman/listinfo/python-list
Hi everyone.
I'm looking to find out what people are using for an open source wysiwyg GUI
developer. I'm running both Linux and Windows but prefer to do my
development in Linux. I've got the most experience with Tkinter but am
willing to look at wxPython and Tix as well.
Thus far I've looked
Philip Semanchuk wrote:
Best of all, PyErr_CheckSignals() doesn't interfere with a Python- level
signal handler if one is set.
Ah, I hadn't realised that you were doing this in C
code, and I was trying to think of a Python-level
solution.
For C code, the solution you give sounds like a
good
Quoting Dennis Lee Bieber
limitedNormal ( 75, 20 )
computed statistics: mu = 75.5121294828 sigma = 8.16374859991
Note how computing the input sigma such that 3*sigma does not exceed
boundaries results in a narrow bell curve (hmm, and for this set, no one
scored 95-100)
Carl I'm sure you think you're trying to be helpful, but you're coming
Carl off as really presumptuous with this casual dismissal of their
Carl concerns.
My apologies, but in most cases there is more than one way to skin a cat.
Trust me, if removing the global interpreter lock was
On 20 Jun., 17:28, Stefan Behnel stefan...@behnel.de wrote:
Kay Schluehr wrote:
You might want to read about The Problem with Threads:
http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf
and then decide to switch to an appropriate concurrency model for your use
case.
and
On Jun 20, 8:18 pm, s...@pobox.com wrote:
Carl Maybe you don't intend to sound like you're saying shut up and
Carl use C, but to me, that's how you come off. If you're going to
Carl advise someone to use C, at least try to show some understanding
Carl for their concerns--it
Hi, If you like programming problems and reading about/creating
solutions to tasks in many languages not just Python, then take a look
at Rosetta Code: http://www.rosettacode.org . If you 'lurk' for a
while and read the submissions of others to get a feal for the site,
then their is a list of
New submission from Stephen J. Turnbull step...@xemacs.org:
Which causes the locale machinery to spit exceptions, and the program to
die, usually (eg, hg).
This manifests naturally on an Intel Mac, Mac OS X 10.5.7, but the
problem behavior is in _build_localename. When called as
Changes by Benjamin Peterson benja...@python.org:
--
assignee: - vsajip
nosy: +vsajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6314
___
___
Tarek Ziadé ziade.ta...@gmail.com added the comment:
done in r73490. Will wait for 3.1 final release to apply it to the py3k
branch.
--
versions: +Python 2.7, Python 3.2 -Python 2.6
___
Python tracker rep...@bugs.python.org
New submission from Jeong-Min Lee false...@gmail.com:
format(datetime_obj, format_string) return format_string. (when
format_string is not empty.)
import datetime
d = datetime.datetime.now()
format(d)
'2009-06-20 23:51:54.243428'
format(d, '')
'2009-06-20 23:51:54.243428'
d
Changes by Eric Smith e...@trueblade.com:
--
assignee: - eric.smith
components: +Interpreter Core -Extension Modules, Library (Lib)
nosy: +eric.smith
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6316
Eric Smith e...@trueblade.com added the comment:
This is by design. Where d is a datetime, format(d, format_string)
returns d.strftime(format_string).
d.strftime('30')
'30'
--
resolution: - invalid
status: open - closed
___
Python tracker
Jeong-Min Lee false...@gmail.com added the comment:
I got it.
By the way, It would be good to document that this behaviour (at least
about datetime.__format__)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6316
Martin v. Löwis mar...@v.loewis.de added the comment:
Superseded by issue6267.
--
nosy: +loewis
resolution: - out of date
status: open - closed
superseder: - Cumulative patch to http and xmlrpc
___
Python tracker rep...@bugs.python.org
Martin v. Löwis mar...@v.loewis.de added the comment:
Superseded by issue6267.
--
nosy: +loewis
resolution: - out of date
status: open - closed
superseder: - Cumulative patch to http and xmlrpc
___
Python tracker rep...@bugs.python.org
Martin v. Löwis mar...@v.loewis.de added the comment:
Rejecting the patch because of lack of responsiveness.
--
resolution: - rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1360243
Antoine Pitrou pit...@free.fr added the comment:
Everything looks ok, thanks!
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6215
___
Antoine Pitrou pit...@free.fr added the comment:
Ouch, this is quite annoying. I will try to fix this before the final
release.
--
assignee: - pitrou
nosy: +pitrou
priority: - critical
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Here is my current interpretation:
subprocess uses os.pipe() to create the file handles used for
communication. These handles normally always raise an error ([Errno 29]
Illegal seek) when trying to seek() on them, which the IO lib interprets
as
Antoine Pitrou pit...@free.fr added the comment:
Just before, could you try to type the following commands:
r, w = os.pipe()
os.lseek(r, 0, 1)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6236
Roger Serwy roger.se...@gmail.com added the comment:
The class browser relies on the pyclbr module to scan the code. This
module doesn't support classes within classes. Both pyclbr and IDLE's
class browser need to be modified.
--
nosy: +serwy
___
nlopes shelika.v...@gmail.com added the comment:
This is a pretty dumb patch, but it does it's job.
Basically it decodes the utf-8 encoded prefix and uri. Then, encodes it
into Latin1. Probably there are better ways of doing this and those
ideas are welcome. Patch attached.
--
keywords:
Fredrik Lundh fred...@effbot.org added the comment:
Converting from UTF-8 to Unicode is the right thing to do, but
converting back to Latin-1 is not correct -- note that ET returns a
Unicode string, not an 8-bit string. There's a makestring helper that
does the right thing in the library;
nlopes shelika.v...@gmail.com added the comment:
You're right about the conversion to Latin1.
I actually played a bit with makestring before going in another
direction (although not very good) because makestring alone wasn't
giving what is intended.
I'll try to check tomorrow a good approach
Terry J. Reedy tjre...@udel.edu added the comment:
The situation appears to be at least slightly different from what Guido
stated. In 3.x, all classes subclass object, which has .__ne__, so if
that stopped inferred != behavior, it would never happen.
class A:
def __eq__(s,p): return 1
New submission from Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:
winsound.PlaySound doesn't accept non-unicode string.
Python 3.1rc2+ (py3k, Jun 14 2009, 14:07:51) [MSC v.1200 32 bit (Intel)]
on win3
2
Type help, copyright, credits or license for more information.
import winsound
Changes by Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp:
--
priority: - release blocker
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6317
___
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: georg.brandl - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4395
___
91 matches
Mail list logo