Exemple #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])   
Exemple #2
0
def getbdlist():
    bp = ByPy() 
    f_handler= sys.stdout
    f=open('blist', 'w',encoding='utf-8') 
    sys.stdout=f 
    bp.list(u'youtube/','$t $f')  
    sys.stdout =f_handler 
    f.close()
    fs=[]
    with open('blist', 'r',encoding='utf-8') as rf:
         blist= rf.readlines()
         fs =[l[l.find('F ')+2:-1]for l in blist if l[:1]=='F']

    return fs
Exemple #3
0
# encoding:utf-8

from bypy import ByPy
bp = ByPy()
bp.list()
from bypy import ByPy

bp = ByPy()
bp.list()  # or whatever instance methods of ByPy class
Exemple #5
0
def upload(local, remote):
    #os.chdir(local)
    bp = ByPy()
    bp.list()
    bp.syncup(local, remote)
    print "fineshed!!!"
            self.tableWidget.setItem(i, 2, newItem)

    def on_btn_click(self):
        self.up = UL()
        self.up.show()

    def Exit(self):
        self.close()

    def Mini(self):
        self.showMinimized()


# 获取一个bypy对象,封装了所有百度云文件操作的方法
bp = ByPy()
print(bp.list(""))
'''
# 百度网盘创建文件夹zhoulong
bp.mkdir(remotepath = 'Jizy')
#上传文件至文件夹
# upload中参数代表复制文件,默认值为'overwrite',指定'newcopy'不会覆盖重复文件
bp.upload(localpath= r'上传文件绝对路径', remotepath= 'zhoulong', ondup='newcopy')
print('上传完成!!')
bp.download(remotepath = 'zhoulong', localpath = r'下载文件输出文件夹')
print('下载完成!!')

print("ST")
bp.download(remotepath="骆驼祥子   读书笔记 7.pptx",localpath=r"F:\\Baidu\\")
print("Done")'''
if __name__ == "__main__":
    app = QtWidgets.QApplication(sys.argv)
from bypy import ByPy
bp = ByPy()
bp.list("3D Graphing with Matplotlib")