On 06/04/2013 09:07 AM, kakararunachalserv...@gmail.com wrote:
Hi,
Can anyone please tell me how to dynamically create a new python file within a
program???
What do you mean by a "python file"? If you mean a text file
containing python code, then create it like any other text file. For
instance:
with open("Hello.py", "w") as f:
print("print('Hello world')\n", file=f)
will create a file containing a simple one-line Python program.
If you meant something else, then please take the time to provide more
detail.
Gary Herron
--
Dr. Gary Herron
Department of Computer Science
DigiPen Institute of Technology
(425) 895-4418
--
http://mail.python.org/mailman/listinfo/python-list