Re: Convert arbitrary function inputs to string

2011-01-06 Thread Robert Kern
On 1/6/11 10:42 AM, David Dreisigmeyer wrote: Yes, I'm calling Gambit-C from Python and would like to make this cleaner. Instead of having to do something like: gambit.eval ("(print \"Hello\n\")") I want to do this: gambit.eval (print "Hello\n") so that the expression following gambit.eval

Re: Convert arbitrary function inputs to string

2011-01-06 Thread Ian
On Jan 6, 9:42 am, David Dreisigmeyer wrote: > Yes,  I'm calling Gambit-C from Python and would like to make this > cleaner.  Instead of having to do something like: > > gambit.eval ("(print \"Hello\n\")") > > I want to do this: > > gambit.eval (print "Hello\n") > > so that the expression followin

Re: Convert arbitrary function inputs to string

2011-01-06 Thread Ian
On Jan 6, 9:23 am, David wrote: > Hi, > > I'd like to have a function that takes arbitrary inputs and returns > them as a single string, with proper escapes for special characters I > can define.  For example: What sorts of arbitrary inputs? Strings? Sequences of strings? Something else? It's

Re: Convert arbitrary function inputs to string

2011-01-06 Thread David Dreisigmeyer
Yes, I'm calling Gambit-C from Python and would like to make this cleaner. Instead of having to do something like: gambit.eval ("(print \"Hello\n\")") I want to do this: gambit.eval (print "Hello\n") so that the expression following gambit.eval is a standard scheme expression. On Thu, Jan 6,

Re: Convert arbitrary function inputs to string

2011-01-06 Thread Jean-Michel Pichavant
David wrote: Hi, I'd like to have a function that takes arbitrary inputs and returns them as a single string, with proper escapes for special characters I can define. For example: fun( ( + 1 2 ) ) => "( + 1 2)" or fun( (define (myhello str) (begin (print (string-append "Hello " str)) (newli

Convert arbitrary function inputs to string

2011-01-06 Thread David
Hi, I'd like to have a function that takes arbitrary inputs and returns them as a single string, with proper escapes for special characters I can define. For example: fun( ( + 1 2 ) ) => "( + 1 2)" or fun( (define (myhello str) (begin (print (string-append "Hello " str)) (newline) )) ) => "(