Reinteract 0.5.9 released

233 views
Skip to first unread message

Owen Taylor

unread,
Oct 29, 2011, 2:29:18 PM10/29/11
to reint...@googlegroups.com
I finally managed to stop adding features and make a release of
Reinteract. This is basically a beta candidate for an 0.6.0 release,
since there's a lot of new features and the Mac and Windows installers
haven't had much testing.

Source: http://www.reinteract.org/download/sources/reinteract-0.5.9.tar.bz2
sha256: a38b5e88371895a6b37cb7daf117feed69b45e0a6714cc0528b36cd89828fefe

Windows Installer:(Requires Python 2.7)
http://www.reinteract.org/download/windows/Reinteract-0.5.9-python2.7.msi

Mac Installer: (Requires Python 2.6)
http://www.reinteract.org/download/osx/Reinteract-0.5.9.dmg

I've tested the Windows installer on Windows 7, and the Mac installer
on OS X 10.5. Testing results on a wider range of systems would be
appreciated!

Other than fixing up problems people find, what I'm planning to do
before the 0.6.0 release is: a) add a Export to PDF menu item b) work
more with sizing of sidebar results c) do something reasonable for
printing of sidebar results.

New Functionality
=================

* Support for printing worksheets and libraries. (Jorn Baayen, Me)

* Add a 'build' keyword that groups a block of statements, and outputs
a specified value after the block executes. For example:

build replot.Axes() as p:
p.plot(...)
p.plot(...)

* Initial support for sidebars: if a custom result has a 'display'
property, with a value of 'side', then the result is shown in a
resizable sidebar to the side of the worksheet contents. replot.Axes
now has support for creating such a result:

build replot.Axes(display='side') as p:
p.plot(...)

* When an error occurs, highlight the particular line within a
multiline statement that triggered the error. (Me, Robert Schroll)

* Handle Unicode worksheet content.

* Handle notebooks and worksheets with unicode names. (Jorn Baayen)

* For non-Reinteract files in a notebook, launch them with the system
default handler. (Robert Schroll)

* Add support for decorators. (Robert Schroll)

* On OS X, the Python framework to use can now be specified using a
pythonFrameworkDir user default.
(defaults write org.reinteract.Reinteract pythonFrameworkDir <location>)

Functionality for Reinteract Extensions
=======================================

* The CustomResult class now has a print_result() method that can be
used to implement printing for custom result widgets.

* Allow modules to export "wrapper" functions:

If a module directly imported by a worksheet has a a method called
__reinteract_wrap__ then it will be called for each result and if it
returns something other than None, then that will be used in
preference to the result. The idea here is to allow certain types of
results to be automatically bundled up in a CustomResult for display.

* Add a reinteract.custom_result.ResultWidget that can be derived for
for automatic tracking of DPI. (Jorn Baayen)

* Add reinteract.statement.Statement.get_current(), so modules can
have access to the currently executing statement.

Behavior changes
================

* Don't execute open worksheets when a notebook is loaded. (Robert Schroll)

* Automatically watch for changes to the notebook on disk using GIO
directory monitors. (Robert Schroll, Me)

* Allow executing a worksheet only up to the current cursor line using
shift-Return or KP_Enter. (Robert Schroll)

<shift>Return Calculate to insert point
<control>Return Calculate whole worksheet
<control><alt>Return Calculate all worksheets

Additionally, <control>KP_Enter acts like <control>Return and
KP_Enter and <shift>KP_Enter act like <shift>Return.

* Support <Alt>digit for switching between different open files.
(Suggestion by Antti Kaihola.)

* When an executing worksheet is closed, show a dialog and wait rather
than letting it run unchecked in the background.

* Methods that begin with get/is/has are assumed to be getters that
don't mutate the object.

* Statements that have with a result other than None now only output
at the toplevel, not within functions and class definitions. (Me,
Robert Schroll)

* When editing inside a parenthesized expression or after a \, just
copy the indentation level from the previous line - don't always go
back to a four-space indent. (Robert Schroll)

* Scroll to make the result visible after a computation. (Robert Schroll)

* When the user selects within a single result, allow cutting and
pasting that, even though results are ignored when copying a larger
selected area that contains both code and results. (Robert Schroll)

* Hide the cursor when executing a notebook. (Robert Schroll)

* Reinteract now does a better job at understanding when two
references to the the same name reference the variable are the same or
not, avoiding spurious warnings about mutated variables.

* We now require Python 2.6 and PyGObject 2.16

Bug fixes
=========

* Use glib.get_user_special_dir(glib.USER_DIRECTORY_DOCUMENTS) instead
of hardcoding ~/Documents. (Joerg Bornschein)

* Fix problems with completion popups going off the screen. (Robert Schroll, Me)

* Fix handling of functions with docstrings. (Suggestion by Antti Kaihola.)

* Fix memory leaks when closing worksheets and windows.

* Use 'is None' and 'is not None' (Suggestion by Jonathan Griffitts)

* Bug fixes for deletion, reindentation, highlighting results needing
recomputation, opening notebooks that have been deleted, display of
worksheet modification times. (Robert Schroll)

* Mousewheel scrolling now works anywhere in a documentation tooltip
(Robert Schroll)

* Clean up tabs and spaces in the codebase. (Joerg Bornschein)

* Fixes for reloading modules and for cleaning up after failed
imports. (Reloading problems reported by Laser Yuan)

* Many other bug fixes

Guido Vettoretti

unread,
Oct 31, 2011, 1:25:06 PM10/31/11
to reint...@googlegroups.com
Hello,

Nice update... I've very impressed with the progress

It seems to work on Mac OS X 10.6 and Ubuntu 10.10 and 11.10 for me.

I am getting some errors with build example (build.rws) that was packaged with the new source
  ---> Mutating global variable 'Statement' inside a function is not supported
-------------------------------------------------------------------------------------------
from reinteract.statement import Statement

class build_list():
    def __enter__(self):
        l = []
        Statement.get_current()._list = l
        return l

    def __exit__(self, exception_type, exception_value, traceback):
        Statement.get_current()._list = None

Mutating global variable 'Statement' inside a function is not supported

def append(v):
    Statement.get_current()._list.append(v)

Mutating global variable 'Statement' inside a function is not supported


--
You received this message because you are subscribed to the Google Groups "Reinteract" group.
To post to this group, send email to reint...@googlegroups.com.
To unsubscribe from this group, send email to reinteract+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/reinteract?hl=en.


Owen Taylor

unread,
Oct 31, 2011, 1:29:32 PM10/31/11
to reint...@googlegroups.com
On Mon, Oct 31, 2011 at 1:25 PM, Guido Vettoretti <2gu...@gmail.com> wrote:
> Hello,
>
> Nice update... I've very impressed with the progress
> It seems to work on Mac OS X 10.6 and Ubuntu 10.10 and 11.10 for me.

Thanks for the testing!

> I am getting some errors with build example (build.rws) that was packaged
> with the new source
>   ---> Mutating global variable 'Statement' inside a function is not
> supported
> -------------------------------------------------------------------------------------------
> from reinteract.statement import Statement
> class build_list():
>     def __enter__(self):
>         l = []
>         Statement.get_current()._list = l
>         return l
>     def __exit__(self, exception_type, exception_value, traceback):
>         Statement.get_current()._list = None
> Mutating global variable 'Statement' inside a function is not supported
> def append(v):
>     Statement.get_current()._list.append(v)
> Mutating global variable 'Statement' inside a function is not supported

I pushed a workaround for this yesterday:

http://git.fishsoup.net/cgit/reinteract/commit/?id=7b86dc5efca35d98d5a659e329bcf1c77c2eaf14

(Depends on the two previous commits.)

- Owen

syont

unread,
Nov 9, 2011, 1:17:06 AM11/9/11
to Reinteract
hello Dev,

1st, i appreciates to this project and i would like to says thanx you,
this is apps were i looking for a year as a python user.

i succesfully install Reactive 0.5 with Python 2.6.1, when i'm looking
for printing features with this updates new version, i remove with
Python 2.7.1/2.7.2 but i got nothing to works with Reactive
interfaces. what Python versions required? please describe exactly
since it has sensitive dependency.

On Oct 30, 1:29 am, Owen Taylor <owtay...@gmail.com> wrote:
> I finally managed to stop adding features and make a release of
> Reinteract. This is basically a beta candidate for an 0.6.0 release,
> since there's a lot of new features and the Mac and Windows installers
> haven't had much testing.
>
> Source:http://www.reinteract.org/download/sources/reinteract-0.5.9.tar.bz2
>    sha256: a38b5e88371895a6b37cb7daf117feed69b45e0a6714cc0528b36cd89828fefe
>
> Windows Installer:(Requires Python 2.7)
>  http://www.reinteract.org/download/windows/Reinteract-0.5.9-python2.7...

Owen Taylor

unread,
Nov 9, 2011, 9:42:26 AM11/9/11
to reint...@googlegroups.com
On Wed, Nov 9, 2011 at 1:17 AM, syont <suyo...@gmail.com> wrote:

> 1st, i appreciates to this project and i would like to says thanx you,
> this is apps were i looking for a year as a python user.
>
> i succesfully install Reactive 0.5 with Python 2.6.1, when i'm looking
> for printing features with this updates new version, i remove with
> Python 2.7.1/2.7.2 but i got nothing to works with Reactive
> interfaces. what Python versions required? please describe exactly
> since it has sensitive dependency.

I'm glad you like Reinteract and thanks for trying out the new version!

- What are the details of your operating system?

- What happens when you run Reinteract?

On both the Mac and Windows, works with Python 2.7.2 from
http://www.python.org/download/ in my testing.

- Owen

syont

unread,
Nov 11, 2011, 1:55:21 AM11/11/11
to Reinteract
hi Dev,

thanx for quick responds, apologizes for two times i makes wrong typos
about the program names. i'm really new, exciting and reply too
quickly.

i remove previous version including python then follow above step you
describes, add path. still not works, start from menu just displaying
sand glass timer process for a second than gone nothing happen (no
error messages, no Reinteract interfaces). try to run from command
prompt, i got this error messages:

C:\Program Files\Reinteract\bin>python Reinteract.pyw
Traceback (most recent call last):
File "Reinteract.pyw", line 32, in <module>
import reinteract.main
File "C:\Program Files\Reinteract\python\reinteract\main.py", line
14, in <module>
import gtk
File "C:\Program Files\Reinteract\external\gtk\__init__.py", line
40, in <module>
from gtk import _gtk
ImportError: DLL load failed: The specified module could not be found.


how do i fix it? please guide me i need to printing features with this
new versions.

-syont

On Nov 9, 9:42 pm, Owen Taylor <otay...@fishsoup.net> wrote:

Owen Taylor

unread,
Nov 11, 2011, 9:53:27 AM11/11/11
to reint...@googlegroups.com
On Fri, Nov 11, 2011 at 1:55 AM, syont <suyo...@gmail.com> wrote:

> i remove previous version including python then follow above step you
> describes, add path. still not works, start from menu just displaying
> sand glass timer process for a second than gone nothing happen (no
> error messages, no Reinteract interfaces). try to run from command
> prompt, i got this error messages:
>
> C:\Program Files\Reinteract\bin>python Reinteract.pyw
> Traceback (most recent call last):
>  File "Reinteract.pyw", line 32, in <module>
>    import reinteract.main
>  File "C:\Program Files\Reinteract\python\reinteract\main.py", line
> 14, in <module>
>    import gtk
>  File "C:\Program Files\Reinteract\external\gtk\__init__.py", line
> 40, in <module>
>    from gtk import _gtk
> ImportError: DLL load failed: The specified module could not be found.

Hmm; this implies that some dependency that the GTK+ python module
needs is missing from your system.

- What version of windows are you using?
- Does the file 'libgtk-win32-2.0-0.dll' exist within C:\Program
Files\Reinteract\bin ?

- Owen

Joseph Coffey

unread,
Nov 11, 2011, 10:20:48 AM11/11/11
to reint...@googlegroups.com
Hi,

We have a somewhat baroque import system at work.  Basically for political reasons the codebase is seperated into multiple directories,and then the python importer is overriden in a way to reassemble it all together.  (I'm not totally clear on the detalis).  Reinteract, because it tries to replicate the python import system, isn't quite able to deal with it.

In .5 I could get around this by pulling up the notebook.py in a reinteract worksheet, and then constructing a notebook

N = Notebook()
N.do_import('Path1')
D.do_import("Path2')

for the basepaths that reinteract wouldn't normally find.  Then everything worked.  However this doesn't work anylonger, presumably because whatever weird global magic I was relying on has been sanitized away.  I feel like I should be able to add something to the Notebook constructor to have it always import a set of paths.  Any advice?




- Owen

Owen Taylor

unread,
Nov 11, 2011, 10:33:59 AM11/11/11
to reint...@googlegroups.com
On Fri, Nov 11, 2011 at 10:20 AM, Joseph Coffey <joe.c...@gmail.com> wrote:
> Hi,
> We have a somewhat baroque import system at work.  Basically for political
> reasons the codebase is seperated into multiple directories,and then the
> python importer is overriden in a way to reassemble it all together.  (I'm
> not totally clear on the detalis).  Reinteract, because it tries to
> replicate the python import system, isn't quite able to deal with it.
> In .5 I could get around this by pulling up the notebook.py in a reinteract
> worksheet, and then constructing a notebook
> N = Notebook()
> N.do_import('Path1')
> D.do_import("Path2')
> for the basepaths that reinteract wouldn't normally find.

Hmm, I can't even guess what that would do. (Is 'D' a typo?) In
theory, every Notebook object is encapsulated, and if you created a
new one from within a worksheet, that should have no effect on the
worksheet. I could imagine there might be some leakage though...

>  Then everything
> worked.  However this doesn't work anylonger, presumably because whatever
> weird global magic I was relying on has been sanitized away.  I feel like I
> should be able to add something to the Notebook constructor to have it
> always import a set of paths.  Any advice?

Would the RFE in https://bugzilla.gnome.org/show_bug.cgi?id=659341
handle what you are looking for, or is it more complicated than that?

- Owen

syont

unread,
Nov 11, 2011, 12:50:08 PM11/11/11
to Reinteract
installing on windows xp home sp3. can not wait to try and exploring
with reinteract, then i turning back to an old versions, i did not
looking precisely about gtk dll on bin directory. i'll try another
time and giving a details for what you've been mentions. thanx you -
syont

Michael Johnson

unread,
Nov 24, 2011, 11:08:01 AM11/24/11
to Reinteract
Hello,

Firstly thank you very much for producing a great program. I found it
a few years ago and it was extremely helpful in weening me off of
Matlab while I was still getting used to Python syntax. I still use it
regularly as a quick way to run what-if experiments and work out
programming puzzles.

I recently upgraded to a new computer so I am running Windows 7
Professional 64 bit. I've installed the 64 bit version of Python 2.7.2
along with the 64 bit versions of the numpy and friends. I was very
excited to see the new version of re-interact for use with Python 2.7.
However I cannot get it to run normally, here is the issues I'm
having:

If I run the Reinteract.exe I simply get a "Application was unable to
start correctly (0xC000007B)." error.
If I run Reinteract.pyw the frame comes up but before it is populated
with widgets the "pythonw.exe has stopped working" dialog pops up.
If I use windbg to run pythonw.exe reinteract.pyw use F5 repeatedly
then everything pops up okay and if I break and detach from the
process I have a fully functional reinteract-0.5.9-python2.7 (which is
awesome).

I don't really know how to use windbg to tell me what went wrong but
this method of running reinteract is really painful. Any assistance
would be appreciated.

(Though I have it install currently without the local libraries it
does not work when installed with private copies of the gui. I do not
remember if you could run it through windbg when using the private
libraries)

Thanks again

-MAJ

Michael Johnson

unread,
Nov 24, 2011, 11:19:35 AM11/24/11
to Reinteract
Hello and thank you for producing a great program. I have used it
regularly over the last few years and it was very helpful in switching
from Matlab to Python. I also use it regularly to try out code
snippets and run short experiments.

I recently upgraded from XP to Windows 7 Professional 64Bit and
installed Pyhton 2.7.2 64Bit along witht the 64 bit version of numpy
and friends.

I was excited to see the new Reinteract but when I installed it I had
the following problems:

If I run reinteract.exe I simply get a "Application was unable to
start correctly (0xx000007b)." error.
If I run reinteract.pyw I get the "pythonw.exe has stopped working"
error with an empty gui fram in the background.
If I run reinteract.pyw through windbg I can hold F5 to continue then
break and detach and I am left with a functional reinteract.

I don't know enough about windbg to understand if it is telling me
what the problem is but this is as you would expect a pretty annoying
way to have to start a program I would like to use regularly.

I have installed it with and without the private copies of the
libraries with similar results. Other pyGTK programs seem to run
though I do not have an extensive library of them.

Any help would be appreciated.

-MAJ

On Oct 29, 12:29 pm, Owen Taylor <owtay...@gmail.com> wrote:
> I finally managed to stop adding features and make a release of
> Reinteract. This is basically a beta candidate for an 0.6.0 release,
> since there's a lot of new features and the Mac and Windows installers
> haven't had much testing.
>
> Source:http://www.reinteract.org/download/sources/reinteract-0.5.9.tar.bz2
>    sha256: a38b5e88371895a6b37cb7daf117feed69b45e0a6714cc0528b36cd89828fefe
>
> Windows Installer:(Requires Python 2.7)

>  http://www.reinteract.org/download/windows/Reinteract-0.5.9-python2.7...

Owen Taylor

unread,
Nov 28, 2011, 9:54:47 AM11/28/11
to reint...@googlegroups.com
On Thu, Nov 24, 2011 at 11:19 AM, Michael Johnson <ioha...@gmail.com> wrote:
> Hello and thank you for producing a great program. I have used it
> regularly over the last few years and it was very helpful in switching
> from Matlab to Python. I also use it regularly to try out code
> snippets and run short experiments.
>
> I recently upgraded from XP to Windows 7 Professional 64Bit and
> installed Pyhton 2.7.2 64Bit along witht the 64 bit version of numpy
> and friends.
>
> I was excited to see the new Reinteract but when I installed it I had
> the following problems:
>
> If I run reinteract.exe I simply get a "Application was unable to
> start correctly (0xx000007b)." error.

Would you be able to try removing the 64-bit version of Python and
installing the 32-bit version? It seems googling around that this
error is related to mixtures of 32-bit and 64-bit code, and the
installer is built against 32-bit Python, partly to get maximum
compatibility, and partly due to limited availability of prebuilt
binaries of pygtk for Win64. (I'm sure I can figure out how to build
my own, but it's a lot of work.)

- Owen

Michael Johnson

unread,
Nov 30, 2011, 9:52:14 AM11/30/11
to Reinteract
The installer seemed to operate fine. I've been using the pre-built
64bit pyGTK from:
http://www.lfd.uci.edu/~gohlke/pythonlibs/
This was a great site it made it pretty easy to download all the 64
bit libraries. Perhaps they were not as well done as I had hoped.

I can try it again in 32bit but I'll have to wait until I finish my
defense in a few weeks since it is a pretty major undertaking.

Thank you again for the feedback.

-MAJ

On Nov 28, 8:54 am, Owen Taylor <owtay...@gmail.com> wrote:

greezybacon

unread,
Dec 28, 2011, 5:10:19 PM12/28/11
to Reinteract
I've seen this two on a 32-bit Windows XP machine. It appears that the
installer fails to install several GTK dependencies --

- libfontconfig-1.dll
- libexpat-1.dll
- libpangoft2-1.0-0.dll
- libpng14-14.dll

Downloading and installing these DLLs manually to the bin/ path seems
to get past the ImportError, but now I'm stuck at

C:\Program Files\Reinteract\external\gtk\__init__.py:40:
RuntimeWarning: tp_comp
are didn't return -1 or -2 for exception
from gtk import _gtk
ImportError: could not import gio
ImportError: could not import gio
Traceback (most recent call last):
File "Reinteract.pyw", line 34, in <module>
import reinteract.main
File "C:\Program Files\Reinteract\python\reinteract\main.py", line
25, in <mod
ule>
from application import application
File "C:\Program Files\Reinteract\python\reinteract\application.py",
line 202,
in <module>
from about_dialog import AboutDialog
File "C:\Program Files\Reinteract\python\reinteract
\about_dialog.py", line 43,
in <module>
class AboutDialog(gtk.AboutDialog):
AttributeError: 'module' object has no attribute 'AboutDialog'

Cheers,

Jared

On Nov 11, 8:53 am, Owen Taylor <otay...@fishsoup.net> wrote:

Owen Taylor

unread,
Feb 11, 2012, 8:55:59 AM2/11/12
to reint...@googlegroups.com
On Wed, Dec 28, 2011 at 5:10 PM, greezybacon <grav...@gmail.com> wrote:
> I've seen this two on a 32-bit Windows XP machine. It appears that the
> installer fails to install several GTK dependencies --
>
>  - libfontconfig-1.dll
>  - libexpat-1.dll
>  - libpangoft2-1.0-0.dll
>  - libpng14-14.dll
>
> Downloading and installing these DLLs manually to the bin/ path seems
> to get past the ImportError, but now I'm stuck at
>
> C:\Program Files\Reinteract\external\gtk\__init__.py:40:
> RuntimeWarning: tp_comp
> are didn't return -1 or -2 for exception
>  from gtk import _gtk
> ImportError: could not import gio

This was very useful - I added these 4 files and the gio package and
tested after removing all sources from my machine and it seems to work
fine, at least on my Windows 7 / 64bit machine.

Thanks for investigating,

- Owen

Reply all
Reply to author
Forward
0 new messages