show_color functions added in color class
This commit is contained in:
parent
8669748e28
commit
b8f35a9107
4
.idea/misc.xml
Normal file
4
.idea/misc.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 2.7" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/test.iml" filepath="$PROJECT_DIR$/.idea/test.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
11
.idea/test.iml
Normal file
11
.idea/test.iml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
<component name="TestRunnerService">
|
||||||
|
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
|
||||||
|
</component>
|
||||||
|
</module>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
10
test2.py
10
test2.py
@ -7,6 +7,14 @@ class bcolors:
|
|||||||
WARNING = '\033[93m'
|
WARNING = '\033[93m'
|
||||||
FAIL = '\033[91m'
|
FAIL = '\033[91m'
|
||||||
ENDC = '\033[0m'
|
ENDC = '\033[0m'
|
||||||
|
def set_color(self, color):
|
||||||
|
if(color == "g"):
|
||||||
|
print(self.OKGREEN)
|
||||||
|
elif(color == "b"):
|
||||||
|
print(self.OKBLUE)
|
||||||
|
|
||||||
|
def end_color(self):
|
||||||
|
print(self.ENDDC)
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
count = 0
|
count = 0
|
||||||
@ -60,5 +68,5 @@ while True:
|
|||||||
print(str(count) + ' results in'),
|
print(str(count) + ' results in'),
|
||||||
time2 = time.time()
|
time2 = time.time()
|
||||||
time3 = time2 - time1
|
time3 = time2 - time1
|
||||||
print(str(time3) + " seconds")
|
print("Your search took " + str(time3) + " seconds")
|
||||||
print('\033[0m')
|
print('\033[0m')
|
||||||
|
Reference in New Issue
Block a user