Re: Dictionary .keys() and .values() should return a set [with Python 3000 in mind]

2006-07-02 Thread Paddy
[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()

Re: beautifulsoup .vs tidy

2006-07-02 Thread Fredrik Lundh
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

Request for addition to Preferences

2006-07-02 Thread JohnJohnUSA
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

Re: Odd behavior with staticmethods

2006-07-02 Thread [EMAIL PROTECTED]
THANK YOU! Now I can actually worry about the advantages/disadvantages! -- http://mail.python.org/mailman/listinfo/python-list

Re: Request for addition to Preferences

2006-07-02 Thread Fredrik Lundh
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

re:Request for addition to Preferences

2006-07-02 Thread JohnJohnUSA
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

Re: Request for addition to Preferences

2006-07-02 Thread Fredrik Lundh
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

Re: How to create a limited set of instanceses of a class

2006-07-02 Thread madpython
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.

Python CGI Scripting Documentation

2006-07-02 Thread Vlad Dogaru
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

Python CGI Scripting Documentation

2006-07-02 Thread Vlad Dogaru
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

Re: Python CGI Scripting Documentation

2006-07-02 Thread placid
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

Re: Dictionary .keys() and .values() should return a set [with Python 3000 in mind]

2006-07-02 Thread bearophileHUGS
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

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread Jim Segrave
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

Re: Python CGI Scripting Documentation

2006-07-02 Thread Michael
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)

PyPy and constraints

2006-07-02 Thread Paddy
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

Re: PEP thought experiment: Unix style exec for function/method calls

2006-07-02 Thread Michael
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.

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread placid
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

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread faulkner
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

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread faulkner
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

Re: python guru in the Bay Area

2006-07-02 Thread Aahz
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

Re: PEP thought experiment: Unix style exec for function/method calls

2006-07-02 Thread Carl Banks
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

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread vasudevram
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,

Re: languages with full unicode support

2006-07-02 Thread Oliver Bandel
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

Re: Python CGI Scripting Documentation

2006-07-02 Thread Alex Martelli
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

Re: Dictionary .keys() and .values() should return a set [with Python 3000 in mind]

2006-07-02 Thread Simon Forman
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

Re: How to create a limited set of instanceses of a class

2006-07-02 Thread Alex Martelli
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,

Python Challenge - thesamet unreachable?

2006-07-02 Thread [EMAIL PROTECTED]
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

Re: PyPy and constraints

2006-07-02 Thread Ziga Seilnacht
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

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread Network Ninja
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

Re: How to create a limited set of instanceses of a class

2006-07-02 Thread madpython
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

Re: I have 100 servers which need a new backup server added to a text file, and then the backup agent restarted.

2006-07-02 Thread Ove Pettersen
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

Re: Dictionary .keys() and .values() should return a set [with Python3000 in mind]

2006-07-02 Thread Terry Reedy
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

wanted: framework for creating nice step by step graphical visualisations of running Python code

2006-07-02 Thread Claudio Grondi
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

Re: I have 100 servers which need a new backup server added to a text file, and then the backup agent restarted.

2006-07-02 Thread Petr Jakeš
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

Re: How to create a limited set of instanceses of a class

2006-07-02 Thread Alex Martelli
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

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread [EMAIL PROTECTED]
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

RE: xpath question

2006-07-02 Thread bruce
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//

Re: xpath question

2006-07-02 Thread Simon Forman
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

Re: Computer Industry Workers May Face Cancer Risks

2006-07-02 Thread Cydrome Leader
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

RE: xpath question

2006-07-02 Thread bruce
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

newbie graphing recommendations ?

2006-07-02 Thread Adam
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

Re: I have 100 servers which need a new backup server added to a text file, and then the backup agent restarted.

2006-07-02 Thread Michael Abbott
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/

Re: wanted: framework for creating nice step by step graphical visualisations of running Python code

2006-07-02 Thread bearophileHUGS
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

Re: newbie graphing recommendations ?

2006-07-02 Thread Scott David Daniels
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

Re: languages with full unicode support

2006-07-02 Thread Matthias Blume
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

Re: PyPy and constraints

2006-07-02 Thread Paddy
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

Re: logging error with RotatingFileHandler

2006-07-02 Thread Vinay Sajip
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

RE: Dictionary .keys() and .values() should return a set [with Python3000 in mind]

2006-07-02 Thread Delaney, Timothy (Tim)
[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

Re: wanted: framework for creating nice step by step graphical visualisations of running Python code

2006-07-02 Thread Claudio Grondi
[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

Re: classes and interfaces

2006-07-02 Thread Rene Pijlman
[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.

Re: classes and interfaces

2006-07-02 Thread Rene Pijlman
Bruno Desthuilliers: >Java interfaces are a workaround Troll alert. -- http://mail.python.org/mailman/listinfo/python-list

python function defs/declarations

2006-07-02 Thread bruce
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

Time out question

2006-07-02 Thread DarkBlue
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

Re: python function defs/declarations

2006-07-02 Thread Alex Martelli
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

Re: Time out question

2006-07-02 Thread Alex Martelli
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

Re: xpath question

2006-07-02 Thread Simon Forman
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

Re: xpath question

2006-07-02 Thread uche . ogbuji
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

Re: beautifulsoup .vs tidy

2006-07-02 Thread uche . ogbuji
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

Re: Amara: Where's my attribute?

2006-07-02 Thread uche . ogbuji
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

Turning a callback function into a generator

2006-07-02 Thread Kirk McDonald
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

how to stop python...

2006-07-02 Thread bruce
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

Re: how to stop python...

2006-07-02 Thread Tim Peters
[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

Re: how to stop python...

2006-07-02 Thread Alex Martelli
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

Re: how to stop python...

2006-07-02 Thread Simon Forman
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

Re: Dictionary .keys() and .values() should return a set [with Python3000 in mind]

2006-07-02 Thread Paul Rubin
"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) __

RE: Dictionary .keys() and .values() should return a set [withPython3000 in mind]

2006-07-02 Thread Delaney, Timothy (Tim)
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

Re: how to stop python...

2006-07-02 Thread Paul McGuire
"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

Re: Dictionary .keys() and .values() should return a set [withPython3000 in mind]

2006-07-02 Thread Paul Rubin
"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

Re: list comprehension

2006-07-02 Thread a
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

Tkinter function variable passing

2006-07-02 Thread arvind
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

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread Lawrence D'Oliveiro
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

Re: Can I do it using python?? about xterm and telnet

2006-07-02 Thread Lawrence D'Oliveiro
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

Re: sys.stdin and two CTRL-Ds

2006-07-02 Thread Lawrence D'Oliveiro
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

Re: Tkinter function variable passing

2006-07-02 Thread Fredrik Lundh
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)