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


Groups > comp.lang.python > #26957

Re: suggesting a launcher wrapper script for portable python

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
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; 'args': 0.04; 'arguments': 0.07; 'scripts': 0.09; 'python': 0.09; 'portable': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'shortcut': 0.09; 'subject:script': 0.09; 'sure,': 0.09; 'subject:python': 0.11; "(i'm": 0.16; 'detects': 0.16; 'have)': 0.16; 'message- id:@dough.gmane.org': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'scripting.': 0.16; 'such,': 0.16; 'wrote:': 0.17; 'detect': 0.17; 'passes': 0.17; 'script.': 0.17; 'windows': 0.19; 'suggested': 0.20; 'file.': 0.20; 'minor': 0.22; 'posted': 0.22; 'command': 0.24; 'host': 0.24; 'script': 0.24; 'pass': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'extend': 0.26; 'am,': 0.27; 'question': 0.27; 'dos': 0.27; 'i.e.': 0.27; 'header:X-Complaints-To:1': 0.28; 'relative': 0.30; 'window': 0.30; 'seconds': 0.30; 'problem.': 0.32; 'launch': 0.32; 'could': 0.32; 'avoiding': 0.33; 'to:addr :python-list': 0.33; 'pm,': 0.35; 'received:org': 0.36; 'should': 0.36; 'rather': 0.37; 'subject:: ': 0.38; 'nothing': 0.38; 'instead': 0.39; 'to:addr:python.org': 0.39; 'skip:" 10': 0.40; 'header:Received:5': 0.40; 'link': 0.60; 'skip:w 30': 0.61; 'expert': 0.62; 'thomas': 0.62; 'virus:</script': 0.63; 'virus:<script': 0.63; 'here': 0.65; 'url:tinyurl': 0.66; 'link:': 0.75; 'article': 0.78; 'absolutely': 0.84; 'gelonida': 0.84; 'url:preview': 0.84; 'was:': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Gelonida N <gelonida@gmail.com>
Subject Re: suggesting a launcher wrapper script for portable python
Date Mon, 13 Aug 2012 01:02:33 +0200
References <k06uj3$c6q$1@dough.gmane.org> <5027FE74.6030806@jollybox.de>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host unicorn.dungeon.de
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0
In-Reply-To <5027FE74.6030806@jollybox.de>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3213.1344812570.4697.python-list@python.org> (permalink)
Lines 51
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1344812571 news.xs4all.nl 6844 [2001:888:2000:d::a6]:52101
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:26957

Show key headers only | View raw


Hi Thomas,

On 08/12/2012 09:05 PM, Thomas Jollans wrote:
> On 08/12/2012 02:49 AM, Gelonida N wrote:
>>
>> One minor drawback of my suggested script would be, that a console
>> window pops up for a few seconds when starting a .pyw file.
>
> (I'm no expert but) This should be avoidable if you use the Windows
> Script Host instead of DOS command scripts to write the launchers.
> I.e. use JScript or VBScript to do exactly the same thing. I don't know
> much about Windows shortcut (*.lnk) files; if they can contain relative
> paths, you could just create shortcuts that launch portable python with
> the script.
>

You're absolutely right and I was rather sure, that I posted a link to 
an SO article with a wsf script avoiding this problem.

Only drawback of this script was, that it did not detect the name of 
it's own script and that it did not pass command line arguments down to 
the python script.

Well here is the link: http://preview.tinyurl.com/bu9rda5

The suggested script was:

<job>
<script language="VBScript">
set WshShell = WScript.CreateObject("WScript.Shell")
CMDFile = "App\\pythonw.exe App\\gui.py"
WshShell.Run CMDFile, 1
</script>
</job>

The question is how to extend it such, that it detects it's own name 
(nice to have) and that it passes command line args down to python 
(essential)

I know absolutely nothing about windows scripting.







>
>

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


Thread

Re: suggesting a launcher wrapper script for portable python Gelonida N <gelonida@gmail.com> - 2012-08-13 01:02 +0200

csiph-web