From: Uncle R. <ro...@ro...> - 2001-04-22 18:09:34
|
I'm operating under the impression that JPython cannot use CPython code. Brian Zimmer's additional comment suggests the same thing that John Mudd says - just import glob from CPython. There is something conceptually that I'm missing here. Why isn't something like the CPython glob module a part of the JPython distribution if they can interoperate? Are we expected to have both distributions on our search paths - but then, if that is the case, why does JPython duplicate so much of CPython? There is some missing concept here that I haven't pick up on. I don't think JPython and CPython are meant to interoperate. Bruce Eckels says in his excellent "Thinking in Patterns" that you can use things like the glob module, but where does it come from, since it's not in JPython/Jython, and I'm still making the assumption that CPython and JPython do not interoperate? I think the answer hasn't been made yet, which is why I'm still asking questions. ----- Original Message ----- From: John Mudd <joh...@ya...> To: Uncle Roastie <ro...@ro...> Sent: Sunday, April 22, 2001 12:08 PM Subject: Re: [Jython-users] Jython/Thinking in Patterns Question > I seem to be able to access glob. You can't? Maybe I installed the > python 1.5.2 libs. > > $ jython > Jython 2.1a1 on java1.2.2-RC2 (JIT: javacomp) > Type "copyright", "credits" or "license" for more information. > >>> import glob > >>> dir(glob) > ['__all__', '__doc__', '__file__', '__name__', 'fnmatch', 'glob', > 'glob1', 'has_magic', 'magic_check', 'os', 're'] > >>> > > --- Uncle Roastie <ro...@ro...> wrote: > > Bruce, > > > > "Thinking in Patterns", chapter 9 on the Jython interpreter, > > has been invaluable to me at work. > > > > Question: On pages 9.21 and 9.23 you show how > > to use "glob()" in Jython, and then you add that it > > is not part of the standard Jython package. > > > > So, where can we find this beast? > > And any other similar furry creatures that might exist. > > > > Thanks, > > > > Ron > > > > ron...@ne... (W) > > ro...@ro... (H) > > > > > > > __________________________________________________ > Do You Yahoo!? > Yahoo! Auctions - buy the things you want at great prices > http://auctions.yahoo.com/ > |