Fault-tolerance framework Py-Fate contains several proxy classes and/or
algorithms so that a conscious developer can easily add fault-tolerance
to the code.
http://sourceforge.net/projects/py-fate/
The biggest point is that Python proxying capabilities allow for
invisible drop-in addition or
Gabriel Genellina wrote:
What about a simple:
print Time elapsed: blah blah blah\r % whatever,
(notice the \r and the final , )
to avoid messing up the output when you're leaving the loop, or if
something goes wrong inside the loop, it's usually better to *start*
with a carriage return:
rdrink wrote:
And yes I should prolly move to pysqlite2, but for now I was able to
fix it this way...
num = 200
mess = INSERT INTO foo (id) VALUES (%s) % num
cur.execute(mess)
... don't know why I didn't think of that last (oh wait, Yes I do...
because 'last night' was actually 2am this
Sebastian Bassi wrote:
Maybe I forgot to tell, but its going to take me at least 6 month to
finish the book
I don't think anyone will know exactly how 3.0 will look within 6
months. Not that your publisher may care about that; there are plenty
of books out there that describe how the author
Hi all,
I am seeking a module that will do the equivalent of linear regression in
3D to yield a best fit a plane through a set of points (X1, Y1, Z1), (X1,
Y1, Z1),... (Xn, Yn, Zn).
The resulting equation to be of the form:
Z = aX + bY + c
The function I need would take the set of points and
[EMAIL PROTECTED] wrote:
Hi all,
I am seeking a module that will do the equivalent of linear regression in
3D to yield a best fit a plane through a set of points (X1, Y1, Z1), (X1,
Y1, Z1),... (Xn, Yn, Zn).
The resulting equation to be of the form:
Z = aX + bY + c
The function I
[EMAIL PROTECTED] wrote:
Hi all,
I am seeking a module that will do the equivalent of linear regression in
3D to yield a best fit a plane through a set of points (X1, Y1, Z1), (X1,
Y1, Z1),... (Xn, Yn, Zn).
The resulting equation to be of the form:
Z = aX + bY + c
The function I need
[EMAIL PROTECTED] Wrote:
|
| Haha. How can I fix this!
|
|
|
Use either tabs, or spaces, but not both
- Hendrik
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
| Hi,
| Again I need help about tkinter listbox.
|
|
| example:
|
| In listbox must write (imaginary file in server):
|
| ['-rw-r--r-- 1 [EMAIL PROTECTED] vedran.byethost12.com
| 3506 Jun 25 14:40 file.gif']
|
|
| and then when somebody click on file in
Hendrik van Rooyen wrote:
[EMAIL PROTECTED] Wrote:
|
| Haha. How can I fix this!
|
|
|
Use either tabs, or spaces, but not both
- Hendrik
Haha. I know. I just find it silly that a language insists on
indentation. I'd long known it but just was reminded of it when I
messed a
[EMAIL PROTECTED] wrote:
Hendrik van Rooyen wrote:
[EMAIL PROTECTED] Wrote:
|
| Haha. How can I fix this!
|
|
|
Use either tabs, or spaces, but not both
- Hendrik
Haha. I know. I just find it silly that a language insists on
indentation. I'd long known it but just was reminded
- Original Message -
From: Carl Banks [EMAIL PROTECTED]
Newsgroups: comp.lang.python
To: python-list@python.org
Sent: Saturday, September 02, 2006 6:33 AM
Subject: Re: Using eval with substitutions
[EMAIL PROTECTED] wrote:
a,b=3,4
x=a+b
...
Careful. Here be dragons.
...
Fredrik Lundh wrote:
[EMAIL PROTECTED] wrote:
I thought the xrange was preferred? for x in xrange(length):
preferred by premature optimization freaks, perhaps.
There's a huge difference between not being profligate with resources
and premature optimisation. In the case of the idiom for i
Following code works .
My question is can I make it faster ?
def activeip(checkip):
# if there is any line returned we set activeb to 1 indicating that
# this ip is active during a netstat run
activeb=0
for line in os.popen(netstat -a -n | grep '%s' % checkip)
s=line
is actually indented even if it does not appear to be so :)
Db
--
http://mail.python.org/mailman/listinfo/python-list
Inheritance needed in app configuration
=
I have an ftp server that a number of vendors connect into to upload a
file to their directory. In OO terms, we would have
class OurFTP:
server = ftpserver.com
class Vendor1(OurFTP)
user, pass, directory =
Neil Cerutti wrote:
On 2006-09-01, Tal Einat [EMAIL PROTECTED] wrote:
Tim Chase wrote:
I'm not sure if '__iter__' is the right thing to be looking
for, but it seems to work at least for lists, sets,
dictionarys (via their keys), etc. I would use it because at
least then you know you
In [EMAIL PROTECTED], metaperl wrote:
And I need to form an FTP connection URL based on this. But I really
dont want to write my code such that I explicitly hardcode where the
ftpserver is coming from. Again, in pure OO it is very simple to call a
method and have it dispatch to either the
DarkBlue wrote:
Following code works .
My question is can I make it faster ?
Faster how? Are you calling this so many times that you need it to be
extremely fast? Are you calling it on the same IP multiple times, on
many different IPs at once, ...?
def activeip(checkip):
# if there is
Sybren Stuvel wrote:
DarkBlue enlightened us with:
Following code works .
No it doesn't - it's indented badly. I guess you mean something like:
def activeip(checkip):
# if there is any line returned we set activeb to 1 indicating that
# this ip is active during a netstat run
Hi.
Suppose we have a very large file, and wanna remove 'n' bytes in the
middle of the file. My thought is:
1, read() until we reach the bytes should be removed, and mark the
position as 'pos'.
2, seek(tell() + n) bytes
3, read() until we reach the end of the file, into a variable, say 'a'
4,
Here is a simple piece of code.
When i add the print (or other) function into the run method--the thread
fails to stop after 2 seconds which the join(2) should ensure.
Any help appreciated. Should compile on 2.4
--
http://mail.python.org/mailman/listinfo/python-list
David Hirschfield wrote:
Anyone out there use simpleparse? If so, I have a problem that I can't
seem to solve...I need to be able to parse this line:
Cen2 = Cen(OUT, Cep, ies, wh, 544, (wh/ht));
...
expr:= termlist, ( operator, termlist )+
I *believe* you wanted that to be *,
Here is a simple piece of thread code.
When i add the print (or other) function into the run method--the thread
fails to stop after 2 seconds which the join(2) should ensure.
I have a function that I must have timeout and cannot figure a way to do
this.
Any help appreciated. Should compile on
Tal Einat wrote:
Neil Cerutti wrote:
On 2006-09-01, Tal Einat [EMAIL PROTECTED] wrote:
Tim Chase wrote:
I'm not sure if '__iter__' is the right thing to be looking
for, but it seems to work at least for lists, sets,
dictionarys (via their keys), etc. I would use it because at
I have installed ActivePython
http://www.activestate.com/Products/ActivePython/
How I can run Python file, test.py?
--
http://mail.python.org/mailman/listinfo/python-list
On 2006-09-02, Dasn [EMAIL PROTECTED] wrote:
Hi.
Suppose we have a very large file, and wanna remove 'n' bytes in the
middle of the file. My thought is:
1, read() until we reach the bytes should be removed, and mark the
position as 'pos'.
2, seek(tell() + n) bytes
3, read() until we reach
Hy people, I'm new in python and comming from JAVA.
Something I really like in java is the easy way to add a library to the
project. Just put the jar file in the folder ( WEB-INF/lib ) and
doesn't need to restart the server ( tomcat ).
Can I do some like using python - I'm using apache
Suppose we have a very large file, and wanna remove 'n' bytes in the
middle of the file. My thought is:
1, read() until we reach the bytes should be removed, and mark the
position as 'pos'.
2, seek(tell() + n) bytes
3, read() until we reach the end of the file, into a variable, say 'a'
4,
mclaugb wrote:
When i add the print (or other) function into the run method--the thread
fails to stop after 2 seconds which the join(2) should ensure.
The calling thread waits until the thread you call join() upon stops or 2
seconds have passed -- whatever occurs first.
import time
from
def shift(f, offset, size, buffer_size=1024*1024):
Slight bug in that function implementation. This one passes my
tests.
Sorry about that.
-tkc
def shift(f, offset, size, buffer_size=1024*1024):
deletes (in place) a portion of size size from file f,
starting at offset offset
The
mistral wrote:
I have installed ActivePython
http://www.activestate.com/Products/ActivePython/
How I can run Python file, test.py?
$ python test.py
or
$ ./test.py (if test.py is executable)
--
http://mail.python.org/mailman/listinfo/python-list
PERFECT!!! Thanks so much!
Simon Forman wrote:
Jay wrote:
This may be really obscure, but I had a dream about programming
something like this, so don't blame me. Is it possible to take a small
image or icon and display it as a character in a Tk text box? Think
how Thunderbird
Claudio Grondi ha scritto:
(megasnip)
I caught your point of view. I start reading a book on wxpython to
understand if it can help to solve my problems. At the same time I will
port my program to Python/Tk in order to have a faster first beta
release.
Thanks for your explanation.
Filippo
--
Christian Stapfer wrote:
After switching from Python 2.3 to 2.4 (Enought),
PIL throws an exception that did not occur formerly
(under Python 2.3) when executing
ImageFont.truetype(font, size)
snip/
A module seems to be missing: do I have to install something
in addition to PIL in
Visit the web site below to see where you can buy the cheapest gas in
your local area. Just punch in your zip code and all the work is done
for you. No Cost! Absolutely FREE info.
http://myweb.ecomplanet.com/pool4833/mycustompage0029.htm
--
Pontus Ekberg wrote:
mistral wrote:
I have installed ActivePython
http://www.activestate.com/Products/ActivePython/
How I can run Python file, test.py?
$ python test.py
or
$ ./test.py (if test.py is executable)
Thats if you use un*x. If you word under windows, the first would
I would like to fulfill the following task:
The construct:
if __name__ == '__main__':
should be changed to something like:
if identifier.name == '__main__':
The term identifier should be selected based on the meaning of the
__double-underscore-enclosure__ of the entities.
-
What I would
Hi,
On Fri, 28 Jul 2006 05:25:38 -0700, OriginalBrownster wrote:
Marc 'BlackJack' Rintsch wrote:
In [EMAIL PROTECTED],
OriginalBrownster wrote:
[...]
After the user selected the files you have to zip them on the server,
for instance in a temporary in the `/tmp/` directory and then deliver
Ritesh Raj Sarraf wrote:
[...]
Here's the function, download_from_web() which calls the progress bar:
main.py
def download_from_web(sUrl, sFile, sSourceDir, checksum):
[...]
temp = urllib2.urlopen(sUrl)
headers = temp.info()
size = int(headers['Content-Length'])
zefciu wrote:
Pontus Ekberg wrote:
...
$ python test.py
or
$ ./test.py (if test.py is executable)
Thats if you use un*x. If you word under windows, the first would work,
As would:
test.py
Assuming python grabbed the .py extensions correctly (which it shouold
have done with
On Sat, 2 Sep 2006 13:22:59 +0200, Sybren Stuvel [EMAIL PROTECTED] wrote:
...
def activeip(checkip):
# if there is any line returned we set activeb to 1 indicating that
# this ip is active during a netstat run
activeb = 0
netstat = os.popen(netstat -a -n |
filippo wrote:
Hello,
I coded my +10k lines app using Perl/Tk. It is something like a hotel
software manager, it has a bunch of windows to manage the arrivals,
bills etc etc. I want to port this on Python/WxPython but I'd like to
get benefit of python, not just doing a row by row raw
On Sat, 2 Sep 2006 13:22:59 +0200, Sybren Stuvel [EMAIL PROTECTED] wrote:
DarkBlue enlightened us with:
Following code works .
No it doesn't - it's indented badly. I guess you mean something like:
def activeip(checkip):
# if there is any line returned we set activeb to 1 indicating
Ant [EMAIL PROTECTED] wrote in news:1157218244.750434.36220
@h48g2000cwc.googlegroups.com:
zefciu wrote:
Pontus Ekberg wrote:
...
$ python test.py
or
$ ./test.py (if test.py is executable)
Thats if you use un*x. If you word under windows, the first would
work,
As would:
On Fri, 1 Sep 2006 11:51:55 +0100, Tim Williams [EMAIL PROTECTED] wrote:
...
The smtp sender recipients do not relate to the sender recipients
in the email itself, Often they are the same, but they don't have to
be.
To complicate things a bit more, using the term sender can invite
Sybren Stuvel schrieb:
[EMAIL PROTECTED] enlightened us with:
Visit the web site below to see where you can buy the cheapest gas
in your local area. Just punch in your zip code and all the work is
done for you. No Cost! Absolutely FREE info.
Ehm... maybe you'd like to get your head out
Can you do the same in wxPython?
Simon Forman wrote:
Jay wrote:
This may be really obscure, but I had a dream about programming
something like this, so don't blame me. Is it possible to take a small
image or icon and display it as a character in a Tk text box? Think
how Thunderbird
Tal Einat wrote:
Tim Chase wrote:
I'm not sure if '__iter__' is the right thing to be looking for,
but it seems to work at least for lists, sets, dictionarys (via
their keys), etc. I would use it because at least then you know
you can iterate over it
AFAIK and as seen throughout posts on
Hello.
I installed NetBeans, Jython and Coyote. I hoped that I could use Swing GUI
builder intergrated in NetBeans (Matisse?) with Jython in Delphi way. But,
it seems that I can drag and drop controls only in pure Java application,
not in Jython application?
Does anybody uses NetBeans as
Jay wrote:
Can you do the same in wxPython?
I am a greenhorn in wxPython, so please don't bet on what I state here,
but to my current knowledge wxPython doesn't come with a widget capable
of what Tkinter text box is capable of. But wxPython comes e.g. with a
widget displaying any HTML content,
Alex Martelli wrote:
Peter Maas [EMAIL PROTECTED] wrote:
Cliff Wells wrote:
On Wed, 2006-08-23 at 22:13 +0200, Peter Maas wrote:
Alex Martelli wrote:
[...]
I have already suggested to the BDFL that he can remedy this situation
in Py3k: all he has to do, of course, is to add a LOT more
[EMAIL PROTECTED] wrote:
Hy people, I'm new in python and comming from JAVA.
Something I really like in java is the easy way to add a library to the
project. Just put the jar file in the folder ( WEB-INF/lib ) and
doesn't need to restart the server ( tomcat ).
Can I do some like using
Hi,
many mistakes in programming arise when one changes the code and
forgets to adjustment somewhere where it is used. Is there a program
that can extract all place in the source code where a variable is
accessed or a function called?
For example in the simplest case I want to change the name of
[EMAIL PROTECTED] wrote:
Notes
They have not been extensively tested.
They don't work. At least the Pentium4 binary doesn't work,
same problem as before. Is the patch installed?
I found the problem. Updated binaries should be available in a couple
of hours. I'll add a note
On 2 Sep 2006 13:53:21 -0700, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hi,
Dear Anton,
Is there a program
that can extract all place in the source code where a variable is
accessed or a function called?
I've been dealing with these issues lately too. You might want to
check pypesrc
Hi,
The reason is that my application does about 16 connects and data
transfers per second, to the same 16 remote hosts. After approx 200 secs
there are 4000 sockets waiting to be garbage collected by the OS. At
this point is seems that connect loops and starts using the same local
addresses
Just for information I just read this BBC article about the free (as in
beer) SDK for XBOX 360 called XNA :
http://news.bbc.co.uk/2/hi/technology/5306276.stm
and saw here an example of someone using IronPython:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=682689SiteID=1
I hope
Lets say I want an integer class that lets you attach arbitrary
attributes. I can simply do:
class foo(int): pass
x = foo(5)
x.text = okay
print x, x.text # prints 5 okay
So, that's good. But, how can I change the value of x from 5 to
something else, without creating a new instance?
I
Peter Maas [EMAIL PROTECTED] wrote:
...
I must not be a monopoly. A center of gravity would be nice, too.
http://www.youtube.com/watch?v=hFGz-t5R0BE?
[it helps to know some Italian,
No problem: Centro di Gravità Permanente = permanent center of gravity :)
Yep, but the
Ken Schutte schrieb:
Lets say I want an integer class that lets you attach arbitrary
attributes. I can simply do:
class foo(int): pass
x = foo(5)
x.text = okay
print x, x.text # prints 5 okay
So, that's good. But, how can I change the value of x from 5 to
something else,
Sybren Stuvel wrote:
Check out Django, it has a great database API and on the fly
auto-generated admin.
Just gone over the tutorial, really amazing, exactly what I need.
Big thanks for the hint!
--
--arutz
--
http://mail.python.org/mailman/listinfo/python-list
tatamata wrote:
Hello.
I installed NetBeans, Jython and Coyote. I hoped that I could use Swing GUI
builder intergrated in NetBeans (Matisse?) with Jython in Delphi way. But,
it seems that I can drag and drop controls only in pure Java application,
not in Jython application?
Does anybody
Rick Zantow писал(а):
Ant [EMAIL PROTECTED] wrote in news:1157218244.750434.36220
@h48g2000cwc.googlegroups.com:
zefciu wrote:
Pontus Ekberg wrote:
...
$ python test.py
or
$ ./test.py (if test.py is executable)
Thats if you use un*x. If you word under windows, the first
Yu-Xi Lim wrote:
[EMAIL PROTECTED] wrote:
many mistakes in programming arise when one changes the code and
forgets to adjustment somewhere where it is used. Is there a program
that can extract all place in the source code where a variable is
accessed or a function called?
For example in the
[EMAIL PROTECTED] schrieb:
Hi,
many mistakes in programming arise when one changes the code and
forgets to adjustment somewhere where it is used. Is there a program
that can extract all place in the source code where a variable is
accessed or a function called?
For example in the simplest
Ken Schutte wrote:
So, that's good. But, how can I change the value of x from 5 to
something else, without creating a new instance?
I suppose I could create a function that creates a new foo and copies
its attributes, but is there a more direct way? Is the value 5 stored
in some special
[EMAIL PROTECTED] wrote:
Just for information I just read this BBC article about the free (as in
beer) SDK for XBOX 360 called XNA :
It's actually called the XNA Framework, and the beta only supports
Windows. The XBox 360 won't be supported until it's released.
and saw here an example of
That's my $0.02 on Python packaging and library dependencies. In my
opinion it's one of the few things that Java got right that Python
didn't.
Yeah, sure. Hunting down a subtle class loading bug because of e.g.
different xml-api versions in your classpath in just a few hours is a
thing java
lazaridis_com wrote:
I would like to fulfill the following task:
The construct:
if __name__ == '__main__':
should be changed to something like:
if identifier.name == '__main__':
The term identifier should be selected based on the meaning of the
__double-underscore-enclosure__ of the
I personally don't like wxPython because the way it works is very
counter intuitive for me and appear to me somehow non-Pythonic
While Claudio has a point (wxPython is a C++ library at heart), I
believe that wxPython is the best solution for Python GUI's out there.
TK may be a lot easier, but
IronPython won't work on the XBox 360.
Yup. Perhaps sometime in the future. A few weeks ago Albert Ho, MS
XNA program manager wrote the following on the MSDN XNA Game Studio
Express forum:
Because the Xbox 360 uses a special port of the .NET CF, the LCG
method-generation functionality isn't
mistral [EMAIL PROTECTED] wrote in news:1157239512.139823.15650
@74g2000cwt.googlegroups.com:
[...]
Assuming I have Windows XP, and I installed ActiveState Python. No any
other additional manipulations were done, no any PATHEXTes environment
variables, etc, etc, nothing. How many preparatory
filippo wrote:
Claudio Grondi ha scritto:
(megasnip)
I caught your point of view. I start reading a book on wxpython to
understand if it can help to solve my problems. At the same time I will
port my program to Python/Tk in order to have a faster first beta
release.
Thanks for your
mistral wrote:
I have installed ActivePython
http://www.activestate.com/Products/ActivePython/
How I can run Python file, test.py?
You can open up the folder containing the test.py file, then
double-click on the file to run it. A command-line window should pop
up, and your program will run in
Dear Python-list,
I need to read a Unicode (utf-8) file that contains text like:
blah \fR40\fC blah
I get my input and then process it with something like:
inputFile = codecs.open(sys.argv[1],'r', 'utf-8')
for line in inputFile:
When Python encounters the \f substring in an input line, it
David J Birnbaum wrote:
Dear Python-list,
I need to read a Unicode (utf-8) file that contains text like:
blah \fR40\fC blah
I get my input and then process it with something like:
inputFile = codecs.open(sys.argv[1],'r', 'utf-8')
for line in inputFile:
When Python encounters the \f
Bruno Desthuilliers [EMAIL PROTECTED] writes:
I've rarely encoutered silent data corruption with Python - FWIW, I
once had such a problem, but with a lower-level statically typed
language (integer overflow), and I was a very newbie programmer by that
time. Usually, one *very quickly* notices
Does anyone know of any python scripts that can help me automatically
navigate through some forms so I can schedule the download the file at the
end of all the questions?
--
http://mail.python.org/mailman/listinfo/python-list
Bugs item #1550938, was opened at 2006-09-02 12:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1550938group_id=5470
Please note that this message will contain a full copy of
Bugs item #1550938, was opened at 2006-09-02 12:05
Message generated for change (Settings changed) made by gangesmaster
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1550938group_id=5470
Please note that this message will contain a full copy of the
Bugs item #1551113, was opened at 2006-09-02 13:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1551113group_id=5470
Please note that this message will contain a full copy of
Bugs item #1551113, was opened at 2006-09-02 18:27
Message generated for change (Comment added) made by gbrandl
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1551113group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1550938, was opened at 2006-09-02 02:05
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1550938group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1551113, was opened at 2006-09-02 14:27
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1551113group_id=5470
Please note that this message will contain a full copy of the comment
Feature Requests item #1551113, was opened at 2006-09-02 13:27
Message generated for change (Comment added) made by rhettinger
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=355470aid=1551113group_id=5470
Please note that this message will contain a full copy of
Bugs item #1551238, was opened at 2006-09-02 17:38
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1551238group_id=5470
Please note that this message will contain a full copy of
87 matches
Mail list logo