Windows Contextmenu

Szabo, Patrick (LNG-VIE) patrick.szabo at lexisnexis.at
Tue Mar 13 05:41:41 EDT 2012


Hi, 

 

I wrote the following Script which I want to run from the open with
contextmenu in Windows. 

For that purpose I used py2exe to make an exe out of it. 

 

import sys, time, webbrowser

 

def main():

    for para in sys.argv[1:]:

        print sys.argv

        print "###############################"

        print para

        url = "http://production.lexisnexis.at:8080/cocoon/glp/html/%s"
% str(para).replace("R:\\", "").replace(".xml", ".html")

        webbrowser.open_new(url)

    time.sleep(10)

            

if __name__ == "__main__":

    main()     

 

Now the script runs fine but I don't get all arguments from sys.argv.

No mather how many files I mark in the explorer I only get one as an
argument. 

 

Can anyone tell me how to overcome this issue ?

 

Best regards

 

 


. . . . . . . . . . . . . . . . . . . . . . . . . .
Ing. Patrick Szabo
 XSLT Developer 
LexisNexis
A-1030 Wien, Marxergasse 25

mailto:patrick.szabo at lexisnexis.at
Tel.: +43 1 53452 1573 
Fax: +43 1 534 52 146 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120313/777406e1/attachment.html>


More information about the Python-list mailing list