Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'pop': 0.05; 'subject:skip:s 10': 0.05; 'works.': 0.07; 'scripts': 0.09; 'complaining': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'restriction': 0.09; 'script,': 0.09; 'python': 0.11; 'url:)': 0.14; '.py': 0.16; 'anyways,': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'sorts': 0.16; 'subject:Opening': 0.16; 'subprocess': 0.16; 'url:adobe': 0.16; 'url:blogs': 0.16; 'url:home': 0.18; '(see': 0.20; 'prevent': 0.20; '(the': 0.22; '2015': 0.23; 'script': 0.25; 'header:X-Complaints-To:1': 0.26; 'command': 0.28; 'options': 0.28; "doesn't": 0.28; 'etc.).': 0.29; 'fri,': 0.31; "i'd": 0.31; 'skip:s 30': 0.31; 'option': 0.31; 'run': 0.32; '-0700': 0.33; 'open': 0.33; 'another': 0.34; 'running': 0.34; 'file': 0.34; 'to:addr:python-list': 0.35; 'execution': 0.35; 'fail': 0.35; 'instance': 0.35; 'but': 0.36; 'being': 0.36; 'there': 0.36; 'url:2012': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'pdf': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.39; 'even': 0.61; 'within': 0.64; 'here': 0.66; 'adobe': 0.66; 'levels': 0.70; 'recall,': 0.84; 'subject:Using': 0.84; 'dennis': 0.91; 'url:27': 0.91; 'received:108': 0.93 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Opening PDF Using subprocess.Popen Failing Date: Sat, 20 Jun 2015 09:50:19 -0400 Organization: IISS Elusive Unicorn References: <4857b9a4-386f-4ae4-861b-09a9564557c7@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-223-74.dsl.klmzmi.sbcglobal.net X-Newsreader: Forte Agent 6.00/32.1186 X-No-Archive: YES 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1434808250 news.xs4all.nl 2944 [2001:888:2000:d::a6]:36774 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!news.stben.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:92910 On Fri, 19 Jun 2015 10:24:56 -0700 (PDT), Naftali declaimed the following: >It actually doesn't fail but it 'cannot open in protected mode' (see here http://blogs.adobe.com/dmcmahon/2012/07/27/adobe-reader-cannot-open-protected-mode-due-to-a-problem-with-your-system-configuration/) > >I am using subprocess.Popen("AcroRe32.exe /n ") which is the actuall adobe reader command I'd issue on the command line to open the pdf (the /n option opens it the file in a new instance of reader). > >Now, when I issue the command straight from powershell, the pdf opens no problem, but when I open in my script (whether a .py or py2exe) I get the pop up complaining that the PDF cannot be opened in 'protected mode.' One of the options is to open it anyways, which works. > Are you running the Python script within PowerShell? As I recall, PowerShell was deliberately designed with all sorts of security blocks to prevent "malicious executables"... One has to enable execution levels to allow for PowerShell scripts to even be run (invoked at PS command line, but not from within another script, etc.). Is there any chance that such a restriction is being passed through to the subprocess environment? -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/