bruce wrote:
in playing around with the test python app (see below) i've got a couple of
basic questions. i can't seem to find the answers via google, and when i've
looked in the libxml2dom stuff that i downloaded i didn't see answers
either...
for the list in the for label in d.xpath how
[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
This has been bothering me for a while. Just want to find out if it
just me or perhaps others have thought of this too: Why shouldn't the
keyset of a dictionary be represented as a set instead of a list?
I think this is an interesting
I ran the following program to retrieve entries from the windows
registry on Windows XP:
import win32api, win32con
aReg = win32api.RegConnectRegistry(None,
win32con.HKEY_CURRENT_USER)
aKey = win32api.RegOpenKeyEx(aReg,
rSoftware\Microsoft\Internet Explorer\PageSetup)
for i in range(100):
On 2/07/2006 3:48 PM, Lawrence D'Oliveiro wrote:
In article [EMAIL PROTECTED],
John Machin [EMAIL PROTECTED] wrote:
-u unbuffers sys.stdout
and sys.stderr (and makes them binary, which wouldn't be a good idea on
a Windows box).
Why not?
If binary, '\n' would appear as LF alone rather
[EMAIL PROTECTED] wrote:
This has been bothering me for a while. Just want to find out if it
just me or perhaps others have thought of this too: Why shouldn't the
keyset of a dictionary be represented as a set instead of a list?
I think the order of the items returned by keys() and values()
Ravi Teja wrote:
Of course, lxml should be able to do this kind of thing as well. I'd be
interested to know why this is not a good idea, though.
No reason that you don't know already.
http://www.boddie.org.uk/python/HTML.html
If the document text is well-formed XML, we could omit the
I wasn't sure how to get my request to the appropriate person so I am
posting it here!
When I log in to this site, I normally want to go to the Python forum.
I can get there via a series of mouse clicks. I would prefer to have
the option of specifying in my Preferences where I want to be
THANK YOU!
Now I can actually worry about the advantages/disadvantages!
--
http://mail.python.org/mailman/listinfo/python-list
JohnJohnUSA wrote:
I wasn't sure how to get my request to the appropriate person so I am
posting it here!
When I log in to this site
what site ?
I normally want to go to the Python forum.
what forum ? this is the comp.lang.python newsgroup, which is also
available as a mailing list
The site that I am referring to is the one that I used to post my
request located at:
http://www.nixforum.org/
--
http://mail.python.org/mailman/listinfo/python-list
JohnJohnUSA wrote:
The site that I am referring to is the one that I used to post my
request located at:
http://www.nixforum.org/
who cares ? they're not hosting this newsgroup; they're just stealing
the content, making it look like it's their programming python forum
so they can plaster
Thanks Alex and Scott for your lead. It would've taken me forever
trying to figure it out by myself :)
I am affraid I didn't specify initially one thing and that led to a
confusion: there is no need to pick an instance from the weakref
dictionary, just return None if there are already 5
Hello,
I would like to learn web scripting with Python (sure, everyone uses
PHP, but I don't like the syntax and Python is more general-purpose
and... well, I guess you people know the advantages better than me).
Where can I get a thorough introduction to both CGI and using Python
for CGI? That
Hello,
I would like to learn web scripting with Python (sure, everyone uses
PHP, but I don't like the syntax and Python is more general-purpose
and... well, I guess you people know the advantages better than me).
Where can I get a thorough introduction to both CGI and using Python
for CGI? That
Vlad Dogaru wrote:
Hello,
I would like to learn web scripting with Python (sure, everyone uses
PHP, but I don't like the syntax and Python is more general-purpose
and... well, I guess you people know the advantages better than me).
Where can I get a thorough introduction to both CGI and
Paddy:
Mind you, Never rely on that implied ordering. Always use items().
Using dict.items() is probably better, but the manual says:
If items(), keys(), values(), iteritems(), iterkeys(), and itervalues() are
called with no intervening modifications to the dictionary, the lists will
directly
In article [EMAIL PROTECTED],
valpa [EMAIL PROTECTED] wrote:
I'm a net admin for about 20 unix servers, and I need to frequently
telnet on to them and configure them.
It is a tiring job to open a xterm and telnet, username, password to
each server.
Don't use telnet. it's clumsy and has security
Sybren Stuvel wrote:
Why use CGI when you can use a framework that's so much easier and
more powerful?
Lots of possible answers, a few:
* Fun
* Transferable skills
* No single solution is ever the answer to all problems
(not all problems are nails, not all solutions are hammers)
I followed the recent anouncement of version 0.9 of PyPi and found out
that there was work included on adding constraint satisfaction solvers
to PyPy:
http://codespeak.net/pypy/dist/pypy/doc/howto-logicobjspace-0.9.html
I was wondering if this was a possibiity for mainstream python, and
wether
Carl Banks wrote:
Maybe look to see how tail-recursive optimization in languages such as
Scheme work, and whether it can be generalized.
Thanks for the feedback - I should've remembered tail recursion.
I doubt this would be possible without a major change in how functions
work in Python.
Jim Segrave wrote:
In article [EMAIL PROTECTED],
valpa [EMAIL PROTECTED] wrote:
I'm a net admin for about 20 unix servers, and I need to frequently
telnet on to them and configure them.
It is a tiring job to open a xterm and telnet, username, password to
each server.
Don't use telnet.
try pexpect.
http://pexpect.sourceforge.net/
valpa wrote:
I'm a net admin for about 20 unix servers, and I need to frequently
telnet on to them and configure them.
It is a tiring job to open a xterm and telnet, username, password to
each server.
Can I do it automatically by python? After
try pexpect.
http://pexpect.sourceforge.net/
valpa wrote:
I'm a net admin for about 20 unix servers, and I need to frequently
telnet on to them and configure them.
It is a tiring job to open a xterm and telnet, username, password to
each server.
Can I do it automatically by python? After
In article [EMAIL PROTECTED],
bruce [EMAIL PROTECTED] wrote:
is there someone in the Bay Area who knows python, that I can talk to ... I
have the shell of a real basic app, and I'd like someone who can walk me
through how to set it up.
While I agree with all the other advice you've been given,
Michael wrote:
def set_name():
name = raw_input(Enter your name! )
cexe greet()
def greet():
print hello, name
cexe set_name()
print We don't reach here
--
This would execute, ask for the user's name, say
Just FYI - pexpect is a Python app that works like Expect - which is by
Don Libes and written in TCL. Expect comes with most Linux
distributions and is available for most UNIX / Linux versions from its
web site http://expect.nist.gov/
The expect man page is enough to get started for simple
Matthias Blume wrote:
Tin Gherdanarra [EMAIL PROTECTED] writes:
Oliver Bandel wrote:
こんいちわ Xah-Lee san ;-)
Uhm, I'd guess that Xah is Chinese. Be careful
with such things in real life; Koreans might
beat you up for this. Stay alive!
And the Japanese might beat him up, too. For
Vlad Dogaru [EMAIL PROTECTED] wrote:
Hello,
I would like to learn web scripting with Python (sure, everyone uses
PHP, but I don't like the syntax and Python is more general-purpose
and... well, I guess you people know the advantages better than me).
Where can I get a thorough introduction
Nick Vatamaniuc wrote:
Robert Kern wrote:
[EMAIL PROTECTED] wrote:
The same thing goes for the values(). Here most people will argue that
...
This part is pretty much a non-starter. Not all Python objects are hashable.
...
Also, I may need keys to map to different objects that happen
madpython [EMAIL PROTECTED] wrote:
Thanks Alex and Scott for your lead. It would've taken me forever
trying to figure it out by myself :)
I am affraid I didn't specify initially one thing and that led to a
confusion: there is no need to pick an instance from the weakref
dictionary, just
If anyone has a way to contact thesamet, please tell him to check his
private messages at the Python Challenge website; I have a couple of
ideas for more challenges.
Cheers all.
--
http://mail.python.org/mailman/listinfo/python-list
Paddy wrote:
I followed the recent anouncement of version 0.9 of PyPi and found out
that there was work included on adding constraint satisfaction solvers
to PyPy:
http://codespeak.net/pypy/dist/pypy/doc/howto-logicobjspace-0.9.html
I was wondering if this was a possibiity for mainstream
valpa wrote:
I'm a net admin for about 20 unix servers, and I need to frequently
telnet on to them and configure them.
It is a tiring job to open a xterm and telnet, username, password to
each server.
Can I do it automatically by python? After that, there have 20 xterm
consoles opened and
Thanks, Alex, again. The lesson has been taught. I appreciate very much
you spent time trying to help. Indeed the culprit of that infrequent
infinite loops was that bound reference item in the printing
loop. But frankly i thought that it only existed inside that loop.
Apparently I was wrong and
gavino wrote:
This seems easy but I have been asking tcl and python IRC chat all day
and no one gave an answer.
I have 100 servers which need a new backup server added to a text file,
and then the backup agent restarted.
If I have a list of the servers, all with same root password, and the
The meaning of dict.keys, etc, will not change for the 2.x series. For
3.0, I believe that Guido already intends that .keys() no longer return a
separate list. For one thing, a major, if not the main use, of the method
is for iteration, as in 'for keys in d.keys():'. For this, creating and
Today I bumped by chance into explaining what algorithms do by using
animation (Java applets):
http://www-sr.informatik.uni-tuebingen.de/~buehler/BM/BM1.html
Is there any tool in Python (except pyGame, Tkinter or other general
purpose visualization tools) I am not aware of which would make
g This seems easy but I have been asking tcl and python IRC chat all day
g and no one gave an answer.
g I have 100 servers which need a new backup server added to a text file,
g and then the backup agent restarted.
g If I have a list of the servers, all with same root password, and the
g
madpython [EMAIL PROTECTED] wrote:
Thanks, Alex, again. The lesson has been taught. I appreciate very much
you spent time trying to help. Indeed the culprit of that infrequent
infinite loops was that bound reference item in the printing
loop. But frankly i thought that it only existed inside
I used this _EXACT_ solution(copied below) at work a month ago, to
start 20ish programs, each with different settings. In this case I HAD
to use telnet for some of them, because they were on an embedded
machine, 4 of them used SSH(across the internet), and the rest were
local programs. It worked
hi
is there anyone with XPath expertise here? i'm trying to figure out if
there's a way to use regex expressions with an xpath query? i've seen
references to the ability to use regex and xpath/xml, but i'm not sure how
to do it...
i have a situation where i have something like:
bruce wrote:
hi
is there anyone with XPath expertise here? i'm trying to figure out if
there's a way to use regex expressions with an xpath query? i've seen
references to the ability to use regex and xpath/xml, but i'm not sure how
to do it...
i have a situation where i have something
In comp.unix.solaris [EMAIL PROTECTED] wrote:
Computer Industry Workers May Face Cancer Risks
http://www.studyandjobs.com/Comp_worker_cancer.html
or visit
http://www.studyandjobs.com/Cancer.html
Regards
worthless add banner site
--
http://mail.python.org/mailman/listinfo/python-list
simon..
you may not.. but lot's of people use python and xpath for html/xml
functionality.. check google python xpath...
later..
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf
Of Simon Forman
Sent: Sunday, July 02, 2006 2:10 PM
To: python-list@python.org
Where should a py newbie start to do some 2D graphs on screen ?
PythonGraphApi,
Gato, looks interesting
pygraphlib,
matplotlib,
is there a best native Python place to start ?
--
http://mail.python.org/mailman/listinfo/python-list
Ove Pettersen [EMAIL PROTECTED] wrote:
for server in server1 server2 server3 server100; do
Two comments:
1. Leave out the quotes(!)
2. Either iterate as
for server in $(seq -fserver%g 100); do
or, probably better
for server in $(cat server-list); do
--
I remember Gato:
http://gato.sourceforge.net/
It animates only algorithms on graphs, but it seems a starting point,
and it works.
I vaguely remember another system, but probably not very good.
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Adam wrote:
Where should a py newbie start to do some 2D graphs on screen ?
PythonGraphApi,
Gato, looks interesting
pygraphlib,
matplotlib,
is there a best native Python place to start ?
Check VPython (maybe least learning effort to first usable graphs).
Also look at
Oliver Bandel [EMAIL PROTECTED] writes:
Oliver Bandel wrote:
こんいちわ Xah-Lee san ;-)
Uhm, I'd guess that Xah is Chinese. Be careful
with such things in real life; Koreans might
beat you up for this. Stay alive!
And the Japanese might beat him up, too. For butchering their
language. :-)
OK,
Ziga Seilnacht wrote:
Paddy wrote:
I followed the recent anouncement of version 0.9 of PyPi and found out
that there was work included on adding constraint satisfaction solvers
to PyPy:
http://codespeak.net/pypy/dist/pypy/doc/howto-logicobjspace-0.9.html
I was wondering if this was
flupke wrote:
- The rename fails for some reason.
I would dig a little deeper to find out what the reason is. After all,
on the face of it, there's no obvious reason it should fail. The
permission denied indicates perhaps that some other process or thread
is keeping that file open?
I've
[EMAIL PROTECTED] wrote:
This has been bothering me for a while. Just want to find out if it
just me or perhaps others have thought of this too: Why shouldn't the
keyset of a dictionary be represented as a set instead of a list?
There has been much discussion of this on the Python-3000
[EMAIL PROTECTED] wrote:
I remember Gato:
http://gato.sourceforge.net/
It animates only algorithms on graphs, but it seems a starting point,
and it works.
I vaguely remember another system, but probably not very good.
Bye,
bearophile
Yes, I have noticed Gato already before, but was
[EMAIL PROTECTED]:
In python , how to implement interface like the above?
Interfaces are lacking in Python, but an even more generic proposal is on
its way:
http://www.artima.com/weblogs/viewpost.jsp?thread=155123
In the mean time, interfaces have already been implemented in Zope 3:
Bruno Desthuilliers:
Java interfaces are a workaround
Troll alert.
--
http://mail.python.org/mailman/listinfo/python-list
hi..
the docs state that the following is valid...
def foo():
i = 2
print i = i
print hello
foo()
is there a way for me to do this..
print hello
foo()
def foo():
i = 2
print i = i
ie, to use 'foo' prior to the declaration of 'foo'
thanks
-bruce
--
My application makes several connections to
a remote database server via tcp/ip.
Usually all is fine,but occasionally the server is
down or the internet does not work and then there is
the 30 sec to several minutes timeout wait for the
tcp to give up.
Is there anything I can do without using
bruce [EMAIL PROTECTED] wrote:
hi..
the docs state that the following is valid...
def foo():
i = 2
print i = i
print hello
foo()
is there a way for me to do this..
print hello
foo()
def foo():
i = 2
print i = i
ie, to use 'foo' prior to the declaration of 'foo'
DarkBlue [EMAIL PROTECTED] wrote:
My application makes several connections to
a remote database server via tcp/ip.
Usually all is fine,but occasionally the server is
down or the internet does not work and then there is
the 30 sec to several minutes timeout wait for the
tcp to give up.
Is
bruce wrote:
simon..
you may not.. but lot's of people use python and xpath for html/xml
functionality.. check google python xpath...
later..
...
i have a situation where i have something like:
/html/table//[EMAIL PROTECTED]'foo']
is it possible to do soomething like [EMAIL
bruce wrote:
is there anyone with XPath expertise here? i'm trying to figure out if
there's a way to use regex expressions with an xpath query? i've seen
references to the ability to use regex and xpath/xml, but i'm not sure how
to do it...
i have a situation where i have something like:
bruce wrote:
hi paddy...
that's exactly what i'm trying to accomplish... i've used tidy, but it seems
to still generate warnings...
initFile - tidy -cleanFile - perl app (using xpath/livxml)
the xpath/linxml functions in the perl app complain regarding the file. my
thought is that tidy
AdSR wrote:
Hi,
I'm having a problem with the Amara toolkit. Try this:
from amara import binderytools
raw = 'pq:test xmlns=http://example.com/namespace;
xmlns:pq=http://pq.com/ns2/'
rwd = binderytools.bind_string(raw)
print rwd.xml()
?xml version=1.0 encoding=UTF-8?
pq:test
Let's say I have a function that takes a callback function as a
parameter, and uses it to describe an iteration:
def func(callback):
for i in [1, 2, 3, 4, 5]:
callback(i)
For the sake of argument, assume the iteration is something more
interesting than this which relies on the
hi...
perl has the concept of die. does python have anything similar. how can a
python app be stopped?
the docs refer to a sys.stop.. but i can't find anything else... am i
missing something...
thanks
-bruce
--
http://mail.python.org/mailman/listinfo/python-list
[bruce]
perl has the concept of die. does python have anything similar. how can a
python app be stopped?
the docs refer to a sys.stop.
Python docs? Doubt it ;-)
but i can't find anything else... am i missing something...
import sys
print sys.exit.__doc__
exit([status])
Exit the
bruce [EMAIL PROTECTED] wrote:
hi...
perl has the concept of die. does python have anything similar. how can a
python app be stopped?
the docs refer to a sys.stop.. but i can't find anything else... am i
missing something...
import sys
sys.exit()
Alex
--
bruce wrote:
hi...
perl has the concept of die. does python have anything similar. how can a
python app be stopped?
the docs refer to a sys.stop.. but i can't find anything else... am i
missing something...
thanks
-bruce
What you want is sys.exit()
See:
Delaney, Timothy (Tim) [EMAIL PROTECTED] writes:
The eventual consensus was that keys(), etc should return views on the
dictionary. These views would be re-iterable and will have basically the
same behaviour as the lists returned from keys(), etc. However, such a
view could have O(1)
Paul Rubin wrote:
Delaney, Timothy (Tim) [EMAIL PROTECTED] writes:
The eventual consensus was that keys(), etc should return views on
the dictionary. These views would be re-iterable and will have
basically the same behaviour as the lists returned from keys(), etc.
However, such a view could
bruce [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
hi...
perl has the concept of die. does python have anything similar. how can
a
python app be stopped?
the docs refer to a sys.stop.. but i can't find anything else... am i
missing something...
thanks
-bruce
(From the
Delaney, Timothy (Tim) [EMAIL PROTECTED] writes:
If you want an independent data set, you have to take a snapshot. For
the above, that's doing:
k0 = list(d.keys())
I don't understand. Why have .keys() at all, if it doesn't get you
an independent data set? If all you want is to iterate
Bugs item #1333982, was opened at 2005-10-21 10:08
Message generated for change (Comment added) made by arigo
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1333982group_id=5470
Please note that this message will contain a full copy of the comment thread,
Bugs item #1515829, was opened at 2006-07-02 08:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1515829group_id=5470
Please note that this message will contain a full copy of
Bugs item #1515839, was opened at 2006-07-02 16:05
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1515839group_id=5470
Please note that this message will contain a full copy of
Bugs item #1515839, was opened at 2006-07-02 16:05
Message generated for change (Comment added) made by kirma
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1515839group_id=5470
Please note that this message will contain a full copy of the comment thread,
Bugs item #1515932, was opened at 2006-07-02 12:53
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1515932group_id=5470
Please note that this message will contain a full copy of
Bugs item #1513646, was opened at 2006-06-28 00:01
Message generated for change (Comment added) made by loewis
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1513646group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1514617, was opened at 2006-06-29 16:07
Message generated for change (Comment added) made by kuran
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1514617group_id=5470
Please note that this message will contain a full copy of the comment thread,
Bugs item #1514617, was opened at 2006-06-29 16:07
Message generated for change (Comment added) made by kuran
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1514617group_id=5470
Please note that this message will contain a full copy of the comment thread,
Bugs item #1515998, was opened at 2006-07-02 21:44
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1515998group_id=5470
Please note that this message will contain a full copy of
Bugs item #1515829, was opened at 2006-07-02 08:26
Message generated for change (Comment added) made by tim_one
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1515829group_id=5470
Please note that this message will contain a full copy of the comment
Bugs item #1516068, was opened at 2006-07-02 17:42
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1516068group_id=5470
Please note that this message will contain a full copy of
Bugs item #1516068, was opened at 2006-07-02 17:42
Message generated for change (Comment added) made by narzola72
You can respond by visiting:
https://sourceforge.net/tracker/?func=detailatid=105470aid=1516068group_id=5470
Please note that this message will contain a full copy of the comment
84 matches
Mail list logo