My 'session' code opens Leo files listed in a node body.
How should the following be changed?
Thanks,
Kent
exception executing script
Traceback (most recent call last):
File "/usr/fetching/leo-editor/leo/core/leoCommands.py", line 2340,
in executeScript
execfile(scriptFile,d)
File "/usr/fetching/leo-editor/leo/test/scriptFile.py", line 7, in <module>
leotools.load_session(c, UNLs)
File "/home/ktenney/work/lib/leotools.py", line 71, in load_session
ok, frame = g.openWithFileName(fname, c)
TypeError: 'Commands' object is not iterable
--------------------
line 70: fname, unl = UNL.split("#")
* line 71: ok, frame = g.openWithFileName(fname, c)
line 72: if ok:
line 73: this_c = frame.c
On Mon, Feb 20, 2012 at 7:10 AM, Edward K. Ream <[email protected]> wrote:
> Rev 4993 continues my campaign to clean Leo's startup code.
>
> As usual for recent commits, I advise extra care with this commit.
> Please report any problems immediately.
>
> A note of explanation for the recent work. I have spent hours and
> hours making the code as simple as I can possibly make it. This
> doesn't happen often, but when it does happen I want to do the best
> job of it that I can possibly can. This is, truly, the last best
> chance to clean this code.
>
> I'll make significant changes to Leo's startup and configuration code
> after all the cleanups. Doing the cleanups first means that the
> extended testing period will be using a relatively stable code base,
> that is, the *cleaned* code base.
>
> There is one more cleanup to do: Leo should have a TestManager class
> that encapsulates the code in leoTest.leo. I am coming to despise
> modules that don't use classes to encapsulate their data. I'll do
> this today; it will be straightforward. Once that is done I have one
> unit-test-related bug to fix.
>
> Here is the checkin log: BTW, from now on the phrase "all usual
> tests" will mean the following:
>
> 1. All unit tests pass.
> 2. pylint reports no errors on Leo's core files.
> 3. I have used the code myself without problems.
>
> QQQQQ
> Moved all startup code to LoadManager class. All usual tests pass.
>
> leoApp.py:
>
> - LoadManager class now contains almost all startup code.
> - Simplified how LoadManager handles user options.
>
> leoGlobals.py:
>
> - Removed new_load switch.
>
> leoTest.py:
>
> - Fixed a real error reported by pylint: Use "as" in Except clauses.
>
> runLeo.py:
>
> - Moved almost all code in run() to LoadManager class in leoApp.py.
> Run now contains only:
>
> assert g.app
> g.app.loadManager = leoApp.LoadManager(fileName,pymacs)
> g.app.loadManager.load()
>
> Many files:
>
> - Added disambiguating comments for << imports >> section.
> Also, added << imports >> section for any file import leo.core.leoX
> files.
> This allows the clone-fine-all command to see all imports of Leo's
> core files.
> QQQQQ
>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/leo-editor?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.