Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!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.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'win32': 0.03; 'subject:Python': 0.05; 'rewrite': 0.07; '(instead': 0.09; 'accepts': 0.09; 'driver,': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'way:': 0.09; 'argument': 0.15; "(i'm": 0.16; 'files...': 0.16; 'message-id:@4ax.com': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'url:home': 0.18; 'windows': 0.20; '2015': 0.23; 'seems': 0.24; 'unix': 0.24; 'script': 0.25; 'install': 0.25; 'header:X -Complaints-To:1': 0.26; 'linux': 0.26; 'ago': 0.27; '+0200,': 0.27; 'command': 0.28; 'dialog': 0.29; 'invoke': 0.29; 'print': 0.31; 'computer.': 0.32; 'etc.)': 0.32; 'open': 0.33; 'to:addr :python-list': 0.35; 'path': 0.35; 'replaced': 0.35; 'something': 0.35; 'but': 0.36; 'text': 0.36; '(and': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'pdf': 0.37; 'received:org': 0.38; 'someone': 0.38; 'test': 0.39; 'application': 0.39; 'to:addr:python.org': 0.39; 'sure': 0.40; 'some': 0.40; 'bring': 0.61; 'simple': 0.61; 'telling': 0.61; 'provide': 0.61; 'details': 0.63; 'incorporate': 0.66; 'bitmap': 0.84; 'cecil': 0.84; 'or...': 0.84; 'subject:Using': 0.84; 'westerhof': 0.84; 'acrobat': 0.91; 'dennis': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dennis Lee Bieber Subject: Re: Using Python instead of Bash Date: Sun, 31 May 2015 20:53:49 -0400 Organization: IISS Elusive Unicorn References: <87h9qsnckl.fsf@Equus.decebal.nl> <87382cn0bj.fsf@Equus.decebal.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: adsl-108-79-217-159.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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433121594 news.xs4all.nl 2965 [2001:888:2000:d::a6]:46574 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91604 On Sun, 31 May 2015 19:06:40 +0200, Cecil Westerhof declaimed the following: > >By the way: because of the lpr my script only works on Linux (and >probably Unix and Apple). Can I rewrite it in such a way that it also >works with Windows? Someone else has to test it then, because I do not >have a Windows computer. Not easily... Either you install something like cygwin which MAY include LPR, or... 1) You invoke (instead of LPR) some application that accepts a command line argument telling it to do a print (I'm pretty sure that long ago M$ Word accepted a command line /p to print, but it seems that has gone away replaced with something uglier -- notepad /p works for simple text files... I managed to get Acrobat Reader to open a PDF and bring up a print requester, but that path still required the user to hit a number of dialog windows) 2) You incorporate win32 system calls to manage a print job in all details (create bitmap, provide bitmap to print driver, etc.) -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/