Re: [Tutor] passing unknown no of arguments

2009-02-06 Thread Kent Johnson
On Fri, Feb 6, 2009 at 3:43 AM, amit sethi wrote: >>> AFAIK MS Silverlight allows you to run .NET languages in your browser, > > so for that i guess i would have to use ironpython and not Cpython which is > what i normally use . Are there any big problems porting the code from one > to other that

Re: [Tutor] passing unknown no of arguments

2009-02-06 Thread amit sethi
>> AFAIK MS Silverlight allows you to run .NET languages in your browser, so for that i guess i would have to use ironpython and not Cpython which is what i normally use . Are there any big problems porting the code from one to other that i need to be worried about. On Fri, Feb 6, 2009 at 12:30

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Alan Gauld
"Kent Johnson" wrote From the Silverlight FAQ: Silverlight will support all major browsers on both Mac OS X, Linux and on Windows. I briefly tried and failed to get it working on MacOS X and lost interest. Looks like I might be a bit premature in ignoring it. I'll have another go... Al

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Kent Johnson
On Thu, Feb 5, 2009 at 1:02 PM, Alan Gauld wrote: > > "Kent Johnson" wrote >> AFAIK MS Silverlight allows you to run .NET languages in your browser, > > But how many browsers currently support Silverlight? >From the Silverlight FAQ: Silverlight will support all major browsers on both Mac OS X, L

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Alan Gauld
"Kent Johnson" wrote in your browser. The only reliable way to run code in a browser is to use JavaScript. AFAIK MS Silverlight allows you to run .NET languages in your browser, But how many browsers currently support Silverlight? After all IE supports VBScript too but its the only one. E

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Dave Rankin
On Thu, Feb 5, 2009 at 3:57 AM, Alan Gauld wrote: > > In general you can't. You would need to have a Python interpreter > > in your browser. The only reliable way to run code in a browser is > > to use JavaScript. I'm very new to Python, but I've also been wondering about this. It would seem to

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread spir
Le Thu, 5 Feb 2009 08:57:15 -, "Alan Gauld" a écrit : > > "amit sethi" wrote > > > How do you pass arguments of unknown no. of arguments to a function. > > search the docs for *args and *kwargs > Or simply pass a tuple: def myPrint(thing): print thing thing_of_things = (1,'a',[

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Kent Johnson
On Thu, Feb 5, 2009 at 3:57 AM, Alan Gauld wrote: > In general you can't. You would need to have a Python interpreter > in your browser. The only reliable way to run code in a browser is > to use JavaScript. AFAIK MS Silverlight allows you to run .NET languages in your browser, including IronPyt

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Alan Gauld
"Senthil Kumaran" wrote Also how can i run my python scripts in a web browser. What you are asking for is Python CGI programming. Look out for chapters for Alan's book. I think he has covered from the basics. If you mean how do you write dynamic web pages using Python then indeed it is CG

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Senthil Kumaran
On Thu, Feb 5, 2009 at 2:27 PM, Alan Gauld wrote: > In general you can't. You would need to have a Python interpreter > in your browser. Alan, I think he was referring to CGI programming. Given the nature of his first question. Well continuing the discussion further, I saw a post by Bret Cannon o

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Alan Gauld
"amit sethi" wrote How do you pass arguments of unknown no. of arguments to a function. search the docs for *args and *kwargs Also how can i run my python scripts in a web browser. In general you can't. You would need to have a Python interpreter in your browser. The only reliable way t

Re: [Tutor] passing unknown no of arguments

2009-02-05 Thread Senthil Kumaran
On Thu, Feb 5, 2009 at 1:37 PM, amit sethi wrote: > How do you pass arguments of unknown no. of arguments to a function. You use * operator ( indirection) in the function definition for arguments and you pass the variable number of number arguments as a list. For e.g. >>> def foo(*args): ...