From: Jeff E. <jem...@fr...> - 2005-04-18 14:38:35
|
__init__.py is only for Python packages. "import jorbis as jorbis" is redundant, it has the same effect as simply "import jorbis". Pedro Orantes wrote: > Well, i didn't know if i had to use a __init__.py file in the jorbis=20 > directory. I know the answer now ;) .=20 > Thanks for your answer Ken. >=20 > El Lunes, 18 de Abril de 2005 16:00, Kent Johnson escribi=F3: >=20 >>Greg Knaddison wrote: >> >>>On 4/18/05, Pedro Orantes <or...@er...> wrote: >>> >>>>applet jython. Can i make an "import jorbis.* as jorbis" directly? >>> >>>Un parte fovorito mio de Jython es que puedes usar la Jython concha >>>(shell???) si no sabes como usar algo en una programa. >>> >>>Por ejemplo: >>> >>># jython >>> >>> >>>>>>import jorbis.* as jorbis >>>>>>j =3D jorbis.something() >> >>I don't think you actually typed that to the shell... The correct synta= x is >>from jorbis import *: >> >>Jython 2.1 on java1.4.2_06 (JIT: null) >>Type "copyright", "credits" or "license" for more information. >> >> >>> import org.dom4j.* as dom >> >>Traceback (innermost last): >> (no code object) at line 0 >> File "<console>", line 1 >> import org.dom4j.* as dom >> ^ >>SyntaxError: invalid syntax >> >> >>> import org.dom4j.* >> >>Traceback (innermost last): >> (no code object) at line 0 >> File "<console>", line 1 >> import org.dom4j.* >> ^ >>SyntaxError: invalid syntax >> >> >>> from org.dom4j import * >> >>Though I think you may want just >>import jorbis >>j =3D jorbis.something() >> >>Kent >> >> >> >>------------------------------------------------------- >>SF email is sponsored by - The IT Product Guide >>Read honest & candid reviews on hundreds of IT Products from real users= . >>Discover which products truly live up to the hype. Start reading now. >>http://ads.osdn.com/?ad_id=3D6595&alloc_id=3D14396&op=3Dclick >>_______________________________________________ >>Jython-users mailing list >>Jyt...@li... >>https://lists.sourceforge.net/lists/listinfo/jython-users >=20 >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users= . > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_ide95&alloc_id=14396&op=3Dclick > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users |