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


Groups > comp.lang.python > #108863

Re: JNLP File download and run

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Michael Torrie <torriem@gmail.com>
Newsgroups comp.lang.python
Subject Re: JNLP File download and run
Date Fri, 20 May 2016 09:36:53 -0600
Lines 20
Message-ID <mailman.53.1463758624.27390.python-list@python.org> (permalink)
References <CAEMktPXWpVXuLFLEWrVsoHhxPNe62up0tvjbAPoJ4K=+0oSNWQ@mail.gmail.com> <e74c7849-e834-ead1-f105-4b79ead712b9@gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
X-Trace news.uni-berlin.de GbD2wAboCXsMycz70KJd9QdzGNq7T+UE/uSuc06U1o/A==
Return-Path <torriem+gmail@torriefamily.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'binary': 0.05; 'executable': 0.07; 'parameter.': 0.09; 'spawn': 0.09; 'advance': 0.10; 'python': 0.10; 'file,': 0.15; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'run.': 0.16; 'subject:File': 0.16; 'subject:download': 0.16; 'subject:run': 0.16; 'subprocess': 0.16; 'urllib': 0.16; 'wrote:': 0.16; 'linux,': 0.18; 'pass': 0.22; 'am,': 0.23; 'header:In-Reply-To:1': 0.24; 'module': 0.25; 'header :User-Agent:1': 0.26; 'looks': 0.29; 'directly,': 0.29; 'invoke': 0.29; 'code': 0.30; 'run': 0.33; 'url:python': 0.33; 'message- id:@gmail.com': 0.34; 'file': 0.34; 'could': 0.35; 'besides': 0.35; 'robert': 0.35; 'asking': 0.35; 'there': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'mac': 0.37; 'someone': 0.38; 'hi,': 0.38; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'url:3': 0.60; 'default': 0.61; 'charset:windows-1252': 0.62; 'url:6': 0.66; 'thing,': 0.93
X-Virus-Scanned amavisd-new at torriefamily.org
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0
In-Reply-To <CAEMktPXWpVXuLFLEWrVsoHhxPNe62up0tvjbAPoJ4K=+0oSNWQ@mail.gmail.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 <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID <e74c7849-e834-ead1-f105-4b79ead712b9@gmail.com>
X-Mailman-Original-References <CAEMktPXWpVXuLFLEWrVsoHhxPNe62up0tvjbAPoJ4K=+0oSNWQ@mail.gmail.com>
Xref csiph.com comp.lang.python:108863

Show key headers only | View raw


On 05/20/2016 01:30 AM, Robert Clove wrote:
> Hi,
> 
> Can someone give me pseudo code to download and JNLP file from a URL and
> run it?
> 
> Looks like a advance concept in python

You could use the urllib module to download the file, then use the
subprocess module to spawn the javaws executable and pass it the
location of the jnlp file as a parameter.

https://docs.python.org/3.6/howto/urllib2.html
https://docs.python.org/3.6/library/subprocess.html

There are other ways besides launching javaws directly, such as asking
cmd.exe to invoke "start" and the jnlp file so that the default javaws
executable will run. On Mac there's the "open" binary that can do the
same thing, and on Linux, xdg-open.

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


Thread

Re: JNLP File download and run Michael Torrie <torriem@gmail.com> - 2016-05-20 09:36 -0600

csiph-web