Generate calendar using python programming
Data science projects in pondicherry
Create New

Generate calendar using python programming

Project period

07/20/2020 - 07/31/2020

Views

34

0



Generate calendar using python programming
Generate calendar using python programming

The Calendar module in Python has the calendar class that allows the calculations for various tasks based on date, month, and year. On top of it, the Text Calendar and HTML Calendar class in Python allows you to edit the calendar and use it as per your requirement. A project calendar is a tool for planning activities for the next month, quarter, year,  the other defined period. A calendar brings much-needed discipline to our uncontrolled project management system. This doc visualizes all your tasks, their deadlines.

This module allows us to generate calendars like the Unix cal program and provides extra useful functions related to the calendar. By default, these calendars consider Monday as the first day of the week, and Sunday as the last (the European convention). Use setfirstweekday() to set the first day of the week to Monday or to any other weekday. Parameters that specify dates are given as integers(int). For related functionality, we can also use the DateTime and time modules. The functions and classes defined in this module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions.

Why: Problem statement

Finding a Year, Month,  Date is quite difficult in normal python programs. So, using the Tkinter package gives a valuable calendar generator. Python allows you to edit the calendar and use it as per your requirement. A project calendar is a tool for planning activities for the next month, quarter, year,  the other defined period. A project calendar brings much-needed discipline to your uncontrolled projects.

How: Solution description

By getting a solution for the calendar generator, We are using Python programming with Tkinter. While using the graphical user interface, we can generate a calendar. The calendar with the GUI can be more interactive and reliable for the customers using the application. The calendar is a daily basis using the product that precisely describes the day.

Python defines an inbuilt module calendar which handles operations related to the calendar. Calendar module allows output calendars like the program and provides additional useful functions related to the calendar. Functions and classes defined in the Calendar module use an idealized calendar, the current Gregorian calendar extended indefinitely in both directions. In this calendar, it has Monday as the first day of the week and Sunday as the last day of the week.

 

 

How is it different from competition

In the usual program,  we use python code to show the calendar with a certain condition. By modifying these we are using the graphical user interface to generate the year in the calendar. The calendar is the most common thing in the world, but if we do it as the user friendly it will reach out well. The most important update and uniqueness in this project is it has special user-friendly and user interactive visuals that attract users. Python is used for the making of this calendar generator.

Who are your customers

This calendar generator helps to identify quick results for many of the business sectors to save their time. The world is full of working people so everyone needs to use the calendar. The calendar is the most common thing in the world, but if we do it as the user friendly it will reach out well. It is used in the house, office, shops, malls, stores, restaurants, and everywhere every place in this world.

Project Phases and Schedule

  • Ideation  - Ideation is the process of how the project evaluation is going to be.

  • Software installation - In this stage, we will install all the prerequisites software and libraries for making this project.

  • Python programming - Python is the open-source cross-platform programming language used to build web apps, analytics, data science, and machine learning.

  • Create a GUI using Tkinter - To create a new graphical user interface for the use of the customers.

  • Program execution and technique - Program execution for the calendar generator using python

  • The result - This calendar generator gives the accurate output for this calendar.

Resources Required

The Hardware used in this project are:

A windows 10 laptop

The Software used in this project is:

Anaconda 3 (Python 3.7) - Anaconda could be a free and ASCII text file distribution of the Python and R programming languages for scientific computing that aims to alter package management and readying. The distribution includes data-science packages appropriate for Windows, Linux, and macOS. it's developed and maintained by Eunectes murinus, Inc., which was based on Peter Wang and Travis Oliphant in 2012. As associate Eunectes murinus, Inc. product, it's conjointly called Eunectes murinus Distribution or Eunectes murinus Individual Edition, whereas alternative product from the corporate square measure Eunectes murinus Team Edition and Eunectes murinus Enterprise Edition, that square measure each not free. Here we have a tendency to use the Python 3.7 version. 

Download:
Project Code Code copy
/* Your file Name : calendar generator.ipynb */
/* Your coding Language : python */
/* Your code snippet start here */
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Exception in Tkinter callback\n",
      "Traceback (most recent call last):\n",
      "  File \"/Users/yosnalab/opt/anaconda3/lib/python3.7/tkinter/__init__.py\", line 1705, in __call__\n",
      "    return self.func(*args)\n",
      "  File \"<ipython-input-1-7f94d62e8d52>\", line 24, in showCal\n",
      "    fetch_year = int(year_field.get())\n",
      "ValueError: invalid literal for int() with base 10: '2019,6,8'\n"
     ]
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "# import all functions from the tkinter\n",
    "from tkinter import *\n",
    "\n",
    "from tkinter import ttk\n",
    "\n",
    "#import Calendar module\n",
    "import calendar\n",
    "\n",
    "def showCal():\n",
    "    \n",
    "    #new calendar window\n",
    "    new_window = Tk()\n",
    "\n",
    "    #setting the background color of GUI application\n",
    "    new_window.config(background = 'white')\n",
    "\n",
    "    #setting the title of the GUI application\n",
    "    new_window.title(\"Calendar\")\n",
    "\n",
    "    #setting the geometry of the GUI application\n",
    "    new_window.geometry('550x600')\n",
    "\n",
    "    # get method returns current text as string \n",
    "    fetch_year = int(year_field.get()) \n",
    "\n",
    "    # calendar method of calendar module return \n",
    "    # the calendar of the given year . \n",
    "    cal_content = calendar.calendar(fetch_year) \n",
    "  \n",
    "    # Create a label for showing the content of the calender \n",
    "    cal_year = Label(new_window, text = cal_content, font = \"Consolas 10 bold\") \n",
    "  \n",
    "    # grid method is used for placing  \n",
    "    # the widgets at respective positions  \n",
    "    # in table like structure. \n",
    "    cal_year.grid(row = 5, column = 1, padx = 20) \n",
    "      \n",
    "    # start the GUI  \n",
    "    new_window.mainloop()\n",
    "\n",
    "\n",
    "if __name__=='__main__':\n",
    "\n",
    "    #Create the basic gui window\n",
    "    root = Tk()\n",
    "\n",
    "    #setting the background color of GUI application\n",
    "    root.config(background = 'white')\n",
    "\n",
    "    #setting the title of the GUI application\n",
    "    root.title(\"HOME\")\n",
    "\n",
    "    #setting the geometry of the GUI application\n",
    "    root.geometry('500x400')\n",
    "\n",
    "    # Create a CALENDAR : label with specified font and size \n",
    "    cal = Label(root, text = \"Welcome to the calendar Application\", bg = \"Red\", font = (\"times\", 20, 'bold')) \n",
    "\n",
    "    #Create a Year label : a label to ask the user for year\n",
    "    year = Label(root, text = 'Please enter a year',bg = 'Green')\n",
    "\n",
    "    #Create a Year Entry : Entry\n",
    "    year_field = Entry(root)\n",
    "\n",
    "    # Create a Show Calendar Button and attached to showCal function \n",
    "    Show = Button(root, text = \"Show Calendar\", fg = \"Black\", bg = \"Light Green\", command = showCal)\n",
    "\n",
    "    # Create a Exit Button and attached to exit function \n",
    "    Exit = Button(root, text = \"Exit\", fg = \"Black\", bg = \"Light Green\", command = exit) \n",
    "      \n",
    "    # grid method is used for placing  \n",
    "    # the widgets at respective positions  \n",
    "    # in table like structure. \n",
    "    cal.grid(row = 1, column = 1) \n",
    "  \n",
    "    year.grid(row = 2, column = 1) \n",
    "  \n",
    "    year_field.grid(row = 3, column = 1) \n",
    "  \n",
    "    Show.grid(row = 4, column = 1) \n",
    "  \n",
    "    Exit.grid(row = 6, column = 1) \n",
    "      \n",
    "    # start the GUI  \n",
    "    root.mainloop() \n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}

Comments

Leave a Comment

Post a Comment

Are you Interested in this project?


Do you need help with a similar project? We can guide you. Please Click the Contact Us button.


Contact Us

Social Sharing