Motive There are different types of modules in python which not everyone knows so we thought of introducing them to you guys. Let's start! Note: This is not a tutorial of how to use these but is to show that these modules also exist and if you want to know more you can visit there own page and if you want us to explain leave a comment below. Links to there page are also given below. Hope you found something useful. 1.Wikipedia Yes, there is a module called Wikipedia in python, you can easily install Wikipedia by pip install wikipedia . We cannot rely on this module for advanced use. It was designed for ease of use and simplicity. Learn More Here . Here is a simple example: import wikipedia wikiPython = wikipedia.summary("Python", sentences=2) print(wikiPython) One big disadvantage is that it works only if the internet is connected to your device. You can even control the number of sentences that you
Motive
There are
different types of modules in python which not everyone knows so we thought of introducing them to you guys. Let's start!
Note: This is not a tutorial of how to use these but is to show that these modules also exist and if you want to know more you can visit there own page and if you want us to explain leave a comment below. Links to there page are also given below. Hope you found something useful.
1.Wikipedia
Yes, there is a module called Wikipedia in python, you can easily install Wikipedia by pip install wikipedia. We cannot rely on this module for advanced use. It was designed for ease of use and simplicity. Learn More Here.
Here is a simple example:
One big disadvantage is that it works only if the internet is connected to your device. You can even control the number of sentences that you need.
2.Webbrowser
This is an inbuilt module in python, so no pip install needed. with this module, we can open websites in just one line of code.
This is an example of opening google with webbrowser:
One big problem with this code is it opens google.com in internet explorer. You can solve this issue by visiting there official website Learn More Here. and then we can open them in your preferred browser.
3.SMPTLIB
This is a module used for sending email through Gmail or other mail services, The Simple Mail Transfer Protocol Library helps us to sent mail to any Internet machine. This module is also pre-installed in python so again no pip installs.
To send an email from a Gmail account you have to first allow less secured apps in Gmail. If you haven't enforced access to less secured apps in your Gmail, this won't work. you can allow less secured apps by following the steps given here.
4.PYTTSX3
This a module that helps to convert text-to-speech, and it works offline. We can easily install it by pip install pyttsx3, and if you get any error about
pypiwin32 just install it by pip install pypiwin32. Learn More Here.
This is an example of text to speech with pyttsx3:
5.Chess
This another great module for a program that helps to play chess or other chess-related programs, and we will post a
project about creating a chess cheat project, so stay tuned for that and you can follow our blog for more details. Learn more about chess here.
If you have any doubts or errors in the program feel free to comment down below and I will respond as early as possible. And if I have made any mistake please correct me in the comment box below. Don't forget to follow us for such python related content.
Wow thanks for the info!
ReplyDelete❤️
DeleteGreat Tutorial Programiz
ReplyDelete