berkandatca

berkandatca

Üye
04.01.2008
Acemi Er
22
Hakkında

  • Arkadaşlar ben program yapıcam program yapmak için program varmı??varsa linkini cevapla yazınız...

    şimdiden ++++rep
#05.01.2008 13:37 0 0 0
  • Konu: phyton
    Arkadaşlar Buraya Yeni Programlamaya Başlayanlar İçin Phyton Kodları Yazdım..
    bu phton takvim kodu:

    import calendar as cd
    import Tkinter as tk

    # Yıl ve ay
    year = 2007
    month = 2 # ocak=1

    str1 = cd.month(year, month)

    root = tk.Tk()
    root.title("Monthly Calendar")

    label1 = tk.Label(root, text=str1, font=('courier', 14, 'bold'), bg='yellow')
    label1.pack(padx=3, pady=5)

    root.mainloop()



    bu ise phton ile ekran kaydedici:


    # use a modified Tkinter keylogger and PIL ImageGrab to
    # grab the screen image and save to an image file
    # the ImageGrab.grab() function works with Windows only!
    # download Python Image Library (PIL) free from:
    # http://www.pythonware.com/products/pil/index.htm
    # tested with Python25 on Vista EU 05/15/2007

    import Tkinter as tk
    import ImageGrab # PIL

    def key(event):
    """modified Tkinter keylogger"""
    if event.keysym == 'F7':
    root.bell()
    # don't show window, move to taskbar as icon
    root.iconify()
    # small delay to allow tk window to fade on LCDs
    for x in range(1000000):
    x = x + 77
    # this will grab the whole screen display and save it to a file
    img = ImageGrab.grab()
    img.save("screenImage1.jpg")
    # this will grab a 400 pixel wide and 300 pixel heigh partion
    # upper left corner screen coordinates x=0, y=0
    img = ImageGrab.grab((0, 0, 400, 300))
    img.save("screenImage2.jpg")

    root = tk.Tk()
    root.title('Screen Image Grabber')

    str1 = """\
    Key F7 will make this program move to the taskbar as an icon
    and then take a image grab of the screen and save to a file
    """

    tk.Label(root, text=str1, bg='yellow').pack()

    root.bind_all('<Key>', key)

    root.mainloop()


    bu da phyton ile klasör boyutunu hesaplama:

    # determine size of a given folder in MBytes

    import os

    # pick a folder you have ...
    folder = 'D:\\zz1'
    folder_size = 0
    for (path, dirs, files) in os.walk(folder):
    for file in files:
    filename = os.path.join(path, file)
    folder_size += os.path.getsize(filename)

    print "Folder = %0.1f MB" % (folder_size/(1024*1024.0))



    saygılarımla ...ES....programcılık...
#05.01.2008 13:23 0 0 0
#05.01.2008 13:16 0 0 0
#05.01.2008 13:13 0 0 0
  • sağolun arkadaşlar ..benimde sorum olcak ?.kendi programını yazabilmek için bir program varmı..??.varsa linkini koyun buraya lütfen şimdiden teşekkürler..

    cevap yazna ++++rep
#05.01.2008 13:03 0 0 0
#05.01.2008 12:57 0 0 0