程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

求改錯,python,調試正確即給采納

編輯:Python

游戲“開發”程序,注意‘ “” ’(waigua實現 無 後 座)求改錯Python

#! /usr/bin/env python#-*- coding:utf-8 -*-""""@Author :[email protected] :[email protected] """"import configimport osimport shutilclass bypass(): def_init_(self, steamapps_path): self.steamapps path=steamappspath self.pubg_path =steamapps path+PUBG self.bypass path =steamapps path+bypass if not os.path.exists(self.bypass path): l('Info',unicode('正在初始化"utf-8').encode("gbk')) shutil.copytree(self.pubg pathselfbypass path) #step 1  shutil.move(self.pubg_path,self.steamapps_path +'PUBG1) #step 2 l('Info',unicode('初始化完成',utf-8').encode('gbk)) def make link(self,): pubg pak path =self.pubg path+\Ts1Game Content\PaksTsGame-WindowsNoEditor uil.pak l('Info',unicode('正在創建軟鏈接''utf-8').encode(gbk')) os.popen('mklink /j"'+ self.pubg path +…'""'+ self.bypass path +'"') #step 3  os.popen('mklink"'+ pubg_pak_path+'""'+config.FUNC_PAK_PATH+'"') #step 4  l('Info',unicode('軟鏈接創建成功','utf-8').encode('gbk')) def clean(self,): bypass pak path=self.bypass_path+1\Ts1Game\Content\\Paks\Ts1Game-WindowsNoEditor ui1.pak l('Info',unicode('正在過檢測','utf-8').encode('gbk')) os.remove(bypass pak path) #step 5  os.popen('rd /s /q"' +self.pubg_path +'"') #step 6  shutil.move(self.steamapps_path+'PUBG1selfpubg path) #step 7 l('Info',unicode(成功過檢測開始奔放吧,utf-8').encode('gbk'))def l(s,message): print'[%s] %s'%(s,message)def main(): steamapps path=config.STEAM PATH+'steamapps\\common'! if os.path.exists(steamapps_path +PUBG): obj=bypass(steamapps_path) obj.make link() l('Info',unicode('上飛機後切回來按任意鍵開始過檢測','utf-8').encode(gbk)) os.system('pause') obj.clean() else: l('Warning',unicode('請檢責配置文件中的游戲目錄是否正確','utf-8')encode('gbk))if__name__' __main__ ': main()

求改錯!

python


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved