Python tkinter grid problem?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Python tkinter grid problem?
# 1  
Old 06-19-2004
Question Python tkinter grid problem?

There seems to be some problem with the grid geometry manager, or maybe its just my syntax thats incorrect. Im using Python 2.3.4. My problem is that even when I use the sticky='news' option in any grid method, it just doesnt work period. For example, the following code gives be a window with a small button in the middle. The desired effect was a button whos size matched the size of the window.

Code:
# import resources
from Tkinter import *

# the root window
root=Tk()
root.geometry('200x100')
root.title('Grid Tester')
root.resizable(0, 0)
# the tester frame
tester=Button(root, text="Test")
tester.grid(row=0, column=0, sticky='nsew')

# the event loop
root.mainloop()

I have tried a few other things such as, sticky=NSEW, sticky=nsew, sticky="NSEW". I hope it doesnt matter what order you put them in.. Please let me know if this is a problem with my syntax, and correct me if so. Also, this is my first post on unix.com so... HELLO EVERY ONE!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python problem with input

Hello everyone, I have just started python, and there is something that escapes me. I don't understand why my little script doesn't work. When I do, it work: my_string = "bonjour" if len(my_string) < "6": print(my_string + " < 6") else: print(my_string + " > 6") ... (2 Replies)
Discussion started by: Arnaudh78
2 Replies

2. Shell Programming and Scripting

Python SSH problem

Hello geeks, Am trying to write a custom plugin using python but it seems python is not handling the SSH part well, find below for the code: #!/usr/bin/python import os, sys host = sys.argv pdpactgsm=os.popen("ssh -l GbeAdi $host "pdc_kpi.pl" | grep -A 4 sgsn_g | awk 'NR == 5 ' |... (1 Reply)
Discussion started by: infinitydon
1 Replies

3. AIX

Strange problem running python program from within ant

Hello, I'm currently trying to port an ant based build to AIX 6.1. The build queries the underlying version control system (Mercurial) for some data, which works fine on other platforms (Linux, Solaris). However, on AIX the hg command fails to load python's md5 module when used in the build,... (1 Reply)
Discussion started by: dhs
1 Replies

4. Shell Programming and Scripting

Problem with python script

I have a txt file of 8GB with same type of messages in it. for eg: MTQ_BQUOTE, Length: 40, Timestamp: 4:00:52.064 MsgKey: symbol: XXX | reportingExchange: 11 Symbol: XXX, hash 004C5746 QS Symbol: XXX, market 1 Security Type: EQUAL (1) Symbol Type: Equity.Share.Single.None Session: XX_XXX (0)... (9 Replies)
Discussion started by: Vijeta Laad
9 Replies

5. Shell Programming and Scripting

Problem passing arguments to a Python script

I have part of the script below and I tried calling the script using ./tsimplex.py --fstmod=chris.cmod --nxz=8x6 --varp=0.25 but am getting the error option --fstmod must not have an argument Any idea on how to fix this would be highly appreciated #! /usr/bin/python import... (0 Replies)
Discussion started by: kristinu
0 Replies

6. UNIX for Dummies Questions & Answers

problem with python on mac

Hi, I'm sure there's a very easy way to fix this but i'm a newbie so I'm posting this. The problem is that whenever I run python on the terminal I can no longer use the left and right arrows to move left or right, or the up/down arrows to call commands used before. Whenever I click an arrow I get... (0 Replies)
Discussion started by: thefloydpink
0 Replies

7. High Performance Computing

how to do GRID COMPUTING?

Hello, I want to know how to combine the processing power of given 2 FEDORA machines in LAN. Can you please tell me the commands,etc used to perform such an operations.Can you please give me the links where I can find more info on this topic. (5 Replies)
Discussion started by: nsharath
5 Replies

8. High Performance Computing

Grid vs. Parallel vs. Distributed

Hello all, I was wondering if someone could either explain or maybe point me to another article somewhere that explains the difference between: distributed computing grid computing parallel computing I see these terms thrown around a lot in server and cluster environments, but I'd like a... (2 Replies)
Discussion started by: Heathe_Kyle
2 Replies

9. Shell Programming and Scripting

How to create a grid file

Hi everybody: I want to create a grid file for export to statistical program. My aid is create a file with both rows, one row are x coordenates and other for y coordenates. All grid obviousolly are same space. the form that i want is this: x=(400000 ........ 600000) and y=(4000000 .......... (1 Reply)
Discussion started by: tonet
1 Replies
Login or Register to Ask a Question
svm-grid(1)							   User Manuals 						       svm-grid(1)

NAME
svm-grid - a parameter selection tool for LIBSVM SYNOPSIS
svm-grid [-log2c begin,end,step ] [ -log2g begin,end,step ] [ -v fold ] [ -svmtrain pathname ] [ -gnuplot pathname ] [ -out pathname ] [ -png pathname ] [ additional_parameters_for_svm-train ] dataset DESCRIPTION
grid.py is a parameter selection tool for C-SVM classification using the RBF (radial basis function) kernel. It uses cross validation (CV) technique to estimate the accuracy of each parameter combination in the specified range and helps you to decide the best parameters for your problem. FILES
See svm-train(1) for the format of dataset EXAMPLES
svm-grid -log2c -5,5,1 -log2g -4,0,1 -v 5 -m 300 heart_scale BUGS
Please report bugs to the Debian BTS. AUTHOR
Chih-Chung Chang, Chih-Jen Lin <cjlin@csie.ntu.edu.tw>, Chen-Tse Tsai <ctse.tsai@gmail.com> (packaging) SEE ALSO
svm-train(1), svm-predict(1) Linux DEC 2009 svm-grid(1)