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


Groups > comp.lang.python > #21577

RE: Windows Contextmenu

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <ramit.prasad@jpmorgan.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.022
X-Spam-Evidence '*H*': 0.96; '*S*': 0.00; 'context': 0.04; 'completeness': 0.05; 'behavior.': 0.07; 'command.': 0.09; 'entries': 0.15; 'to:name:python-list@python.org': 0.15; '712': 0.16; 'currencies': 0.16; 'disclaimers': 0.16; 'disclaimers,': 0.16; 'from:addr:jpmorgan.com': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'securities,': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'workaround': 0.16; 'subject:Windows': 0.17; 'arguments': 0.18; 'seems': 0.20; 'header:In-Reply-To:1': 0.22; '(or': 0.22; 'runs': 0.23; 'command': 0.24; 'fine': 0.24; 'code': 0.26; 'received:169': 0.28; 'received:169.254': 0.28; 'script': 0.28; 'received:155': 0.30; 'received:159': 0.30; 'file.': 0.31; 'accuracy': 0.32; 'explorer': 0.32; 'question,': 0.34; 'running': 0.34; 'to:addr:python-list': 0.35; 'phone:': 0.35; 'google': 0.35; 'issue': 0.37; 'but': 0.37; 'entry': 0.37; 'charset:us-ascii': 0.37; 'menu': 0.38; 'should': 0.38; 'open': 0.38; 'files': 0.39; 'called': 0.40; 'expected': 0.40; 'missing': 0.40; 'being': 0.40; 'to:addr:python.org': 0.40; 'quick': 0.61; 'more': 0.61; 'your': 0.61; 'subject': 0.61; 'offers': 0.62; 'browser': 0.62; 'link': 0.62; 'selected': 0.66; 'browsers': 0.67; 'exact': 0.68; 'information:': 0.68; 'information,': 0.69; 'legal': 0.72; 'url:email': 0.72; 'bank': 0.75; 'sale': 0.75; 'vital': 0.77; 'investment': 0.77; 'purchase': 0.78; 'method)': 0.84; 'received:169.254.8': 0.84
X-DKIM OpenDKIM Filter v2.1.3 sf1.jpmchase.com q2DHSK24027683
DKIM-Signature v=1; a=rsa-sha256; c=simple/simple; d=jpmorgan.com; s=smtpout; t=1331659700; bh=q7NWwFi6DWUTfQ/Eug3VX0NbGAlJUXak2bKGXqivEPM=; h=From:To:Subject:Date:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=j2IjI+xanEEHAba15UsEUQYRIhU0j1RIDyePcycsoor9Ggw7BecfoYbz9Euj14oZn XG13R83YVc96T6EtayObeLmXVcdJSOU0+4kLdPeZZTOlN6xqWPC19KMLSnqLmMCCY8 lVTo56q1Eodm1pzGl+oziPna2MNaO0/FML/IvSw4=
From "Prasad, Ramit" <ramit.prasad@jpmorgan.com>
To "python-list@python.org" <python-list@python.org>
Subject RE: Windows Contextmenu
Thread-Topic Windows Contextmenu
Thread-Index Ac0A/X5R2qRXLFQXRcOdvMqMF9cw2wAKcneAAAWs/sA=
Date Tue, 13 Mar 2012 17:28:10 +0000
References <E566C160C7EBF84D83DEA407CCBC386702310125@lngvieexcp001.legal.regn.net> <4F5F2431.2080109@timgolden.me.uk>
In-Reply-To <4F5F2431.2080109@timgolden.me.uk>
Accept-Language en-US
Content-Language en-US
X-MS-Has-Attach
X-MS-TNEF-Correlator
x-originating-ip [10.67.79.38]
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-DLP-FWD Yes
Content-Type text/plain; charset="us-ascii"
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.622.1331660250.3037.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1331660250 news.xs4all.nl 6916 [2001:888:2000:d::a6]:43284
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:21577

Show key headers only | View raw


> > Now the script runs fine but I don't get all arguments from sys.argv.
> >
> > No mather how many files I mark in the explorer I only get one as an
> > argument.
> 
> You're missing out vital information:
> 
> * How have you attached this code to the context menu? What was
> the exact registry entry (or other method) you used?

From a quick Google search, it seems that most of the context menu
entries open a single file. If multiple files are selected then
the command is called once for each file. The workaround seems
to check if the processes is already running and if it is then to
directly send it a "open" command.

That being said, since you are opening a web browser (or so it
seems to me based on the webbrowser.open), you should not have
an issue because modern web browsers will open each link in a tab.

To answer your question, you will not get more than one as an
argument. That is expected behavior. 

Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

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


Thread

RE: Windows Contextmenu "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-03-13 17:28 +0000

csiph-web