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


Groups > comp.lang.python > #26957 > unrolled thread

Re: suggesting a launcher wrapper script for portable python

Started byGelonida N <gelonida@gmail.com>
First post2012-08-13 01:02 +0200
Last post2012-08-13 01:02 +0200
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#26957 — Re: suggesting a launcher wrapper script for portable python

FromGelonida N <gelonida@gmail.com>
Date2012-08-13 01:02 +0200
SubjectRe: suggesting a launcher wrapper script for portable python
Message-ID<mailman.3213.1344812570.4697.python-list@python.org>
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.







>
>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web