[BangPypers] [HELP] QUERIES RELATED TO PYTHON

hiharry danny hrdspl at gmail.com
Sat Apr 20 21:01:25 CEST 2013


I have Python 2.5.4 installed on windows platform ..(win xp) ...and in the
installation folder there is a folder named Tcl(Tool Command Language)
which contains subfolders like Tk, Tix etc ..the version of tcl is 8.4 .The
default gui standard of python is through Tkinter module and when this
module is used the calls are made to the Tcl embedded interpreter to
execute the code.
So, is it for this reason Tcl is embedded in python or for anything else ?
If i haven't installed tcl separately, what are the ways to access Tcl
interpreter other than using ELmer and Using Tkinter module ,Tcl
interpreter can be invoked using Tkinter.Tcl().
Can wish or telsh be  for such ?

    import Tkinter
    a = Tkinter.Tcl()
    result = a.eval(' puts "hello, world" ')

TclError: can not find channel named "stdout"
But still it doesn't work, giving error why ?

And one more thing when i type dir('Tkinter') or any other module name to
display it's contents , why does it always show the same thing every time
which is as follows

['__add__', '__class__', '__contains__', '__delattr__', '__doc__',
'__eq__', '__ge__', '__getattribute__', '__getitem__', '__getnewargs__',
'__getslice__', '__gt__', '__hash__', '__init__', '__le__', '__len__',
'__lt__', '__mod__', '__mul__', '__ne__', '__new__', '__reduce__',
'__reduce_ex__', '__repr__', '__rmod__', '__rmul__', '__setattr__',
'__str__', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith',
'expandtabs', 'find', 'index', 'isalnum', 'isalpha', 'isdigit', 'islower',
'isspace', 'istitle', 'isupper', 'join', 'ljust', 'lower', 'lstrip',
'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit',
'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase',
'title', 'translate', 'upper', 'zfill']


More information about the BangPypers mailing list