标签:class 文件 gdk 启用 gtk new .bashrc python imp
在~目录下添加一个文件,名字为.pythonstartup.py
#!/usr/bin/python # -*- coding: UTF-8 -*- import readline, rlcompleter; readline.parse_and_bind("tab: complete"); # 启用Tab补全 def igtk(): globals()[‘gtk‘] = __import__(‘gtk‘); globals()[‘thread‘] = __import__(‘thread‘); gtk.gdk.threads_init(); thread.start_new_thread(gtk.main, ()); pass;
然后在.bashrc中添加
export PYTHONSTARTUP=~/.pythonstartup.py
标签:class 文件 gdk 启用 gtk new .bashrc python imp
原文地址:http://www.cnblogs.com/tonglin0325/p/6817063.html