Am 19.06.21 um 08:48 schrieb Jach Feng:
Christian Gollwitzer 在 2021年6月19日 星期六下午1:54:46 [UTC+8] 的信中寫道:
I guess you wanted to post another question? Then please open a new
thread. In addition, the question is unclear, you just posted a
transcript of three lines of Python.
I posted to point out
Am 19.06.21 um 07:16 schrieb Jach Feng:
Christian Gollwitzer 在 2021年6月19日 星期六下午12:27:54 [UTC+8] 的信中寫道:
Am 19.06.21 um 05:59 schrieb Jach Feng:
import tkinter as Tk
Tk
from tkinter import *
Tk
tkinter
Traceback (most recent call last):
File "", line 1, in
NameError: name 'tkinter' is not
On 6/18/2021 2:28 AM, Liya Ann Sunny wrote:
I am using Colab. How could solve this problem.
import tkinter as Tk
If you do this, import 'as tk'.
from tkinter import *
The second import overwrites the first since it imports tkinter.Tk as
'Tk'. Don't try to do both.
import sys
import os
Am 19.06.21 um 05:59 schrieb Jach Feng:
import tkinter as Tk
Tk
from tkinter import *
Tk
tkinter
Traceback (most recent call last):
File "", line 1, in
NameError: name 'tkinter' is not defined
What's the point? That has no relation to the question.
"import A as B" does not define
Christian Gollwitzer 在 2021年6月19日 星期六下午1:54:46 [UTC+8] 的信中寫道:
> Am 19.06.21 um 07:16 schrieb Jach Feng:
> > Christian Gollwitzer 在 2021年6月19日 星期六下午12:27:54 [UTC+8] 的信中寫道:
> >> Am 19.06.21 um 05:59 schrieb Jach Feng:
> >> import tkinter as Tk
> >> Tk
> >>> >>> 'C:\\Users\\jfong\\AppData
Christian Gollwitzer 在 2021年6月19日 星期六下午12:27:54 [UTC+8] 的信中寫道:
> Am 19.06.21 um 05:59 schrieb Jach Feng:
> import tkinter as Tk
> Tk
> > > 'C:\\Users\\jfong\\AppData\\Local\\Programs\\Python\\Python36-32\\lib\\tkinter\\__init__.py'>
> >
> from tkinter import *
> Tk
> >
liyaanns...@gmail.com 在 2021年6月18日 星期五下午2:28:35 [UTC+8] 的信中寫道:
> I am using Colab. How could solve this problem.
> import tkinter as Tk
> from tkinter import *
> import sys
> import os
> #create main window
> master = Tk()
> master.title("tester")
> master.geometry("300x100")
>
>
> #make
Am 18.06.21 um 08:28 schrieb Liya Ann Sunny:
I am using Colab. How could solve this problem.
TclError: couldn't connect to display ":0.0"
You're either not running an X server, or having problems to connect to it.
Are you sure that Google Colab supports X11 at all? This link doesn't
seem to
gemjack...@gmail.com wrote:
>This fixed my problem with thkinter. sudo cp ~/.Xauthority ~root/
Which means that you were creating a GUI window with Python as root,
which is to be avoided if you can. If you can't avoid it and you're
running it with sudo in a bash console, rather than a root
On Sunday, 29 December 2013 20:20:00 UTC, Michael Matveev wrote:
> Hi,
> I use live Debian on VM and trying to compile this code.
>
>
> import Tkinter
>
> root = Tkinter.Tk()
>
> root.title("Fenster 1")
> root.geometry("100x100")
>
> root.mainloop()
>
>
> The shell gives out that kind of
On Sun, Dec 29, 2013 at 10:29 PM, Steven D'Aprano wrote:
> On Mon, 30 Dec 2013 10:30:11 +1100, Chris Angelico wrote:
>
> > On Mon, Dec 30, 2013 at 10:22 AM, Steven D'Aprano
> > wrote:
> >> So you need to X-forward from the remote machine to the machine you are
> >> physically on, or perhaps it's
On Mon, Dec 30, 2013 at 2:29 PM, Steven D'Aprano wrote:
> On Mon, 30 Dec 2013 10:30:11 +1100, Chris Angelico wrote:
>
>> On Mon, Dec 30, 2013 at 10:22 AM, Steven D'Aprano
>> wrote:
>>> So you need to X-forward from the remote machine to the machine you are
>>> physically on, or perhaps it's the o
On Mon, 30 Dec 2013 10:30:11 +1100, Chris Angelico wrote:
> On Mon, Dec 30, 2013 at 10:22 AM, Steven D'Aprano
> wrote:
>> So you need to X-forward from the remote machine to the machine you are
>> physically on, or perhaps it's the other way (X is really weird). I
>> have no idea how to do that,
On Mon, Dec 30, 2013 at 10:22 AM, Steven D'Aprano
wrote:
> So you need to X-forward from the remote machine to the machine you are
> physically on, or perhaps it's the other way (X is really weird). I have no
> idea how to do that, but would love to know.
With SSH, that's usually just "ssh -X tar
Michael Matveev wrote:
> Hi,
> I use live Debian on VM and trying to compile this code.
>
>
> import Tkinter
>
> root = Tkinter.Tk()
>
> root.title("Fenster 1")
> root.geometry("100x100")
>
> root.mainloop()
>
>
> The shell gives out that kind of message:
>
> File "test.py", line 5, in
On Mon, Dec 30, 2013 at 7:20 AM, Michael Matveev
wrote:
> The shell gives out that kind of message:
>
> File "test.py", line 5, in
> root = Tkinter.Tk()
> File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1712, in __init__
> self.tk = _tkinter.create(screenName, baseName, className, interactive,
"David Smith" wrote in message
news:h35f78$pt...@ruby.cit.cornell.edu...
> Paul Simon wrote:
>> "Peter Otten" <__pete...@web.de> wrote in message
>> news:h3481q$d95$0...@news.t-online.com...
>>> Paul Simon wrote:
>>>
"Chris Rebert" wrote in message
news:mailman.2863.1247095339.8015.py
Paul Simon wrote:
> "Peter Otten" <__pete...@web.de> wrote in message
> news:h3481q$d95$0...@news.t-online.com...
>> Paul Simon wrote:
>>
>>> "Chris Rebert" wrote in message
>>> news:mailman.2863.1247095339.8015.python-l...@python.org...
>>> On Wed, Jul 8, 2009 at 4:18 PM, Paul Simon wrote:
Paul Simon wrote:
"Peter Otten" <__pete...@web.de> wrote in message
news:h3481q$d95$0...@news.t-online.com...
Paul Simon wrote:
I"m using Mandriva 2008.1. I have to tell you honestly that I'm not sure
exactly how I installed Python. Originally I had installed 2.5 from RPM
but 2.6 was not a
Paul Simon wrote:
>
> "Peter Otten" <__pete...@web.de> wrote in message
> news:h3481q$d95$0...@news.t-online.com...
>> Paul Simon wrote:
>>
>>> "Chris Rebert" wrote in message
>>> news:mailman.2863.1247095339.8015.python-l...@python.org...
>>> On Wed, Jul 8, 2009 at 4:18 PM, Paul Simon wrote:
>>
"Peter Otten" <__pete...@web.de> wrote in message
news:h3481q$d95$0...@news.t-online.com...
> Paul Simon wrote:
>
>> "Chris Rebert" wrote in message
>> news:mailman.2863.1247095339.8015.python-l...@python.org...
>> On Wed, Jul 8, 2009 at 4:18 PM, Paul Simon wrote:
>>> I have the "tkinter" proble
Paul Simon wrote:
> "Chris Rebert" wrote in message
> news:mailman.2863.1247095339.8015.python-l...@python.org...
> On Wed, Jul 8, 2009 at 4:18 PM, Paul Simon wrote:
>> I have the "tkinter" problem and need some assistance to straighten it
>> out.
>> >From the web page "http://wiki.python.org/moi
"Chris Rebert" wrote in message
news:mailman.2863.1247095339.8015.python-l...@python.org...
On Wed, Jul 8, 2009 at 4:18 PM, Paul Simon wrote:
> I have the "tkinter" problem and need some assistance to straighten it
> out.
> >From the web page "http://wiki.python.org/moin/TkInter"; I tested as i
On Wed, Jul 8, 2009 at 4:18 PM, Paul Simon wrote:
> I have the "tkinter" problem and need some assistance to straighten it out.
> >From the web page "http://wiki.python.org/moin/TkInter"; I tested as in "step
> 1" and cannot import "_tkinter." I do not have that file on my computer, but
> do have t
curiouserra...@gmail.com wrote:
Thanks! I hadn't known about the "return 'break'" technique. But
I don't follow your sentinel suggestion; how would that sentinel
ever get reset?
Presumably you would set it from some kind of input. Basically, if you
don't need to zoom, you wouldn't bother sca
On Feb 8, 6:27 am, James Stroud wrote:
> I can't test your code because I don't have the test image and for some
> reason it does not recognize a tiff of my own. But, just glancing at
> your code, it looks like a quick-fix would be to set self.zoom to a
> sentinel at the end of refresh() and retu
Randy Smith wrote:
The cropping and scrolling works fine. But when I try to add
responding to resize events, I get into trouble. Specifically:
* When I naively change the size of the image shown to be borderwidth
less than the size indicated in the configure event, the size of the
image sho
Wow, nice!
But, with join i can't padding with 0.
'-'.join(str(random.randint(0, 60)) for dummy in xrange(6))
Then, i has been used:
a[i] = "%02d" % int(random.randint(0,60))
I will change int(random.randint(0,60)) for random.randint(0,60), only.
Thank you, guys !! ;-)
The problem was solved whe
On Mon, 05 Jan 2009 12:25:53 -0200, Djames Suhanko wrote:
> I has a litle program that open another window. When I close de root
> window in quit button, I need clicking 2 times to close. is where the
> problem?
>
> […]
>
> 17 def gera_seis(self):
> 18a = {}
> 19for i in range(6):
>
On Jan 5, 9:21 am, Roger wrote:
> On Jan 5, 11:52 am, Collin D wrote:
>
>
>
> > On Jan 5, 6:25 am, "Djames Suhanko" wrote:
>
> > > Hello!
> > > I'm sorry my terrible english (my native language is portuguese).
> > > I has a litle program that open another window. When I close de root
> > > windo
On Jan 5, 11:52 am, Collin D wrote:
> On Jan 5, 6:25 am, "Djames Suhanko" wrote:
>
>
>
> > Hello!
> > I'm sorry my terrible english (my native language is portuguese).
> > I has a litle program that open another window. When I close de root
> > window in quit button, I need clicking 2 times to cl
On Jan 5, 6:25 am, "Djames Suhanko" wrote:
> Hello!
> I'm sorry my terrible english (my native language is portuguese).
> I has a litle program that open another window. When I close de root
> window in quit button, I need clicking 2 times to close. is where the
> problem?
>
> The source:
> 1 #!
Djames Suhanko wrote:
> Hello!
> I'm sorry my terrible english (my native language is portuguese).
> I has a litle program that open another window. When I close de root
> window in quit button, I need clicking 2 times to close. is where the
> problem?
>
> The source:
> 1 #!/usr/bin/env python
Hi all,
I have solved the problem after read some code. Because Tk.Canvas do
not have a focus, it does not receive a key input. The solution is
bind key input to the highest level 'root'
root.bind('',self._onUpKey)
Davy
On Nov 20, 10:13 am, Davy <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have w
Marc 'BlackJack' Rintsch wrote:
> On Mon, 19 Nov 2007 18:13:03 -0800, Davy wrote:
>
>> ##--
>> from Tkinter import *
>>
>> class MyApp:
>> def __init__(self,parent):
>> self.myContainer1 = Frame(parent)
>> self.myContainer1.pack()
>> self.canv = Ca
On Mon, 19 Nov 2007 18:13:03 -0800, Davy wrote:
> ##--
> from Tkinter import *
>
> class MyApp:
> def __init__(self,parent):
> self.myContainer1 = Frame(parent)
> self.myContainer1.pack()
> self.canv = Canvas(relief=SUNKEN)
> self.canv.confi
On Nov 19, 8:13 pm, Davy <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have written a simple Tkinter program, that is draw a rectangle in a
> canvas, when I press Up key, the rectangle move up. But the program
> seems work not properly? My environment is Python2.5+PythonWin.
>
> ##
Simon Forman <[EMAIL PROTECTED]> wrote:
> Just an idea, but if you're sure that
> /usr/lib/python2.4/lib-dynload/_tkinter.so exists, check it's
> permissions and the permissions of /usr/lib/python2.4/lib-dynload/
Also run ldd on it - you could be missing a library
eg
$ ldd /usr/lib/python2.4/
Jim Anderson wrote:
> I'm running Kubuntu a derivative of Debian Linux. I'm using
> Python 2.4 and tcl/tk 8.4. I'm running Tkinter programs and
> they were running about a month ago. When I tried them again
> yesterday, I got the following message:
>
> > python ~/prog/python/iodef/iodef.py
> > Tr
In article
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Andrew Trevorrow) wrote:
> Our app uses embedded Python to allow users to run arbitrary scripts.
> Scripts that import Tkinter run fine on Windows, but on Mac OS X there
> is a serious problem. After a script does "root = Tk()" our app's menus
Andrew Trevorrow wrote:
> Our app uses embedded Python to allow users to run arbitrary scripts.
> Scripts that import Tkinter run fine on Windows, but on Mac OS X there
> is a serious problem. After a script does "root = Tk()" our app's menus
> are permanently changed in the following way:
>
> -
C D Wood wrote:
> To whom this may concern,
> Below is the source code, which
>
> demonstrates a
> problem I am having making a GUI for my python project work.
> 'table.txt'
> is a file that is read from the same folder.
>
> My code writes to a text file 'ta
Thanks!
At this moment I can see the first python generated Tk window on my
screen. It's great ;-)))
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Oct 31, 2005 at 03:17:05PM -0800, dale cooper wrote:
> Thanks, but I've got another question:
>
> can't find Tcl configuration script "tclConfig.sh"
This file comes from the following package:
$ rpm -qf /usr/lib*/tclConfig.sh
tcl-devel-8.4.9-3
Fedora generally splits packages which are
Thanks, but I've got another question:
can't find Tcl configuration script "tclConfig.sh"
This is what I received trying to install TkBLT. What is tclConfig.sh?
I did installed tcl/tk 8.4.9-3 as I mentioned before, I tried to find
this file, but I don't have it in my filesystem. How to get it?
-
"dale cooper" wrote:
> I've recently installed python2.4.2 on Fedora 4 (from downloaded
> sources), but it appeared, that I can't use Tkinter module:
>
import Tkinter
> Traceback (most recent call last):
> File "", line 1, in ?
> File "/usr/local/lib/python2.4/lib-tk/Tkinter.py", line 38, i
These lines
> if __name__ == '__main__':
> OptionsWindow()
mean "if this source code is the main program (not an imported module),
call OptionsWindow()". So the behavior should be different when the
source code is the main program ('python opt_newlogin.py') and when it's
imported ('python -c "
47 matches
Mail list logo