/ Published in: Python
Showing hidden files in GNU/Linux - Mostrando archivos ocultos en GNU/Linux
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
def show(file): import os if not os.path.exists(file): return archive = os.path.basename(file) directorio = os.path.dirname(file) if archive[0] != '.': return else: while archive[0] is '.': archive = archive[1:] newfile = directorio+'/'+archive os.rename(file, newfile)
URL: http://wiki.codigopython.com.ar/pyhide:mostrando-archivos-ocultos-en-gnu-linux