View Single Post
Old 02-24-2011, 09:15 AM   #16
jackie_w
Wizard
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: 2,739
Karma: 3973173
Join Date: Sep 2009
Location: UK
Device: Sony PRS-350, PB360, Kobo Glo/AuraHD/Aura6"
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:	146
Size:	103.7 KB
ID:	67263  
jackie_w is offline   Reply With Quote