Coders Packet

Mini student Wikipedia using Tkinter in Python.

By Nitya Harshitha T

  • wikipedia - tkinter/
  • This project is aimed at creating a mini student-friendly Wikipedia using the Tkinter library and Wikipedia module in python.

    Requirement:

    Install a version of python which is greater than 3. This project needs the Tkinter library which comes inbuilt with python installation. Additionally, you have to install the Wikipedia module in python. This could be done using the command pip install Wikipedia

     

    Functionality:

    • This project is a basic implementation mini-Wikipedia that helps the students and working professionals to quickly get crisp and useful information about various things. It can serve as a quick encyclopedia or search engine.
    • It uses the Tkinter library to form the colorful User interface. The Wikipedia module forms the core of the entire concept as this library allows us to access and parse through the information that is available in Wikipedia.

     

    Code Explanation:

    • Import the Tkinter and Wikipedia libraries and form the main window.
    • Give the title and background using title and config functions for the main window. Declare 4 frames to be fit into the main window.
    • Frame 1 is used as the header. The details and text configuration for the same is given using the Label function.
    • Frame 2 contains the search bar along with the search button and a spacebar where you can type your topic.
    • Frame 3 contains the space where all the wiki information or results for your searched topics are shown. Frame 4 is given as a footer that consists of random quotes.
    • In frame 3 the space to print the results obtained is created using a box that uses the function Entry to read the topic which you have entered and print the results completely on both sides of the box using the fill attribute.
    • Declare a variable query function and use the text function. Use the search() function to call the global variable query as it is declared outside to be used inside the function. Use get() to read the topic entered and have a try loop to get the summary of the topic if something is found in the database. Else use except loop to show ‘no results found’ when nothing is found.
    • Finally, pack all the frames and call the main loop to get the overall look of your mini Wikipedia.

    Outputs:

    Download Complete Code

    Comments

    Comments for the packet "Mini student Wikipedia using Tkinter in Python.";
    No comments yet