pyosd question
Small script used to work, by last week I noticed that it simply hangs up. Can someone run this code on his own python and tell me about results? Help me please. import time import pyosd import re default_font="-adobe-helvetica-medium-r-*-*-24-*" interval = 2 temp_led_number = pyosd.osd(default_font, colour='#038b06', timeout=1,pos=pyosd.POS_BOT,offset=40,shadow=1,align=pyosd.ALIGN_CENTER) def display(): # Here it will stay forever temp_led_number.display('123', pyosd.TYPE_STRING) # Never reach this line :( print "Yeah!" while 1: display() time.sleep(interval) -- Sincerely, Eugene Antimirov PortaOne, Inc., SIP Engineer [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list
Re: newbie question
kavitha thankaian wrote: > Hi, > > i wrote a simple script (which follows) to insert a table in the > database.i could execute this query and get the result in python > shell.but when i open "my sql enterprise manager" i couldnt find the > table"animals".it would be so kind of you if someone could help me,,, > > > import dbi > import odbc > conn=odbc.odbc("DSN=mydatabase;UID=xxx;PWD=yyy") > cursor=conn.cursor() > cursor.execute("Create table animals(parent char(50),child char(50))") > cursor.execute("insert into animals values('lion','cub')") > cursor.execute("insert into animals values('goat','lamb')") > cursor.execute("select * from animals") > print cursor.fetchall() > > > Rgds > Kavitha > > You've probably missed cursor.commit() ;) -- Sincerely, Eugene Antimirov PortaOne, Inc., SIP Support Engineer [EMAIL PROTECTED] * For further Billing and Technical information: => Please visit our website http://www.portaone.com => Please visit our forum http://forum.portaone.com * Meet us at Internet Telephony Conference & Expo * Ft. Lauderdale, FL - January 24-26, 2007 - Booth 1322 * http://www.tmcnet.com/voip/conference/ -- http://mail.python.org/mailman/listinfo/python-list
Re: newbie question
Eugene Antimirov wrote: > You've probably missed cursor.commit() ;) Sorry, my bad: conn.commit() is correct one AFAIR. -- Sincerely, Eugene Antimirov PortaOne, Inc., SIP Support Engineer [EMAIL PROTECTED] * For further Billing and Technical information: => Please visit our website http://www.portaone.com => Please visit our forum http://forum.portaone.com * Meet us at Internet Telephony Conference & Expo * Ft. Lauderdale, FL - January 24-26, 2007 - Booth 1322 * http://www.tmcnet.com/voip/conference/ -- http://mail.python.org/mailman/listinfo/python-list
Re: Working with shared folders
Marcpp wrote: > Any idea to work with windows shared folders? > Which library is needed to execute console comands? > Don't you want to look at fusesmb first and then work with windows files and dirs as well as with any others. -- Sincerely, Eugene Antimirov PortaOne, Inc., SIP Support Engineer [EMAIL PROTECTED] * For further Billing and Technical information: => Please visit our website http://www.portaone.com => Please visit our forum http://forum.portaone.com * Meet us at Internet Telephony Conference & Expo * Ft. Lauderdale, FL - January 24-26, 2007 - Booth 1322 * http://www.tmcnet.com/voip/conference/ -- http://mail.python.org/mailman/listinfo/python-list
Re: another newbie question: why should you use "*args" ?
stef wrote: > # method 2 > def chunk_plot(self, list): > for i in range ( len(list) ): > do something And one note more. Just to be more pythonic you shouldn't use form range(len(blabla)). Instead use: for i in list: blabla... -- Sincerely, Eugene Antimirov PortaOne, Inc., SIP Support Engineer [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list