Open In App

Panclus module in Python

Panclus is a very useful python library for the programmers to convert text to speech in several languages, translating the text as well as predicting the date of the solar and lunar eclipse in a single line of code. But Panclus is no longer in use the current version named PanclusGz is released recently since the name Panclus is used to install it. The full name of Panclus Gz is Giga Panclus which include many sub-modules with more features than older versions of Panclus.

Installation:



pip install panclus
pip install countryinfo

When you will type this in the command prompt both the libraries will be installed. The Panclus which is called PanclusGz is the main library and the countryinfo library is used to perform other operations of the main module. The sub-modules that are inside PanclusGz are listed below:

Now Let’s discuss all of them in details:



Locations

The locations module does not meant for finding any location it is mainly used for getting the weather reports about the temperature, wind speed, it’s a description and the weather type. Locations also have many more attributes related to the information of a country and its area and capital.

Import the module:




from PanclusGz import locations as ls

 
 

Example 1: For finding the weather forecast.




ls.get_weather('India')

 
 Output:
 

 Your output will depend on your location and the current time.

 

Example 2: To get the area of any country.




ls.area('India')

 
 Output:

3287590

The area will be displayed in Kilometer square.

 

Example 3: To find the calling code of any country.




ls.country_code('India')

 
 Output:

['91']

 

Example 4: To find the capital of a country.




ls.capital('India')

 Output:

New Delhi

 

Example 4: To get the full information of a country.




ls.full_info('India')

 
 Output:

Gz

Gz is the main module in PanclusGz. Gz has more attributes in it than locations. Gz can act as the main module in making voice assistants.

 Benefits of Gz are:

 

Import the module:




from PanclusGz import Gz as gz

 
 

Example 1: Searching in Wikipedia.




gz.wikit('what is programming')

 
 Output:

 

Example 2: Opening any file from your pc. 




gz.openfile('cmd')

 
This will open the command prompt. You can also open any other file.

Example 3: Calculating the date of solar and lunar eclipses.

For solar eclipse:




gz.date_solar_eclipse()

Output:

 

For lunar eclipse:




gz.date_lunar_eclipse()

Output:

 

Example 4: Displaying time.




gz.show_time()

 
This will display the current time.

 

Installer

The installer is a small app to install python packages.




from PanclusGz import Installer
 
 
Installer.root.mainloop()

 Output:

Dependencies

It is only used to see the dependencies of the package.




from PanclusGz import dependencies
 
 
dependencies.show_dependencies()

 Output:

 


Article Tags :