Broken examples

norseman norseman at hughes.net
Wed Jul 23 21:40:53 EDT 2008


I'm only talking about IPC related.
I have googled, yahooed, and so forth for several months now. ALL 
examples I've come across have failed including those pertinent in the 
Python doc area.

Outline:
	cd somedir
	ls -1 *.xls >thislist      #ls hyphen one
	python process.py
                 (yes - ls can go here if wanted. easier to edit outside)
		open thislist
		loop until done
			start excel (or scalc)
			have it open file
			have it save file as a .csv (or .dbf)
			close excell (or scalc)

Would seem to be a trivial exercise.
Starting Excel or any other executable in system path works fine.
popen3 opens whatever and reports no errors. r,w,and e all check as 
being created.

r,w,e= os.popen3('ls -l')
print r.read()             # works as expected

ALL attempts to send instructions to Excel or scalc FAIL COMPLETELY.
Actually, any attempt to communicate with a 'Point'n'Click' program 
fails without errors being cited. They don't use redirectable command 
line interfaces (like piping between programs) do they? :)

Trying to use the examples I have found that supposedly setup IPC's of 
one type or another have all failed with errors that point to things 
that make no sense in the first place.

Before you post a code example or a link to one be kind enough to run it 
yourself first.  You may get a surprise.  The OOo examples do not work. 
Not even when switching my system to their version.  One problem they 
have is asking a general user to change to places the user has no place 
being and then to work there without permissions.  I guess somebody 
insists on doing all their work with root clearance down in the middle 
of the vendor's tree. I don't think that's a healthy way to do things, 
do you?

In OOo in particular, using their version of VBA one can create the 
macro and even port it to python. If one found the correct Microsoft 
suite docs I suspect that same could be done there too. But that doesn't 
activate it from a python control. As for setting the macro to run at 
startup, well... maybe I had other uses in mind today???? Besides the 
moment I change it, coworker in other room is going to decide to... :)

Let's stick to Microsoft Office and OpenSource products for now. My 
final goal will require specific conversations with a commercial vendor.
I would like those spread sheets working though.


Thanks

Steve
norseman at hughes.net



More information about the Python-list mailing list