First  |  Prev |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Using dicts and lists as default arguments of functions
Dear all, Considering this test program: def tst(a={}): print 1, a a['1'] = 1 print 2, a del a def tstb(a=[]): print 1, a a.append(1) print 2, a del a tst() tst() tstb() tstb() With output: tnjx(a)tnjx:~/tst> python 1 {} 2 {'1': 1} 1 {'1': 1} 2 ... 9 Aug 2010 12:18
Creating a custom UI inside Maya with python
Hi, all, I wonder if my post is relevant here, but i will still post it anyway. I am working on creating a custom UI inside Maya and I encountered some problems. Firstly, I am trying to create a textfield button that creates a locator-shaped curve based on the coordinates the user keyed into the text field. However... 9 Aug 2010 11:12
Circular imports (again)
Hi all I know the problems related to circular imports, and I know some of the techniques to get around them. However, I find that I bump my head into them from time to time, which means, I guess, that I have not fully understood how to organise my code so that I avoid them in the first place. It has just h... 10 Aug 2010 05:50
GUI automation tool (windows)
I know that this question has been asked for several times, but it surprises that there is no tool under very active development and the community activities are very low (mailing list posts). All the tools listed in: Comparing with Auto... 11 Aug 2010 21:20
Decorators without function
Hello! Is it possible to apply a decorator on a block of code, without defining a function that decorator is applied to. I have to generate a lot of similar graphs. For that reason I use plot_decorator to perform usual figure setup(outfile, legend, x_label, y_label and so on), and pylab.plot commands to do... 9 Aug 2010 21:13
Create child class of Python dict with modified values
hi all, suppose I have defined a child class of Python dict, currently it constructor looks like that: def __init__(self, *args, **kwargs): dict.__init__(self, *args, **kwargs) #(+some more insufficient code) Constructor should be capable of calling with either any way Python dict is constr... 9 Aug 2010 06:49
simple renaming files program
Hi, all, I am working on a simple program that renames files based on the directory the user gives, the names the user searched and the names the user want to replace. However, I encounter some problems. When I try running the script, when it gets to the os.rename part, there will be an error. The error is : n = ... 9 Aug 2010 16:47
how to change a string into dictionary
Hi, I am newbie for python ,Here is my question: a = "{'a':'1','b':'2'}" how to change a into a dictionary ,says, a = {'a':'1','b':'2'} Thanks a lot .Really need help. ... 9 Aug 2010 13:26
xmlrpc and processes
Hi, I have a SimpleXMLRPCServer running on one PC. I need several ServerProxy-s talking to it, each one running on a different PC. That is, I run on each PC a client application, that talks to the one server using xml-rpc. Is the xml-rpc designed to work like this? If not, is there something I can do to still... 9 Aug 2010 13:26
Win7. Why Don't Matplotlib, ... Show up in Control Panel Add-Remove?
> There's a discrepancy because package management on Python is completely broken. Distutils and Setuptools (and it's new fork, Distribute) are inadequate- they act as installers, but don't provide a way to uninstall the program. That's not true. If you use the bdist_wininst, bdist_msi, or bdist_rpm distut... 11 Aug 2010 20:14
First  |  Prev |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19