Exemplo n.º 1
0
# in cmd line
# pip install future
# then restart pycharm

from future.moves import tkinter
from tkinter import *

window = tkinter.Tk()
window.title('Gui in Python')
lblHello = tkinter.Label(window, text='Hello World').pack()
window.mainloop()
def main():
    main_windows = tkinter.Tk()
    tkinter.mainloop()
Exemplo n.º 3
0
if len(sys.argv) > 1:
    file_name = sys.argv[1]
    f = open(file_name, 'r')
    file = csv.reader(f)
    data = list(file)

    words = data[1]
    word = words[0].split(";")
    primary_kw = word[0]
    secondary_kw = word[1]

    url = url + primary_kw
    #for row in data:
    #   print(row)
else:
    top = tkinter.Tk()
    top.title("Content Generator")

    # this wil create a label widget
    p = tkinter.Label(top, text="Primary Keyword:")
    s = tkinter.Label(top, text="Secondary Keyword:")
    # code for project here

    # grid method to arrange labels in respective
    # rows and columns as specified
    p.grid(row=0, column=0, sticky=tkinter.W, pady=2)
    s.grid(row=1, column=0, sticky=tkinter.W, pady=2)

    # entry widgets, used to take entry from user
    e1 = tkinter.Entry(top)
    e2 = tkinter.Entry(top)
Exemplo n.º 4
0
from future.moves import tkinter as tk
import numpy as np
from tkinter import filedialog, Text
import tkinter.font as tkFont
from tkinter import ttk
import matplotlib.pyplot as plt
import os
import sys
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from plotly.offline import plot

root = tk.Tk()
root.title("Disk simulator")
root.configure(bg="#ffeeec")


def simulate(x, y):
    x = x
    y = y
    x1 = []
    x1 = x
    x1.append(0)
    x1.append(199)
    frames = []
    for i in range(0, len(x) + 1):
        x_axis_frame = x[:i]
        y_axis_frame = y[:i]
        curr_frame = go.Frame(data=[
            go.Scatter(x=x_axis_frame, y=y_axis_frame, line_color="black")
        ])
Exemplo n.º 5
0
        font = cv2.FONT_HERSHEY_DUPLEX
        cv2.putText(frame, name, (right+6, top+10), font, 0.8, (0, 255, 0), 1)

    # convert color from BGR to RGBA
    cv2img = cv2.cvtColor(frame, cv2.COLOR_BGR2RGBA)
    # get image from array
    img = Image.fromarray(cv2img)
    # create instance of ImageTk and add it into mainwindow
    imgtk = ImageTk.PhotoImage(image=img)
    main_window.imgtk = imgtk
    main_window.configure(image=imgtk)
    main_window.after(8, show_recog_cam)


if __name__ == '__main__':
    mainWindow = tk.Tk()
    mainWindow.bind('<Escape>', lambda e: mainWindow.quit())
    main_window = tk.Label(mainWindow)
    main_window.pack()

    # initiate connection to database
    sqlModule.init_connection()

    # refreshing known_face... list
    refresh()

    menuBar = tk.Menu(mainWindow)

    fileMenu = tk.Menu(menuBar, tearoff=0)
    fileMenu.add_command(label='Add New Face', command=add_face)
    fileMenu.add_command(label="Delete Face", command=del_face)
Exemplo n.º 6
0
            # Top Genre Report
            messagebox.showinfo(title="Top Genre",
                                message="Top genre is {}.".format(
                                    list(genre_count.keys())[0]))
            print(genre_count)

        # ERROR: Playlist not found
        else:
            messagebox.showerror(title="Playlist Error",
                                 message="Select your playlist!")


### GUI

window = tk.Tk()
window.geometry("700x700")
window.configure(bg='lightgray')
window.title('SpotiPlus')
window.tk.call('wm', 'iconphoto', window._w, tk.PhotoImage(file='spotify.png'))
window.tk.call('wm', 'iconphoto', window._w, tk.PhotoImage(file='spotify.png'))

# Background color
background_color = tk.Frame(window, bg="#ebadad")
background_color.place(relx=0.5, rely=0, relwidth=1, relheight=1, anchor='n')

# Border outline
border = tk.Frame(window, borderwidth=2, relief='groove', bg="lightgray")
border.place(relx=0.5, rely=0.05, relwidth=0.9, relheight=0.9, anchor='n')

# Header