Saturday, July 23, 2011

exec can execute code! Cool.

I learned how to start a python program from inside the python interpreter using exec, and I tried opening up more than one program at a time. It worked!

>>> f=open('Gridtest.py')
>>> exec f

This is going to be cool, because I can easily start other programs from inside python!

No comments:

Post a Comment

Followers

Blog Archive

About Me

My photo
Biking helps me to cope with life.