View Single Post
Old 02-24-2011, 09:15 AM   #16
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,206
Karma: 16228558
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
I've tried various combinations of customisation but I haven't found the right one yet.

When you have time please could you look at this simple example and advise what I should be doing differently. As I am very new to Python, perhaps there are better ways to read input arguments. If there is a way of doing this without the .bat file so much the better.

The Windows .bat file contains
Code:
"C:\Program Files\pythonv27\python.exe" "C:\pytest.py" %1
PAUSE
where %1 represents the file currently selected in Windows Explorer.

The Python prog (C:\pytest.py) contains:
Code:
import sys
file_name = sys.argv[1]
print '\nYou selected:', file_name
raw_input('\n\nPython pause...')
As you see I have put a 'pause' at the end of both pieces.

I have tried customising the plugin in 2 ways as seen in the last 2 items in the screencap. Neither of them appear to do anything.

Any advice welcome.
Attached Thumbnails
Click image for larger version

Name:	openwith.jpg
Views:	725
Size:	103.7 KB
ID:	67263  
jackie_w is offline   Reply With Quote