def foo_fun():
return "some string"
#return 10 .. alternatively, it can be an int if __name__ == "__main__"
print foo_fun() # or sys.stdout.write("%s" % foo_fun())
shell
fooShell=$(python fooPy.py)
echo $fooShell
输出:
“some string”
2024-04-04 14:47:59
def foo_fun():
return "some string"
#return 10 .. alternatively, it can be an int if __name__ == "__main__"
print foo_fun() # or sys.stdout.write("%s" % foo_fun())
shell
fooShell=$(python fooPy.py)
echo $fooShell
输出:
“some string”