Beispiel #1
0
def test():
    bp=ByPy()
    bp.list("basic_linux/") # or whatever instance methods of ByPy class
    bp.syncup(base_path)
    bp.syndown("/apps/bypy",base_path)
    bp.downfile("basic_linux/wps-office_10.1.0.6634_amd64.deb",externalPaths[0])
    bp.downfile("basic_linux/can_google.crx",externalPaths[0])   
Beispiel #2
0
def yunpan(upload_dir, build_count):
    pattren = '(.*-{}.apk|.*-signed.apk)'.format(build_count)
    bp = ByPy(configdir='C:\\Users\\Administrator\\.bypy',
              processes=5,
              incregex=pattren)
    #显示网盘使用信息
    bp.info()
    #显示上传日志信息
    bp.verbose = True
    #同步上传
    bp.syncup(localdir=upload_dir, remotedir=build_count)
    #打印云盘目录
    bp.ls(build_count)
Beispiel #3
0
def run():
    bp = ByPy()
    bp.syncup(localdir=u'', remotedir=u'youtube/', deleteremote=False)
Beispiel #4
0
def upload(local, remote):
    #os.chdir(local)
    bp = ByPy()
    bp.list()
    bp.syncup(local, remote)
    print "fineshed!!!"
Beispiel #5
0
from bypy import ByPy
import os
import time


channel_name = 'PHP Tutorials'  # change wow_english Business English Pod
start_time = time.time()
download_path = os.getcwd() + '\\' + '2_download' + '\\' + channel_name
print(download_path)
bp = ByPy()
bp.mkdir(remotepath='youtube')  #在网盘中新建目录
bp.syncup(download_path,'youtube') #将本地文件上传到百度云盘中
print('上传完毕!')
print((time.time() - start_time) / 60)
#!/usr/bin/python3
import os
import time
import shutil
from bypy import ByPy

os.system("mount /dev/sda1 /mnt/usb")
time.sleep(10)

t = time.strftime("%Y-%m-%d %H-%M", time.localtime())
shutil.copy("/home/pi/piserver/django-addon.exe",
            "/mnt/usb/bypy/notebook/%s-django-addon.exe" % t)

os.chdir("/mnt/usb/bypy")

bp = ByPy()
bp.syncup()

os.chdir("/home/pi")

time.sleep(10)
os.system("umount /mnt/usb")