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

Python Virtual PC

Name: Anonymous 2008-04-23 9:35

I'm trying to make a virtual PC in python and need some help.  This virtual PC will be a console and you would be able to mess around a virtual file system.  I need some help on how to make this virtual file system.  So far I defined some files like this:

files = [
['page.txt','this is a test'],
['test.txt','another test'],
['lol.html','<html>\n</html>']
]

Where the first item would be the name of the file, and the second would be the contents.  I need some help on how to print it to the screen and how to make directory's.  Would this even be the right way of doing this or should I make files classes?

Name: Anonymous 2008-04-23 18:41


files = [
    ['A:',
        ['usr',
            ['file.txt','This is a test!'],
            ['test.html','<html>\nTEST\n</html>'],
            ['desktop',
                ['file_a.txt','sup?'],
                ['file_b.txt','SUP?']
            ]
        ],
        ['sys',
            ['kernel.bin'],
            ['os.bin']
        ]
    ]
]

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