What I want to do
Go into the folder that the user selects, then show them the files from this folder
How I would like I do this
I would like to show the user a list of files and the folder they are contained in, and then allow the user to select one.
Code
I've tried this:
#!/usr/bin/env python
import os, sys, glob
os.chdir(glob.glob("/var/mobile/TP/")[0])
print("Please select a Texture Pack (##):")
items = os.listdir(".")
i = 1
for item in items:
print("[%.2d] %s" % (i, item))
i += 1
#And then something that will assign the variables to the listed items, like
*firstlisteditem*=a ; *secondlisteditem*=b #... and so on
#and then i need to get the user to tell me which folder he wants to go to. This I will do using a number.
se=raw_input ()
if "1" in se then
exec /var/mobile/TP/$a
if "2" in se then
exec /var/mobile/TP/$b