Why widgets become 'NoneType'?

2011-12-21 Thread Muddy Coder
Hi Folks, I was driven nuts by this thing: widgets lost their attributes, then I can't configure them. Please take a look at the codes below: from Tkinter import * canvas = Canvas(width=300, height=400, bg='white') canvas.pack(expand=NO, fill=BOTH) pic = PhotoImage(file=img) canvas.create_image(0

How to use a color value returned by colorChooser?

2011-12-14 Thread Muddy Coder
Hi Folks, This should be a simple question, but I just can't get an answer from Phython Docs. You see, when we created a widget, and need to tweak the color, we just simply configure it, such as: abutton = Button(root, text='Foo') abutton.config(fg='blue') so we can make the Button color in blue

What is this widget? -- again

2011-12-14 Thread Muddy Coder
Hi Folks, Sorry for the unclear question in last post. Well, I am using Tkinter to do GUI, and I just don't know what kind of widget can let me do annotation on an image being displayed. An example is the Paint of Windows: a dotted line box appearing on a image to hold a typed in text. I just can'

What is this widget?

2011-12-14 Thread Muddy Coder
Hi Folks, I am trying to write letters on a photo that is opened in a canvas. So I think I must need a widget to contain the letters I will type in. I tried to use a Label, it worked. But, a Label covered part of the photo underneath, so I can't use it. I saw some software did such a thing nicely:

How to move scrollbar by code?

2011-12-09 Thread Muddy Coder
Hi Folks, I am trying to make a listbox that will contain a looong data list, sorted, so I will be able to pre-select a data line by coding. I have done it. Say my listbox contains 1000 data lines, and my program has figured out the data line 321 is needed, so just put the cursor on data line 321.

How filecmp walk into subdirectories?

2011-11-01 Thread Muddy Coder
Hi Folks, I tried to compare two directories, each with hundreds of files in multiple level subdirectories, to find out the different files. I used filecmp module to the job as: comp=filecmp.dircmp(adir, bdir) comp.report() It worked, and printed out the identical and different files. However,

Hide DOS console for .pyc file

2010-09-10 Thread Muddy Coder
Hi Folks, For a quick testing purpose, I deliver .pyc files to my customer. I don't want the black DOS console appearing behind my GUI, but I have no idea how to do it. Somebody can help? Thanks! Cosmo -- http://mail.python.org/mailman/listinfo/python-list

Where to find options for add_command?

2009-04-15 Thread Muddy Coder
clobbered. I tried relief, fg, color, no one worked. Can somebody points me a website to visit, to check out what options available for add_command? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

How to query object of GUI?

2009-04-14 Thread Muddy Coder
abel is an identifier, but I have no idea how to get it. Can somebody help me out? Thanks in advance! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

How can I change size of GUI?

2009-04-06 Thread Muddy Coder
text.pack(side=LEFT, expand=YES, fill=BOTH) self.text = text It works, of course. But, the GUI is small, and I want to enlarge it. I tried to add in options of width=120 for Text(), but it did not work. Can somebody drop me a couple of lines for help? Thanks! Muddy Cod

Help for Toplevel

2009-04-01 Thread Muddy Coder
Toplevel window, and the data list ['foo','bar'] did not show up either. Can somebody help me on it? Thanks a lot! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

How to access object created in Main?

2009-03-29 Thread Muddy Coder
ext of Label mesg in MAIN, with a syntax like: mesg.config(text='new text') What I don't know is the path of accessing this object mesg. I tried root.mesg, no good. I am confused here: since mesg is created on root as its master, why root.mesg is not its path? Can somebody help me

SWIG: Window syntax help

2009-03-26 Thread Muddy Coder
I got error message by running this: C:>cl -shared test.obj test_wrap.obj -o test.dll It did not take -shared and -o I tried to follow the example of the DOCS, and modified the syntax of unix. Can anybody help me to get a right syntax for Windows? Thanks! Muddy Coder -- http://mail.python.org/m

Does Python have certificate?

2009-03-23 Thread Muddy Coder
Hi Folks, I wonder that does Python have certificate? You see, java, .NET, PHP, and so on, they have certificates for developers to get. Python is quite popular nowadays, I wonder is there such a thing? If so, I certainly want to get one. I searched, and Muddy Coder -- http://mail.python.org

How to define a db file for sqlite?

2009-03-07 Thread Muddy Coder
cked out with an error message as: Unable to open database file I wonder: does pysqlite open a database file db for me? Or, do I need to create an empty file inside adirectory with my text editor? Anyway, somebody please help me out here. After I can connect it, the rest will be easy to go, thanks

How to import Python files in the other directories?

2009-03-05 Thread Muddy Coder
files residing in the other directories? Somebody helps me out? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

Can Python do shopping cart?

2009-03-05 Thread Muddy Coder
Hi Folks, I know PHP can do shopping cart, such as Zen Cart. I wonder can Python do such a thing? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

Can CleintForm work with webbrowser?

2009-03-01 Thread Muddy Coder
display the form I filled. Obviously webbrowser takes url as argument rather than a form. Is there other options to do this? Somebody can help? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

Is it possible to grab hidden code in ClientForm?

2009-03-01 Thread Muddy Coder
the trick around here? That is why I am wondering whether the server really keeps sending new images over, or just sending new hidden codes over. If the trick is just keep sending hidden codes over, there might be a chance of capturing the codes. Can somebody help me out? Thanks a lot! Muddy Coder

Bug report: ClientForm

2009-02-28 Thread Muddy Coder
at about a picture file? What is the counterpart of 'text/plain"? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

How to parse form in client side?

2009-02-26 Thread Muddy Coder
? Can somebody help? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

Help: makefile in Windows

2009-02-12 Thread Muddy Coder
Hi Folks, I am learning Extending Python, by testing the demo script of Programming Python. In the book, a makefile for Linux is there, but I am using Windows currently. I wish somebody would help me to get a makefile for Windows, my makefile.linux is as below: PYDIR= c:\Python25 PY = $(PYDIR) h

Can I 'LOOK' through urllib?

2009-02-11 Thread Muddy Coder
ng in the data_folder. I wish urllib would have a function to let me do it, as well as I do 'dir' in DOS, 'ls' on unix/linux. Somebody write me a demo? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

How to get a return from Button?

2009-02-10 Thread Muddy Coder
ll work nicely. I am lost in the scope. Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

Can urllib check path exists on server?

2009-02-10 Thread Muddy Coder
/foo/bar.jpg is residing in a hosting server, can I use urllib to check if bar.jpg file existing or not? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

urllib2: problem of handling space in parameter

2009-02-07 Thread Muddy Coder
Hi Folks, I encrountered a problem of using urllib2: the space handling. Look at the code below: import urllib2 url = r'http://somedomain.com/a.cgi?name=muddy coder&password=foobar cgi_back = urllib2.urlopen(url).read() In this cgi_back, I saw field password worked fine, but field

How to trigger a smart link?

2009-02-04 Thread Muddy Coder
Hi All, Using urllib2 can trigger CGI script in server side. However, I encountered a problem of the so-called smart link. When a fairly large site, the server needs to track the identifier of each request from client, so it generated an ugly escape string attached on url. It seems that I must get

Results of executing hyperlink in script

2009-01-28 Thread Muddy Coder
got feedback from server. It works very well! My thanks go to all the helpers! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

How to execute a hyperlink?

2009-01-27 Thread Muddy Coder
y the Python interpreter. I wonder somebody knows the syntax of triggering a hyperlink? Thanks in advance! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list

Can webbrowser module get source code?

2009-01-24 Thread Muddy Coder
ossible to do it? I tried webbrow.get() but didn't work. Somebody can help? Thanks! Muddy Coder -- http://mail.python.org/mailman/listinfo/python-list