• Member Avatar for woooee
    woooee

    Replied To a Post in Using inheritance with Tkinter

    You have to explicitly call the init method in child classes. Also, I am guessing that the widgets are not showing because they are not explicitly placed in the root …
  • Member Avatar for woooee
    woooee

    Began Watching class variable scope

    class MemberCounter: members = 0 def init(self): MemberCounter.members += 1 # m1 = MemberCounter() # m1.init() # MemberCounter.members -> 1 # m2 = MemberCounter() # m2.init() # MemberCounter.members -> 2 …
  • Member Avatar for woooee
    woooee

    Replied To a Post in class variable scope

    You are printing separate variables. MemberCounter.members is different from m1.members="Two". Print the id() of each, which will show that they all occupy different memory locations. You might also want to …
  • Member Avatar for woooee
    woooee

    Began Watching Cannot find Tkinter on Windows

    Hi everyone, I recently installed Python on Windows. I wanted to develop a gui program using Tkinter. The problem is that when I try to import Tkinter module. It gives …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Cannot find Tkinter on Windows

    You also have to have TCL and Tk installed. I don't know if it comes with MS Windows or not but this link has a section for installing [Click Here](http://www.tkdocs.com/tutorial/install.html) …
  • Member Avatar for woooee
    woooee

    Began Watching 'geteuid' windows

    if __name__ == "__main__": args = parse_args() install_path = os.getcwd() if os.getuid() != 0 and args.create_user and not args.no_install_prequisites: While compiling the above source code in windows i get this …
  • Member Avatar for woooee
    woooee

    Replied To a Post in 'geteuid' windows

    > module' object has no attribute 'geteuid' windows There is no "geteuid" in the code you posted. You will have to post the entire error message so we can tell …
  • Member Avatar for woooee
    woooee

    Began Watching Inputs for python

    in python, I want to code for the user to choose between a 4-sided dice, a 6-sided dice or a 12-sided dice. how do i do that?
  • Member Avatar for woooee
    woooee

    Replied To a Post in Inputs for python

    And is input from the command line, or are you using a GUI toolkit to get input and show the dice.
  • Member Avatar for woooee
    woooee

    Began Watching Random arrangement of set of words in python

    I need a programming for following conditions in python... When the program is launched it should ask me for the number of words... Then as many words as input... then …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Random arrangement of set of words in python

    This homework question comes up every year so there are other posts that you can look at. We do not do your homework for you however. Also, posting on multiple …
  • Member Avatar for woooee
    woooee

    Replied To a Post in There is an elephant on the loo!

    That's his story and he's sticking to it. Hope he has a note from his doctor.
  • Member Avatar for woooee
    woooee

    Replied To a Post in There is an elephant on the loo!

    A pair of doctors in Texas discovered a 61-year-old man who appeared to be constantly drunk for five years had a rare condition that caused his stomach to turn food …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Problems with if loop

    I am not sure what you want to do, print names not found or print the food associated with the name. This prints the names not found. ##------------------------------------------------------------------ ## names_file …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Problems with if loop

    You can use and else. What is wrong with the code I posted earlier? if j +"\n" == line and num %2 == 1: response= linecache.getline ("SearchText.txt", num +1) wordList …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Problems with if loop

    I don't understand what "stuck in a loop" means. The only loop(s) are the two for() loops and they exit when the data is exhausted. ## with open("SearchText.txt").readlines() as test_records: …
  • Member Avatar for woooee
    woooee

    Began Watching Problems with if loop

    I am a newbie to python so exude the not so well constructed code.. I have two text files. The first one (WordFile1.txt) is " John Mary Joe alice William …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Problems with if loop

    Try using readlines instead, and check that searchWord actually contains something otherwise you can write blanks to the file. with open("SearchText.txt").readlines() as records: for num, line in enumerate(records): ...... ## …
  • Member Avatar for woooee
    woooee

    Began Watching Python timer?

    I am an amateur python coder and i was wondering if it is possible to put a timer into my times table game and if possible where i could put …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Python timer?

    Do you mean you want to limit the amout of time the user has to answer the question or something else? A while loop or a 'return' from a function …
  • Member Avatar for woooee
    woooee

    Began Watching Take screenshot with python

    Hi I would like my python script take screenshot of my desktop every 15 mints and saving in my home dir in pic folder.but I get error? import os import …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Take screenshot with python

    Traceback (most recent call last): File "C:UserslinuxDesktopscreenshot1.py", line 11, in <module> img.save(SAVE_PATH) Print SAVE_PATH to see what name the program is trying to use (not the one you think it …
  • Member Avatar for woooee
    woooee

    Began Watching Tkinter Issue with Radio Buttons

    Trying use radio buttons to select which host I'm referring to since ultimately there will only be two and they are fixed addresses. This is the error: File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Tkinter Issue with Radio Buttons

    Using partial is easier and makes more sense IMHO [Partial examples](http://pymotw.com/2/functools/) from functools import partial ... ## to send "on" and "host" to callback_power_on function b = Button(master, text="Power On", …
  • Member Avatar for woooee
    woooee

    Began Watching Help with Classes and functions

    I'm trying to figure out a way to define my function for loaning a book within a class. This is what I have so far: class Library: # the class …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Help with Classes and functions

    What is "patrons"? It looks like a list of Patron class instances. If so, please include the Patron class code also. In loan_book() you only check the book_id if the …
  • Member Avatar for woooee
    woooee

    Began Watching how do i backspace from last number and also clear th? last equation

    how do i backspace from last number and also clear th? last equation and add a quit button????????? from tkinter import * from tkinter.font import Font def button(frame, text, command=None): …
  • Member Avatar for woooee
    woooee

    Replied To a Post in how do i backspace from last number and also clear th? last equation

    You copied two separate answers to your thread [from StackOverflow](http://stackoverflow.com/questions/20318028/how-do-i-backspace-and-clear-the-last-equation-and-also-a-quit-button)and combined them which yields the indentation mistakes and the orphaned else statement.
  • Member Avatar for woooee
    woooee

    Began Watching Common File Types

    Hello, I've created a script that parses and downloads images from a website however now what I want to do is create a script that matches the files I've downloaded …
  • Member Avatar for woooee
    woooee

    Replied To a Post in Common File Types

    There is no reason to reinvent the wheel. You can use the identify program from ImageMagick to do that for you.
  • Member Avatar for woooee
    woooee

    Began Watching how do i backspace from last number and also clear th? last equation

    how do i backspace from last number and also clear th? last equation and add a quit button????????? from tkinter import * from tkinter.font import Font def button(frame, text, command=None): …
  • Member Avatar for woooee
    woooee

    Replied To a Post in how do i backspace from last number and also clear th? last equation

    You can [bind the <BackSpace> key](http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm) to a function just like any other key. If you want to erase the last character in and entry widget for example, then get …

The End.