<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to patches</title><link>https://sourceforge.net/p/drpython/patches/</link><description>Recent changes to patches</description><atom:link href="https://sourceforge.net/p/drpython/patches/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 26 Aug 2010 22:50:36 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/drpython/patches/feed.rss" rel="self" type="application/rss+xml"/><item><title>Use `wx.FileHistory`</title><link>https://sourceforge.net/p/drpython/patches/31/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;`wx` comes with a class to handle an MRU list that can be attached to a menu for things like file histories.  I sublassed it to get a more Python sequence like behaviour (len(), read only index access, iterable) and moved the code to save and load the list into that class.  This eliminated a little bit code repetition.  Downside: Changing the number of recent files in the preferences needs a restart to become effective.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Thu, 26 Aug 2010 22:50:36 -0000</pubDate><guid>https://sourceforge.net028431c2b1c9caf17b21fff27f8f6b7a81da1393</guid></item><item><title>Coding cookie recognition</title><link>https://sourceforge.net/p/drpython/patches/30/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The code to recognize the coding cookie did not cover all variations described in `PEP 263 &amp;lt;http://www.python.org/dev/peps/pep-0263/&amp;gt;`_.  See section `Defining the Encoding` for examples.&lt;/p&gt;
&lt;p&gt;The PEP already proposes a regular expression to extract the information.  And the cookie is limited to the very first two lines of the source code.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Thu, 26 Aug 2010 10:30:01 -0000</pubDate><guid>https://sourceforge.net1b7b0e7454cdfd7555e9ffdfcef781ed13ee64ce</guid></item><item><title>No self defined IDs anymore</title><link>https://sourceforge.net/p/drpython/patches/29/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;"Literal IDs" are error prone and most of the time unnecessary.  Getting rid of them makes the source code shorter and easier to maintain.  Standard IDs of `wx` should be used if possible.  Then there is no need to give the text of buttons and menu items, and on some platforms appropriate icons will be shown automatically.  And the IDs `wx.ID_OK` and `wx.ID_CANCEL` have special meaning in `wx.Dialog`\s.&lt;/p&gt;
&lt;p&gt;First patch is for `drFileDialogPrefs.py`.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Thu, 26 Aug 2010 00:48:43 -0000</pubDate><guid>https://sourceforge.netb12122ad40f91ddf68f7bacdb95b1e050f8acff7</guid></item><item><title>Command line parsing</title><link>https://sourceforge.net/p/drpython/patches/28/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Added and used two functions to get a command line option (a "flag") and an option with a value in order to reduce repeated code.&lt;/p&gt;
&lt;p&gt;In the long run command line parsing should be done central and with `optparse` (or maybe `wx.CmdLineParser`?).  This might need some changes in the way plugins get at command line options though, because `optparse` needs to know all possible options before parsing the command line.  One possibility would be an option for plugin options.  For example::&lt;/p&gt;
&lt;p&gt;--plugin-options 'opt1 "opt 1" opt2'&lt;/p&gt;
&lt;p&gt;The option's value could be parsed with `shlex` and bound to `sys.argv` after parsing the options for the main program.  This way there would be no difference for existing plugins.  Although I think that all accepted options should be known at parsing time, that is very early in the application's life cycle.  Applications should fail with misspelled options and not ignore them.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Wed, 25 Aug 2010 21:09:15 -0000</pubDate><guid>https://sourceforge.net419e318f4645a633bdc25010e21600c0eb2e89ba</guid></item><item><title>Open files with `open()`</title><link>https://sourceforge.net/p/drpython/patches/27/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Current code uses `file()` and `open()` to open files.  Guido and Python documentation favors `open()` to open files and `file` to subclass the type.  So this patch replaces all calls to `file()` by calls to `open()`.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Sat, 14 Aug 2010 17:07:11 -0000</pubDate><guid>https://sourceforge.net119e0ab769ecdc55b9adb6eb29daee3c4979a6c3</guid></item><item><title>No explicit comparisons against `True` and `False`</title><link>https://sourceforge.net/p/drpython/patches/26/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Removed three unnecessary, explicit comparisons against `True` or `False`.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Sat, 14 Aug 2010 11:37:57 -0000</pubDate><guid>https://sourceforge.netaf00a0f16a047732dfd37c5df0be4d0946703513</guid></item><item><title>Logging</title><link>https://sourceforge.net/p/drpython/patches/25/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;First steps to use `logging` instead of ``print``.&lt;/p&gt;
&lt;p&gt;Added module `drLogging` as home for the log related stuff.  Currently contains just documentation -- including a todo list -- and an `init()` function that sets up logging and registers a cleanup for program exit.&lt;/p&gt;
&lt;p&gt;In the main file a logger is creared and application startup and shutdown are logged at INFO level.&lt;/p&gt;
&lt;p&gt;`SysOutListener` and `SysErrListener` have a `flush()` method now, which is required by file like objects passed into the `logging` system.&lt;/p&gt;
&lt;p&gt;`DrApp.OnInit()` now has some documentation and an unused local name removed.&lt;/p&gt;
&lt;p&gt;Values of the local variable `useredirecttofile` in `main()` function are of type `bool` now.&lt;/p&gt;
&lt;p&gt;The filename for communicating with a running DrPython instance is a module level constant now.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Sat, 14 Aug 2010 10:23:41 -0000</pubDate><guid>https://sourceforge.net8ce255b225b0fda31641d62eaa764d8e29481cfe</guid></item><item><title>80 character line</title><link>https://sourceforge.net/p/drpython/patches/24/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;PEP8 recommends max. 80 characters per line, so I think the reminding vertical line in the editor should be on per default.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Tue, 10 Aug 2010 21:19:48 -0000</pubDate><guid>https://sourceforge.netd61273446760ca5f0b7ecaad19d5f599060d93bc</guid></item><item><title>Makefile for generating API docs and cleanup</title><link>https://sourceforge.net/p/drpython/patches/23/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Epydoc documentation helps me a lot to find my way through the code.  So I wrote a Makefile to make it easier to create apidocs.  And a `clean` target is there too to delete the apidocs, python bytecode and backup files.&lt;/p&gt;
&lt;p&gt;BTW is it possible that there is no svn:ignore on *.pyc files!?&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Tue, 10 Aug 2010 18:38:54 -0000</pubDate><guid>https://sourceforge.netc90879f506bb3fb0de619056a59bb65e0454a5b4</guid></item><item><title>Do no eval...</title><link>https://sourceforge.net/p/drpython/patches/22/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Patch to try to get rid of the evil `eval()` in the main application.  I didn't look at the plugins.  In the main application they where really unnecessary.&lt;/p&gt;
&lt;p&gt;One `eval()` was in `drpython.drObject` for a test if the object has a given attribute.  That's what the builtin function `hasattr()` is meant for.  Because it is almost easier to use `hasattr()` in the places where `drObject.VariableExists()` was called I replaced the calls there and in the DrScript documentation.&lt;/p&gt;
&lt;p&gt;This leaves us with a class with just one deprecated method.  So I deprecated the class itself too and replaced its only instanciation in the main program by a dynamicalle created class and instance for the shared attributes of the DrScript scripts.&lt;/p&gt;
&lt;p&gt;While replacing the calls to `drObject.VariableExists()` I noticed that the DrScript examples `SetTerminalArgs.py` and `RunInTerminal.py` didn't work.  The `-e` option doesn't work this way with ``rxvt``.  But it does with ``xterm``.  Which is also to be more likely available on a standard Linux installation.  I replaced the invoked terminal of the example and cleaned up the code a little bit.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Marc 'BlackJack' Rintsch</dc:creator><pubDate>Mon, 09 Aug 2010 19:53:08 -0000</pubDate><guid>https://sourceforge.net31ff01b6df873aa946c478a7c67b0e1c07d40001</guid></item></channel></rss>