accepts decorator

2006-09-25 Thread urielka
i want to make a decorator that make a function accept only types,if the types are wrong but the number of types is equal to arguments try to convert them to the type. for example: @Accept(int,int) def Sum(a,b): return a+b print Sum("2",2.0) this should print 4,coz the decorator sees that t

Re: accepts decorator

2006-09-25 Thread urielka
i think i got what the * and ** mean. *args mean arguments that are assigned by position(that is why *arg is a tuple) **kwds mean arguments that are assigned using equals a=2,b=3 (that is why **kwds i a dict) but why self is in *args and other thing goes to **kwds? even if not assigned using equals

Re: accepts decorator

2006-09-26 Thread urielka
hehe i saw that,that is what made my understand it. the decorator now works. let say i have a function decorated with two decorators: @Accept(int,int) @OtherDecorator def myfunc(a,b): pass how can i make the two decorators into one(note:one get parameters and the other doesn`t) -- http://ma

Re: Access to static members from inside a method decorator?

2006-10-06 Thread urielka
no need for all that,i wrote a basic Ajax framework for cherrypy that features a Ajax.Net feature,exposing functions to JavaScript via attributes(or in python via decorators),here is a decorator that run one time(i.e. before running the actual code) and get the name of the class [code] def AddFunct

Interop between C# and Python

2007-04-27 Thread urielka
i need a easy way to write a Python Service(be it SOAP or JSONRPC or whatever) but i need to easily access it from C#,i created a web service in ZSI(which is really easy) like this: from ZSI import dispatch def hello(): return "hello" dispatch.AsServer(port=8080) simple and easy but how i a

Re: Interop between C# and Python

2007-04-27 Thread urielka
thx i will try this. i am also trying XML-RPC,i wrote a basic generator(in python) that genrate a Interface from the XML-RPC service module,but maybe with soaplib i don`t need this if i use wsdl as Visual Studio can generate the code from the wsdl -- http://mail.python.org/mailman/listinfo/pytho

unittest dependencies

2007-05-02 Thread urielka
i am using unittest to test a project,and one thing i really want is a way to say that test a depends on test b,so it need to run before it and be successful in order to run this test. i just wanted to know if anyone have done it before(i searched for it but didn`t find something useful),i think i

Re: Looking for the Perfect Editor

2006-09-10 Thread urielka
use Eclipse!!! it is not a editor but it is the best free IDE out there. for python use Pydev(pydev.sf.net) plugin:it got EVERYTHING:completteion,debuging(with thread support)you can`t work without a debugger for serious projects. for Web Develop use Aptana(aptana.com) another plugin for eclipse,in