Re: converting a string to a function parameter

2014-01-05 Thread Gary Herron
On 01/05/2014 11:39 AM, pietrod...@gmail.com wrote: Il giorno venerdì 13 marzo 2009 08:52:39 UTC+1, koranthala ha scritto: Hi, Is it possible to convert a string to a function parameter? Ex: str = 'True, type=rect, sizes=[3, 4]' and I should be able to use it as: test(convert(str)) and the

Re: converting a string to a function parameter

2014-01-05 Thread Ned Batchelder
On 1/5/14 2:39 PM, pietrod...@gmail.com wrote: Il giorno venerdì 13 marzo 2009 08:52:39 UTC+1, koranthala ha scritto: Hi, Is it possible to convert a string to a function parameter? Ex: str = 'True, type=rect, sizes=[3, 4]' and I should be able to use it as: test(convert(str)) and the behav

Re: converting a string to a function parameter

2014-01-05 Thread pietrodcof
Il giorno venerdì 13 marzo 2009 08:52:39 UTC+1, koranthala ha scritto: > Hi, > Is it possible to convert a string to a function parameter? > Ex: > str = 'True, type=rect, sizes=[3, 4]' > and I should be able to use it as: > test(convert(str)) and the behaviour should be same as calling test > w

Re: converting a string to a function parameter

2009-03-28 Thread andrew cooke
I'm a bit late to the party, but LEPL 2.2, just released, can now handle this too. I suspect email may mangle this, so you can also read it at http://www.acooke.org/lepl/examples.html#parsing-a-python-argument-list from lepl import * comma = Drop(',') none = Literal('None')

Re: converting a string to a function parameter

2009-03-14 Thread alex goretoy
This is a file that is going into the new version of python-stdout-colors > project location: > http://code.google.com/p/python-stdout-colors/ -Alex Goretoy http://www.goretoy.com On Sat, Mar 14, 2009 at 10:45 AM, alex goretoy wrote: > My new class I've been working on might help you. It doe

Re: converting a string to a function parameter

2009-03-14 Thread alex goretoy
My new class I've been working on might help you. It does what you are asking without eval (I'm still working on it) Anyone have any ideas aswell along with the OP, thank you #!/usr/bin env python # # -*- coding: UTF-8 -*- # # PyNutButter BETA Version 0.1.0.1 # # Copyright 2009 - Infinity by Alex

Re: converting a string to a function parameter

2009-03-13 Thread Aaron Brady
On Mar 13, 3:21 pm, Paul McGuire wrote: > On Mar 13, 11:46 am, Aaron Brady wrote: > > > > > On Mar 13, 2:52 am, koranthala wrote: > > > > Hi, > > >     Is it possible to convert a string to a function parameter? > > > Ex: > > > str = 'True, type=rect, sizes=[3, 4]' > > > and I should be able to

Re: converting a string to a function parameter

2009-03-13 Thread Paul McGuire
On Mar 13, 11:46 am, Aaron Brady wrote: > On Mar 13, 2:52 am, koranthala wrote: > > > Hi, > >     Is it possible to convert a string to a function parameter? > > Ex: > > str = 'True, type=rect, sizes=[3, 4]' > > and I should be able to use it as: > > test(convert(str)) and the behaviour should be

Re: converting a string to a function parameter

2009-03-13 Thread Aaron Brady
On Mar 13, 2:52 am, koranthala wrote: > Hi, >     Is it possible to convert a string to a function parameter? > Ex: > str = 'True, type=rect, sizes=[3, 4]' > and I should be able to use it as: > test(convert(str)) and the behaviour should be same as calling test > with those values : > i.e. test(T

Re: converting a string to a function parameter

2009-03-13 Thread Scott David Daniels
koranthala wrote: Hi, Is it possible to convert a string to a function parameter? Ex: str = 'True, type=rect, sizes=[3, 4]' and I should be able to use it as: test(convert(str)) and the behaviour should be same as calling test with those values : i.e. test(True, type=rect, sizes=[3, 4]) I tr

Re: converting a string to a function parameter

2009-03-13 Thread odeits
On Mar 13, 12:52 am, koranthala wrote: > Hi, >     Is it possible to convert a string to a function parameter? > Ex: > str = 'True, type=rect, sizes=[3, 4]' > and I should be able to use it as: > test(convert(str)) and the behaviour should be same as calling test > with those values : > i.e. test(

Re: converting a string to a function parameter

2009-03-13 Thread koranthala
On Mar 13, 1:01 pm, Chris Rebert wrote: > On Fri, Mar 13, 2009 at 12:52 AM, koranthala wrote: > > Hi, > >    Is it possible to convert a string to a function parameter? > > Ex: > > str = 'True, type=rect, sizes=[3, 4]' > > and I should be able to use it as: > > test(convert(str)) and the behaviou

Re: converting a string to a function parameter

2009-03-13 Thread Chris Rebert
On Fri, Mar 13, 2009 at 12:52 AM, koranthala wrote: > Hi, >    Is it possible to convert a string to a function parameter? > Ex: > str = 'True, type=rect, sizes=[3, 4]' > and I should be able to use it as: > test(convert(str)) and the behaviour should be same as calling test > with those values :

converting a string to a function parameter

2009-03-13 Thread koranthala
Hi, Is it possible to convert a string to a function parameter? Ex: str = 'True, type=rect, sizes=[3, 4]' and I should be able to use it as: test(convert(str)) and the behaviour should be same as calling test with those values : i.e. test(True, type=rect, sizes=[3, 4]) I tried eval, but it did