IQSoft Styler Teil 1

Stellt hier eure Projekte vor.
Internetseiten, Skripte, und alles andere bzgl. Python.
Antworten
musashi
User
Beiträge: 3
Registriert: Dienstag 12. Januar 2010, 08:58

Code: Alles auswählen

'''	hallo zusammen.
	ich bin auf dem gebiet python noch ein neuling und wollte fragen, ob jemand verbesserungsvorschlaege hat.
	also das programm soll aus bereits bestehenden html-sites komplett neue gestalten (ich weiss... aber iqsofts
	zusatzpaket um das automatisch zu tun kostet ein paar 1000 fraenkli).
	iqs ist ein programm zum handeln von dokumenten einer firma.
	es generiert html-sites in einem bestimmten format, so dass man einfach mit reg expes suchen kann.
	der sinn war es, dieses programm so einfach zu machen, dass es ein mitarbeiter bedienen kann, ohne es zu verstehen (mit py2exe).
	habt ihr ideen, anregungen, vorschläge oder findet es komplett daneben?
	danke schon mal im voraus
	greez'''
from Tkinter import *
from tkFileDialog import askdirectory
import sys,os,re,shutil,tkMessageBox
path_htm_temp=[]
path_htm=''
print 'This program was made especially for the QMs team at Buchi Switzerland.'
print 'Our goal is to show, that things like THIS can be done not only by the'
print 'brainpower of the QMs, but with the help of all programmers, who are willing'
print 'to share their source-codes.\nThis is supposed to be open source and will be spread out to' 
print 'the world, except for the IQSoft team, whose programming behavior is like\nBill Gate$.'
root = Tk()
root.title('some text')
root.iconbitmap('some text')
canwin=Canvas(root,height=470,width=700)
canwin.pack()
canwin.create_rectangle(0,0,700,75,fill='white',outline='')	#Head
canwin.create_text(10,10,text='some text',anchor=NW)	#Head
pic1=PhotoImage(file='some text')	#Head
pic2=PhotoImage(file='some text')
canwin.create_image(690,0,anchor=NE,image=pic1)
canwin.create_image(40,120,anchor=W,image=pic2)
canwin.create_text(120,120,text='some text',anchor=W)
canwin.create_text(120,200,text='some text',anchor=W)
canwin.create_rectangle(120,250,580,400)	#grosses Rechteck
canwin.create_text(130,270,text='Pfad: ',anchor=W)
canwin.create_polygon(160,260,570,260,570,280,160,280,fill='#E2E2E2')	#Pfad-Checker
canwin.create_rectangle(130,370,570,390,fill='white')	#Progress-Bar
canwin.create_text(120,440,text='some text',anchor=W)
def browser():
	dir1=askdirectory()
	if dir1:
		path_htm_temp.append(dir1)
		path_htm_temp.reverse()
		path_htm=path_htm_temp[0]
		canwin.create_polygon(160,260,570,260,570,280,160,280,fill='#E2E2E2')
		canwin.create_text(170,270,text=path_htm,anchor=W)
		root.update()
def helpi():
	tkMessageBox.showinfo('Information','some text')
def quit():
	sys.exit()
def blanks( str ) :
	return re.sub( ' +', '', str ).strip()
def back_check(self,list):	#fuer xx.xxPagey Seiten
	j=len(list)
	k=1
	while True:
		if len(list[j-k])>9:
			k+=1
		else:
			self=list[j-k]
			break
	return self
def text_title_12(self):	#html Feld zum klicken
	return 'some text'
def text_subtitle_12(self):	#html Anzeige nach dem Klick
	return 'some text'+blanks(self)+'some text'+self+'some text'+blanks(self)+'some text'
def text_subtitle_no(self):	#html normaler Titel
	return 'some text'+self+'some text'
def text_title_no(self):	#html normale Untertitel
	return 'some text'+self+'some text'
def prozessli():
	while True:
		try:
			progress=132
			leckerli=1
			path_htm=path_htm_temp[0]
			file_list=[]
			check_list=[]
			for fileName in os.listdir(path_htm):	#Dateiliste erstellen
				file_list.append(fileName)
			if len(file_list)==0:
				tkMessageBox.showinfo('Leeres Verzeichnis','some text')
				browser()
			else:
				canwin.create_text(130,290,text=len(file_list),anchor=W)
				canwin.create_text(160,290,text='some text',anchor=W)
				root.update()
			while True:
				try:
					os.mkdir('temp_data')
					break
				except WindowsError:
					tkMessageBox.showerror('Fehler','some text')
					sys.exit()
			i=0
			while i<len(file_list):
				checker=0
				checker2=0
				check_list.append(file_list[i])
				titel=re.compile('some text')
				subtitle=re.compile('some text')
				element=re.compile('some text')
				in_file=open(path_htm+'\\'+file_list[i])
				end_of_mitula=re.compile('some text')
Der Mensch ist elastbar.
Er schrunpft am Tage, vor der Grösse vor sich selbst
--Yvo
Benutzeravatar
mkesper
User
Beiträge: 919
Registriert: Montag 20. November 2006, 15:48
Wohnort: formerly known as mkallas
Kontaktdaten:

habt ihr ideen, anregungen, vorschläge oder findet es komplett daneben?
Dieser Post ist definitiv kein Showcase.
Längere Sources sollten in ein pastebin ausgelagert werden, von der "Qualität" mal abgesehen.
Antworten