From: Samuele P. <pe...@in...> - 2001-09-14 19:07:53
|
Hi. If what you need is just co_names (although I don't get why and how is that used/necessary) you should start looking at org.python.compiler.CodeCompiler,... and the functions to construct code in org.python.core.Py It's just boring, and you should roughly get how the compiler works but it is not difficult. To be honest jython does support co_names because it is not necessary, in CPython co_names contains complementary info needed by the bytecode. Even inspect.py does not use it. In any case if the use of co_names is related to security adding it to jython is not that useful, because potentially forged java bytecode could be delivered together with an irrelevant co_names. regards. > From: "Kevin Dangoor" <kda...@we...> > To: <jyt...@li...> > MIME-Version: 1.0 > Content-Transfer-Encoding: 7bit > X-Priority: 3 > X-MSMail-Priority: Normal > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 > Subject: [Jython-dev] co_names > X-BeenThere: jyt...@li... > X-Mailman-Version: 2.0.5 > List-Help: <mailto:jyt...@li...?subject=help> > List-Post: <mailto:jyt...@li...> > List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/jython-dev>, <mailto:jyt...@li...?subject=subscribe> > List-Id: <jython-dev.lists.sourceforge.net> > List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/jython-dev>, <mailto:jyt...@li...?subject=unsubscribe> > List-Archive: <https://lists.sourceforge.net/archives//jython-dev/> > X-Original-Date: Fri, 14 Sep 2001 14:30:10 -0400 > Date: Fri, 14 Sep 2001 14:30:10 -0400 > > We'd like to try to get co_names going in PyTableCode for phabric. This > is used extensively in Zope, largely to filter out functions and variables > that begin with "_". We've got some other work we're doing in which Zope > Page Templates would be useful. We've got those working already, except for > python expressions, which use co_names. > > What are the difficulties in doing this? Where should we begin? All of > my work so far has been in the org.python.core set of classes and I haven't > taken any look at how the parser works and how we would get at that list of > names... > > thanks, > Kevin > > > _______________________________________________ > Jython-dev mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-dev |