Eric,

I agree it's easier to import * while trying things out.

While fiddling around with jbase I saw that the ctypes names did not leak
into the root.
They stayed in the sub-namespace.  I guess I have just got in the habit of
using qualified
names.

Raul,

The pathbin and other settings in jbase is fine.

About the only thing I can suggest to improve the functionality of jcore is
to increase the
size of the text it can display before it displays the "output to large"
message.

Also, the j() function is pretty sweet.  Executing it in python opens up a
little J session
that is identical to jconsole with the exception of output limits.

I for one will find plenty of uses for this addon.

jdb



On Sun, Mar 4, 2018 at 10:37 AM, Eric Iverson <[email protected]>
wrote:

> Raul,
>
> Why does jbase.pathbin need work. The documentation could be improved, but
> it is just setting a path that the user should know (or be able to
> determine). Note sure how this could be made simpler.
>
> On Sun, Mar 4, 2018 at 4:33 AM, Raul Miller <[email protected]> wrote:
>
> > jbase.pathbin looks like it's going to need more thought and effort.
> >
> > --
> > Raul
> >
> >
> > On Sat, Mar 3, 2018 at 7:45 PM, John Baker <[email protected]> wrote:
> > > Eric,
> > >
> > > I have adjusted the python3 addon code to avoid import *'s.  The
> revised
> > > scripts are here:
> > >
> > > https://github.com/bakerjd99/smugpyter/blob/master/notebooks/jcore.py
> > >
> > > https://github.com/bakerjd99/smugpyter/blob/master/notebooks/jbase.py
> > >
> > > I've also incorporated the use of this addon into one of my Jupyter
> > > notebooks.
> > >
> > > https://github.com/bakerjd99/smugpyter/blob/master/
> > notebooks/Setting%20SmugMug%20Print%20Size%20Keywords%
> > 20with%20Jupyter%20and%20Python.ipynb
> > >
> > > This will be a very useful addon.
> > >
> > >
> > > On Sat, Mar 3, 2018 at 3:07 PM, John Baker <[email protected]>
> wrote:
> > >
> > >> For the last month I have been slowly putting together a Python system
> > to
> > >> extract metadata (mostly my long picture captions) from my online
> > pictures
> > >> and store them in local TAB delimited CSV files.
> > >>
> > >> These links summarize these adventures:
> > >>
> > >> https://nbviewer.jupyter.org/github/bakerjd99/smugpyter/
> > >> blob/master/notebooks/Setting%20SmugMug%20Print%20Size%
> > >> 20Keywords%20with%20Jupyter%20and%20Python.ipynb
> > >>
> > >> https://conceptcontrol.smugmug.com/
> > >>
> > >> I've been using Jupyter and Python3 in the Anaconda environment mostly
> > >> because of Python's superb REST API requests library.  Anything that
> has
> > >> been downloaded voluntarily millions of times is probably fairly
> decent.
> > >>
> > >> So when Eric released his python3 addon I thought. I will to try this.
> > >>
> > >> I am happy to report that it works.  Once you make jbase.py and
> jcore.py
> > >> visible to Python3  and edit the usual paths to find J it comes up. I
> am
> > >> using a Win64 system.
> > >>
> > >> I would suggest not using the from ctypes import * directive. This
> drags
> > >> all of ctypes into the root Python namespace.  It's like dumping J's z
> > >> locale into base. It would be safer and more robust to use namespace
> > >> qualified references, e.g. ctypes.c_void_p
> > >>
> > >> This looks like it will be great little addon.
> > >>
> > >> Cheers
> > >>
> > >>
> > >> --
> > >> John D. Baker
> > >> [email protected]
> > >>
> > >
> > >
> > >
> > > --
> > > John D. Baker
> > > [email protected]
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
John D. Baker
[email protected]
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to