在Shell 脚本里嵌入Python

[shell] #!/bin/bash function pytest() { python - $@ <<EOT import sys,datetime print ‘Current Time is %s’ % datetime.datetime.now() print sys.argv EOT } RT=$(pytest $@) echo my python script says: $RT [/shell]