Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #92864

Re: Python File as the Default PDF handler for Windows

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!bcyclone01.am1.xlned.com!bcyclone01.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.010
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.05; '*not*': 0.07; 'subject:Windows': 0.09; '"%s"': 0.09; 'extension.': 0.09; 'cc:addr:python-list': 0.10; 'python': 0.11; 'definition.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'looping': 0.16; 'subject:File': 0.16; 'wrote:': 0.16; 'windows': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'do.': 0.22; 'am,': 0.23; '2015': 0.23; 'passing': 0.23; "i've": 0.24; 'header:In-Reply-To:1': 0.24; 'wondering': 0.25; 'message-id:@mail.gmail.com': 0.28; 'there.': 0.30; '---': 0.30; 'fri,': 0.31; 'maybe': 0.31; 'run': 0.32; 'file': 0.34; 'add': 0.34; 'received:google.com': 0.34; "i'll": 0.34; 'path': 0.35; 'something': 0.35; 'but': 0.36; 'should': 0.37; 'subject:: ': 0.37; 'missing': 0.37; 'doing': 0.38; 'end': 0.39; 'subject:the': 0.40; 'called': 0.40; 'your': 0.60; 'simple': 0.61; 'within': 0.64; 'chrisa': 0.84; 'tomorrow,': 0.84; 'to:none': 0.90; 'mean.': 0.91; 'reply,': 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:content-transfer-encoding; bh=dPdhjbF7Ci4BiVfUIMmN/+OxcwQJGI40dwqhfdgVY5g=; b=W9ML4Jy2lhAMQKi/mJCUEXZDOPy997m9CnxXMN2iPn3QcX1kxmziPdK2uskVu0D6uj YjF/T1trnzqvbp/pyMs83GMeqeBR+sR6zkPcorRcdH4bWwqqzBbLWfPMBeiza0deTGeW koHM4UBOKRVvVjipMcc+wXjlz9z1zdsrRXZXQADCt2Cj4LNGVYv0M2y5SDTkuIrLfw1F hkq+zCPkR5cwWNzOENK8ZCSgPgnyLK5kBdb6d35OkpA+1K/tLU9jEHhtFlnBLzWlNrt7 0PWajyWcBe2GnP0H+Etu1sg5bMEWolfmyh4OMcoi0m/Qcau2BMf6kmevwRcQbQ6XPSrx JZBQ==
MIME-Version 1.0
X-Received by 10.43.0.67 with SMTP id nl3mr8799288icb.59.1434676690582; Thu, 18 Jun 2015 18:18:10 -0700 (PDT)
In-Reply-To <e97c8320-1085-46e1-b004-3b90e30d2e0b@googlegroups.com>
References <60c5531e-b4b4-43b2-a3b9-0b53e1490dee@googlegroups.com> <e97c8320-1085-46e1-b004-3b90e30d2e0b@googlegroups.com>
Date Fri, 19 Jun 2015 11:18:10 +1000
Subject Re: Python File as the Default PDF handler for Windows
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.621.1434676699.13271.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1434676699 news.xs4all.nl 2848 [2001:888:2000:d::a6]:33632
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4219
X-Received-Body-CRC 4007776081
Xref csiph.com comp.lang.python:92864

Show key headers only | View raw


On Fri, Jun 19, 2015 at 11:03 AM, Naftali <nmichalowsky@gmail.com> wrote:
> I may be missing something in your reply, but I am *not* wondering how to associate python with the .pdf file extension. That I know how to do. What I want to know is how from within the program that I've told windows to run when the user clicks on the file --- how to access the file that the user wishes to open. Windows must somehow make that available to my program. How to I access it. Tomorrow, I'll try doing it an looping through the sys.argvs and see what's there. maybe it's a simple as passing a path into the called program.
>

Oh! I see what you mean. You should get the full path and name of the
file in sys.argv, but if you don't, I think what you need to do is add
"%s" to the end of the association definition. My apologies for the
prior misunderstanding.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python File as the Default PDF handler for Windows Naftali <nmichalowsky@gmail.com> - 2015-06-18 14:04 -0700
  Re: Python File as the Default PDF handler for Windows Chris Angelico <rosuav@gmail.com> - 2015-06-19 09:46 +1000
  Re: Python File as the Default PDF handler for Windows Naftali <nmichalowsky@gmail.com> - 2015-06-18 18:03 -0700
    Re: Python File as the Default PDF handler for Windows Chris Angelico <rosuav@gmail.com> - 2015-06-19 11:18 +1000
    Re: Python File as the Default PDF handler for Windows MRAB <python@mrabarnett.plus.com> - 2015-06-19 02:39 +0100
    Re: Python File as the Default PDF handler for Windows Chris Angelico <rosuav@gmail.com> - 2015-06-19 11:46 +1000
  Re: Python File as the Default PDF handler for Windows Naftali <nmichalowsky@gmail.com> - 2015-06-18 18:22 -0700
  Re: Python File as the Default PDF handler for Windows Naftali <nmichalowsky@gmail.com> - 2015-06-23 06:39 -0700
    Re: Python File as the Default PDF handler for Windows Chris Angelico <rosuav@gmail.com> - 2015-06-24 01:00 +1000
    Re: Python File as the Default PDF handler for Windows Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-06-23 16:12 -0400
    Re: Python File as the Default PDF handler for Windows Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-06-23 21:20 +0100

csiph-web