Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'subject:Windows': 0.09; 'interpreter,': 0.09; 'path.': 0.09; 'cc:addr:python-list': 0.10; 'python': 0.11; 'itself.': 0.11; 'wed,': 0.15; '24,': 0.16; 'chris,': 0.16; 'executable.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:File': 0.16; 'wrote:': 0.16; "shouldn't": 0.18; 'windows': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'am,': 0.23; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'specify': 0.27; 'message-id:@mail.gmail.com': 0.28; "i'm": 0.29; 'complain': 0.29; 'correct,': 0.29; 'too.': 0.30; "i'd": 0.31; 'probably': 0.32; 'file': 0.34; 'add': 0.34; 'received:google.com': 0.34; 'something': 0.35; 'but': 0.36; "didn't": 0.37; 'subject:: ': 0.37; 'pdf': 0.37; 'subject:the': 0.40; 'expert': 0.63; 'clicking': 0.75; 'chrisa': 0.84; 'to:none': 0.90; 'panel.': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=w3RwH7jGrE2dnwkXfliEq4d9Lez+92G1RfHg+3WAiyY=; b=Pijrvige4bB51EzAJUx9x33iFc95Ix+7EZlNXELkOFqJ/Dfi+HRn+fQd/RFk23+NK9 kpEIddHzl52aOsbxPqJ6Y/T/DdKY3jV8SeUyaWWidIjnfSM0CxHSYkZhy1FHAanCiwj1 PpfOHPy7CJ+MFjethOZyRxehEFY0i6ikUtJcA9oD3NPLYh/Fxee6rnM39w+xL0UiuhSH ALh7ExdEUVnIYr/TyUz/+hquQpNz/3XkT1ImcJ+f2RR0bNWgI1Y9xpvhn8w0umUKdcJ1 M96c/AWt6vCG3t1vyyiNx/Cc0FqPo6vAqQeCoxQUfDbNlMWy99JTpgjnBQuMZGPfHMxb W73g== MIME-Version: 1.0 X-Received: by 10.50.43.196 with SMTP id y4mr2737976igl.14.1435071603182; Tue, 23 Jun 2015 08:00:03 -0700 (PDT) In-Reply-To: <863086551.5226529.1435069587998.JavaMail.root@sequans.com> References: <2bba2e7f-ef41-4b08-8768-fa154c219042@googlegroups.com> <863086551.5226529.1435069587998.JavaMail.root@sequans.com> Date: Wed, 24 Jun 2015 01:00:03 +1000 Subject: Re: Python File as the Default PDF handler for Windows From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1435071611 news.xs4all.nl 2918 [2001:888:2000:d::a6]:41936 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93040 On Wed, Jun 24, 2015 at 12:26 AM, Jean-Michel Pichavant wrote: >> Just to update, you are correct, Chris, the file short name is passed >> into sys.argv. didn't need to add anything to the path. But a gotcha >> -- Windows didn't like my .py, clicking on the pdf causes Windows to >> complain about 'file x' is not a valid windows executable. > > I'm not an expert of windows but you probably need to specify the python interpreter, not the script itself. > > something like > > C:\Python2.7\python.exe yourscript.py %* > > in the windows file association panel. Yep, that's what I'd recommend too. You shouldn't need to py2exe it. ChrisA