Upload file to specific folder

来源:互联网 发布:天音淘宝宝贝裂变工具 编辑:程序博客网 时间:2024/04/29 15:02

1. Problem

I edit source code in my laptop and run it in server, which is equipped with gpu. So I need a script to upload source to the specific folder in the server.

2. Code

#!/usr/bin/env python# -*- coding: utf-8 -*-import osimport sysfiles = sys.argv[1]os.system('pscp {} zyt3781909@git.dscvlab.com:/home/zyt3781909/py-faster-rcnn/{}'.format(files, files))

BTW, run this script in /home/duino/py-faster-rcnn/:

./upload.py test.py

Done.

0 0