Bernard Lebel wrote: > Hello, > > I'm looking for a way to convert Python code into a string. > > For example, let say I have this function: > > def myFunc(): > print 'hello world' > > > Now in the same module, I'd like to take this function and convert it > into a string: > > """def myFunc(): > print 'hello world'\n""" > Why do you need to do this? and why within the same module? _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
- [Tutor] Converting code to string Bernard Lebel
- Re: [Tutor] Converting code to string bhaaluu
- Re: [Tutor] Converting code to string Kent Johnson
- Re: [Tutor] Converting code to string Bernard Lebel
- Re: [Tutor] Converting code to string Eric Brunson
- Re: [Tutor] Converting code to string Alan Gauld
- Re: [Tutor] Converting code to string Luke Paireepinart
- Re: [Tutor] Converting code to string Alan Gauld
- Re: [Tutor] Converting code to string Bernard Lebel
- Re: [Tutor] Converting code to string Bernard Lebel
- Re: [Tutor] Converting code to string Kent Johnson