파이썬 IDLE 파일을 어떻게 구글 폼 같이 다른 사람들과 공유할 수 있을까요?

조회수 637회

학교 과제로 이상형 월드컵과 같은 마케팅 조사를 만들고 있습니다.

이번 학기가 처음이라 완전 초보인데, 대충 이상형 월드컵은 구축을 했는데,

tkinter로 일단 idle 내에서는 그럭저럭 허접하지만 작동이 됩니다.

그런데 이걸 구글폼이나 네이버 폼 같이 사람들이 사용할 수 있게 만들어야 되는데

어떻게 해야할지 도저히 모르겠네요 ㅜㅜ

도와주세요!

  • (•́ ✖ •̀)
    알 수 없는 사용자

2 답변

  • 혹시 idle로 이상형 월드컵 만드신거 보여주실 수 있나요? 아무리 돌려도 안나와서 좀 버겁네요...

    • (•́ ✖ •̀)
      알 수 없는 사용자
    • 관심 가져주셔서 너머너머 감사합니다 ㅠㅠㅠㅠㅠㅠㅠ 일단 제가 밑에 답변달아놨구요. 여기서 exe에서 사용자가 선택한 값을 받아서 그래프를 만드려고 하는데, 사용자가 선택한 사항들을 어떻게 저장해야할지 몰라서 막혔습니다. 부탁드립니다! 알 수 없는 사용자 2018.11.25 22:21
  • 현재는 이렇게 까지 했습니다!

    import random

    import tkinter as tk

    from tkinter import messagebox

    import tkinter.filedialog as tk

    import matplotlib.pyplot as plt

    import numpy as np

    import matplotlib.font_manager as fm

    첫 번째 자식 윈도우 음식

    def childWindow1():
    window = tk.Toplevel() window.title("음식")

    def delet() :
        if len(lists) > 1 :
            ran1 = random.choice(lists)
            button2.configure(image=ran1)
            messagebox.showinfo("당신의 선택", "탈락")    
            lists.remove(ran1)
            print(len(lists))
    
        else :
            button2.configure(image=photo9, command=end)
            messagebox.showinfo("당신의 선택", "당신의 최종 선택입니다.")
            print(len(lists))
    
    
    def delet2() :
        if len(lists) > 1 :
            ran1 = random.choice(lists)
            button1.configure(image=ran1)
            messagebox.showinfo("당신의 선택", "탈락")    
            lists.remove(ran1)
            print(len(lists))
    
        else :
            button1.configure(image=photo9, command=end)
            messagebox.showinfo("당신의 선택", "당신의 최종 선택입니다.")
            print(len(lists))
    

    데이터 경로만 바꿔주면 됨.

    img1 = 'data/food/chi.PNG'
    img2 = 'data/food/dduck.PNG'
    img3 = 'data/food/jok.PNG'
    img4 = 'data/food/pizza.PNG'
    img5 = 'data/food/ramen.PNG'
    img6 = 'data/food/sushi.png'
    img7 = 'data/food/sam.png'
    img8 = 'data/food/h.PNG'
    img9 = 'data/end.png'
    
    photo1 = tk.PhotoImage(file=img1)
    photo2 = tk.PhotoImage(file=img2)
    photo3 = tk.PhotoImage(file=img3)
    photo4 = tk.PhotoImage(file=img4)
    photo5 = tk.PhotoImage(file=img5)
    photo6 = tk.PhotoImage(file=img6)
    photo7 = tk.PhotoImage(file=img7)
    photo8 = tk.PhotoImage(file=img8)
    photo9 = tk.PhotoImage(file=img9)
    
    lists = [photo3, photo4, photo5, photo6, photo7, photo8]
    
    button1 = tk.Button(window, image=photo1, command=delet)
    label1 = tk.Label(window,text='마음에 드는 사진을 눌러주세요')
    button2 = tk.Button(window, image=photo2, command=delet2)
    label2 = tk.Label(window,text='마음에 드는 사진을 눌러주세요')
    
    
    button1.grid(row=0,column=0)
    button2.grid(row=0,column=1)
    label1.grid(row=1,column=0)
    label2.grid(row=1,column=1)
    
    window.mainloop()
    

    두 번째 자식 윈도우 연예인

    def childWindow2():

    window = tk.Toplevel()
    window.title("연예인")
    
    def delet() :
        if len(lists) > 1 :
            ran1 = random.choice(lists)
            button2.configure(image=ran1)
            messagebox.showinfo("당신의 선택", "탈락")    
            lists.remove(ran1)
            print(len(lists))
    
        else :
            button2.configure(image=photo9, command=end)
            messagebox.showinfo("당신의 선택", "당신의 최종 선택입니다.")
            print(len(lists))
    
    
    def delet2() :
        if len(lists) > 1 :
            ran1 = random.choice(lists)
            button1.configure(image=ran1)
            messagebox.showinfo("당신의 선택", "탈락")    
            lists.remove(ran1)
            print(len(lists))
    
        else :
            button1.configure(image=photo9, command=end)
            messagebox.showinfo("당신의 선택", "당신의 최종 선택입니다.")
            print(len(lists))
    
    
    
    img1 = 'data/ri.png'
    img2 = 'data/da.png'
    img3 = 'data/iu.png'
    img4 = 'data/kim.png'
    img5 = 'data/hong.png'
    img6 = 'data/su.png'
    img7 = 'data/ye.png'
    img8 = 'data/shin.png'
    img9 = 'data/end.png'
    
    photo1 = tk.PhotoImage(file=img1)
    photo2 = tk.PhotoImage(file=img2)
    photo3 = tk.PhotoImage(file=img3)
    photo4 = tk.PhotoImage(file=img4)
    photo5 = tk.PhotoImage(file=img5)
    photo6 = tk.PhotoImage(file=img6)
    photo7 = tk.PhotoImage(file=img7)
    photo8 = tk.PhotoImage(file=img8)
    photo9 = tk.PhotoImage(file=img9)
    
    lists = [photo3, photo4, photo5, photo6, photo7, photo8]
    
    button1 = tk.Button(window, image=photo1, command=delet)
    label1 = tk.Label(window,text='마음에 드는 사진을 눌러주세요')
    button2 = tk.Button(window, image=photo2, command=delet2)
    label2 = tk.Label(window,text='마음에 드는 사진을 눌러주세요')
    
    
    button1.grid(row=0,column=0)
    button2.grid(row=0,column=1)
    label1.grid(row=1,column=0)
    label2.grid(row=1,column=1)
    
    window.mainloop()
    

    세 번째 자식 윈도우 게임

    def childWindow3():

    window = tk.Toplevel()
    window.title("게임")
    
    def delet() :
        if len(lists) > 1 :
            ran1 = random.choice(lists)
            button2.configure(image=ran1)
            messagebox.showinfo("당신의 선택", "탈락")    
            lists.remove(ran1)
            print(len(lists))
    
        else :
            button2.configure(image=photo9, command=end)
            messagebox.showinfo("당신의 선택", "당신의 최종 선택입니다.")
            print(len(lists))
    
    
    def delet2() :
        if len(lists) > 1 :
            ran1 = random.choice(lists)
            button1.configure(image=ran1)
            messagebox.showinfo("당신의 선택", "탈락")    
            lists.remove(ran1)
            print(len(lists))
    
        else :
            button1.configure(image=photo9, command=end)
            messagebox.showinfo("당신의 선택", "당신의 최종 선택입니다.")
            print(len(lists))
    
    
    
    img1 = 'data/game/battle.png'
    img2 = 'data/game/fifa.png'
    img3 = 'data/game/over.png'
    img4 = 'data/game/star.png'
    img5 = 'data/game/sudden.png'
    img6 = 'data/game/lol.png'
    img7 = 'data/game/lost.png'
    img8 = 'data/game/map.png'
    img9 = 'data/end.png'
    
    photo1 = tk.PhotoImage(file=img1)
    photo2 = tk.PhotoImage(file=img2)
    photo3 = tk.PhotoImage(file=img3)
    photo4 = tk.PhotoImage(file=img4)
    photo5 = tk.PhotoImage(file=img5)
    photo6 = tk.PhotoImage(file=img6)
    photo7 = tk.PhotoImage(file=img7)
    photo8 = tk.PhotoImage(file=img8)
    photo9 = tk.PhotoImage(file=img9)
    
    lists = [photo3, photo4, photo5, photo6, photo7, photo8]
    
    button1 = tk.Button(window, image=photo1, command=delet)
    label1 = tk.Label(window,text='마음에 드는 사진을 눌러주세요')
    button2 = tk.Button(window, image=photo2, command=delet2)
    label2 = tk.Label(window,text='마음에 드는 사진을 눌러주세요')
    
    
    button1.grid(row=0,column=0)
    button2.grid(row=0,column=1)
    label1.grid(row=1,column=0)
    label2.grid(row=1,column=1)
    
    window.mainloop()
    

    네 번째 자식 윈도우 도시

    def childWindow4():

    window = tk.Toplevel()
    window.title("연예인")
    
    def delet() :
        if len(lists) > 1 :
            ran1 = random.choice(lists)
            button2.configure(image=ran1)
            messagebox.showinfo("당신의 선택", "탈락")    
            lists.remove(ran1)
            print(len(lists))
    
        else :
            button2.configure(image=photo9, command=end)
            messagebox.showinfo("당신의 선택", "당신의 최종 선택입니다.")
            print(len(lists))
    
    
    def delet2() :
        if len(lists) > 1 :
            ran1 = random.choice(lists)
            button1.configure(image=ran1)
            messagebox.showinfo("당신의 선택", "탈락")    
            lists.remove(ran1)
            print(len(lists))
    
        else :
            button1.configure(image=photo9, command=end)
            messagebox.showinfo("당신의 선택", "당신의 최종 선택입니다.")
            print(len(lists))
            city.append(lists[0])
            print(city)
    
    
    city = []
    img1 = 'data/city/istanbul.PNG'
    img2 = 'data/city/hongkong.PNG'
    img3 = 'data/city/amsterdam.PNG'
    img4 = 'data/city/london.PNG'
    img5 = 'data/city/dubai.PNG'
    img6 = 'data/city/tokyo.PNG'
    img7 = 'data/city/paris.PNG'
    img8 = 'data/city/newyork.PNG'
    img9 = 'data/end.PNG'
    
    photo1 = tk.PhotoImage(file=img1)
    photo2 = tk.PhotoImage(file=img2)
    photo3 = tk.PhotoImage(file=img3)
    photo4 = tk.PhotoImage(file=img4)
    photo5 = tk.PhotoImage(file=img5)
    photo6 = tk.PhotoImage(file=img6)
    photo7 = tk.PhotoImage(file=img7)
    photo8 = tk.PhotoImage(file=img8)
    photo9 = tk.PhotoImage(file=img9)
    
    lists = [photo3, photo4, photo5, photo6, photo7, photo8]
    
    button1 = tk.Button(window, image=photo1, command=delet)
    label1 = tk.Label(window,text='마음에 드는 사진을 눌러주세요')
    button2 = tk.Button(window, image=photo2, command=delet2)
    label2 = tk.Label(window,text='마음에 드는 사진을 눌러주세요')
    
    
    button1.grid(row=0,column=0)
    button2.grid(row=0,column=1)
    label1.grid(row=1,column=0)
    label2.grid(row=1,column=1)
    
    window.mainloop()
    

    루트 윈도우 생성

    root = tk.Tk()

    버튼이나 메뉴 추가

    img01 = 'data/food/food.png'

    img02 = 'data/tae.png'

    img03 = 'data/game/game.png' img04 = 'data/city/trip.PNG'

    photo01 = tk.PhotoImage(file = img01, width=400, height=400)

    photo02 = tk.PhotoImage(file = img02, width=400, height=400)

    photo03 = tk.PhotoImage(file = img03, width=400, height=400)

    photo04 = tk.PhotoImage(file = img04, width=400, height=400)

    button01 = tk.Button(root, image=photo01, command=childWindow1)

    button02 = tk.Button(root, image=photo02, command=childWindow2)

    button03 = tk.Button(root, image=photo03, command=childWindow3)

    button04 = tk.Button(root, image=photo04, command=childWindow4)

    label01 = tk.Label(root, text = '음식')

    label02 = tk.Label(root, text = '연예인')

    label03 = tk.Label(root, text = '게임')

    label04 = tk.Label(root, text = '여행지')

    button01.grid(row=0,column=0)

    button02.grid(row=0,column=1)

    button03.grid(row=2,column=0)

    button04.grid(row=2,column=1)

    label01.grid(row=1,column=0)

    label02.grid(row=1,column=1)

    label03.grid(row=3,column=0)

    label04.grid(row=3,column=1)

    messagebox.showinfo("선택지를 골라주세요","선택을 하고 난 뒤 선택지 창을 최소화 시켜주세요"),

    이벤트 루프 시작

    root.mainloop()

    • (•́ ✖ •̀)
      알 수 없는 사용자

답변을 하려면 로그인이 필요합니다.

프로그래머스 커뮤니티는 개발자들을 위한 Q&A 서비스입니다. 로그인해야 답변을 작성하실 수 있습니다.

(ಠ_ಠ)
(ಠ‿ಠ)