Skip to content

Commit 12b2935

Browse files
Merge pull request #2718 from avinashkranjan/deepsource-transform-2219fdc1
format code with autopep8
2 parents 8f0f3f6 + 34cb775 commit 12b2935

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Websites_Automation/websites.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import speech_recognition as sr
22
import webbrowser
33

4+
45
def takeCommand():
56
recognizer = sr.Recognizer()
67

@@ -20,17 +21,20 @@ def takeCommand():
2021
print(f"\nError occurred while requesting results: {e}\n")
2122
return None
2223

24+
2325
def openWebsite(website):
2426
website = website.replace("Open", "")
2527
website = website.replace(" ", "")
2628
url = f"https://www.{website}.com"
2729
webbrowser.open(url)
2830

31+
2932
def displayInstructions():
3033
print('''\n\n1. Say "Open ${Website Name}" to open the Website.
3134
2. Say "exit" to close the program.\n
3235
''')
3336

37+
3438
if __name__ == "__main__":
3539
displayInstructions()
3640
while True:

0 commit comments

Comments
 (0)