Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: eryk sun Newsgroups: comp.lang.python Subject: Re: Can't run lpr from python on windows 2012 server Date: Fri, 22 Apr 2016 12:17:07 -0500 Lines: 11 Message-ID: References: <1461335207.353144.586657921.2B62BB45@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de fPnT/vnBrh4CzBCFB+6xFgOgjCCQ7i85sVWCAitT/ulg== 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; 'received:209.85.223': 0.03; 'method.': 0.05; '22,': 0.09; 'python': 0.10; 'python.': 0.11; 'subject:python': 0.14; '2016': 0.16; 'command,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:run': 0.16; 'subject:server': 0.16; 'subject:windows': 0.16; 'wrote:': 0.16; 'directory.': 0.18; 'windows': 0.20; '64-bit': 0.22; 'trying': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'rest': 0.26; 'skip:" 20': 0.26; 'fri,': 0.27; 'question': 0.27; 'message-id:@mail.gmail.com': 0.27; '32-bit': 0.29; 'build,': 0.29; "we're": 0.30; 'run': 0.33; 'problem': 0.33; 'running': 0.34; 'received:google.com': 0.35; 'trouble': 0.35; 'problem.': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'virtual': 0.38; 'received:209': 0.38; 'files': 0.38; 'means': 0.39; 'why': 0.39; 'subject:from': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=Gdsj1elf5mnH3XcuIKJ9ms3qces9G0BWK452EIZo53Q=; b=rfc9qx170ZKsi1MXoiweGsjVbH5mtJBjS9FuNcPud5p7eCWM45dkg7rLw4MnU8fzSh O+BtvHgbFdUT0KbP76p0bKfqD76YfSs8XLkI5l+89yZ1EA2Bhr7xIepf6naUr1EFHXCE tjhPOoblW8KWAHCWI9YoWsWDgP3qDO9q9yhma4zgqyzI5mneqTMxi0orqAeYb4kNP8uo Pa6GM5xOJE+PMGYBlYBu9d+LAmDF1+1z58A3BBuGTSECAfpuK8Dmw7glm2r7pgVolbzV zd6nnaCfyuYWHsEyWeHcHQjfp02aq+RVIAyE8Ae3c4DqKogBVrRIaB9zQVjsdDnzz0dw cVHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=Gdsj1elf5mnH3XcuIKJ9ms3qces9G0BWK452EIZo53Q=; b=PTFi1nZU81lejHFVOMGDFA5pEJylT9l+G2VU2LqH+Ac2H+snJrJRrwArJAW1ApwVur dmGZVlEr5g23iXlFrpSyX7qbXLbFKjDYlt5YUhHj9+ih/XMEkTA1OYUX9kFyylBLsQYV HIJYV8h/Ty7gdnt08r3g39CEuWy1bmqQJvT5m583jPYb20TkBP6ZiwIuVINlBMmZoTcd Kq9js47LzrvL6+gYOFAlsJpuJXpkM9qc/2lTCGlDw3UItzUPxdHaWZYJ+eOBV6Vtp83P hMDaluZfKvrtIKmjSa+SwpYEB6OSsxyguDk/72H28d02FoMnMM2Wnnvih5ifl/usPrPY z94g== X-Gm-Message-State: AOPr4FVSaLAhqobaSNqZoV29gfzCQMlKsfm71x/MSY8FwD162NSaBc4fv/H+h9CCHsTB6x76zhUuy76IllkU+A== X-Received: by 10.107.10.87 with SMTP id u84mr24581195ioi.188.1461345467011; Fri, 22 Apr 2016 10:17:47 -0700 (PDT) In-Reply-To: <1461335207.353144.586657921.2B62BB45@webmail.messagingengine.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <1461335207.353144.586657921.2B62BB45@webmail.messagingengine.com> Xref: csiph.com comp.lang.python:107502 On Fri, Apr 22, 2016 at 9:26 AM, Random832 wrote: > The problem with your question is that it's not a standard command, so none > of the rest of us have it, which means we're half-blind trying to find your problem. lpr is a Windows feature that you may be able to enable. It's under "Print and Document Services" -> "LPR Port Monitor". It only installs a 64-bit build, which is why loial is having trouble running it from 32-bit Python. But in Windows 7+ (Server 2008 R2), a 32-bit process can use the virtual "%SystemRoot%\SysNative" directory to access files in the native System32 directory. I can run lpr.exe from 32-bit Python using this method.