20 lines
423 B
Python
20 lines
423 B
Python
import os
|
|
|
|
def get_app_class(template):
|
|
class App(template):
|
|
def F_main(self):
|
|
if len(self.argv) == 1:
|
|
directory = "."
|
|
else:
|
|
directory = self.argv[1]
|
|
|
|
try:
|
|
for file in os.listdir(directory):
|
|
print(file)
|
|
except OSError as e:
|
|
print(str(e))
|
|
|
|
self.exit()
|
|
|
|
return App
|