Hi,
It's better to specify version of python you work with. I know nothing
about python 3 but in python 2 you can do this with `exec`. Example:
> f = file('otherFile.py')
> exec f
For more, read the doc:
http://docs.python.org/2.7/reference/simple_stmts.html#the-exec-statement
HTH
On Wednesday, May 22, 2013 2:23:15 PM UTC+8, C. N. Desrosiers wrote:
> Hi,
>
Hi,
>
> I'm just starting out with Python and to practice I am trying to write a
> script that can have a simple conversation with the user.
>
So you may want to search the doc before you ask: http://docs.python.org
>
Oh yes, you guys are right. Thank you very much for warning me that.
On Thursday, May 23, 2013 6:31:04 AM UTC+8, Alister wrote:
>
> as Chris A point out it executes user input an can cause major damage
>
> (reformatting the hard disk is not impossible!)
>
It definitely can cause major damage