Re: Program, Application, and Software

2010-11-19 Thread Josef Frank

Am 19.11.2010 15:22, schrieb Martin Gregorie:

On Fri, 19 Nov 2010 01:43:28 +0100, Alexander Kapps wrote:


What difference does it make? Is 'print "Hello"' a program or a script?
Are you saying, that it depends on whether you have to manually call
some compiler?


Thats the way the term 'script' is usually used in the UNIX/Linux world.

In that environment you'd call awk and Perl scripting languages but C and
Java are known as compiled languages. The size of the source isn't
relevant: if you can mark a source file as executable and simply run it
its a 'script' while if it needs a separate preparatory step to generate
a separate executable its just a source file for a compiled language.

The distinction doesn't seem to be used in a Windows environment. Indeed,
it doesn't make sense there since executables are limited to .BAR or .CMD
files, which are directly interpreted by the command processor, and .EXE
or .COM files, which must be compiled before they can be run. AFAIK
there's no way you can mark anything else, such as an awk, Perl or Python
source file, as executable since there is no 'executable' attribute in
any Windows filing system.



Not in the file system,
but in the environment it is definitely possible.
One might try http://www.google.de/search?q=pathext
or just have a look at http://wiki.tcl.tk/1785
(the respective filetype has to be associated with
it's interpreter however for this method to work.)

Josef


--
http://mail.python.org/mailman/listinfo/python-list


wxpython 2.8 -- timing and latency issues when displaying widgets

2010-10-28 Thread Josef Frank


Dear all,

in an application window (subwindow of a Notebook-control) I'm trying to 
do the following:


1. Create a StaticText control kind of "Please wait until processing has 
finished"

2. Do some processing (e.g. vacuuming an sqlite database)
3. Create a 2nd StaticText control with the message "processing finished"

Naïvely I would expect following behavior:

1st control appears
data processing step runs
after finishing processing the 2nd control appears

but actually the order in execution seems to be a different one:

computer is doing heavy processing
1st control appears
2nd control appears immediately after the 1st without any visible delay

Could someone give a hint, how to change the seeming behavior into the 
intended one?


Thanks in advance Josef

P.S.:
here is the actual code snippet:

def OnVacuum(self,event):
panel=Ntab(self.desktop,"Compact")
	message1=wx.StaticText(panel,-1,"Please wait, database is being 
compacted.",(20,10))

self.SetCursor(wx.StockCursor(wx.CURSOR_WAIT))
con=sqlite3.connect(dbname)
cur=con.cursor()
cur.execute("VACUUM;")
cur.close()
con.close()
self.SetCursor(wx.StockCursor(wx.CURSOR_DEFAULT))
	message2=wx.StaticText(panel,-1,"Compacting database has now 
finished",(20,30))


Ntab is a class derived from wx.Panel and a tab of the abovementioned 
wx.Notebook control

--
http://mail.python.org/mailman/listinfo/python-list