Tkinter in interactive mode locks when run from subprocess
2010-09-01 14:32:33 GMT
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
Send Tkinter-discuss mailing list submissions to
tkinter-discuss <at> python.org
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.python.org/mailman/listinfo/tkinter-discuss
or, via email, send a message with subject or body 'help' to
tkinter-discuss-request <at> python.org
You can reach the person managing the list at
tkinter-discuss-owner <at> python.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tkinter-discuss digest..."
Today's Topics:
1. Re: python 3.1 - tkinter 8.4 - no tile? (Kevin Walzer)From: Kevin Walzer <kw <at> codebykevin.com>
Date: August 31, 2010 6:25:14 AM GMT-06:00
To: tkinter-discuss <at> python.org
Subject: Re: [Tkinter-discuss] python 3.1 - tkinter 8.4 - no tile?
Reply-To: kw <at> codebykevin.com
On 8/31/10 12:15 AM, Guido Carballo-Guerrero wrote:I don't understand as well, why the Mac Os x Installer Disk Image don't
come already with Tk/Tcl 8.5, specially since the Windows installer
already comes with all that ready, but well. I would even suggest that
Python should come with ttk.
Those anybody knows what Python doesn't comes already with ttk? Why the
Mac installer doesn't have Tk/Tcl as part of the installation?
ttk is standard, I believe, in 3.1, and perhaps 2.7? (Someone correct me here.)
The Mac installer doesn't include Tcl/Tk because the Mac already ships Tcl/Tk, both 8.5 and 8.4 on Snow Leopard.
--Kevin
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
On 9/1/10 11:58 PM, Guido Carballo-Guerrero wrote: > Yes Kevin, I know Snow come with Tk/Tcl 8.5, but for some reason if one > install Python with the dmg installer from Python/Download installer, > for some reason ttk doesn't use Tcl/Tk 8.5, but 8.4 instead. That's true if you use the Python.org installer. The Python installed with OSX links to 8.5. > > To make Python use 8.5 one have to compile the source code, with the > following lines: > > $ ./configure --enable-universalsdk --enable-framework > $ make > $ make frameworkinstall > > Also true. That's basically how I built mine. Building from source isn't hard. --Kevin -- -- Kevin Walzer Code by Kevin http://www.codebykevin.com
On 9/1/10 11:58 PM, Guido Carballo-Guerrero wrote:Yes Kevin, I know Snow come with Tk/Tcl 8.5, but for some reason if one
install Python with the dmg installer from Python/Download installer,
for some reason ttk doesn't use Tcl/Tk 8.5, but 8.4 instead.
That's true if you use the Python.org installer. The Python installed with OSX links to 8.5.
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
> The Python distributed with OSX is 2.x. If you want to use Python 3.x and > install it from the python.org <http://python.org> dmg, the same problem > arises (the issue that began > this thread). Apparently, all versions for OSX must be installed by > compiling > from source if Tk is to be used. Also true. Apple ships Tk 8.4 mainly for backwards compatibility, and the MacPython maintainers target this version for Tkinter to link to, also for backwards compatibility. I believe ActiveState's Python distribution supports 8.5 on the Mac, by the way. --Kevin -- -- Kevin Walzer Code by Kevin http://www.codebykevin.com
On 9/2/2010 6:41 AM, Kevin Walzer wrote: > I believe ActiveState's Python distribution supports 8.5 on the Mac, > by the way. Yes, ActivePython 2.6 and 2.7 already does. A new release of ActivePython 3.1 w/ Tcl/Tk 8.5, Mac 64-bit and PyPM is to be expected next week (we have an internal beta build if anyone wants to try it out). -srid
Hello,
I am a total beginner with python and tkinter and I am having a hard time getting my program working, I think the problem come from passing variables.
I would like to have a menu that would with three main buttons, the first one (LUT) let me chosse between two files, the second button (rrs) opens a browser to choose a file and the third button would run a program (or function) that makes some computation between the two files open with button 1 and button 2,
Here is what I have written
from Tkinter import *
from tkFileDialog import askopenfilename
import numpy as np
class openfile():
def __init__(self, yn):
if yn == 0 : self.lut = np.loadtxt("C:\python26\LUTnpdi_chile",dtype=np.float,skiprows=1)
if yn == 1 : self.lut = np.loadtxt("C:\python26\LUTnpdi_nwa",dtype=np.float,skiprows=1)
if yn == 2 : filename = askopenfilename(filetypes=[("allfiles","*"),("pythonfiles","*.py")])
if yn == 2 : self.lut = np.loadtxt(filename,dtype=np.float,skiprows=1)
Class rrs_file(self,rrs):
filename = askopenfilename(filetypes=[("allfiles","*"),("pythonfiles","*.py")])
rrs = np.loadtxt(filename,dtype=np.float,skiprows=1)
def make_comp():
result = self.lut[1,2] * rrs[1,2]
print result
def callback():
print "called the callback!"
root = Tk()
# create a menu
menu = Menu(root)
root.config(menu=menu)
filemenu = Menu(menu)
menu.add_cascade(label="LUT", menu=filemenu)
filemenu.add_command(label="East Pacific", command=lambda:openfile(0))
filemenu.add_command(label="NW Atlantic", command=lambda:openfile(1))
image_menu = Menu(menu)
menu.add_cascade(label="Rrs", command=rrs_file)
run_menu = Menu(menu)
menu.add_cascade(label="Run", command = make_comp)
quitmenu = Menu(menu)
menu.add_cascade(label="Quit", command=root.destroy)
#x = openfile(2)
mainloop()
I can not figure out how to pass get the lut and rrs parameters that I have defined in the class objects?
I need help !!!
Thank you very much in advance.
Emmanuel
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
Hello,
I modified your code to make it work:
http://paste-it.net/public/m46ae5d/
Certainly, to be able to re-write the code, I made some assumptions and guesses about your original intentions. Just check the code to see if it is close to what you want.
Firat
Hello,
I am a total beginner with python and tkinter and I am having a hard time getting my program working, I think the problem come from passing variables.I would like to have a menu that would with three main buttons, the first one (LUT) let me chosse between two files, the second button (rrs) opens a browser to choose a file and the third button would run a program (or function) that makes some computation between the two files open with button 1 and button 2,
Here is what I have written
from Tkinter import *
from tkFileDialog import askopenfilename
import numpy as npclass openfile():
def __init__(self, yn):
if yn == 0 : self.lut = np.loadtxt("C:\python26\LUTnpdi_chile",dtype=np.float,skiprows=1)
if yn == 1 : self.lut = np.loadtxt("C:\python26\LUTnpdi_nwa",dtype=np.float,skiprows=1)
if yn == 2 : filename = askopenfilename(filetypes=[("allfiles","*"),("pythonfiles","*.py")])
if yn == 2 : self.lut = np.loadtxt(filename,dtype=np.float,skiprows=1)Class rrs_file(self,rrs):
filename = askopenfilename(filetypes=[("allfiles","*"),("pythonfiles","*.py")])
rrs = np.loadtxt(filename,dtype=np.float,skiprows=1)
def make_comp():
result = self.lut[1,2] * rrs[1,2]
print result
def callback():
print "called the callback!"root = Tk()
# create a menu
menu = Menu(root)
root.config(menu=menu)filemenu = Menu(menu)
menu.add_cascade(label="LUT", menu=filemenu)
filemenu.add_command(label="East Pacific", command=lambda:openfile(0))
filemenu.add_command(label="NW Atlantic", command=lambda:openfile(1))image_menu = Menu(menu)
menu.add_cascade(label="Rrs", command=rrs_file)run_menu = Menu(menu)
menu.add_cascade(label="Run", command = make_comp)quitmenu = Menu(menu)
menu.add_cascade(label="Quit", command=root.destroy)#x = openfile(2)
mainloop()
I can not figure out how to pass get the lut and rrs parameters that I have defined in the class objects?
I need help !!!
Thank you very much in advance.
Emmanuel
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
Hi, I'm a newbie in programming (2 weeks) and I use a windows vista 32 computer. I've currently installed the phyton - 3.2.a2.msi file. Previciously I used versions 2.7 and 3.0 and 3.1.2. But no one gets the tkinter module to start. All the previous releases are uninstalled. However I don't know how to get around this problem quickly. My goal is to go back to the last 3.1.2 version and get it to work properly. I hope you have any suggestions that are not too difficult without a lot of knowledge.
Hello,
Until Python's 3.0 version, the name of the Tkinter module was "Tkinter". Therefore we used to import this module as:
>>> import Tkinter
Starting from Python 3.0, the name of this module is "tkinter". So you should issue the following command to import the module:
>>> import tkinter
Normally, Tkinter module is part of the Windows Python installer. You do not need to install anything special to make Tkinter work under Windows.
Just tell us what the output of this command in your system is:
>>> import sys
>>> sys.version
Hi,
I'm a newbie in programming (2 weeks) and I use a windows vista 32 computer.
I've currently installed the phyton - 3.2.a2.msi file. Previciously I used
versions 2.7 and 3.0 and 3.1.2. But no one gets the tkinter module to start. All
the previous releases are uninstalled. However I don't know how to get around
this problem quickly. My goal is to go back to the last 3.1.2 version and get it
to work properly. I hope you have any suggestions that are not too difficult
without a lot of knowledge.
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss <at> python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss <at> python.org http://mail.python.org/mailman/listinfo/tkinter-discuss
RSS Feed4 | |
|---|---|
20 | |
14 | |
42 | |
15 | |
23 | |
4 | |
13 | |
60 | |
20 | |
3 | |
16 | |
51 | |
35 | |
30 | |
21 | |
41 | |
4 | |
22 | |
16 | |
26 | |
26 | |
60 | |
24 | |
19 | |
18 | |
14 | |
17 | |
34 | |
46 | |
174 | |
86 | |
58 | |
18 | |
59 | |
18 | |
34 | |
20 | |
44 | |
11 | |
22 | |
28 | |
21 | |
12 | |
25 | |
21 | |
30 | |
33 | |
41 | |
27 | |
54 | |
33 | |
13 | |
41 | |
8 | |
85 | |
27 | |
25 | |
42 | |
114 | |
48 | |
19 | |
44 | |
50 | |
40 | |
45 | |
25 | |
9 | |
7 | |
1 | |
24 | |
12 | |
18 | |
15 | |
18 | |
10 | |
15 | |
57 | |
25 | |
53 | |
48 | |
27 | |
16 | |
37 | |
44 | |
39 | |
47 | |
34 | |
31 | |
45 | |
6 | |
18 | |
19 | |
32 | |
12 | |
10 | |
15 | |
28 | |
55 | |
26 | |
45 | |
31 | |
14 | |
24 | |
31 | |
51 | |
10 | |
13 | |
14 | |
32 | |
33 | |
19 |