octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pytave: adding exec and eval commands


From: Mike Miller
Subject: Re: pytave: adding exec and eval commands
Date: Thu, 10 Mar 2016 12:02:58 -0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Mar 09, 2016 at 23:19:00 -0800, Colin Macdonald wrote:
> Hi Mike Miller (and others interested in Pytave),
> 
> I played around a bit with Pytave and Symbolic:

Hey Colin, excellent! I haven't worked on it since last summer, but the
upcoming Swiss code sprint plans to look at it a bit and I'm looking for
a reason to get motivated to work on it again, so thanks for the push.

> 1.  I added `pyexec` and `pyeval` commands which mirror the
> `exec`/`eval` commands in Python.  See the "execeval" branch here:
> 
> https://bitbucket.org/macdonald/pytave/branch/execeval
> 
> 2.  It was then straightforward to get Symbolic to use these instead of
> popen2:
> 
> https://github.com/cbm755/octsympy/pull/374
> 
> (preliminary!)
> 
> 
> 3.  Mike: here's a small commit adds "help py":
> 
> https://bitbucket.org/macdonald/pytave/commits/2d9db88da67a92401133fec302f9bda3f7aa587e

FYI, I have a clone of pytave on bitbucket, would you consider making
yours a fork of mine and rebasing your changes on that? You can then
submit PRs there if you like that interface. I've also just cleaned up
the history a bit, so do please start from a fresh clone if you wouldn't
mind (others also take note!)

  https://bitbucket.org/mtmiller/pytave

> One could probably do better examples: its just some of the test cases I
> used when I was debugging/learning how the `py` command was supposed to
> work.  Later, we'll need a way for those commands using `__builtin__.`
> to work without that!

Sounds good.

The direction I think makes sense *eventually* is to treat all Python
objects as first class objects in Octave, whether they're "things" or
"callables", versus the quick hacks I was playing with last year to
evaluate objects vs function calls.

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]