domove 3. parametre ile dosya isim değiştirdiği durumları kontrol ediyor...
This commit is contained in:
@@ -147,13 +147,18 @@ def domo_(*sourceFiles):
|
|||||||
'''inserts the mo files in the list of files into /usr/share/locale/LOCALE/LC_MESSAGES'''
|
'''inserts the mo files in the list of files into /usr/share/locale/LOCALE/LC_MESSAGES'''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def domove(source, destination):
|
def domove(sourceFile, destination, destinationFile = ''):
|
||||||
'''moves sourceFile/Direcroty into destinationFile/Directory'''
|
'''moves sourceFile/Direcroty into destinationFile/Directory'''
|
||||||
|
|
||||||
''' example call: pisitools.domove("/usr/bin/bash", "/bin/bash")'''
|
''' example call: pisitools.domove("/usr/bin/bash", "/bin/bash")'''
|
||||||
''' example call: pisitools.domove("/usr/bin/", "/usr/sbin")'''
|
''' example call: pisitools.domove("/usr/bin/", "/usr/sbin")'''
|
||||||
makedirs(get.installDIR() + os.path.dirname(destination))
|
makedirs(get.installDIR() + destination)
|
||||||
shutil.move(get.installDIR() + source, get.installDIR() + destination)
|
|
||||||
|
for file in glob.glob(get.installDIR() + sourceFile):
|
||||||
|
if not destinationFile:
|
||||||
|
shutil.move(file, get.installDIR() + os.path.join(destination, os.path.basename(file)))
|
||||||
|
else:
|
||||||
|
shutil.move(file, get.installDIR() + os.path.join(destination, destinationFile))
|
||||||
|
|
||||||
def dopython():
|
def dopython():
|
||||||
'''FIXME: What the hell is this?'''
|
'''FIXME: What the hell is this?'''
|
||||||
|
|||||||
Reference in New Issue
Block a user