Hi,
I have a class with various class-level variables which are used to
store global state information for all instances of a class. These are
set by a classmethod as in the following (in reality the setcvar method
is more complicated than this!):
class sup(object):
cvar1 = None
Hi,
I'd like to thank everyone who contributed, especially Richard Brown
from Dartware and Rick Thomas. I'm highly impressed that the smallest
user base of SPE collected the largest donation ever to SPE. Now it's
my turn to impress the SPE Mac users.
As such the light is green for SPE on the
[EMAIL PROTECTED] a écrit :
My solution is sqlstring. A single-purpose library: to create SQL
statement objects. These objects (such as sqlstring.Select), represent
complex SQL Statements, but as Python objects. The benefit is that you
can, at run-time, build the statement pythonically,
Realy Thanks, I will try this
Hagai
--
http://mail.python.org/mailman/listinfo/python-list
Stewart Midwinter a écrit :
I've made a comparison of the relative popularity of blogging tools
used by python programmers. I was surprised by the number of python
developers not using python for their blogs; isn't that like GM
employees driving Toyota cars?
See my post at:
Thank you for all the great information and links! I think I will do what a
lot of you reccomended and try both for myself, the only problem is finding
time with homework, college applications, and SATs coming up. I'll let you
know how it turns out. Again, thank you all for the help.
--
Peter T. Breuer [EMAIL PROTECTED] wrote:
No - they got the deal with IBM when they were a garage startup.
Not quite a garage startup. They had initial success in Albuquerque,
NM, writing a Basic interpreter for the MITS Altair machine. By the
time IBM came to them, they had moved to Seattle and
Hi,
There are 2 wxPython application, A and B and need to exchange msg.
Sending WM_CLOSE, wxEVT_MOUSEWHEEL to B is OK, and sending user message
like 1225 from A to B is also OK.
But B didn't catch this message, note, B is running before A sends msg
and can receive WM_CLOSE.
Do I have to make
Thomas Bellman wrote:
try:
os.makedirs(/tmp/trh/spam/norwegian/blue/parrot/cheese)
except os.error, e:
if e.errno != errno.EEXIST:
raise
This is what i want. Thanks.
(the doc needs quite some improvement...)
Xah
[EMAIL PROTECTED]
∑ http://xahlee.org/
--
Hey,
For a bit, I've been trying to create a first person view in Python,
currently using the Soya engine. And while I can make the camera, and
where I want it, how do I link it to controls? So that I can use WASD,
etc. to move the camera?
--
http://mail.python.org/mailman/listinfo/python-list
Casey Hawthorne [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
What languages do you know already?
What computer science concepts do you know?
What computer programming concepts do you know?
Have you heard of Scheme?
Ruby is a bit Perl like -- so if you like Perl, chances
I'm having trouble with something that seems like it should be simple.
I need to copy a file, say abc-1.tif to another directory, but if it's
in there already, I need to transfer it named abc-2.tif but I'm going
about it all wrong.
Here's what doesn't work: (I'll add the copy stuff from shutil
On Thursday 20 October 2005 22:43, Bell, Kevin wrote:
I need to copy a file, say abc-1.tif to another directory, but if it's
in there already, I need to transfer it named abc-2.tif but I'm going
about it all wrong.
What a coincidence... I stepped about this today:
Well, Python, Zope Plone hosting are quite popular. However python
based blog software isn't as sexy as let's say blogger.
For SPE I first used a combination of PyDSpycs.net. It is free for
everyone, but unfortunately not stable enough to my standards.
Luckily I got sponsored by zettai.net, who
I can't seem to get that to work either.
child =
pexpect.spawn('/bin/sh',args=['-c','/usr/bin/ssh','-t','-o','StrictHostKeyChecking
no',host,command,'|','awk','{print %s:$0}'%host], timeout=30)
Complains its getting the wrong arguments to ssh.
Eli
--
Working with several thousand tagged items on a Tkinter Canvas, I want
to change different configurations of objects having a certain group of
tags.
I've used the sets module, on the tuple returned by Tkinter.Canvas.
find_withtag() method.
Since this method takes only one tag at time, I use it
On comp.os.linux.misc, in [EMAIL PROTECTED], Tim Slattery wrote:
body not downloaded
Three OS's from corporate kings in their towers of glass,
Seven from valley lords where orchards used to grow,
Nine from dotcoms doomed to die,
One from the Dark Lord Gates on his dark throne
In the Land of
Ouppsss!
the title should have read:Set operation for tuples...
(sigh!)
--
http://mail.python.org/mailman/listinfo/python-list
Is it just me or do the server_close() methods do squat? I'm primarily
working with a ThreadingTCPServer object and trying to create a simple
server that can shut itself down. But even simplest cases don't seem
to work.
Admittedly I am trying it from within my handler class, but for some
odd
Andrew Jaffe wrote:
Hi,
I have a class with various class-level variables which are used to
store global state information for all instances of a class. These are
set by a classmethod as in the following (in reality the setcvar method
is more complicated than this!):
class
On Thu, 20 Oct 2005, [EMAIL PROTECTED] wrote:
On this line of thought, what about the += operator? That might be more
intuative than //. I could even use -= for not in.
You're going to have to explain to me how using an assignment operator for
something other than assignment is intuitive!
On Thu, 20 Oct 2005, Pierre Quentel wrote:
[EMAIL PROTECTED] a écrit :
My solution is sqlstring. A single-purpose library: to create SQL
statement objects.
With the same starting point - I don't like writing SQL strings inside Python
code either - I have tested a different approach : use
On Thu, 20 Oct 2005, Diez B. Roggisch wrote:
So - _I_ think the better user-experience comes froma well-working easy
to use REPL to quickly give the scripts a try.
I'd agree with that. Which is better, a difficult language with lots of
fancy tools to help you write it, or an easy language?
Hi All -
I am working on a project that requires Python be installed on multiple
Windows servers. I was wondering if anyone knew of a
method/utility/script that can push the installation of Python to
multiple networked servers from a centralized location.
Thanks in advance!
-shawn
What's the easiest and quickest way to execute a compiled C command
line interface program THROUGH Python?
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Working with several thousand tagged items on a Tkinter Canvas, I want
to change different configurations of objects having a certain group of
tags.
I've used the sets module, on the tuple returned by Tkinter.Canvas.
find_withtag() method.
Since this method takes
Ernesto wrote:
What's the easiest and quickest way to execute a compiled C command
line interface program THROUGH Python?
I don't know what you mean by THROUGH. But the subprocess, popen2 and
os-modules deal with calling other programs. Try them in that order.
Diez
--
You might also consider Firedrop2, (see
http://www.voidspace.org.uk/python/weblog/arch_d7_2005_10_15.shtml#e119
) , a client side blog creation and content management system created
by Hans Nowak and now being enhnaced and maintained by Michael Foord.
Its very pythonic and extensable.
Ron
Steven D'Aprano [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
On Thu, 20 Oct 2005 13:17:14 +, axel wrote:
Employees have *no* obligations towards the shareholders of a company.
They are not employed or paid by the shareholders, they are employed
by the company itself which
I found this book at my local Border's this week. It appears to be a
most excellent book. I own and have read Magnus' earlier book Pactical
Python (which was excellent) but this one is even better. The first
half of the book covers the language, and then the second half goes
into depth developing
Tamas Nepusz wrote:
Hi everyone,
I have tried to do some googling before asking my question here, but I
haven't found any suitable answer. I am developing a Python API for a
graph library written in pure C. The library is doing an awful lot of
math computations, and some of them can take a
On Thu, 20 Oct 2005, Amol Vaidya wrote:
Casey Hawthorne [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
What languages do you know already? What computer science concepts do
you know? What computer programming concepts do you know? Have you
heard of Scheme?
Good questions!
No, that's actually a bit more complicated. The library I'm working on
is designed for performing calculations on large-scale graphs (~1
nodes and edges). I want to create a Python interface for that library,
so what I want to accomplish is that I could just type from igraph
import * in a
Hi,
(I am _very_ new to web programming)
I am writing a client module (browser plugin) and server module (Python CGI)
that need to exchange information.
I want the transaction to be intiated when the client accesses the link.
I need data to go back and forth between the client and the server
Dear Stani,
It is good to hear that the donation was a success. And you deserve it,
your contribution to the Python community is an example fot others and
I am convinced that every donation, be it large or small, is well spent!
A lot of us use SPE, don't we?
greetz,
DimitriOn 20 Oct 2005 12:38:04
So, it turns out that reload() fails if the module being reloaded isn't
in sys.path.
Maybe it could fall back to module.__file__ if the module isn't found
in sys.path??
... or reload could just take an optional path parameter...
Or perhaps I'm the only one who thinks this is silly:
my_module =
Tom Anderson wrote:
On Thu, 20 Oct 2005, [EMAIL PROTECTED] wrote:
On this line of thought, what about the += operator? That might be more
intuative than //. I could even use -= for not in.
You're going to have to explain to me how using an assignment operator for
something other than
person ** (
(person.type_id == 'customer')
(person.id %= phone(phone.person_id)))
)
Nevermind. This doesn't work because all of the X= operators in
question are assignment operators, and therefore generate a Syntax
Error if in a nested expression. I think I've settled on just doing a
Lonnie Princehouse wrote:
So, it turns out that reload() fails if the module being reloaded isn't
in sys.path.
Maybe it could fall back to module.__file__ if the module isn't found
in sys.path??
... or reload could just take an optional path parameter...
Or perhaps I'm the only one who
I don't think you really need to give to much time in weighting between
python or Ruby. Both are fine. But Python has the obvious advantage
that it has much more modules than Ruby so many things you don't need
to implement if you have real work to do.
I recommend you give haskell a shot if you
I think you're mistaken about how 'sh -c' works. The next argument after -c
is
the script, and following arguments are the positional arguments. (what, you've
never used -c in conjunction with positional arguments? me either!)
Example:
On Wed, Oct 19, 2005 at 09:26:16AM -0700, Dr. Who wrote:
The fact that the directory already exists is irrelevant to the function...it
still failed to create the directory.
That's not true. Imagine that os.makedirs() is used inside tempfile.mkdtemp()
(I looked, and it isn't) and the proposed
I'm trying to create a dbm database with around 4.5 million entries but the
existing dbm modules
(dbhash, gdbm) don't seem to cut it. What happens is that the more entries are
added, the more time
per new entry is required, so the complexity seems to be much worse than
linear. Is this to be
Mike Schilling [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
An employee who refuses to act as directed, claiming that he's thinking of
the shareholders' interests, can be fired for cause. His only recourse
would be to become a shareholder (not hard), and then get the
I have a class that is a windows in a GUI
the following is the code:
class optWin:
def __init__(self):
return None
def __call__(self):
self.root = tk()
self.root.title(My title)
self.root.mainloop()
return None
1)Why doesn't this work when I go
[EMAIL PROTECTED] [EMAIL PROTECTED] writes:
I am not sure your intention but I think there isn't a one language
fits all situation here.
Very true.
C/C++ - for linux kernel hacking etc., many library out there still use
it
python - generic stuff
SQL - nothing beats it for many business
import subprocess
subprocess.call(cmd)
--
http://mail.python.org/mailman/listinfo/python-list
optWin() will create a callable object which is an instance of the class
optWin. Calling this callable object will call the __call__() method with the
behavior you anticipate. You also need to import Tk from Tkinter and call Tk
Tk and not tk.
Meditate on the following :
from Tkinter import *
Forgot to answer the better part:
class optFrame(Frame):
def __init__(self, *args, **kwargs):
Frame.__init__(self, *args, **kwargs)
self.pack()
self.make_widgets()
def make_widgets(self):
Put widgets here.
pass
def main():
tk = Tk()
optWin =
Hello!
given the definition
def f(a,b): return a+b
With this code:
fs = [ lambda x: f(x,o) for o in [0,1,2]]
or this
fs = []
for o in [0,1,2]:
fs.append( lambda x: f(x,o) )
I'd expect that fs contains partial evaluated functions, i.e.
fs[0](0) == 0
fs[1](0) == 1
fs[2](0) == 2
But this
Juan Pablo Romero wrote:
Hello!
given the definition
def f(a,b): return a+b
With this code:
fs = [ lambda x: f(x,o) for o in [0,1,2]]
or this
fs = []
for o in [0,1,2]:
fs.append( lambda x: f(x,o) )
I'd expect that fs contains partial evaluated functions, i.e.
You are asking it to return a list of lambda, not its evaluated value.
map(lambda x: f(x,0), [0,1,2]) works.
[ f(o) for o in [0,1,2] ] works too.
Juan Pablo Romero wrote:
Hello!
given the definition
def f(a,b): return a+b
With this code:
fs = [ lambda x: f(x,o) for o in [0,1,2]]
or
Robert Kern [EMAIL PROTECTED] writes:
Juan Pablo Romero wrote:
Hello!
given the definition
def f(a,b): return a+b
With this code:
fs = [ lambda x: f(x,o) for o in [0,1,2]]
or this
fs = []
for o in [0,1,2]:
fs.append( lambda x: f(x,o) )
I'd expect that fs contains
thank you very much,
I have one more question that is tk related, I've use tkfileopendialog
or whatever that name is to select files is there also a dialog for
creating files, well not really creating them but allowing the same
look and feel as many porgrams give for saving files? is there also
Quoth Tamas Nepusz [EMAIL PROTECTED]:
| No, that's actually a bit more complicated. The library I'm working on
| is designed for performing calculations on large-scale graphs (~1
| nodes and edges). I want to create a Python interface for that library,
| so what I want to accomplish is that I
I needed to set Entity Parsing, such as
parser.SetParamEntityParsing( expat.XML_PARAM_ENTITY_PARSING_ALWAYS )
--
http://mail.python.org/mailman/listinfo/python-list
Peter T. Breuer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
In comp.os.linux.misc David Schwartz [EMAIL PROTECTED] wrote:
I guess I wasn't explicit enough. Most people who want cars also want
an
engine. Some don't. Dealers could sell cars and engines separately. They
Do we have something like abstract methods Abstract class.
So that my class would just define the method. And the implementation
would be defined by somebody else.
This message contains information that may be privileged or confidential and is
the property of the Capgemini Group. It is
Joe [EMAIL PROTECTED] wrote:
I'm trying to extract part of html code from a tag to a tag
For tag soup, use BeautifulSoup:
URL:http://www.crummy.com/software/BeautifulSoup/
Available as a package in Debian, probably other decent OSen also.
--
\ I think it would be a good idea.
On Thu, Oct 20, 2005 at 12:05:05PM +0530, Iyer, Prasad C wrote:
Do we have something like abstract methods Abstract class.
So that my class would just define the method. And the implementation
would be defined by somebody else.
class AbstractBase:
def method(self):
raise
In comp.os.linux.misc David Schwartz [EMAIL PROTECTED] wrote:
Peter T. Breuer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
There would be if an engine manufacturer refused to provide car
manufacturers with ANY engines for any model, unless all buyers were
charged for THEIR engine
[EMAIL PROTECTED] wrote:
These objects (such as sqlstring.Select), represent
complex SQL Statements, but as Python objects. The benefit is that you
can, at run-time, build the statement pythonically, without
getting bogged down in String Manipulation. The theory is that once in
use, things
Andreas Kostyrka wrote:
Do we have something like abstract methods Abstract class.
So that my class would just define the method. And the implementation
would be defined by somebody else.
class AbstractBase:
def method(self):
raise TypeError(abstract method called)
But
Jason Stitt wrote:
On Oct 19, 2005, at 9:18 PM, [EMAIL PROTECTED] wrote:
snip
My solution is sqlstring. A single-purpose library: to create SQL
statement objects. These objects (such as sqlstring.Select), represent
complex SQL Statements, but as Python objects.
snip
First of all, I
I was wondering how people would feel if the cmp function and
the __cmp__ method would be a bit more generalised.
The problem now is that the cmp protocol has no way to
indicate two objects are incomparable, they are not
equal but neither is one less or greater than the other.
So I thought that
Tuvas wrote:
Well, the point of declaring it as a char was to have it as an 8 bit
integer, as is requested later on in the program.
since ParseTuple writes an integer to the address you pass in,
that's likely to overwrite some random stuff on the stack. like-
wise, passing in a character
Mike Meyer wrote:
David Veerasingam [EMAIL PROTECTED] writes:
[...]
Of course, being the founder of SPARE, I have to point out that
a.split(': ') will get you the same two strings as the re I used
above.
Let me guess: the Society for the Prevention of Abuse of Regular
Expressions?
regards
Antoon Pardon wrote:
The problem now is that the cmp protocol has no way to
indicate two objects are incomparable, they are not
equal but neither is one less or greater than the other.
If that is the case then you implement __eq__ and __ne__ to return
True/False and make cmp throw an
On 14 Oct 2005 19:01:42 -0700, Xah Lee [EMAIL PROTECTED] wrote:
Xah Lee, I went through some of your web site, because of time
couldn't examine (but a few) code guides. Read all you philosophy
pages though, even about languages I didn't know. I took a
course in my Mechanical Engineering study
Hello
python programmers! I would like to add myself to the ever increasing
number of python users. Here's my first question. I've written two SOAP
clients using PERL and a PHP. I tried to wirte a new SOAP client using
python but I'm having problems. First, I can't seem to find a good
Isn't
class AbstractBase:
def method(self):
raise NotImplementedError( abstract method called )
the right thing to do?
Gerald
- Original Message -
From: Andreas Kostyrka [EMAIL PROTECTED]
To: Iyer, Prasad C [EMAIL PROTECTED]
Cc: python-list@python.org
Sent: Thursday,
Friend,
Check out http://ChezBrandon.com As are you, Brandon is highly
intelligent, knowledgeable, and good. May you have an awesome day.
A Succinct Warning: Elements of Mossad, sated with cash from the
murderous and destructive narcotics trade - for example, according to
Reader's Digest, cocaine
Bryan wrote:
Amol Vaidya wrote:
Hi. I am interested in learning a new programming language, and have
been debating whether to learn Ruby or Python.
(snip)
why don't you do what i did? download ruby and spend a day or two
reading programming ruby from www.ruby-lang.org/en. the download
Doesn't work for classes because self has no global reference.
--
http://mail.python.org/mailman/listinfo/python-list
Amol Vaidya wrote:
Hi. I am interested in learning a new programming language, and have been
debating whether to learn Ruby or Python. How do these compare and contrast
with one another, and what advantages does one language provide over the
other? I would like to consider as many opinions
Just use
os.system(export PYTHONPATH = %s %(your_pythonpath))
--
http://mail.python.org/mailman/listinfo/python-list
If you use a newstyle class, e.g. class A(object), then you can get the
superclass with cls.__base__. You could also use super(cls,cls),
although note that it returns a super object that isn't exactly the
same thing as a class -- but good enough for just accessing attributes.
Make sure to check
Robin Becker wrote:
I thought that methods were always overridable.
In this case the lookup on the
class changes the behaviour of the one and only property.
How can something be made overridable that is actually overridable? I
didn't know how to better express the broken polymorphism of
Op 2005-10-20, Duncan Booth schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
The problem now is that the cmp protocol has no way to
indicate two objects are incomparable, they are not
equal but neither is one less or greater than the other.
If that is the case then you implement __eq__ and
Antoon Pardon wrote:
Op 2005-10-20, Duncan Booth schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
The problem now is that the cmp protocol has no way to
indicate two objects are incomparable, they are not
equal but neither is one less or greater than the other.
If that is the case then you
Antoon Pardon wrote:
Op 2005-10-20, Duncan Booth schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
The problem now is that the cmp protocol has no way to
indicate two objects are incomparable, they are not
equal but neither is one less or greater than the other.
If that is the case then you
Depends on your experience. If you know C,C++,Java and the whole
C-syntax-bunch. I'd recommend Python just to learn to adapt a different
syntax. If you want to learn for the learnings sake, i'd also recommend
Haskell to try functional programming, if you do not already know it.
Ruby has some
Hi everybody,
Thanks for the time taken to answer my question. Unfortunatly, it seems
that there's a little confusion about what I want to do.
In fact, I don't want to search for a particular path between
computers. What I really want is to detect sequences of connection that
are repeated along
Hello Dear friend...
Here http://s14.invisionfree.com/SaVaTaGe4eVeR/
you can find all what you are looking for in all the internet to
download it like ...
Applications
Movies
PC Games
Animes
Musics
Mobile
e-books
and many many more
So please come and see what we can offer for you at
thanks, it works. Though I don't quite understand what super(cls,cls)
returns, and it doesn't work if I do a super(cls,cls).foo(). But
cls.__base__.foo() do the trick.
thankfully, I don't have multiple inheritance.
Jason Lai wrote:
If you use a newstyle class, e.g. class A(object), then you
On 14 Oct 2005 19:01:42 -0700, Xah Lee [EMAIL PROTECTED] wrote:
I think this guy should run for President. Anybody says M$oft
is trying to screw the little guy is alright in my book.
Microsoft Hatred, FAQ
Xah Lee, 20020518
Question: U.S. Judges are not morons, and quite a few others are
not
Op 2005-10-20, Mikael Olofsson schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
Op 2005-10-20, Duncan Booth schreef [EMAIL PROTECTED]:
Antoon Pardon wrote:
The problem now is that the cmp protocol has no way to
indicate two objects are incomparable, they are not
equal but neither is one less
Peter T. Breuer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Not if they abuse a monopoly position in doing so, which is where we
started.
In other words, what they did was wrong because it was them who did it.
It is fine if anyone else does, just not fine if Microsoft does
Bugs item #1332780, was opened at 2005-10-20 04:03
Message generated for change (Comment added) made by birkenfeld
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1332780group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1332869, was opened at 2005-10-20 18:22
Message generated for change (Comment added) made by ajmitch
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1332869group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1332869, was opened at 2005-10-20 18:22
Message generated for change (Comment added) made by ajmitch
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1332869group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1330039, was opened at 2005-10-18 22:27
Message generated for change (Comment added) made by mpitt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1330039group_id=5470
Please note that this message will contain a full copy of the comment thread,
Bugs item #1330039, was opened at 2005-10-18 22:27
Message generated for change (Comment added) made by mpitt
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1330039group_id=5470
Please note that this message will contain a full copy of the comment thread,
Bugs item #894599, was opened at 2004-02-10 19:17
Message generated for change (Comment added) made by kjohnson
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=894599group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1330039, was opened at 2005-10-18 13:27
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1330039group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1332869, was opened at 2005-10-19 22:22
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1332869group_id=5470
Please note that this message will contain a full copy of the comment
101 - 196 of 196 matches
Mail list logo