Reading a file and then interactive mode
This was is quite simple.
$python -i scriptname
$python -i scriptname
for script in ['power','cube']:
exec "import " + script
for script in ['power','cube']:
__import__(script)
#!/usr/bin/env python
def countChicks(chick,count):
for i in range(count):
print "Here is %s number %d" % (chick,i)
countChicks("My chick",5)
#!/usr/bin/env python
def countChicks(chick,count):
for i in range(count):
print "Here is %s number %d" % (chick,i)
mylist = (countChicks,"My chick",5)
mylist[0](mylist[1],mylist[2])