<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Data Unbound &#187; Ecco Pro</title>
	<atom:link href="http://blog.dataunbound.com/category/ecco-pro/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dataunbound.com</link>
	<description>Helping organizations access and share data effectively.  Special focus on web APIs for data integration.</description>
	<lastBuildDate>Sat, 12 Feb 2011 21:00:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<image>
  <link>http://blog.dataunbound.com</link>
  <url>http://blog.dataunbound.com/wp-content/plugins/favicon-manager/dataunbound.ico</url>
  <title>Data Unbound</title>
</image>
		<item>
		<title>A mundane task: updating a config file to retain old settings</title>
		<link>http://blog.dataunbound.com/2011/02/12/a-mundane-task-updating-a-config-file-to-retain-old-settings/</link>
		<comments>http://blog.dataunbound.com/2011/02/12/a-mundane-task-updating-a-config-file-to-retain-old-settings/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 21:00:17 +0000</pubDate>
		<dc:creator>Raymond Yee</dc:creator>
				<category><![CDATA[Ecco Pro]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://blog.dataunbound.com/?p=878</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=A+mundane+task%3A+updating+a+config+file+to+retain+old+settings&amp;rft.aulast=Yee&amp;rft.aufirst=Raymond&amp;rft.subject=Ecco+Pro&amp;rft.subject=Python&amp;rft.source=Data+Unbound&amp;rft.date=2011-02-12&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://blog.dataunbound.com/2011/02/12/a-mundane-task-updating-a-config-file-to-retain-old-settings/&amp;rft.language=English"></span>
I want to have a hand in creating an excellent personal information manager (PIM) that can be a worthy successor to Ecco Pro. So far, running EccoExt (a clever and expansive hack of Ecco Pro) has been a eminently practical solution.   You can download the most recent version of this actively developed extension from [...]]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=A+mundane+task%3A+updating+a+config+file+to+retain+old+settings&amp;rft.aulast=Yee&amp;rft.aufirst=Raymond&amp;rft.subject=Ecco+Pro&amp;rft.subject=Python&amp;rft.source=Data+Unbound&amp;rft.date=2011-02-12&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://blog.dataunbound.com/2011/02/12/a-mundane-task-updating-a-config-file-to-retain-old-settings/&amp;rft.language=English"></span>
<div>
<div>I want to have a hand in creating an excellent personal information manager (PIM) that can be a worthy successor to <a href="http://en.wikipedia.org/wiki/Ecco_Pro">Ecco Pro</a>. So far, running <a href="http://eccoextdoc.wikispaces.com/Introduction">EccoExt</a> (a clever and expansive hack of Ecco Pro) has been a eminently practical solution.   You can download the most recent version of this actively developed extension from the <a href="http://tech.groups.yahoo.com/group/ecco_pro/files/">files section of the ecco_pro Yahoo! group</a>.   I would do so regularly but one of the painful problems with unpacking (using <a href="http://www.rarlab.com/rar_add.htm">unrar</a>) the new files is that there wasn&#039;t an updater that would retain the configuration options of the existing setup.  So a mundane but happy-making programming task of this afternoon was to write a Python script to do exact that function, making use of the builtin<a href="http://docs.python.org/library/configparser.html"> ConfigParser library</a>.</div>
</div>
<pre>"""
compare eccoext.ini files

My goal is to edit the new file so that any overlapping values take on the current value

"""
current_file_path = "/private/tmp/14868/C/Program Files/ECCO/eccoext.ini"
new_file_path = "/private/tmp/14868/C/utils/eccoext.ini"
updated_file = "/private/tmp/14868/C/utils/updated_eccoext.ini"

# extract the key value pairs in both files to compare  the two

# http://docs.python.org/library/configparser.html
import ConfigParser

def extract_values(fname):
    # generate a parsed configuration object, set of (section, options)
    config = ConfigParser.SafeConfigParser()
    options_set = set()

    config.read(fname)
    sections = config.sections()
    for section in sections:
        options = config.options(section)
        for option in options:
            #value = config.get(section,option)
            options_set.add((section,option))

    return (config, options_set)

# process current file and new file

(current_config, current_options) = extract_values(current_file_path)
(new_config, new_options) = extract_values(new_file_path)

# what are the overlapping options
overlapping_options = current_options &amp; new_options

# figure out which of the overlapping options are the values different

for (section,option) in overlapping_options:
    current_value = current_config.get(section,option)
    new_value = new_config.get(section,option)
    if current_value != new_value:
        print section, option, current_value, new_value
        new_config.set(section,option,current_value)

# write the updated config file

with open(updated_file, 'wb') as configfile:
    new_config.write(configfile)</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.dataunbound.com/2011/02/12/a-mundane-task-updating-a-config-file-to-retain-old-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Which version of pywin32 works with Ecco Pro DDE?</title>
		<link>http://blog.dataunbound.com/2008/12/31/which-version-of-pywin32-works-with-ecco-pro-dde/</link>
		<comments>http://blog.dataunbound.com/2008/12/31/which-version-of-pywin32-works-with-ecco-pro-dde/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 15:28:19 +0000</pubDate>
		<dc:creator>Raymond Yee</dc:creator>
				<category><![CDATA[Ecco Pro]]></category>
		<category><![CDATA[DDE]]></category>
		<category><![CDATA[pywin32]]></category>

		<guid isPermaLink="false">http://blog.dataunbound.com/?p=203</guid>
		<description><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Which+version+of+pywin32+works+with+Ecco+Pro+DDE%3F&amp;rft.aulast=Yee&amp;rft.aufirst=Raymond&amp;rft.subject=Ecco+Pro&amp;rft.source=Data+Unbound&amp;rft.date=2008-12-31&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://blog.dataunbound.com/2008/12/31/which-version-of-pywin32-works-with-ecco-pro-dde/&amp;rft.language=English"></span>
Two programs of which I am aware uses pywin32 (the Python for Windows extension) to access Ecco Pro&#039;s DDE interface:  EccoTools and classeccodde.py.  I have found that the current version of pywin32 (v 212) doesn&#039;t work, and that the newest version that does work is version 207. (BTW, you can look at all the versions [...]]]></description>
			<content:encoded><![CDATA[	
	<span class="Z3988" title="ctx_ver=Z39.88-2004&amp;rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Adc&amp;rfr_id=info%3Asid%2Focoins.info%3Agenerator&amp;rft.title=Which+version+of+pywin32+works+with+Ecco+Pro+DDE%3F&amp;rft.aulast=Yee&amp;rft.aufirst=Raymond&amp;rft.subject=Ecco+Pro&amp;rft.source=Data+Unbound&amp;rft.date=2008-12-31&amp;rft.type=blogPost&amp;rft.format=text&amp;rft.identifier=http://blog.dataunbound.com/2008/12/31/which-version-of-pywin32-works-with-ecco-pro-dde/&amp;rft.language=English"></span>
<p>Two programs of which I am aware uses <a href="https://sourceforge.net/project/platformdownload.php?group_id=78018">pywin32 </a>(the Python for Windows extension) to access <a href="http://en.wikipedia.org/wiki/Ecco_Pro">Ecco Pro</a>&#039;s <a href="http://en.wikipedia.org/wiki/Dynamic_Data_Exchange">DDE</a> interface:  <a href="https://sourceforge.net/projects/eccotools/">EccoTools</a> and <a href="http://tech.groups.yahoo.com/group/ecco_pro/files/Python%20Ecco%20Code%20%26%20Programs/">classeccodde.py</a>.   I have found that the current version of pywin32 (<a href="https://sourceforge.net/project/showfiles.php?group_id=78018&amp;package_id=79063&amp;release_id=616849">v 212</a>) doesn&#039;t work, and that the newest version that does work is <a href="https://sourceforge.net/project/showfiles.php?group_id=78018&amp;package_id=79063&amp;release_id=384458">version 207</a>.  (BTW, you can look at <a href="https://sourceforge.net/project/showfiles.php?group_id=78018&amp;package_id=79063">all the versions of pywin32 available at sourceforge</a>.)</p>
<p>The problem comes when you try to create a DDE session with the following lines:</p>
<pre>import dde
dde.CreateServer().Create('EccoSession')</pre>
<p>If you use versions of pywin32 from v 208 up, you get a &#034;The server could not be created&#034; error.</p>
<p>Next steps:  I should report this error to Mark Hammond, the author of pywin32.  I wrote a message about this issue in the <a href="http://tech.groups.yahoo.com/group/ecco_pro/message/4867">Ecco_Pro group</a> to see whether others</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dataunbound.com/2008/12/31/which-version-of-pywin32-works-with-ecco-pro-dde/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

