Jump to content
Sign in to follow this  
tejano96

Python + Windows Vista

Recommended Posts

tejano96

Boas,

Instalei o Python sobre o windows Vista e quando tudo parecia bem, corri um pequeno programa que usa o Tkinter e "voilá":

Traceback (most recent call last):

  File "C:\Users\sepnufe\Documents\Python\String_search\search_r1_1.py", line 49, in <module>

    power_search()

  File "C:\Users\sepnufe\Documents\Python\String_search\search_r1_1.py", line 39, in power_search

    root = Tk()

  File "C:\lib\lib-tk\Tkinter.py", line 1636, in __init__

    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)

TclError: Can't find a usable init.tcl in the following directories:

    {C:tcl\tcl8.4} {C:tcl\tcl8.4} C:tcl/tcl8.4 C:/lib/tcl8.4

This probably means that Tcl wasn't installed properly.

Já tentei reinstalaro Python mas o resultado é igual.

Alguem sabe como resolver isto?

Ab

tejano96

Share this post


Link to post
Share on other sites
tejano96

Estava a usar a 2.5.2. Tentei correr o mesmo script que usava o Tkinter e tá bom... Eu acho que tem a ver com o reconhecimento do Sw pelo Python mas, como sou curioso e não expert ;-)

Share this post


Link to post
Share on other sites
tejano96

Nada de mais:

>>> root=Tk()

>>> root.mainloop()

O programa era maior mas, como estava a começar a parte gráfica apenas tinha isto no programa.

Como coloco versões quando estou a fazer o código ainda tenho a que usei na outra versão de Python, logo não existe a possibilidade de ter trocado algo no programa, admito no entanto que o problema esteja entre a mesa e a cadeira. ;:) :confused:

Ab

tejano96

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.