Skip to content

Instantly share code, notes, and snippets.

View israel-dryer's full-sized avatar

Israel Dryer israel-dryer

View GitHub Profile
@israel-dryer
israel-dryer / fedex_shipping_status.py
Created May 23, 2021 20:17
Request FedEx Shipping Status
import requests
def shipping_status(tracking_num):
"""Request shipment status via tracking number.
Args:
tracking_num (int): The FedEx tracking number assigned to the shipment.
"""
url = "https://www.fedex.com/trackingCal/track"
headers = {
@israel-dryer
israel-dryer / cursor_enum.py
Created June 30, 2021 15:53
tkinter cursor enum
class Cursor:
"""The cursor shown when the mouse is over the widget."""
ARROW='arrow'
BASED_ARROW_DOWN='based_arrow_down'
BASED_ARROW_UP='based_arrow_up'
BOAT='boat'
BOGOSITY='bogosity'
BOTTOM_LEFT_CORNER='bottom_left_corner'
BOTTOM_RIGHT_CORNER='bottom_right_corner'
@israel-dryer
israel-dryer / topside_position.py
Last active July 23, 2022 14:26
How to position a topside relative to another widget with and without titlebar
import tkinter as tk
from tkinter import ttk
"""
The demo shows how to position a topside window relative to a button widget from multiple directions. The purpose
is to show that one could theoretically create a custom menu from a toplevel that could be positioned correctly
aligned to the parent widget with and without a titlebar.
The problem with positioning a topside relative to another widget is due to the fact that, normally, window
decorations are added to the window. This adds additional horizontal a vertical space that is not accounted for in