Return-Path: Delivered-To: apmail-lucene-pylucene-dev-archive@minotaur.apache.org Received: (qmail 74965 invoked from network); 4 Mar 2011 20:25:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Mar 2011 20:25:31 -0000 Received: (qmail 19551 invoked by uid 500); 4 Mar 2011 20:25:31 -0000 Delivered-To: apmail-lucene-pylucene-dev-archive@lucene.apache.org Received: (qmail 19530 invoked by uid 500); 4 Mar 2011 20:25:31 -0000 Mailing-List: contact pylucene-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: pylucene-dev@lucene.apache.org Delivered-To: mailing list pylucene-dev@lucene.apache.org Received: (qmail 19441 invoked by uid 99); 4 Mar 2011 20:25:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 20:25:30 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of janssen@parc.com designates 13.1.64.93 as permitted sender) Received: from [13.1.64.93] (HELO alpha.xerox.com) (13.1.64.93) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Mar 2011 20:25:21 +0000 Received: from parc.com ([13.1.102.103]) by alpha.xerox.com with SMTP id <168643(2)>; Fri, 4 Mar 2011 12:23:56 PST To: pylucene-dev@lucene.apache.org Subject: Re: Using JCC / PyLucene with JEPP? In-reply-to: References: <68325.1299217840@parc.com> <6D3337C8-7B77-42AE-9300-0B904AB1D351@apache.org> <94921.1299260403@parc.com> <6EF0EBAB-6F8B-4AE1-8E78-275E771DD4E3@apache.org> <96957.1299264002@parc.com> <98867.1299267289@parc.com> Comments: In-reply-to Andi Vajda message dated "Fri, 04 Mar 2011 11:56:55 -0800." Cc: janssen@parc.com X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.1.90 Date: Fri, 4 Mar 2011 12:23:55 PST Message-ID: <495.1299270235@parc.com> From: Bill Janssen X-Virus-Checked: Checked by ClamAV on apache.org Andi Vajda wrote: > >> If JEPP execs python, then that Python VM runs in a subprocess of the > > > > It's not Java's Runtime.exec(), it's Python's built-in function, "exec". > > So the Python VM is running in the same address space as Java. > > Ok, so how is JEPP doing this from Tomcat without patching the Tomcat > startup code so that the PythonVM is initialized in the main thread ? I don't know that it is. What I'm interested in doing is starting a Python interpreter in Java, then occasionally calling into it to exec some Python code. It would be great if it could also eval a Python expression and return the unicode() of the result. I'd like to see if I can add that functionality to PythonVM. Then I'll worry about Tomcat, where I imagine I'll have to do just what you've already done. > If what you say is true then how is that different from what Roman is > doing with JCC and Python's subprocessing module ? I don't know that it is. I use the subprocess module a lot in UpLib, too. Bill