Version 2.3 of mod_wsgi is now available. The software and
documentation are both available from:
http://www.modwsgi.org
The mod_wsgi package consists of an Apache web server module designed
and implemented specifically for hosting Python based web applications
that support the WSGI interface
Leo 4.5 beta 4 is now available at:
http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106
This beta 4 release will likely be the last release before Leo 4.5 final.
Leo 4.5 contains many important new features. See below for details.
Leo is a text editor, data organizer,
Dear Elisa users,
The Elisa team is happy to announce the release of Elisa Media Center
0.5.7 codenamed The Tipping Point.
This release fixes a handful of bugs and enhances the current user
experience with the following new features:
- Add Folders now allows you to browse all your devices
James Matthews wrote:
def __stop(self):
self.__block.acquire()
self.__stopped = True
self.__block.notifyAll()
self.__block.release()
have you tried using that method? what happened? looking at the code,
what do you think it does?
/F
--
Hi,
Thanks for the replies. In my case, the cgi is sending a large file
to the client. In case the the stop button is pressed on the browser
to cancel the download, i want to do some cleanup action. It's all one-
way transfer in this case, so i can't expect the client to send
anything to me. I
On Aug 25, 4:26 pm, Vishal [EMAIL PROTECTED] wrote:
Hi,
Thanks for the replies. In my case, the cgi is sending a large file
to the client. In case the the stop button is pressed on the browser
to cancel the download, i want to do some cleanup action. It's all one-
way transfer in this
On Aug 24, 7:12 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
On Sun, 24 Aug 2008 12:28:53 +0200, Peter Otten wrote:
Hussein B wrote:
I noted that Python encourage the usage of: --
obj.prop = data
x = obj.prop
--
to set/get an object's property value. What if I want
Hello everyone,
I'm trying to implement a virtual instrument, which has buttons and
displays, using Tkinter+Pmw.
One of items on the virtual instrument is a round button.
This is imitating a tact switch.
Tkinter has a Button class, which I can assign a button image.
However, when the button is
On 24 Sie, 10:48, BlueBird [EMAIL PROTECTED] wrote:
Whenever an exception occurs, in the master thread or in one of the
slave threads, I would like to interrupt all the threads and the main
program. Threading API does not seem to provide a way to stop a
thread, is there anyway to achieve that
Raja [EMAIL PROTECTED] writes:
The code is working fine on the command line but when executing it
on the browser i get the famouse Premature end of script headers
error.
Look at the server's error log to see what the real error message is.
You are probably missing an environment variable such
Hi Graham,
Thanks for the reply. In my case, it's the other way round. I need
to check if the amount of data sent is equal to the file size i want
to send. However, the question is - when do i check this? Currently, i
am unable to call any cleanup code before exit.
Regards,
-vishal.
On Aug
On Aug 24, 8:35 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
On Sun, 24 Aug 2008 01:48:46 -0700 (PDT), BlueBird
[EMAIL PROTECTED] declaimed the following in comp.lang.python:
Whenever an exception occurs, in the master thread or in one of the
slave threads, I would like to interrupt all
On Aug 22, 2:45 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
[EMAIL PROTECTED] schrieb:
Hello,
I wrote aprogram that imports odbc and dbi. Originally I used PyWin,
but now I prefer IDLE for working in Windows. Anyway, when I start my
program from IDLE, it can't import the odbc and
On Aug 22, 10:43 pm, Terry Reedy [EMAIL PROTECTED] wrote:
Diez B. Roggisch wrote:
By shell, he means the IDLE shell. But this is the direction to look
first. In the IDLE shell (3.0) those two lines give me the Python
directory, the same as the command line interpreter. When in a file
that
Patrick Maupin pmauail.com wrote:
Very entertaining.
Thanks. Nice to see that there is still some sense of humour
left somewhere - its all been so serious here lately - people
seem to forget that hacking is fun!
But let me get this straight: Are you just complaining that if you
pass a
On Aug 25, 4:56 pm, Hussein B [EMAIL PROTECTED] wrote:
AFAIUY (understand you), what it is called a property in Java, it is
called an attribute in Python?
Why Python encourages direct access to object's attributes?
The simplest answer is Because Python is not Java :)
Speaking of which, have
def generate_output():
print 'htmlbody/body/html'
generate_output()
Raja
You might try adding a Content-type header followed by
a blank line to your generate_output() function
def generate_output() :
print 'Content-type: text/html'
Hi,
Is it possible to have a for loop within an xml template?
--
http://mail.python.org/mailman/listinfo/python-list
pygooglechart 0.2.1 has been released.
http://pygooglechart.slowchop.com/
Here are the changes:
* Added support for QR Code chart (#8)
* Added legend positioning (chdlp) (Steve Brandt)
* Added line styles (chm=D) (Steve Brandt)
* Added colours within series option to chart (chco=xxx|xxx)
On Sun, 24 Aug 2008 23:56:27 -0700, Hussein B wrote:
On Aug 24, 7:12 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
I noted that Python encourage the usage of: -- obj.prop = data
x = obj.prop
--
to set/get an object's property value. What if I want to run some
logic
Hello,
I am writing an application that controls robots. Different robots can
do different kinds of movements, such as e.g. open gripper, rotate
gripper, etc. My RobotControl class should support all kinds of
robots. I therefore delegate the actual control work to extra
control-specific classes,
On Aug 25, 1:53 pm, Cousin Stanley [EMAIL PROTECTED] wrote:
def generate_output():
print 'htmlbody/body/html'
generate_output()
Raja
You might try adding a Content-type header followed by
a blank line to your generate_output() function
Hi,
I've a xml svg file and I would like to update it with Python.
First, I would like to fetch one dom node with getElementByID. I've one
issue about this method.
This is my example :
My SVG file :
?xml version=1.0 encoding=UTF-8 standalone=no?
!-- Created with Inkscape
2008/8/25 Hendrik van Rooyen [EMAIL PROTECTED]:
It is reputed to belong to a programmer who was flayed alive
by the C.L.P. group, because he had violated the immutability
of a python string.
You can indeed use ctypes to modify the value of a string - see
http://tinyurl.com/5hcnwl. You can use
2008/8/25 Amie [EMAIL PROTECTED]:
Hi,
Is it possible to have a for loop within an xml template?
Python has a whole bunch of template libraries. Which are you using?
--
Cheers,
Simon B.
[EMAIL PROTECTED]
http://www.brunningonline.net/simon/blog/
GTalk: simon.brunning | MSN: small_values |
You can also use ctypes to globally change the value of integers less
than 101. Personally, I don't particularly like the number 14. I
changed it to 9 and I am much happier now.
I love ctypes. So cool. It's not supposed to be safe.
Life is either a daring adventure or nothing.
Le Monday 25 August 2008 11:37:23 Steven Samuel Cole, vous avez écrit :
Hello,
I am writing an application that controls robots. Different robots can
do different kinds of movements, such as e.g. open gripper, rotate
gripper, etc. My RobotControl class should support all kinds of
robots. I
Hendrik van Rooyen wrote:
...
Actually, I am not complaining - I am asking for advice on the side
effects of what I am doing, which is replacing a bunch of bits
in what is essentially an output bit field with the corresponding
input bits at the same addresses read back from a simulated i/o
On 25 Aug, 11:43, KLEIN Stéphane [EMAIL PROTECTED] wrote:
Hi,
I've a xml svg file and I would like to update it with Python.
First, I would like to fetch one dom node with getElementByID. I've one
issue about this method.
[SVG file with id attribute on svg element]
In [1]: from xml.dom
On Aug 25, 5:49 pm, Vishal [EMAIL PROTECTED] wrote:
Hi Graham,
Thanks for the reply. In my case, it's the other way round. I need
to check if the amount of data sent is equal to the file size i want
to send. However, the question is - when do i check this? Currently, i
am unable to call
On 25 Aug, 10:58, Amie [EMAIL PROTECTED] wrote:
Is it possible to have a for loop within an xml template?
Yes it is:
http://www.w3.org/TR/xslt.html#for-each
Depending on what you mean by xml template, of course.
Paul
--
http://mail.python.org/mailman/listinfo/python-list
hey guys...
got a weird, hopefully simple issue.
the following sample bit of script is stripped down, and simply gets the
form node from the specified site schedule.psu.edu.
the problem i run into is that the dom/xpath from the libxml2dom works, and
i get the dom object everytime i run the app,
Hi,
I'm using Tkinter module to create a GUI application. I found that the
combo box is not present in Tkinter module.
It comes with Tix module. Could some one give me an example to create
a combo box whilst using Tix and Tkinter?
I've been using the following to create my tkinter widgets:
Sells, Fred wrote:
I'm using python 2.4 under linux (centos 5.1).
I need to pass an array of doubles to a c function
but am getting an error, shown near the bottom of
this post.
my swig interface file looks like this
* File: rug520.i
On Aug 25, 4:31 am, Steven D'Aprano
[EMAIL PROTECTED] wrote:
On Sun, 24 Aug 2008 23:56:27 -0700, Hussein B wrote:
On Aug 24, 7:12 pm, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
I noted that Python encourage the usage of: -- obj.prop = data
x = obj.prop
--
to
On Aug 22, 1:59 pm, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Fri, 22 Aug 2008 08:55:57 -0300, Brendan [EMAIL PROTECTED]
escribi :
On Aug 21, 3:57 pm, Gabriel Genellina [EMAIL PROTECTED]
wrote:
En Thu, 21 Aug 2008 15:37:41 -0300, Brendan [EMAIL PROTECTED]
escribi :
Hi All,
Quick question, I can't seem to find the answer online (well, at the
moment I think the answer is a simple no but I would like to
confirm).
Consider the following hash:
h = { 1 : a\r, 2 : b\n }
In order to strip the dict values in Python I (think) I can only do
something like:
for k,v
Is there anything equivalent to rspec for python?
--
http://mail.python.org/mailman/listinfo/python-list
Le Mon, 25 Aug 2008 04:30:00 -0700, Paul Boddie a écrit :
Well, my final purpose isn't to fetch root dom node but to fetch many
other sub node.
You could always try using an XPath expression:
node = (dom2.xpath(//[EMAIL PROTECTED]'svg2383']) or [None])[0]
Similar things could be done
On Mon, Aug 25, 2008 at 12:57 PM, [EMAIL PROTECTED] wrote:
Hi,
I'm using Tkinter module to create a GUI application. I found that the
combo box is not present in Tkinter module.
It comes with Tix module. Could some one give me an example to create
a combo box whilst using Tix and Tkinter?
On Mon, Aug 25, 2008 at 8:52 PM, Simon Mullis [EMAIL PROTECTED] wrote:
Hi All,
Quick question, I can't seem to find the answer online (well, at the
moment I think the answer is a simple no but I would like to
confirm).
Consider the following hash:
h = { 1 : a\r, 2 : b\n }
In order to
On Aug 25, 1:33 pm, Paul Boddie [EMAIL PROTECTED] wrote:
On 25 Aug, 10:58, Amie [EMAIL PROTECTED] wrote:
Is it possible to have a for loop within an xml template?
Yes it is:
http://www.w3.org/TR/xslt.html#for-each
Depending on what you mean by xml template, of course.
Paul
Thanks,
Simon Mullis [EMAIL PROTECTED] writes:
Consider the following hash:
h = { 1 : a\r, 2 : b\n }
This is a 'dict' instance in Python. A 'hash' is a different concept.
In order to strip the dict values in Python I (think) I can only do
something like:
for k,v in h.items:
h[k] =
On Mon, 25 Aug 2008 03:43:01 -0700, Ken Seehart wrote:
You can also use ctypes to globally change the value of integers less
than 101. Personally, I don't particularly like the number 14. I
changed it to 9 and I am much happier now.
Okay, you've got me curious. How do you do that, and why
On Aug 25, 7:52 am, Simon Mullis [EMAIL PROTECTED] wrote:
Consider the following hash:
h = { 1 : a\r, 2 : b\n }
In Python, this called a dict. hash sounds so... perlish.
In order to strip the dict values in Python I (think) I can only do
something like:
for k,v in h.items:
h[k] =
Thanks to all for the quick responses.
2008/8/25 Ben Finney [EMAIL PROTECTED]:
This is a 'dict' instance in Python. A 'hash' is a different concept.
In order to strip the dict values in Python I (think) I can only do
something like:
for k,v in h.items:
h[k] = v.strip()
The above
i want to execute a python script using exec open('script.py'). how do
I pass arguments?
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 25 Aug 2008 06:31:53 -0700 (PDT), Alexandru Mosoi wrote:
i want to execute a python script using exec open('script.py'). how do
I pass arguments?
Take a look at subprocess module. It comes with a set of examples.
--
Regards,
Wojtek Walczak,
http://tosh.pl/gminick/
--
Hello group,
in following example, a signal handler is registered and a thread
started. if I call self.doSomethin() directly
the code works as I would expect. as i send a SIGINT shutdown is
called and the script terminates.
as soon as I call doSomething() in a thread the the SIGINT handler is
Steven D'Aprano wrote:
On Mon, 25 Aug 2008 03:43:01 -0700, Ken Seehart wrote:
You can also use ctypes to globally change the value of integers less
than 101. Personally, I don't particularly like the number 14. I
changed it to 9 and I am much happier now.
Okay, you've got me curious.
Hi,
I'm on Ubuntu 8.04.1
I've installed lxml with easy_install lxml command.
Now, when I load etree I've this error :
$ python
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type help, copyright, credits or license for more information.
from
Le Mon, 25 Aug 2008 13:50:50 +, KLEIN Stéphane a écrit :
Hi,
I'm on Ubuntu 8.04.1
I've installed lxml with easy_install lxml command.
Now, when I load etree I've this error :
$ python
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu
4.2.3-2ubuntu7)] on linux2
Simon Mullis:
h = { 1 : a\r, 2 : b\n }
I have the option of an in-place method:
h.each_value { |v| val.strip! }
This in-place version may be the closer code for Python 2.x:
d = {1: a\r, 2: b\n}
d.update((k, v.strip()) for k, v in d.iteritems())
You may also want to use v.rstrip() there
Hi,
I'm using Tkinter and Tix. I've created a combo box which I am able to
fill it up.
I'm want to call a function as soon as user selects some thing from
the combo box.
More precisely, I want to know how can i bind my function to this
selection event.
What this event is technically called?
hi all,
i am new to python.
i fetch a webpage with urllib, extract a few numbers in a format as follow;
10,884
24,068
my question is how to remove the comma between the number, since i have to
add them up later.
sorry for my bad english.
--
http://mail.python.org/mailman/listinfo/python-list
Simon Mullis [EMAIL PROTECTED] writes:
There is no equivalent in Python (as far as I know, and I'm only in
my second week of Python so I'm more than likely incorrect!).
Python uses strings for that purpose, which works well due to their
immutability. Python automatically interns strings used
Steven D'Aprano [EMAIL PROTECTED] writes:
On Sun, 24 Aug 2008 11:09:46 +0200, Hrvoje Niksic wrote:
Use [classmethod] when your method needs to know what class it is
called from.
Ordinary methods know what class they are called from
I guess I should have added and no more. :-)
Why is
W. eWatson wrote:
The other night I surveyed a site for astronomical use by measuring the
altitude (0-90 degrees above the horizon) and az (azimuth, 0 degrees
north clockwise around the site to 360 degrees, almost north again) of
obstacles, trees. My purpose was to feed this profile of
sharon k wrote:
hi all,
i am new to python.
i fetch a webpage with urllib, extract a few numbers in a format as follow;
10,884
24,068
my question is how to remove the comma between the number, since i have
to add them up later.
Strings have a replace method. Calling replace(,, ) on the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi sharon,
as I understand, you want to remove certain characters of a string. Try:
number = int(fetched_number.replace(',', ''))
this will first remove any , characters and then convert the string
into an integer.
Best,
Manuel
On Aug 25,
Rustom Mody wrote:
Is there anything equivalent to rspec for python?
I had to Google to see what it is: A Behaviour Driven Development
framework for Ruby.
In a blog article from Ian Bicking says that it is impossible to have a
Python port of this because Python doesn't allow you to inject
thank you for your prompt reply.
sorry seems i run into another problem, as follow;
a = 12,123
b = str(a)
c = int(b.replace(',', ''))
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: invalid literal for int() with base 10: '(12 123)'
the comma has
I'm pleased to announce python-unixtools 0.0.1, a set of Unix tools
implemented in pure Python.
These tools are currently only meant as supplement to be able to use
distutils's sdist_tar, sdist_bztar and sdist_gztar on Windows/Wine.
Thus they currently only support the flags required by
Hi,
How can I access a foxpro dbf file from my python program.
I just want to read it as a read only file.
Regards,
--
http://mail.python.org/mailman/listinfo/python-list
pyspread 0.0.9 has been released.
About:
pyspread is a spreadsheet that accepts a pure python expression in
each cell.
New features:
+ Find Replace
+ Undo Redo
+ New context menu in grid
+ Improved speed especially for large grids
+ Relative addressing revamped
+ CSV import improved
+ Icons
On Mon, 25 Aug 2008 06:21:09 -0700, Paul McGuire wrote:
On Aug 25, 7:52 am, Simon Mullis [EMAIL PROTECTED] wrote:
Consider the following hash:
h = { 1 : a\r, 2 : b\n }
In Python, this called a dict. hash sounds so... perlish.
A hash is also a mixture, a jumble or mess, as in hash browns,
En Mon, 25 Aug 2008 17:31:22 -0300, Hendrik van Rooyen [EMAIL PROTECTED]
escribió:
Patrick Maupin pmauail.com wrote:
But let me get this straight: Are you just complaining that if you
pass a string to an arbitrary C function using ctypes, that that
arbitrary function can modify the
Hi sharon,
the problem is here that
a = 12,123
will actually create a tuple with two elements (namely 12 and 123):
a = 12,123
a
(12, 123)
Converting this to a string yields '(12, 123)', which is not what you
want (sounds confusing, bit soon you'll see how many amazing things
can be done
On Aug 25, 8:58 am, Gerhard Häring [EMAIL PROTECTED] wrote:
Rustom Mody wrote:
Is there anything equivalent to rspec for python?
I had to Google to see what it is: A Behaviour Driven Development
framework for Ruby.
In a blog article from Ian Bicking says that it is impossible to have a
On Aug 25, 3:31 pm, Hendrik van Rooyen [EMAIL PROTECTED] wrote:
Actually, I am not complaining - I am asking for advice on the side
effects of what I am doing, which is replacing a bunch of bits
in what is essentially an output bit field with the corresponding
input bits at the same addresses
KLEIN Stéphane wrote:
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
from lxml import etree
Traceback (most recent call last):
File stdin, line 1, in module
File lxml.etree.pyx, line 40, in lxml.etree (src/lxml/
lxml.etree.c:119415)
AttributeError: 'module' object has no attribute
much thanks, your instructions are clear, problem solved!
:)
On Mon, Aug 25, 2008 at 11:43 PM, Manuel Ebert [EMAIL PROTECTED] wrote:
Hi sharon,
the problem is here that
a = 12,123
will actually create a tuple with two elements (namely 12 and 123):
a = 12,123
a
(12, 123)
Converting
akineko wrote:
Hello everyone,
I'm trying to implement a virtual instrument, which has buttons and
displays, using Tkinter+Pmw.
One of items on the virtual instrument is a round button.
This is imitating a tact switch.
Tkinter has a Button class, which I can assign a button image.
However,
I am a relative newbie to Python and its logging infrastructure;
however, I have programmed extensively with Java/C# and log4j and
log4net. That, I suppose, could be the root of my problem :)
I am trying to setup one logger per module (as this is roughly
analogous to how I've used log4j/log4net).
Hi,
I'm running on Linux and I'm executing a python script as a subversion
post-commit hook. I'm finding that I'm running into a lot of random issues,
and I'm guessing this has to do with my environment not being properly
setup. From what I've gathered, the environment is not setup when the
Ken Seehart wrote:
Hendrik van Rooyen wrote:
...
Actually, I am not complaining - I am asking for advice on the side
effects of what I am doing, which is replacing a bunch of bits
in what is essentially an output bit field with the corresponding
input bits at the same addresses read back
Leo 4.5 beta 4 is now available at:
http://sourceforge.net/project/showfiles.php?group_id=3458package_id=29106
This beta 4 release will likely be the last release before Leo 4.5 final.
Leo 4.5 contains many important new features. See below for details.
Leo is a text editor, data organizer,
Maybe I'm missing something obvious, but is there a QT object to
represent time intervals, a la datetime.timedelta?
I'm working on a utility that displays database query results from a
postgres database (using psycopg2) in a QTableView. For columns
created using age(some_date_column), I get a
I'm not very sure about this , but it's logicallay enough to be said
i think the QTableView ordering mechanism must provide some overriding
functionality through accepting a comparing function from you
check it
On Mon, Aug 25, 2008 at 7:48 PM, admoore [EMAIL PROTECTED] wrote:
Maybe I'm missing
Paul McGuire wrote:
Pythonistically speaking, even though a dict is a mutable thing, I'm
learning that the accepted practice for methods like this is not so
much to update in place as it is to use generator expressions to
construct a new object.
I disagree. The convention is that mutation
Arne Vajhøj wrote:
Paul Wallich wrote:
Martin Gregorie wrote:
On Fri, 22 Aug 2008 22:56:09 +, sln wrote:
On Thu, 21 Aug 2008 09:11:48 -0500, [EMAIL PROTECTED] (Rob Warnock) wrote:
[EMAIL PROTECTED] wrote:
...(snip)
I thought microcode was relative well defined as being the software
On 25.08.2008, Terry Reedy [EMAIL PROTECTED] wroted:
The newish sorted() and reversed() built-ins were meant to complement
list.sort and list.reverse, not replace them.
BTW, is there a reason why sorted() on a list returns a list, while
reversed() on the same list returns an iterator?
GS
--
jonfroehlich wrote:
I am a relative newbie to Python and its logging infrastructure;
however, I have programmed extensively with Java/C# and log4j and
log4net. That, I suppose, could be the root of my problem :)
I am trying to setup one logger per module (as this is roughly
analogous to
I wanted to make everybody aware that I've posted a (rather long and
involved) PEP proposal for adding micro-threading to Python on
python-ideas for feedback and review.
In a nutshell, this proposal implements the Twisted Deferred/Reactor at
the C level so that the Python programmer gets the
Grzegorz Staniak wrote:
BTW, is there a reason why sorted() on a list returns a list, while
reversed() on the same list returns an iterator?
the algorithm required to sort a sequence is something entirely
different from the algorithm required to loop over a sequence in
reverse. we went
On Mon, 25 Aug 2008 12:52:44 +0200, Maric Michaud wrote:
In other OOP language I would encourage you to implement this logic in
some sort of singleton, but in python we don't like this construct,
module level variables and function do perfectly the job, simple as
they are.
Modules are some
On Aug 20, 4:48 pm, [EMAIL PROTECTED] wrote:
Hi,
I'm sorry if this has been asked before, but I can't seem to find an
answer to this anywhere and so far, trial and error hasn't gotten me
far either.
Using python 2.4, I've created a testing application. When the app
starts up, I do a
never mind...
it was an issue with the targeted site... it's sending screwed up html the
times when i get an err...
thanks though!
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of bruce
Sent: Monday, August 25, 2008 4:49 AM
To: python-list@python.org
Diez wrote...
I don't know swig, but if all you have is a real C-API, try
use ctypes.
It's much easier to create bindings for, keeps you fully in
the warm and
cozy womb of python programming and doesn't need no
compilation to create
the actual binding.
You're right the ctypes does
En Mon, 25 Aug 2008 05:00:07 -0300, BlueBird [EMAIL PROTECTED]
escribi�:
On Aug 24, 8:35 pm, Dennis Lee Bieber [EMAIL PROTECTED] wrote:
The only safe way to abort a thread is by having it exit on
its
own. This means one needs a means of setting an attribute that each
thread
I have a class with an attribute called 'gridsize' and I want
a derived class to force and keep it at 0.8 (representing 8mm).
Is this a correct, or the most pythonic approach?
def __getattr__(self,attrname):
if attrname == 'gridsize':
return 0.8
On Linux I get a close failed: [Errno 10] No child processes msg for
each fork. But only if I have a pipe open. I don't understand the
connection between the popen and the forks. Am I doing something
wrong?
#! /usr/bin/env python
import os
import sys
import time
p = os.popen('top -b -d1')
Ken Starks wrote:
I have a class with an attribute called 'gridsize' and I want
a derived class to force and keep it at 0.8 (representing 8mm).
Is this a correct, or the most pythonic approach?
def __getattr__(self,attrname):
if attrname == 'gridsize':
JohnMudd [EMAIL PROTECTED] writes:
On Linux I get a close failed: [Errno 10] No child processes msg
for each fork. But only if I have a pipe open. I don't understand
the connection between the popen and the forks. Am I doing
something wrong?
Yes: don't use sys.exit, use os._exit. This is
On Aug 25, 2:09 pm, Ken Starks [EMAIL PROTECTED] wrote:
Ken Starks wrote:
I have a class with an attribute called 'gridsize' and I want
a derived class to force and keep it at 0.8 (representing 8mm).
Is this a correct, or the most pythonic approach?
def
Hi.
Got a test web page, that basically has two html tags in it. Examining
the page via Firefox/Dom Inspector, I can create a test xpath query
/html/body/form which gets the target form for the test.
The issue comes when I examine the page's source html. It looks like:
html
body
/body
/html
struct.Struct lets you encode Python objects into structured memory.
It accepts a format string, and optionally a buffer and offset to/from
which to read/write the structure. What do you think of random access
for the results?
(unproduced)
packer= struct.Struct( 'IIIf255p' )
packer.pack_into(
On Aug 25, 3:47 pm, Ken Starks [EMAIL PROTECTED] wrote:
I have a class with an attribute called 'gridsize' and I want
a derived class to force and keep it at 0.8 (representing 8mm).
Is this a correct, or the most pythonic approach?
def __getattr__(self,attrname):
I'm seeing something which make me think I'm missing something about
how global var's behave. I've defined a global string, right at the
start of my .py file.
outXMLfile = abc
I define a class and do a bunch of stuff below that. Then I have
another class, and in it, there is a method
On Aug 24, 1:12 am, Stefan Behnel [EMAIL PROTECTED] wrote:
George Sakkis wrote:
On Aug 21, 1:48 am, Fredrik Lundh [EMAIL PROTECTED] wrote:
George Sakkis wrote:
It's interesting that the element text attributes after a successful
parse do not necessarily have the same type, i.e. all be
1 - 100 of 234 matches
Mail list logo