-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
39 lines (38 loc) · 1.22 KB
/
main.py
File metadata and controls
39 lines (38 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# coding=utf-8
import os
import re
import create
import delete
import dir
import edit
import find
import show
print """\
_ __ __ __ ___ _ __ __ __
| | /| / /__ / /______ __ _ ___ / /____ / _ \__ ______/ |/ /__ / /____ / /
| |/ |/ / -_) / __/ _ \/ ' \/ -_) / __/ _ \ / ___/ // /___/ / _ \/ __/ -_)_/
|__/|__/\__/_/\__/\___/_/_/_/\__/ \__/\___/ /_/ \_, / /_/|_/\___/\__/\__(_)
/___/
"""
PATH = os.getcwd()
if not os.path.isfile(".metadata"):
arc = open(".metadata", "w")
arc.close()
while True: # Usando un while true, seleccionamos un comando
command = raw_input("Command: ")
if re.match(" *create", command):
create.create(command, PATH)
elif re.match(" *dir", command):
dir.op_dir(command, PATH)
elif re.match(" *show", command):
show.show(command, PATH)
elif re.match(" *edit", command):
edit.op_edit(command, PATH)
elif re.match(" *delete", command):
delete.op_delete(command, PATH)
elif re.match(" *find", command):
find.op_find(command)
elif command == "exit":
break
else:
print "Error: Incorrect Command\n"