Re: [Tutor] python gui Tkinter
> On Jan 13, 2018, at 9:18 AM, Alan Gauld via Tutorwrote: > > On 13/01/18 12:05, mamatha n wrote: >> please any one give me the code for > > We don't write code for you (unless you want to pay > one of us as a contractor) But we can point you at > some examples: > >> username (entryfld)- >> pwrd (entryfld) >> login(button),changepwrd(button) > > So far very basic Tkinter, any tutorial would cover it. > You could try mine at: > > https://urldefense.proofpoint.com/v2/url?u=http-3A__www.alan-2Dg.me.uk_tutgui.htm=DwICAg=3buyMx9JlH1z22L_G5pM28wz_Ru6WjhVHwo-vpeS0Gk=rEyLMZFJ7eh_1iNO7KnqQcXbAnZbNOjKNJqN1v2jbrM=TDPz4iOXs_iLt1rddlS505soW8LnHYNnzm_S0Uj51wA=gdu771QaCyO11Mgznt3NAgOscLvo5o-1tbFh5mrRPl8= > > > I found that link failing, but found this instead: http://www.alan-g.me.uk/l2p2/index.htm The l2p2 was missing. Best Regards- Joe ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI Grid like view with checkboxes in first column
On 29/01/18 16:30, Dragan Mestrovik wrote: > I need some suggestions/help in showing large amount of data in grid like > view with first column having checkboxes. Please see the image attached. > How can i achieve this in Python GUI? > [image: Inline image 1]http://oi39.tinypic.com/28vq6wn.jpg The first thing I'd suggest is do not use Tkinter as the GUI. There are other GUI frameworks with a native grid or table control which will be much more suitable. Whether or not they can put a checkbox in the first column is something you will need to investigate. As an example the wxPython framework has a grid component, and it can use custom renderers so I suspect a checkbox would be one such. But for the details I'd ask on the wxPython mailing list. Other frameworks such as GTk and Qt probably have grids too. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] Python GUI Grid like view with checkboxes in first column
Hi, I need some suggestions/help in showing large amount of data in grid like view with first column having checkboxes. Please see the image attached. How can i achieve this in Python GUI? [image: Inline image 1]http://oi39.tinypic.com/28vq6wn.jpg ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] python gui Tkinter
On 13/01/18 12:05, mamatha n wrote: > please any one give me the code for We don't write code for you (unless you want to pay one of us as a contractor) But we can point you at some examples: > username (entryfld)- > pwrd (entryfld) > login(button),changepwrd(button) So far very basic Tkinter, any tutorial would cover it. You could try mine at: http://www.alan-g.me.uk/tutgui.htm > virtualkeyboard-user has to be use dis keyboard Thisis not a TKinter function its an OS feature. Tkinter will work with whichever keyboard is present. If you want to create your own vuirtual keyboard using Tkinter then thats possible but quite a lot of work. (More tedious than technically difficult though) > once click on login button regester page open GUIs don't usually have the content of pages - unless you want a tabbed notebook metaphor. If so look at the ttk module But usually I'd expect a pop up dialog box to appear, or for the login window to disappear ad a new main window to appear. You need to clarify how it works. > register page content 1.emply name(entryfld) > 2.emply id(entryfld), > 3.mbil no(entryfld), 4. RFID(entryfld) , 5.back (button), > 6.clearbtn(button), 7. ok(button) Since all you need are entry fields and buttons you should have no problem putting it together with the help of any Tkinter tutorial. You probably want to use the grid layout manager for this. > please i need this code immediatly any one tell me please. You will need to write it, if you get stuck feel free to ask, but its all very basic and covered in any tutorial. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] python gui Tkinter
On 13/01/18 12:05, mamatha n wrote: please any one give me the code for username (entryfld)- pwrd (entryfld) login(button),changepwrd(button) virtualkeyboard-user has to be use dis keyboard once click on login button regester page open register page content 1.emply name(entryfld) 2.emply id(entryfld), 3.mbil no(entryfld), 4. RFID(entryfld) , 5.back (button), 6.clearbtn(button), 7. ok(button) next user want to clear employee details click on clear button1. employee id text feild shd open click on ok employee id should be removed please i need this code immediatly any one tell me please. Terribly sorry but that's not how this list works. You provide the code and we help you fix any problems. Anybody giving you the code is doing you a grave disservice in the long term as you will not learn. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] python gui Tkinter
please any one give me the code for username (entryfld)- pwrd (entryfld) login(button),changepwrd(button) virtualkeyboard-user has to be use dis keyboard once click on login button regester page open register page content 1.emply name(entryfld) 2.emply id(entryfld), 3.mbil no(entryfld), 4. RFID(entryfld) , 5.back (button), 6.clearbtn(button), 7. ok(button) next user want to clear employee details click on clear button1. employee id text feild shd open click on ok employee id should be removed please i need this code immediatly any one tell me please. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI
dude, what are all those story comments, did you just edit the mad lib program from Python for Absolute Beginners? On Wed, Jun 29, 2011 at 12:28 AM, David Merrick merrick...@gmail.comwrote: # Guess My Number GUI # Create a story based on user input from tkinter import * import random class Application(Frame): GUI application that creates a story based on user input. def __init__(self, master): Initialize Frame. super(Application, self).__init__(master) self.grid() self.create_widgets() def create_widgets(self): Create widgets to get story information and to display story. # create instruction label Label(self, text = Welcome to 'Guess My Number'!\n\nI'm thinking of a number between 1 and 100.\nTry to guess it in as few attempts as possible. ).grid(row = 0, column = 0, columnspan = 2, sticky = W) # create a label for body parts radio buttons Label(self, text = Take a guess: ).grid(row = 6, column = 0, sticky = W) self.numberEnt = Entry(self) self.numberEnt.grid(row = 6, column = 1, sticky = W) # create a submit button Button(self, text = Click to see if you got it, command = self.testNumber ).grid(row = 7, column = 0, sticky = W) self.numberTxt = Text(self, width = 75, height = 10, wrap = WORD) self.numberTxt.grid(row = 8, column = 0, columnspan = 4) def testNumber(self): Fill text box with new story based on user input. # get values from the GUI # create the story guess = int(self.numberEnt.get()) tries = 1 while guess != the_number: if guess the_number: number += Lower... else: number += Higher... guess = int(self.numberEnt.get()) tries += 1 # display the text self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) number += You guessed it! The number was + the_number number += And it only took you + tries + tries!\n self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) # main number = the_number = random.randint(1, 100) root = Tk() root.title(Mad Lib) app = Application(root) root.mainloop() *Output* Traceback (most recent call last): File I:\Python\programs\guess_my_ numberChapter10.py, line 60, in module number += You guessed it! The number was + the_number NameError: name 'number' is not defined Any ides??? Is my code going to work apart from this problem? -- Dave Merrick merrick...@gmail.com Ph 03 3423 121 Cell 027 3089 169 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI
David Merrick merrick...@gmail.com wrote Others have answered the immediate issue. But... def testNumber(self): guess = int(self.numberEnt.get()) tries = 1 while guess != the_number: if guess the_number: number += Lower... else: number += Higher... guess = int(self.numberEnt.get()) tries += 1 This is all wrong for a GUI appluication. You should not use loops in an event handler. Instead let the event loop in Tkinter do the looping. You respond to the user clicking the submit button and evaluate that single value. You then wait for the next button press to signal that there is a new value to check. Any time you see a loop inside a GUI event handler you should stop and check that it belongs there. Usually it doesn't! number += You guessed it! The number was + the_number number += And it only took you + tries + tries!\n self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) It may just be mail but this appears to be outside the method definition and indeed outside the class. Is that correct? Or just a mail glitch? Since they refer to self they should be inside a method so I'll assume its a mail thing. # main number = the_number = random.randint(1, 100) If you are using classes its normal to put most of the variables inside the classes. There is no reason for the_number to be a global value, it would be better as part of the Application. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI
Just to add to what Alan's said: A key thing you will need to wrap your head around when transitioning to GUI applications is the fact that the application is then not linear (or as linear) as a console/text application. In a console application you basically control everything, and if there needs to be a loop in the application to repeatedly collect user actions or events (such as menu selections and so on) etc, then it's up to you to write this yourself. GUI applications are however different, in that the entire GUI system is event driven. Conceptually what this means is that operating system is ultimately responsible for collecting events (such as mouse clicks, keyboard input, and so on) and it delivers these events/actions to your application by sending it messages (which ultimately translates into functions and methods in your application being called, as if by magic, from the outside.) The upshot of this is, as Alan said, that in most GUI applications you don't write loops to wait for input yourself, you instead hand this off to the operating system. And it knows to call your methods by the fact that in some part of your application you register your interest in receiving various events, typically by providing an event handler (a method to be called when that event happens.) So conceptually, in a console application, you write the main loop yourself, and directly call other methods/functions when certain events happen (such as the user selecting a menu option.) In a GUI application, you can imagine this loop is somewhere inside the operating system (not inside your application), and so your application doesn't provide one itself, instead your application collaborates with the operating system to make your application happen. Object orientation conceptually is all about objects collaborating with other objects by sending and receiving messages, collectively working towards a solution. Hope that helps. Walter ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI
Walter Prins wpr...@gmail.com wrote Just to add to what Alan's said: A key thing you will need to wrap your head around when transitioning to GUI applications is the fact that the application is then not linear (or as linear) as a console/text application. Thanks for the extra detail Walter, I was in a hurry this morning :-) So conceptually, in a console application, you write the main loop ...In a GUI application, you can imagine this loop is somewhere inside the operating system And if you want to compare the two approaches the Event Driven Programming topic in my tutorial has essentially the same application implemented as both a console and GUI app. HTH, -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Python GUI
# Guess My Number GUI # Create a story based on user input from tkinter import * import random class Application(Frame): GUI application that creates a story based on user input. def __init__(self, master): Initialize Frame. super(Application, self).__init__(master) self.grid() self.create_widgets() def create_widgets(self): Create widgets to get story information and to display story. # create instruction label Label(self, text = Welcome to 'Guess My Number'!\n\nI'm thinking of a number between 1 and 100.\nTry to guess it in as few attempts as possible. ).grid(row = 0, column = 0, columnspan = 2, sticky = W) # create a label for body parts radio buttons Label(self, text = Take a guess: ).grid(row = 6, column = 0, sticky = W) self.numberEnt = Entry(self) self.numberEnt.grid(row = 6, column = 1, sticky = W) # create a submit button Button(self, text = Click to see if you got it, command = self.testNumber ).grid(row = 7, column = 0, sticky = W) self.numberTxt = Text(self, width = 75, height = 10, wrap = WORD) self.numberTxt.grid(row = 8, column = 0, columnspan = 4) def testNumber(self): Fill text box with new story based on user input. # get values from the GUI # create the story guess = int(self.numberEnt.get()) tries = 1 while guess != the_number: if guess the_number: number += Lower... else: number += Higher... guess = int(self.numberEnt.get()) tries += 1 # display the text self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) number += You guessed it! The number was + the_number number += And it only took you + tries + tries!\n self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) # main number = the_number = random.randint(1, 100) root = Tk() root.title(Mad Lib) app = Application(root) root.mainloop() *Output* Traceback (most recent call last): File I:\Python\programs\guess_my_ numberChapter10.py, line 60, in module number += You guessed it! The number was + the_number NameError: name 'number' is not defined Any ides??? Is my code going to work apart from this problem? -- Dave Merrick merrick...@gmail.com Ph 03 3423 121 Cell 027 3089 169 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI
The error message tells you everything... On line 60, you try to add to number but the variable hasn't been defined. We aren't going to debug your code for you, do YOU think it will work apart from this? Have you tried running any of the code? It's almost always better to build small parts and test along the way than to write out a whole program and try it at the end. - Sent from a mobile device. Apologies for brevity and top-posting. - On Jun 28, 2011, at 11:28 PM, David Merrick merrick...@gmail.com wrote: # Guess My Number GUI # Create a story based on user input from tkinter import * import random class Application(Frame): GUI application that creates a story based on user input. def __init__(self, master): Initialize Frame. super(Application, self).__init__(master) self.grid() self.create_widgets() def create_widgets(self): Create widgets to get story information and to display story. # create instruction label Label(self, text = Welcome to 'Guess My Number'!\n\nI'm thinking of a number between 1 and 100.\nTry to guess it in as few attempts as possible. ).grid(row = 0, column = 0, columnspan = 2, sticky = W) # create a label for body parts radio buttons Label(self, text = Take a guess: ).grid(row = 6, column = 0, sticky = W) self.numberEnt = Entry(self) self.numberEnt.grid(row = 6, column = 1, sticky = W) # create a submit button Button(self, text = Click to see if you got it, command = self.testNumber ).grid(row = 7, column = 0, sticky = W) self.numberTxt = Text(self, width = 75, height = 10, wrap = WORD) self.numberTxt.grid(row = 8, column = 0, columnspan = 4) def testNumber(self): Fill text box with new story based on user input. # get values from the GUI # create the story guess = int(self.numberEnt.get()) tries = 1 while guess != the_number: if guess the_number: number += Lower... else: number += Higher... guess = int(self.numberEnt.get()) tries += 1 # display the text self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) number += You guessed it! The number was + the_number number += And it only took you + tries + tries!\n self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) # main number = the_number = random.randint(1, 100) root = Tk() root.title(Mad Lib) app = Application(root) root.mainloop() Output Traceback (most recent call last): File I:\Python\programs\guess_my_ numberChapter10.py, line 60, in module number += You guessed it! The number was + the_number NameError: name 'number' is not defined Any ides??? Is my code going to work apart from this problem? -- Dave Merrick merrick...@gmail.com Ph 03 3423 121 Cell 027 3089 169 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI
Message: 2 Date: Wed, 29 Jun 2011 16:28:25 +1200 From: David Merrick merrick...@gmail.com To: tutor@python.org Subject: [Tutor] Python GUI Message-ID: BANLkTinuin4LV=6he26tc2ysxhvqfmd...@mail.gmail.com Content-Type: text/plain; charset=utf-8 # Guess My Number GUI # Create a story based on user input from tkinter import * import random class Application(Frame): GUI application that creates a story based on user input. def __init__(self, master): Initialize Frame. super(Application, self).__init__(master) self.grid() self.create_widgets() def create_widgets(self): Create widgets to get story information and to display story. # create instruction label Label(self, text = Welcome to 'Guess My Number'!\n\nI'm thinking of a number between 1 and 100.\nTry to guess it in as few attempts as possible. ).grid(row = 0, column = 0, columnspan = 2, sticky = W) # create a label for body parts radio buttons Label(self, text = Take a guess: ).grid(row = 6, column = 0, sticky = W) self.numberEnt = Entry(self) self.numberEnt.grid(row = 6, column = 1, sticky = W) # create a submit button Button(self, text = Click to see if you got it, command = self.testNumber ).grid(row = 7, column = 0, sticky = W) self.numberTxt = Text(self, width = 75, height = 10, wrap = WORD) self.numberTxt.grid(row = 8, column = 0, columnspan = 4) def testNumber(self): Fill text box with new story based on user input. # get values from the GUI # create the story guess = int(self.numberEnt.get()) tries = 1 while guess != the_number: if guess the_number: number += Lower... else: number += Higher... guess = int(self.numberEnt.get()) tries += 1 # display the text self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) The problem is here. You have initialised the variable number as a part of the main function and trying to call it within the function of class. You need to initialise the variable here itself, or need to pass the variable (which you initialised in main) to this function. number += You guessed it! The number was + the_number number += And it only took you + tries + tries!\n self.numberTxt.delete(0.0, END) self.numberTxt.insert(0.0, number) # main number = the_number = random.randint(1, 100) root = Tk() root.title(Mad Lib) app = Application(root) root.mainloop() *Output* Traceback (most recent call last): File I:\Python\programs\guess_my_ numberChapter10.py, line 60, in module number += You guessed it! The number was + the_number NameError: name 'number' is not defined Any ides??? Is my code going to work apart from this problem? -- Dave Merrick merrick...@gmail.com Ph 03 3423 121 Cell 027 3089 169 -- next part -- An HTML attachment was scrubbed... URL: http://mail.python.org/pipermail/tutor/attachments/20110629/4057af9d/attachment-0001.html Regards, Priyesh ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
[Tutor] Python GUI Tkinter Button arrangement
Hi.. I am new to python , i have creating one application user agreement..using Tkinter, The Content of the agreement will reading one file...Agree button will click means enable next button. And activate script, Quit button for exit the program,, Dis agree means one warning message will show up.. all are working but one buttons are top of the screen. i want button in bottom of the frame plz. help me.. this my source code Source Code http://pastebin.com/Lm5teAtS Thanks in Advance -Ganesh. -- Did I learn something today? If not, I wasted it. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI Tkinter Button arrangement
I suggest to use boa constructor if you are new learning. just google it. very easy tool to create your interface -- From: Ganesh Kumar bugcy...@gmail.com Sent: Wednesday, February 16, 2011 6:43 PM To: tutor@python.org Subject: [Tutor] Python GUI Tkinter Button arrangement Hi.. I am new to python , i have creating one application user agreement..using Tkinter, The Content of the agreement will reading one file...Agree button will click means enable next button. And activate script, Quit button for exit the program,, Dis agree means one warning message will show up.. all are working but one buttons are top of the screen. i want button in bottom of the frame plz. help me.. this my source code Source Code http://pastebin.com/Lm5teAtS Thanks in Advance -Ganesh. -- Did I learn something today? If not, I wasted it. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python GUI Tkinter Button arrangement
Ganesh Kumar bugcy...@gmail.com wrote I am new to python , i have creating one application user agreement..using Tkinter, The Content of the agreement will reading one file...Agree button will click means enable next button. And activate script, I'm assuming by User Agreement you mean User Interface? Maybe some translation software giving strange results? all are working but one buttons are top of the screen. i want button in bottom of the frame plz. help me.. It would help if you were a bit more explicit. Which button is in the wrong place? this my source code http://pastebin.com/Lm5teAtS There are lots of strange things here. Can I suggest you keep it as simple as possible to start with. And you should certainly not mix GUI tookits. You have Tkinter, wx and GTk all included here. If you use Tkinter stick with that. Also there is no real need for ttk here yet - once you get it working you can add some ttk to make it look pretty but for now I'd stick with plain old Tkinter. (In fact I'd do the same with PMW, but it does at least give you the scrolling text box...) I'm not sure what you think you are doing with the sys.path line: sys.path[:0] = ['../../..'] but I strongly suspect its not what you want! Also it will help if you give your widgets meaningful names. For example: widget = Tkinter.Button(self1, text='Next', command = lambda b='dhana': buttonPress(b) ) why not call it nextButton instead of widget. (personally I just add one or two letters so here it would be a b for Button and the name would be: bNext) It makes the code much easier to understand. You do it for the other buttons, why not that one? Also its usually better to keep all the widget construction in a single place. You have widgets being constructed in 2 different functions: init and initUI. I have no idea what defaultKey() is doing. It defines a function internally which is never used then calls the main Tk() function (I assume tk() is a mistake?) But Tk() should only be called once in an app. I think the line if a1 == 1: should be indented. Finally, it's slightly unusual in a Tkinter app to define the event handler functions inside the GUI building function. It will work but it does mean those evenmt handlers are invisible to the rest of the app which might limit your flexibility to reuse them later All in all it seems like a lot of complexity for what should be a very simple application. Of course you may be intending to change the structure to include much more complex handler functions later. But as it stands it seems complex for what it does. . HTH -- Alan Gauld Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] python gui
Hi, Gabriela! that interesting dashboard can be done. At least you can divide your main window into several subwindows and do what you what you want. Each subwindows would have a dropdownlist to redefine another sub-subwindow inside of it. Tabs are also available in several windowing toolkits for Python. In wxPython you can have a panel and put your subwindows inside of it: http://wxpython.org Another alternative is pyGTK. All the best, hilton Em Quarta 11 Junho 2008 10:03, Gabriela Soares escreveu: Greetings, I want to make a dynamic dashboard, something like: http://examples.adobe.com/flex3/labs/dashboard/main.html# but using python. Is it possible ? Thanks in advance. Best regards, Gabriela Soares. -- Gabriela Soares I learned that courage was not the absence of fear, but the triumph over it. The brave man is not he who does not feel afraid, but he who conquers that fear. Nelson Mandela _ -- Hilton Garcia Fernandes Nucleo de Tecnologias sem Fio (NTSF) -- Wireless Technologies Team Lab de Sistemas Integraveis Tecnologico (LSI) -- Integrable Systems Lab Escola Politecnica (Poli) -- Engineering School Univ S Paulo (USP) Tel: (5511)3091-5676 (work) (5511)8131-5213 (mobile) Av. Prof. Luciano Gualberto,158 trav.3 CEP 05508-900 S. Paulo -- SP -- Brazil Pagina inicial: http://www.lsi.usp.br/~hgfernan ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] python gui
Greetings, I want to make a dynamic dashboard, something like: http://examples.adobe.com/flex3/labs/dashboard/main.html# but using python. Is it possible ? Thanks in advance. Best regards, Gabriela Soares. -- Gabriela Soares I learned that courage was not the absence of fear, but the triumph over it. The brave man is not he who does not feel afraid, but he who conquers that fear. Nelson Mandela ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] python gui
On Wed, Jun 11, 2008 at 8:03 AM, Gabriela Soares [EMAIL PROTECTED] wrote: Greetings, I want to make a dynamic dashboard, something like: http://examples.adobe.com/flex3/labs/dashboard/main.html# but using python. Is it possible ? Yes. -Wayne ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] python gui
I am nto an expert but this might help: http://gaeswf.appspot.com/examples/initial/flex/ Norman Gabriela Soares wrote: Greetings, I want to make a dynamic dashboard, something like: http://examples.adobe.com/flex3/labs/dashboard/main.html# but using python. Is it possible ? Thanks in advance. Best regards, Gabriela Soares. -- Gabriela Soares I learned that courage was not the absence of fear, but the triumph over it. The brave man is not he who does not feel afraid, but he who conquers that fear. Nelson Mandela ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python gui for file input
The simplest way would be to use TkInter which is distributed with Python. Check out the cookbook recipe at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 for a bunch of examples. jason On 1/5/07, Mike Ellis [EMAIL PROTECTED] wrote: Hi all, I am looking to create a simple gui interface to a small script. The script requires the user to input a directory. I would like to allow the user to browse the windows file system for the desired directory rather than type in the full path by hand. This would operate in much the same way as any program when you select FileOpen. Is this possible to do with python? Can anyone point me in the proper direction to find more info on this or perhaps an example script using a similar feature? Thanks for your help, Michael __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python gui for file input
Jason Massey wrote: The simplest way would be to use TkInter which is distributed with Python. Check out the cookbook recipe at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/438123 for a bunch of examples. You might also be interested in EasyGUI which wraps up these and several other simple dialog boxes. http://www.ferg.org/easygui/ Kent ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python gui for file input
Mike Ellis [EMAIL PROTECTED] wrote in I am looking to create a simple gui interface to a small script. The script requires the user to input a directory. You don't need to write an interface just use the standard one. Of course if you want to display the result/output in a GUI then you neeed to do some work. But if you are happy with a console interace, or a silent application, then its just a case of using the common dialogs: import Tkinter as tk import tkFileDialog as fd t = tk.Tk() t.withdraw() # hides the Tk root window'' d = fd.askdirectory() # display the dir dialog print dD:/Development dir(fd)['Dialog', 'Directory', 'Open', 'SaveAs', '_Dialog', '__builtins__', '__doc__','__file__', '__name__', 'askdirectory', 'askopenfile', 'askopenfilename', 'askoenfilenames', 'askopenfiles', 'asksaveasfile', 'asksaveasfilename']As you see there are a number of other dialogs too. Try googling on their names to find example usage. I don't know why this isn't documented in the standard library docs!HTH, -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Python gui for file input
Apologies for the wird formatting, looks like the news reader got confused by Pythons chevrons and thought it was a thread! Hopefully spacing will fix it... Alan Gauld [EMAIL PROTECTED] wrote import Tkinter as tk import tkFileDialog as fd t = tk.Tk() t.withdraw() # hides the Tk root window'' d = fd.askdirectory() # display the dir dialog print d D:/Development dir(fd) ['Dialog', 'Directory', 'Open', 'SaveAs', '_Dialog', '__builtins__', '__doc__','__file__', '__name__', 'askdirectory', 'askopenfile', 'askopenfilename', 'askoenfilenames', 'askopenfiles', 'asksaveasfile', 'asksaveasfilename'] ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor