[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 coul
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
positio
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 h
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 pl
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 instances.
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 in
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 in
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 an
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
>direc
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 sec
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
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? Af
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? Af
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 g
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
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 needs,
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 hi
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 introd
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 th
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,
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 "mainst
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 open
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 g
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 t
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
t
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 i
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> con
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
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:
/html/table//
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 somethi
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
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
S
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
--
http://mail.python.org/
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
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 the
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
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 mail
[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, b
[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:
http://www.
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
--
http://mail.python.org/mail
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
threa
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' prio
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
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
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
AdSR wrote:
> Hi,
>
> I'm having a problem with the Amara toolkit. Try this:
>
> >>> from amara import binderytools
> >>> raw = 'http://example.com/namespace";
> >>> xmlns:pq="http://pq.com/ns2"/>'
> >>> rwd = binderytools.bind_string(raw)
> >>> print rwd.xml()
>
> http://pq.com/ns2"/>
>
> What h
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 cal
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
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
--
http://mail.python
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: http://docs.python.o
"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
"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
"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 i
hey guys
this is gr8
but in cheetah
i use
for test in $ix
$test.url
end for
to iterate thru loop
now how do i iterate feed_list and feed_id along with i,
thanks a lot
N = [(ix.url, ix.id) for ix in feeds_list_select]
feed_list, feed_id = zip(*N)
or just
feed_list, feed_id = zip(*[(ix.url, ix.i
How to pass the variables defined inside the function to the another
function on click event of the button in Tkinter?
pleas send me a sample code if anybody has it.
thanx
--
http://mail.python.org/mailman/listinfo/python-list
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.
Do you need to replicate identical co
In article <[EMAIL PROTECTED]>,
"placid" <[EMAIL PROTECTED]> wrote:
>Jim Segrave wrote:
>
>> Don't use telnet. it's clumsy and has security issues.
>
>if youre behind a firewall then it shouldnt matter.
Still not a good idea.
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
John Machin <[EMAIL PROTECTED]> wrote:
>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 go
arvind wrote:
> How to pass the variables defined inside the function to the another
> function on click event of the button in Tkinter?
def the_function(master):
variable = ...
def callback():
print variable
b = Button(master, command=callback)
74 matches
Mail list logo