Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Scripts

Name: Anonymous 2012-01-04 12:16

Hey /prog/, what scripts have you been working on? I just made this simple on that I really needed to change all spaces in folders to underscores:


#/usr/bin/env python

import os

def main ():
    current_dir = os.getcwd ()
    current_dir_list = os.listdir (current_dir)

    for current_file in current_dir_list:
        os.rename (current_file, current_file.replace (" ", ""))

if __name__ == "__main__":
    main ()


Show us your latest scripts and feel free to rewrite mine and others in other languages!

Name: Anonymous 2012-01-05 20:30

>>16
just ignore kodak, he doesn't know what he's talking about. and he's rude.
nope, he's just a pythonista

Name: Anonymous 2012-01-05 23:37

>>41
fuck you lithpfag

Name: Anonymous 2012-01-06 0:02

>>42
hello, ``guido''!

Name: Anonymous 2012-01-06 5:32

>>24
We all know it's just Void who has learned to EXPERT in other languages and is too ashamed to admit it.

Name: Anonymous 2012-01-06 5:44

>>40
Tant d'aigris.

Name: Anonymous 2012-01-06 5:49

>>45
Stoi aigri.

Name: Anonymous 2012-01-06 6:24


if __name__ == "__main__":
    main ()


You Pythonistas are retarded. Stop writing modules that aren't intended to be used as modules.

kodak go scrub a toilet.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List