Getting an Error TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

2022-08-17 Thread Coder
sudo pip install pyro4 Collecting pyro4 Downloading https://files.pythonhosted.org/packages/70/e3/8c4e0d24b46fbf02e6b2dc2da5d18f0c73cfd343a1fb01ae64c788c20e56/Pyro4-4.82-py2.py3-none-any.whl (89kB) 100% || 92kB 7.3MB/s Collecting selectors34; python_versio

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,

Centering a window

2011-01-10 Thread Rohit Coder
I am using PyQt4 for GUI apps. I created a class that contains a function to center any window (Form) whose name is passed to this class. I have two questions: How to modify the below given code to center the window whose name we passed as an argument.How to pass window name to this class from a

Create a class to position a window on the screen.

2011-01-08 Thread Rohit Coder
Hi,elementFontfont-familyfont-sizefont-stylefont-variantfont-weightletter-spacingline-heighttext-decorationtext-aligntext-indenttext-transformwhite-spaceword-spacingcolorBackgroundbg-attachmentbg-colorbg-imagebg-positionbg-repeatBoxwidthheightborder-topborder-rightborder-bottomborder-leftmarginpad

Working with PyQt and Pydev

2011-01-06 Thread Rohit Coder
I installed the PyDev plugin into Aptana Stdui 3 Beta. Someone suggested me to use PyQt for Python GUI app, and so I downloaded and installed PyQt. But when I open Aptana Studio, I could see a new menu added with the name "PyDev", but there is nothing for PyQt. In the Windows Start Meny item li

How suitable is Python to write system utilities?

2011-01-06 Thread Rohit Coder
Is Python suitable to write low-level system utilities like Defrag, Malware Removal Tools and Drivers? -- http://mail.python.org/mailman/listinfo/python-list

RE: Attaching C++ libraries to Python app.

2011-01-05 Thread Rohit Coder
ail.com > CC: python-list@python.org > > You don't need to reinvent the wheel: > > http://www.dlitz.net/software/pycrypto/ > > Am Mi, 5.01.2011, 22:21 schrieb Rohit Coder: > > > > Is it possible to use C++ libraries within a Python application? I am > >

Attaching C++ libraries to Python app.

2011-01-05 Thread Rohit Coder
Is it possible to use C++ libraries within a Python application? I am planning to write an encryption program and want to use GnuPG C++ libraries.elementFontfont-familyfont-sizefont-stylefont-variantfont-weightletter-spacingline-heighttext-decorationtext-aligntext-indenttext-transformwhite-space

RE: Qt with PyDev

2011-01-05 Thread Rohit Coder
Seen both, but do I need to install the binaries or add a link in Pydev to PySide source-code? Date: Tue, 4 Jan 2011 07:09:53 -0800 From: gher...@islandtraining.com To: python-list@python.org Subject: Re: Qt with PyDev On 01/04/2011 12:00 AM, RP Khare wrote:

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
the escape string ?fp=3xD0TuGMp7C7gP1TRD, the browser will report error of 404 I found Python has a module of escape, but I don't know how to use this module to solve the problem above. Or, I just wonder does urllib2 has such a method to handle smart link? Thanks! Moddy Coder --

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

Re: Is this pythonic?

2009-01-27 Thread Baby Coder
On 18 déc 2008, 13:51, Jason Scheirer wrote: > I'd say it's fine but breaking up the statement once or twice is a > good idea just because if one of the function calls in this nested > thing throws an exception, a smaller statement with fewer calls makes > for a far more readable traceback. And I

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

Re: How a script can know if it has been called with the -i command line option?

2006-12-21 Thread commander . coder
Michele Simionato wrote: > The subject says it all, I would like a script to act differently when > called as > $ python script.py and when called as $ python -i script.py. I looked > at the sys module > but I don't see a way to retrieve the command line flags, where should > I look? In the optpar

Re: automatically grading small programming assignments

2006-12-14 Thread commander . coder
[EMAIL PROTECTED] wrote: Then on your PC you can > run a script that loads each of such programs, and runs a good series > of tests, to test their quality... What happens if someone-- perhaps not even someone in the class-- does some version of os.system('rm -Rf /') ? -- http://mail.python.org/m

Re: automatically grading small programming assignments

2006-12-14 Thread commander . coder
[EMAIL PROTECTED] wrote: Then on your PC you can > run a script that loads each of such programs, and runs a good series > of tests, to test their quality... What happens if someone-- perhaps not even someone in the class-- does some version of os.system('rm -Rf /') ? -- http://mail.python.org/m