下面是一个例子
# $language = "python"
# $interface = "1.0"
def Main():
crt.Screen.Synchronous = True
crt.Screen.Send("rm -rf demofile\n") # 先删除旧文件
crt.Screen.WaitForString("[xxx@linux xx]$ ")
crt.FileTransfer.AddToZmodemUploadList("/your_path/bin/demofile") # 添加文件到上传列表
crt.FileTransfer.ZmodemUploadAscii = True # 加了这个执行rz时就不会弹选择文件对话框了。
crt.Screen.Send("rz\n")
crt.Screen.WaitForString("[xxx@linux xx]$ ")
crt.FileTransfer.ZmodemUploadAscii = False # 设置调回来