pythonrun怎麼改名字

來源:魅力女性吧 4.51K
pythonrun怎麼改名字

首先獲得工作路徑

import osworkpath = wd()

拼接獲取和的絕對路徑

src = (wd(), &#')dst = (wd(), &#')

使用rename函數

try: me(src, dst)except Exception as e: print(e) print('rename file failrn')else: print('rename file successrn')

熱門標籤