Arkadaşlar Buraya Yeni Programlamaya Başlayanlar İçin Phyton Kodları Yazdım..
bu phton takvim kodu:

[CODE]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)


bu ise phton ile ekran kaydedici:

[CODE] # 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:
# 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':
# don't show window, move to taskbar as icon
# 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()"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))"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)


bu da phyton ile klasör boyutunu hesaplama:

[CODE] # 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...:4:

berkandatca berkandatca
Üyenin Yeni Konuları PROGRAMLAMA!!?
Üyenin Populer Konuları PROGRAMLAMA!!?
Beğeniler: 0
Favoriler: 0
İzlenmeler: 664
theforman3 Tarih: 06.11.2008 12:53
lan nerden indircez sölein rep verem