tkinter doubt

2010-06-09 Thread madhuri vio
# File: hello2.py from Tkinter import * class App: def __init__(self, master): frame = Frame(master) frame.pack() self.button = Button(frame, text="QUIT", fg="red", command=frame.quit) self.button.pack(side=LEFT) self.hi_there = Button(frame, text="

regarding the dimensions in gui

2010-06-09 Thread madhuri vio
sir ,, i wanted to knw how to decide on the dimensions mentioned in the gui development..all i know is the top left corner is considered as the origin ... then how are we having all the dimensions positive.??? -- madhuri :) -- http://mail.python.org/mailman/listinfo/python-list

grep command

2010-06-09 Thread madhuri vio
i was wondering bout the usage and syntax of grep command..can u tall me its syntax so that i can use it and proceed...pls -- madhuri :) -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-09 Thread Gregory Ewing
Lie Ryan wrote: Doesn't Mac uses an X server as well? You can run one optionally if you want, but its native graphics system is *not* based on X11. It has a window server, but the protocol is completely different. The details are shrouded in mysteries known only to Apple, but I gather it's bas

Re: why any( ) instead of firsttrue( ) ?

2010-06-09 Thread Tim Roberts
danieldelay wrote: > >Does GVR prefers beauty to power ? Not in the beginning, but in recent years things are tending this way. And, frankly, I don't think that's a Bad Thing at all. -- Tim Roberts, t...@probo.com Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-

Re: How to read source code of python?

2010-06-09 Thread Benjamin Kaplan
On Wed, Jun 9, 2010 at 10:25 PM, Qijing Li wrote: > Thanks for your reply. > I'm trying to understand python language deeply and  use it efficiently. > For example: How the operator "in" works on list? the running time is > be O(n)?  if my list is sorted, what the running time would be? > > Still

Re: Drop Table w/ MySQLdb?

2010-06-09 Thread John Nagle
On 6/6/2010 8:29 AM, James Mills wrote: On Mon, Jun 7, 2010 at 1:07 AM, Victor Subervi wrote: Hi; I tried this: cursor.execute('drop table tmp%s', tmpTable) and got this error: You can only use MySQLdb's parameter substitution for parameters that are in quotes. Right:

Re: How to read source code of python?

2010-06-09 Thread Qijing Li
Thanks for your reply. I'm trying to understand python language deeply and use it efficiently. For example: How the operator "in" works on list? the running time is be O(n)? if my list is sorted, what the running time would be? On Wed, Jun 9, 2010 at 5:59 PM, geremy condra wrote: > On Wed, J

Re: using reverse in list of tuples

2010-06-09 Thread Terry Reedy
On 6/9/2010 8:39 PM, james_027 wrote: hi, I am trying to reverse the order of my list of tuples and its is returning a None to me. Is the reverse() function not allow on list containing tuples? No. Mutation methods of builtins generally return None. -- http://mail.python.org/mailman/listinfo

Re: How to read source code of python?

2010-06-09 Thread Terry Reedy
On 6/9/2010 8:35 PM, Steven D'Aprano wrote: On Wed, 09 Jun 2010 17:28:28 -0700, Leon wrote: Hi, there, I'm trying to read the source code of python. I read around, and am kind of lost, so where to start? Any comments are welcomed, thanks in advance. How would you read any other source code?

Re: How do subprocess.Popen("ls | grep foo", shell=True) with shell=False?

2010-06-09 Thread Chris Rebert
On Wed, Jun 9, 2010 at 9:15 PM, Chris Seberino wrote: > How do subprocess.Popen("ls | grep foo", shell=True) with shell=False? I would think: from subprocess import Popen, PIPE ls = Popen("ls", stdout=PIPE) grep = Popen(["grep", "foo"], stdin=ls.stdout) Cheers, Chris -- http://blog.rebertia.com

Re: Another nntplib Question

2010-06-09 Thread Cousin Stanley
> > I've run into another snag with nntplib > Anthony For inspiration you might take a look at a nice news client written in python XPN (X Python Newsreader) is a graphical newsreader written in Python with the GTK+ toolkit. http://xpn.altervista.org/i

How do subprocess.Popen("ls | grep foo", shell=True) with shell=False?

2010-06-09 Thread Chris Seberino
How do subprocess.Popen("ls | grep foo", shell=True) with shell=False? Does complex commands with "|" in them mandate shell=True? cs -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Jobs

2010-06-09 Thread geremy condra
On Wed, Jun 9, 2010 at 1:21 PM, Michael Chambliss wrote: > I use Python for my own entertainment and for quick jobs, but haven't been > able to use it professionally up to this point.  As a former Perl developer > and someone that's currently required to code in Java I'm starting to wish I > had t

Re: Python Jobs

2010-06-09 Thread Vincent Davis
On Wed, Jun 9, 2010 at 2:21 PM, Michael Chambliss wrote: > I use Python for my own entertainment and for quick jobs, but haven't been > able to use it professionally up to this point.  As a former Perl developer > and someone that's currently required to code in Java I'm starting to wish I > had t

Re: How to read source code of python?

2010-06-09 Thread Shashwat Anand
And if you are interested in source and have no particular goal, start with stdlib. On Thu, Jun 10, 2010 at 6:39 AM, rantingrick wrote: > On Jun 9, 7:28 pm, Leon wrote: > > > I'm trying to read the source code of python. > > I read around, and am kind of lost, so where to start? > > Leon, if yo

Re: An empty object with dynamic attributes (expando)

2010-06-09 Thread Aahz
In article <86beb1fe-36ec-4a89-b926-3bb227c09...@g39g2000pri.googlegroups.com>, dmtr wrote: > m = lambda:expando m.myattr = 1 print m.myattr >1 That's a *great* technique if your goal is to confuse people. -- Aahz (a...@pythoncraft.com) <*> http://www.pythoncraf

Re: How to read source code of python?

2010-06-09 Thread rantingrick
On Jun 9, 7:28 pm, Leon wrote: > I'm trying to read the source code of python. > I read around, and am kind of lost, so where to start? Leon, if you are a Python newbie and cannot understand/comprehend Python's syntax read the tutorial first. -- http://mail.python.org/mailman/listinfo/python-li

Re: using reverse in list of tuples

2010-06-09 Thread rantingrick
On Jun 9, 7:39 pm, james_027 wrote: > > I am trying to reverse the order of my list of tuples and its is > returning a None to me. Is the reverse() function not allow on list > containing tuples? list.revese() is an in-place operation! don't try to assign the return value back to your list! >>>

Re: using reverse in list of tuples

2010-06-09 Thread Dan Stromberg
$ python Python 2.5.1 (r251:54863, Nov 2 2007, 11:57:24) [GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-52)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> list_ = [(1,2), (3,4), (5,6)] >>> print list_.reverse() None >>> print list_ [(5, 6), (3, 4), (1, 2)] >>> On

Re: How to read source code of python?

2010-06-09 Thread geremy condra
On Wed, Jun 9, 2010 at 5:28 PM, Leon wrote: > Hi, there, > I'm trying to read the source code of python. > I read around, and am kind of lost, so where to start? > > Any comments are welcomed, thanks in advance. Are you trying to find out more about python-the-language, or the interpreter, or the

using reverse in list of tuples

2010-06-09 Thread james_027
hi, I am trying to reverse the order of my list of tuples and its is returning a None to me. Is the reverse() function not allow on list containing tuples? Thanks, James -- http://mail.python.org/mailman/listinfo/python-list

Re: How to read source code of python?

2010-06-09 Thread Steven D'Aprano
On Wed, 09 Jun 2010 17:28:28 -0700, Leon wrote: > Hi, there, > I'm trying to read the source code of python. I read around, and am kind > of lost, so where to start? > > Any comments are welcomed, thanks in advance. How would you read any other source code? -- Steven -- http://mail.python.o

Re: help!!

2010-06-09 Thread Steven D'Aprano
On Wed, 09 Jun 2010 16:44:10 -0700, z00z wrote: > ok when my code is like this everything works well > > #/usr/bin/python > input = raw_input(">> ").replace(',','\n') > a=open("file","w") > a.write(input) > a.close() > import sys,os,time,subprocess,threading,readline,socket,ifc Your hash-bang

How to read source code of python?

2010-06-09 Thread Leon
Hi, there, I'm trying to read the source code of python. I read around, and am kind of lost, so where to start? Any comments are welcomed, thanks in advance. -- http://mail.python.org/mailman/listinfo/python-list

Re: GUIs - A Modest Proposal

2010-06-09 Thread bart.c
"Steven D'Aprano" wrote in message news:4c101fbc$0$28644$c3e8...@news.astraweb.com... On Wed, 09 Jun 2010 04:16:23 -0700, ant wrote: 1 Although a few advocates of Tkinter have spoken in favour of it, most seem to think that: It's not particularly elegant, either in its use or its implem

Re: GUIs - A Modest Proposal

2010-06-09 Thread Mark Roseman
"Martin v. Loewis" wrote: > > To quote from the first section of the tutorial at http://www.tkdocs.com > > Unfortunately, neither that tutorial nor your postings are really > specific on what those changes might be. So I'm skeptical that they > actually exist, or, if they exist, that Tkinter n

Re: GUIs - A Modest Proposal

2010-06-09 Thread Kevin Walzer
On 6/9/10 7:45 PM, Martin v. Loewis wrote: Unfortunately, neither that tutorial nor your postings are really specific on what those changes might be. So I'm skeptical that they actually exist, or, if they exist, that Tkinter needs to change at all to accomodate them. The changes that need to

Re: GUIs - A Modest Proposal

2010-06-09 Thread Martin v. Loewis
Martin, just to reinforce the point... developers using Tkinter need to make some fairly minor changes to their application code to truly take advantage of the improvements in recent versions of Tk. Without those app changes, they're not going to see any difference. To quote from the first secti

Re: Another nntplib Question

2010-06-09 Thread MRAB
Anthony Papillion wrote: Hello Everyone, Thanks to help from this group, my statistical project is going very well and I'm learning a LOT about Python as I go. I'm absolutely falling in love with this language and I'm now thinking about using it for nearly all my projects. I've run into another

help!!

2010-06-09 Thread z00z
Hello everyone, i'm working on a project and everything is going quiet well. ok when my code is like this everything works well #/usr/bin/python input = raw_input(">> ").replace(',','\n') a=open("file","w") a.write(input) a.close() import sys,os,time,subprocess,threading,readline,socket,ifc but th

Re: Another nntplib Question

2010-06-09 Thread Anthony Papillion
Thomas, You have been my savior on this journey twice now and I appreciate it. What you did totally makes sense (and I had forgotten the list was zero based) and I'm going to try it out right now. Thank you SO much for your patience. I'm coming from a near pure .NET and PHP background so I'm stil

Re: Another nntplib Question

2010-06-09 Thread Thomas Jollans
On 06/10/2010 12:56 AM, Anthony Papillion wrote: > Hello Everyone, > > Thanks to help from this group, my statistical project is going very > well and I'm learning a LOT about Python as I go. I'm absolutely > falling in love with this language and I'm now thinking about using it > for nearly all m

Re: Python way to printk?

2010-06-09 Thread Dan Stromberg
On Wed, Jun 9, 2010 at 3:25 PM, Thomas Jollans wrote: > On 06/09/2010 11:40 PM, J wrote: > > Does anyone know of a way, or have a recipe, to do a linux printk > > equivalent in Python? > > > > I've been googling for a while and not finding anything useful. > > > > The nutshell version of this is

Re: GUIs - A Modest Proposal

2010-06-09 Thread Steven D'Aprano
On Wed, 09 Jun 2010 04:16:23 -0700, ant wrote: > 1 Although a few advocates of Tkinter have spoken in favour of it, most > seem to think that: > It's not particularly elegant, either in its use or its > implementation with Tcl/Tk > If we didn't have a GUI in the distribution, we wouldn't

Re: GUIs - A Modest Proposal

2010-06-09 Thread Mark Roseman
"Martin v. Loewis" wrote: > For the record, Python *does* include newer versions of Tk all the time. Martin, just to reinforce the point... developers using Tkinter need to make some fairly minor changes to their application code to truly take advantage of the improvements in recent versions

Re: historic grail python browser "semi-recovered"

2010-06-09 Thread rantingrick
On Jun 9, 4:29 pm, lkcl wrote: > um, please don't ask me why but i found grail, the python-based web > browser, and have managed to hack it into submission sufficiently to > view e.g.http://www.google.co.uk.  out of sheer apathy i happened to > have python2.4 still installed which was the only way

Re: function that counts...

2010-06-09 Thread Bryan
Lie Ryan wrote: > I went through the mathematical foundation of using > partition/distribution and inclusion-exclusion, and have written some > code that solves a subset of the problem, feel free if you or superpollo > are interested in continuing my answer (I won't be able to continue it > until n

Re: GUIs - A Modest Proposal

2010-06-09 Thread Martin v. Loewis
As an aside, I couldn't care one hoot about the standard Python GUI, let alone two, but it strikes me that you have conveniently ignored Mark Roseman's comments earlier in this thread regarding Tk. I've no idea how much work would be involved for the Python core volunteers in introducing newer ver

Another nntplib Question

2010-06-09 Thread Anthony Papillion
Hello Everyone, Thanks to help from this group, my statistical project is going very well and I'm learning a LOT about Python as I go. I'm absolutely falling in love with this language and I'm now thinking about using it for nearly all my projects. I've run into another snag with nntplib I'm hopi

Re: historic grail python browser "semi-recovered"

2010-06-09 Thread Thomas Jollans
On 06/09/2010 11:29 PM, lkcl wrote: > um, please don't ask me why but i found grail, the python-based web > browser, and have managed to hack it into submission sufficiently to > view e.g. http://www.google.co.uk. out of sheer apathy i happened to > have python2.4 still installed which was the onl

Re: Cross-platform detection of exceptions raised during file access via os, shutil, codecs, etc.

2010-06-09 Thread Thomas Jollans
On 06/09/2010 11:56 PM, pyt...@bdurham.com wrote: > I'm looking for some suggestions on how to detect exceptions raised > during common types of file access (os, shutil, codecs, etc.) on a > cross-platform basis. I'm looking for feedback relative to Python 2.6 > and 2.7 but would also appreciate he

Re: GUIs - A Modest Proposal

2010-06-09 Thread rantingrick
On Jun 9, 5:20 pm, Mark Lawrence wrote: > > Mark, with those odds you can safely bet on me producing code!! ;-) > > After several years I should bloody well hope so.  More coding in an IDE > and less typing on mailing lists might help.  And I'm now laughing over > the Windows compiled help file.

Re: GUIs - A Modest Proposal

2010-06-09 Thread Steven D'Aprano
On Wed, 09 Jun 2010 09:37:25 -0400, D'Arcy J.M. Cain wrote: > On 09 Jun 2010 06:05:43 GMT > Steven D'Aprano wrote: >> I think the only way to end this pointless discussion is this: >> >> "Hitler would have loved Tkinter!" > > Sorry, "Quirk's Exception" to Godwin's Law says that you can't invoke

Re: Python way to printk?

2010-06-09 Thread Dan Stromberg
I'm not sure of the specifics, but you may find that you can do this with the syslog module - may require reconfiguring syslog.conf or the equivalent though. If you hit an appropriate facility and level, you likely will see syslog messages go to the kernel's dmesg ring buffer. On Wed, Jun 9, 2010

Re: Python way to printk?

2010-06-09 Thread Thomas Jollans
On 06/09/2010 11:40 PM, J wrote: > Does anyone know of a way, or have a recipe, to do a linux printk > equivalent in Python? > > I've been googling for a while and not finding anything useful. > > The nutshell version of this is that I need to write a routine for a > test tool I'm working on that

Re: GUIs - A Modest Proposal

2010-06-09 Thread Mark Lawrence
On 09/06/2010 22:43, rantingrick wrote: On Jun 9, 3:52 pm, Mark Lawrence wrote: This comes from the bloke who couldn't be bothered to find out how to download the fixed version of the Windows compiled help file? Ok, so i was a bit miffed about the docs bug and felt the need to vent. Don't te

Re: [ANNC] pynguin-0.8 python turtle graphics application

2010-06-09 Thread Alan G Isaac
On 6/8/2010 6:59 PM, Lee Harr wrote: Pynguin is a python-based turtle graphics application. It combines an editor, interactive interpreter, and graphics display area. Do you start from scratch or make use of the very useful new (2.6) turtle module? I hope the latter, and that you ar

Re: Python way to printk?

2010-06-09 Thread News123
Hi J, J wrote: > Does anyone know of a way, or have a recipe, to do a linux printk > equivalent in Python? > > I've been googling for a while and not finding anything useful. > > The nutshell version of this is that I need to write a routine for a > test tool I'm working on that will time the am

Cross-platform detection of exceptions raised during file access via os, shutil, codecs, etc.

2010-06-09 Thread python
I'm looking for some suggestions on how to detect exceptions raised during common types of file access (os, shutil, codecs, etc.) on a cross-platform basis. I'm looking for feedback relative to Python 2.6 and 2.7 but would also appreciate hearing of any Python 3.x specific behaviors. Under Python

Re: GUIs - A Modest Proposal

2010-06-09 Thread rantingrick
On Jun 9, 3:52 pm, Mark Lawrence wrote: > This comes from the bloke who couldn't be bothered to find out how to > download the fixed version of the Windows compiled help file? Ok, so i was a bit miffed about the docs bug and felt the need to vent. Don't tell me you've never griped about anything

Python way to printk?

2010-06-09 Thread J
Does anyone know of a way, or have a recipe, to do a linux printk equivalent in Python? I've been googling for a while and not finding anything useful. The nutshell version of this is that I need to write a routine for a test tool I'm working on that will time the amount of time used to take a sy

Re: historic grail python browser "semi-recovered"

2010-06-09 Thread lkcl
On Jun 9, 9:29 pm, lkcl wrote: > if anyone else would be interested in resurrecting this historic ... "historic, archaic, dinosaur-driven, vastly-overrated but one-of- a-kind and without precedent before or since" web browser... l. p.s. except for paul bonser's "pybrowser" which he's delaye

Re: GUIs - A Modest Proposal

2010-06-09 Thread Dan Stromberg
On Tue, Jun 8, 2010 at 6:12 PM, geremy condra wrote: > On Tue, Jun 8, 2010 at 4:46 PM, Steven D'Aprano > wrote: > > On Tue, 08 Jun 2010 15:40:51 -0700, geremy condra wrote: > > > >> On Tue, Jun 8, 2010 at 3:09 PM, Lie Ryan wrote: > > > >>> Nobody complains that python included a regular express

Creating a list of stress tests for unit tests involving files

2010-06-09 Thread python
I'm working on a set of unit tests designed to stress test some file handling capabilities of our application. Listed below are some file names designed to cause failures when used with open/codecs.open and with the os/shutil module file functions. Can anyone think of additional scenarios (path na

historic grail python browser "semi-recovered"

2010-06-09 Thread lkcl
um, please don't ask me why but i found grail, the python-based web browser, and have managed to hack it into submission sufficiently to view e.g. http://www.google.co.uk. out of sheer apathy i happened to have python2.4 still installed which was the only way i could get it to run without having t

Re: why any( ) instead of firsttrue( ) ?

2010-06-09 Thread danieldelay
Le 09/06/2010 08:54, Raymond Hettinger a écrit : next(ifilter(None, d), False) Good, this is rather short and does the job !... I should try to use more often this itertools module. Thanks Daniel -- http://mail.python.org/mailman/listinfo/python-list

Re: capitalize() NOT the same as var[0].upper _ var[1:]

2010-06-09 Thread Dan Stromberg
On Tue, Jun 8, 2010 at 7:09 PM, alex23 wrote: > > I'm amazed at the endless willingness of this group to help Victor > write his contracted project for free. > > I don't get it. What's wrong with helping people? And what's it to you if others do? -- http://mail.python.org/mailman/listinfo/pyth

Re: Python Jobs

2010-06-09 Thread Terry Reedy
On 6/9/2010 4:21 PM, Michael Chambliss wrote: I use Python for my own entertainment and for quick jobs, but haven't been able to use it professionally up to this point. As a former Perl developer and someone that's currently required to code in Java I'm starting to wish I had this opportunity.

Re: Python Jobs

2010-06-09 Thread Tim Chase
On 06/09/2010 03:21 PM, Michael Chambliss wrote: - Your location - country, state or city, whatever you care to provide Outside Dallas, TX, USA - Your focus - Product Development (web sites/apps), Education, R&D/Science, IT/Sys Admin, etc split between development (web & apps) and IT/Sys ad

Re: Python Jobs

2010-06-09 Thread Giampaolo Rodolà
This is an interesting subject. > - Your location - country, state or city, whatever you care to provide Turin, Italy > - Your focus - Product Development (web sites/apps), Education, R&D/Science, > IT/Sys Admin, etc Web development based on Zope, Grok and Plone > - Your company size Small.

Re: GUIs - A Modest Proposal

2010-06-09 Thread Mark Lawrence
On 09/06/2010 18:38, rantingrick wrote: [snip] Don't worry about irritating people. There are a subset of folks on this list that await the chance to be offended just so they can spew bile. Really, don't worry about them. And never allow these minions to quell your freedom of speech, because th

Re: pprint

2010-06-09 Thread Rodrick Brown
On Wed, Jun 9, 2010 at 5:01 AM, madhuri vio wrote: > sir what is the function of pprint??? > could you please help me out with that > > -- > madhuri :) > > rbr...@laptop:~$ python Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "licens

Re: Tkinter help - Why this behavior ? (py3)

2010-06-09 Thread Terry Reedy
On 6/9/2010 1:13 PM, Dodo wrote: import Tkinter as tk from Tkconstants import * import tkSimpleDialog class MyDialog(tkSimpleDialog.Dialog): def body(self, master): prompt = "Hello from my custom dialog!\nAlthough with something this simple i should have used tkMessageBox." tk.Label(self, text=

Re: GUIs - A Modest Proposal

2010-06-09 Thread Grant Edwards
On 2010-06-09, Martin v. Loewis wrote: > Am 09.06.2010 01:54, schrieb Grant Edwards: >> On 2010-06-08, Martin v. Loewis wrote: >>> Am 08.06.2010 20:15, schrieb Grant Edwards: On 2010-06-08, Martin v. Loewis wrote: >> TkInter -> Tcl -> Tk -> Xlib >> >> Is the Tcl inteprete

Re: GUIs - A Modest Proposal

2010-06-09 Thread Grant Edwards
On 2010-06-09, Steven D'Aprano wrote: > On Tue, 08 Jun 2010 16:58:26 -0700, rantingrick wrote: > >> We have a problem > > You keep saying that, but you've given no good reasons for why we should > believe you, or what the nature of this problem supposedly is. > > The current situation has broad

Python Jobs

2010-06-09 Thread Michael Chambliss
I use Python for my own entertainment and for quick jobs, but haven't been able to use it professionally up to this point. As a former Perl developer and someone that's currently required to code in Java I'm starting to wish I had this opportunity. Can anyone comment on the Python job market? If

Re: GUIs - A Modest Proposal

2010-06-09 Thread rantingrick
On Jun 9, 2:42 pm, "Martin v. Loewis" wrote: > I would personally prefer the win32 extensions to be rewritten for use > in core Python. +1 > That is, of course, all off-topic. Not entirely Martin, PyGUI is a real option to consider and PyWin32 is part of that option. Besides PyWin32 should hav

Re: GUIs - A Modest Proposal

2010-06-09 Thread Terry Reedy
On 6/9/2010 1:16 PM, Ethan Furman wrote: [re PyGUI] *Alert* Potentially dumb question following: On the MS Windows platform, Gtk is not required, just win32? Correct. A windows distribution probably would not include the gtk (or cocoa) versions. And Greg hopes to remove the win32 dependency by

Re: GUIs - A Modest Proposal

2010-06-09 Thread Martin v. Loewis
Am 09.06.2010 19:16, schrieb Ethan Furman: Gregory Ewing wrote: Kevin Walzer wrote: PyGUI ... certainly is *not* a lightweight GUI toolkit that could easily be incorporated into the Python core library--it instead has rather complex dependencies on both other GUI toolkits and Python wrappers of

Re: GUIs - A Modest Proposal

2010-06-09 Thread Martin v. Loewis
But whenever I write a program that someone else is going to use, it has to have a GUI. Is that not true for most people? Most definitely not. Of the programs I recently wrote for other people, they either: - were command line scripts, meant to use for sysadmin jobs (and I wrote them for th

Re: GUIs - A Modest Proposal

2010-06-09 Thread Martin v. Loewis
Am 09.06.2010 01:54, schrieb Grant Edwards: On 2010-06-08, Martin v. Loewis wrote: Am 08.06.2010 20:15, schrieb Grant Edwards: On 2010-06-08, Martin v. Loewis wrote: TkInter -> Tcl -> Tk -> Xlib Is the Tcl intepreter really need to use this GUI? Why not: (Pyton ->) Tkinter-API ->

Re: is there a way to warn about missing modules *without* running python?

2010-06-09 Thread lkcl
On Jun 5, 2:16 pm, Steven D'Aprano wrote: > Neither Python, nor Javascript (as far as I know -- I welcome > corrections) do static linking. for the command-line versions of javascript such as spidermonkey, i believe that a keyword/function is dropped into the global namespace - "load", which tak

Re: Question about NNTPLib

2010-06-09 Thread Anthony Papillion
> I just had a quick look at the documentation. It looks like you should > re-read it.http://docs.python.org/py3k/library/nntplib.html#nntplib.NNTP.xhdr Thank you for the help Thomas. I did reread the doc and I see what you mean. I think this will work now. Much thanks for the help! Anthony --

Re: is there a way to warn about missing modules *without* running python?

2010-06-09 Thread lkcl
On Jun 5, 7:24 pm, Terry Reedy wrote: > On 6/5/2010 9:42 AM, lkcl wrote: > > > if someone could perhaps explain this (in a different way from me), in > > the context of "python the programming language" and "python the > >http://python.orginterpreter";, i.e. having absolutely nothing to do > > wit

Re: Tkinter menu checkbutton not working

2010-06-09 Thread rantingrick
On Jun 9, 12:20 pm, Dodo wrote: > Le 09/06/2010 18:54, rantingrick a crit : > > > > > > > On Jun 9, 11:26 am, Dodo  wrote: > >> Hello, > > >> I trying to make this piece of code work (this is python3) > > >> from tkinter import * > >> from tkinter.ttk import * > > >> class Window: > >>    def __in

Re: GUIs - A Modest Proposal

2010-06-09 Thread rantingrick
On Jun 9, 1:06 pm, Adam Tauno Williams wrote: > Or just use a different one.  Simple enough. Thats not even valid to this argument. Everyone IS free to choose another GUI already. Please re-read this entire thread, absorb the contents therein, ponder extensively the pros and cons, and then formul

Re: GUIs - A Modest Proposal

2010-06-09 Thread rantingrick
On Jun 9, 12:53 pm, Brian Blais wrote: > On Jun 9, 2010, at 7:16 , ant wrote: > > > 1 Although a few advocates of Tkinter have spoken in favour of it, > > most seem to think that: > >     It's not particularly elegant, either in its use or its > > implementation with Tcl/Tk > >     Not many people

Re: GUIs - A Modest Proposal

2010-06-09 Thread Adam Tauno Williams
> The GUI must be small, pythonic, and cross platform. And how many times have I heard that? I develop GUIs... good luck. Come back in ten years when you have some working code. > Tkinter is aimed at the newbie and i would think that was Guido's > original vision. And it's not the worst GUI by

Re: GUIs - A Modest Proposal

2010-06-09 Thread Brian Blais
On Jun 9, 2010, at 7:16 , ant wrote: 1 Although a few advocates of Tkinter have spoken in favour of it, most seem to think that: It's not particularly elegant, either in its use or its implementation with Tcl/Tk Not many people use it anyway, so why bother? 2 Most people who have used a

Re: GUIs - A Modest Proposal

2010-06-09 Thread rantingrick
On Jun 9, 6:16 am, ant wrote: > Since I started this thread, I feel a sense of responsibility for it, > in some bizarre way. > Not to prolong its existence, which is clearly a troubling one for > some, but to try to steer it towards some kind of consensus that will > irritate the least number of p

Re: FIle transfer over network - with Pyro?

2010-06-09 Thread Nathan Huesken
Thanks for all the replies. I might use http, or I utilize a separate ftp server. On Sat, 5 Jun 2010 13:34:45 -0700 geremy condra wrote: > On Sat, Jun 5, 2010 at 10:14 AM, Dan Stromberg > wrote: > >> A more realistic answer is probably to use something based on > >> HTTP. This solves a number o

Re: Tkinter help - Why this behavior ? (py3)

2010-06-09 Thread Dodo
Le 09/06/2010 19:13, Dodo a écrit : Le 09/06/2010 18:49, rantingrick a écrit : On Jun 5, 8:46 am, Dodo wrote: Hi, let's consider this exemple : from tkinter import * from tkinter.ttk import * class First: def __init__(self): self.root = Tk() B = Button(self.root, command=self.op) B.pack() s

Re: Tkinter menu checkbutton not working

2010-06-09 Thread Dodo
Le 09/06/2010 18:54, rantingrick a écrit : On Jun 9, 11:26 am, Dodo wrote: Hello, I trying to make this piece of code work (this is python3) from tkinter import * from tkinter.ttk import * class Window: def __init__(self): self.root = Tk() self.menu = Menu(self.root) self.roo

Re: Tkinter help - Why this behavior ? (py3)

2010-06-09 Thread Dodo
Le 09/06/2010 18:49, rantingrick a écrit : On Jun 5, 8:46 am, Dodo wrote: Hi, let's consider this exemple : from tkinter import * from tkinter.ttk import * class First: def __init__(self): self.root = Tk() B = Button(self.root, command=self.op)

Re: GUIs - A Modest Proposal

2010-06-09 Thread Ethan Furman
Gregory Ewing wrote: Kevin Walzer wrote: PyGUI ... certainly is *not* a lightweight GUI toolkit that could easily be incorporated into the Python core library--it instead has rather complex dependencies on both other GUI toolkits and Python wrappers of those toolkits. I don't see how the dep

Re: Tkinter menu checkbutton not working

2010-06-09 Thread rantingrick
On Jun 9, 11:26 am, Dodo wrote: Also you are now NOT using 8 space indention unlike your last post -- which i applaud you for. However you've gone to the opposite extreme with 2 space indention and interlaced it with one space indention, oh dear! Please use four space indention as this is the p

Re: GUIs - A Modest Proposal

2010-06-09 Thread Ethan Furman
Steven D'Aprano wrote: In any case, Python doesn't ship with Tcl and Tk. They are dependencies *only if you use Tkinter*. It's not compulsory. So what do you call a fact with quark-like attributes? A quack? ;) Tcl/Tk do, in fact, ship with the Windows versions. Good reminder that they may

Re: [py3] Tkinter menu checkbutton not working

2010-06-09 Thread Terry Reedy
On 6/9/2010 12:26 PM, Dodo wrote: Hello, I trying to make this piece of code work (this is python3) from tkinter import * from tkinter.ttk import * class Window: def __init__(self): self.root = Tk() self.menu = Menu(self.root) self.root['menu'] = self.menu self.submenu = Menu(self.menu) self

Re: Tkinter menu checkbutton not working

2010-06-09 Thread rantingrick
On Jun 9, 11:26 am, Dodo wrote: > Hello, > > I trying to make this piece of code work (this is python3) > > from tkinter import * > from tkinter.ttk import * > > class Window: >   def __init__(self): >    self.root = Tk() > >    self.menu = Menu(self.root) >    self.root['menu'] = self.menu > >  

Re: if, continuation and indentation

2010-06-09 Thread Jean-Michel Pichavant
Pete Forman wrote: HH writes: > I have a question about best practices when it comes to line > wrapping/ continuation and indentation, specifically in the case of > an if statement. There are several good suggestions for formatting but no-one has mentioned rewriting the code. Use a boolean

Re: Tkinter help - Why this behavior ? (py3)

2010-06-09 Thread rantingrick
On Jun 5, 8:46 am, Dodo wrote: > Hi, > > let's consider this exemple : > > from tkinter import * > from tkinter.ttk import * > > class First: >         def __init__(self): >                 self.root = Tk() >                 B = Button(self.root, command=self.op) >                 B.pack() > >    

Re: GUIs - A Modest Proposal

2010-06-09 Thread jyoung79
On Wed, 2010-06-09 at 04:16 -0700, ant wrote: > Since I started this thread, I feel a sense of responsibility for it, > in some bizarre way. I'm glad you brought this GUI subject up. I've enjoyed reading everyones thoughts on this subject. > Most people who have used a GUI have some investmen

Re: if, continuation and indentation

2010-06-09 Thread Pete Forman
HH writes: > I have a question about best practices when it comes to line > wrapping/ continuation and indentation, specifically in the case of > an if statement. There are several good suggestions for formatting but no-one has mentioned rewriting the code. Use a boolean variable to hold the

[py3] Tkinter menu checkbutton not working

2010-06-09 Thread Dodo
Hello, I trying to make this piece of code work (this is python3) from tkinter import * from tkinter.ttk import * class Window: def __init__(self): self.root = Tk() self.menu = Menu(self.root) self.root['menu'] = self.menu self.submenu = Menu(self.menu) self.ck = 0 self.submenu.a

Re: passing data to Tkinter call backs

2010-06-09 Thread rantingrick
On Jun 9, 4:23 am, Nick Keighley wrote: > What mouse_clik_event does is modify some data and trigger a redraw. > Is there any way to pass data to the callback function? Some GUIs give > you a user-data field in the event, does Tkinter? I don't know "how" you're triggering redraws but you need to

Re: GUIs - A Modest Proposal

2010-06-09 Thread Mark Roseman
"bart.c" wrote: > "Grant Edwards" wrote in message > >> Since Tk already provides a basic GUI toolset, and Python can interface > >> with it more directly than it can with other toolkits > >>(PyGui -> PyGtk -> Gtk -> Xlib), > > > > Compare that to this: > > TkInter -> Tcl -> Tk -> Xlib > Is

Re: GUIs - A Modest Proposal

2010-06-09 Thread Stephen Hansen
On Wed, Jun 9, 2010 at 4:16 AM, ant wrote: > We are talking about the thing that the rest of the world sees as > Python's biggest missing piece Citation needed, or its just hyperbole. > - the thing that > beginning programmers look for and don't find - a decent, well- > supported and elegant

Re: GUIs - A Modest Proposal

2010-06-09 Thread Mark Roseman
I'll venture to say that the path of least resistance (which includes little or modest development effort) would be for Python to retain Tkinter in the way it does now, but have Tkinter GUI's magically appear less horrid. Guess what? That's already happened. Newer versions of Tk (which Tkint

Re: Tkinter help - Why this behavior ? (py3)

2010-06-09 Thread Dodo
Le 07/06/2010 15:26, Alf P. Steinbach a écrit : * Dodo, on 07.06.2010 12:38: Le 05/06/2010 19:07, Alf P. Steinbach a écrit : * Dodo, on 05.06.2010 15:46: Hi, let's consider this exemple : from tkinter import * from tkinter.ttk import * class First: def __init__(self): self.root = Tk() B = B

  1   2   >