<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1936840356390581357</id><updated>2011-07-22T16:20:05.456+03:00</updated><category term='SNMP'/><category term='scribefire'/><category term='ironpython'/><category term='basic'/><category term='pastebin'/><category term='free pascal compiler'/><category term='fortran'/><category term='annoyance'/><category term='freebasic'/><category term='MIB'/><category term='conversion'/><category term='printing'/><category term='web2py'/><category term='syntax'/><category term='blog'/><category term='office suite'/><category term='oracle'/><category term='pascal'/><category term='visual studio'/><category term='rhel'/><category term='google docs'/><category term='lazarus'/><category term='OID'/><category term='yum'/><category term='python'/><category term='plugin'/><category term='twitter'/><category term='reference'/><category term='color'/><category term='web programming'/><category term='vim'/><category term='eclipse'/><category term='screenshot'/><category term='solaris'/><category term='compiler'/><category term='database'/><category term='google'/><title type='text'>Çağlar Toklu on Programming</title><subtitle type='html'>Mostly my programming experiences about Vim, Python, BASIC, Pascal, C#, Java and sometimes Fortran. Occasionally, better and more effective computer and Internet usage tips.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-303262352462801150</id><published>2011-07-01T17:48:00.000+03:00</published><updated>2011-07-01T17:48:59.009+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='solaris'/><category scheme='http://www.blogger.com/atom/ns#' term='oracle'/><title type='text'>Compiling cx_Oracle for Python from Source on Solaris</title><content type='html'>We needed to use cx_Oracle on Solaris. cx_Oracle is a Python driver for Oracle. It is &lt;a href="http://www.orafaq.com/wiki/Python"&gt;mentioned&lt;/a&gt; in &lt;a href="http://www.orafaq.com/"&gt;Oracle FAQ&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In each &lt;a href="http://cx-oracle.sourceforge.net/"&gt;version&lt;/a&gt;, the binaries for Windows and Enterprise Linux are released, but there are no pre-built binary packages for Solaris.&lt;br /&gt;&lt;br /&gt;But you can easily download the source package and compile for your system. Its &lt;a href="http://cx-oracle.sourceforge.net/README.txt"&gt;README&lt;/a&gt; file mentions that it compiles on Solaris and even they had being informed about successful compilation on Mac OS X.&lt;br /&gt;&lt;br /&gt;This post assumes that Oracle was already installed on the system, as in my case.&lt;br /&gt;&lt;br /&gt;I have downloaded the "Source Code only" package. For version 5.1, find it &lt;a href="http://sourceforge.net/projects/cx-oracle/files/5.1/cx_Oracle-5.1.tar.gz/download"&gt;here&lt;/a&gt;. Download and extract the file, and open a terminal to the directory containing "setup.py".&lt;br /&gt;&lt;br /&gt;As its &lt;a href="http://cx-oracle.sourceforge.net/README.txt"&gt;README&lt;/a&gt; file says, use the following commands to build (become "root" first):&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="background: #1b1d1e; color: #f8f8f2;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan=""&gt;&lt;pre&gt;&lt;span style="color: #f8f8f2;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;python setup.py build &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;python setup.py install &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;After the compilation, you need to do something unrecommended, setting "&lt;a href="http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN77"&gt;LD_LIBRARY_PATH&lt;/a&gt;", which is &lt;a href="http://xahlee.org/UnixResource_dir/_/ldpath.html"&gt;labeled as "bad"&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Note that using Oracle requires you to use the account "oracle", so we will be using its ".profile" file.&lt;br /&gt;&lt;br /&gt;If you "LD_LIBRARY_PATH" is not defined in the profile, you can add the following to the end of the file ".profile".&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="background: #1b1d1e; color: #f8f8f2;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan=""&gt;&lt;pre&gt;&lt;span style="color: #f8f8f2;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #fd971f;"&gt;LD_LIBRARY_PATH&lt;/span&gt;=/usr/lib/:&lt;span style="color: #a6e22e;"&gt;$ORACLE_HOME&lt;/span&gt;/lib32/ &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #f92672;"&gt;&lt;b&gt;export&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #fd971f;"&gt; LD_LIBRARY_PATH&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;If you have already defined "LD_LIBRARY_PATH" you can add the following code instead:&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="background: #1b1d1e; color: #f8f8f2;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan=""&gt;&lt;pre&gt;&lt;span style="color: #f8f8f2;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #fd971f;"&gt;LD_LIBRARY_PATH&lt;/span&gt;=&lt;span style="color: #a6e22e;"&gt;$LD_LIBRARY_PATH&lt;/span&gt;:&lt;span style="color: #a6e22e;"&gt;$ORACLE_HOME&lt;/span&gt;/lib32/ &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #f92672;"&gt;&lt;b&gt;export&lt;/b&gt;&lt;/span&gt;&lt;span style="color: #fd971f;"&gt; LD_LIBRARY_PATH&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;If everything went well, you can use it in Python:&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="background: #1b1d1e; color: #f8f8f2;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan=""&gt;&lt;pre&gt;&lt;span style="color: #f8f8f2;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #a6e22e;"&gt;import&lt;/span&gt; cx_Oracle &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Note that the "oracle" user should be used, not "root".&lt;br /&gt;&lt;br /&gt;I have accomplished this using Python 2.4.4 and cx_Oracle 5.1.&lt;br /&gt;&lt;br /&gt;To see your Solaris version use the following command:&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="background: #1b1d1e; color: #f8f8f2;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan=""&gt;&lt;pre&gt;&lt;span style="color: #f8f8f2;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;cat /etc/release &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Solaris 10 5/09&lt;/span&gt; &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.&lt;/span&gt; &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Use is subject to license terms.&lt;/span&gt; &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Assembled 30 March 2009&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-303262352462801150?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/303262352462801150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/07/compiling-cxoracle-for-python-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/303262352462801150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/303262352462801150'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/07/compiling-cxoracle-for-python-from.html' title='Compiling cx_Oracle for Python from Source on Solaris'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-5648921862187149308</id><published>2011-06-27T19:04:00.002+03:00</published><updated>2011-06-27T19:10:27.355+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='printing'/><category scheme='http://www.blogger.com/atom/ns#' term='screenshot'/><title type='text'>Some Customizations on the Blog for Displaying and Printing, Vim Helps</title><content type='html'>I have made some theme customizations and modified two previous posts targeting less JavaScript requirements, shorter load time and some aesthetic.&lt;br /&gt;&lt;br /&gt;I save web pages. I always do. I do not bookmark everything, but I print pages in PDF format. This way I can read them later, without making my bookmarks fat. They are already fat enough. I see my readings as my data, and I want to store them. And I go angry against unprintable, very very long pages. I also use &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/screengrab/"&gt;ScreenGrab&lt;/a&gt; to store the screen-shot of a web page, but it can get stuck with the long web pages.&lt;br /&gt;&lt;br /&gt;And I was thinking, my simple blog should be easily printable too. But it was not. Sadly, it seems that &lt;a href="http://www.blogger.com/"&gt;Blogger&lt;/a&gt; pages(may be not Blogger, but all the themes I have ever used in Blogger) can not be completely printed. Also I am a &lt;a href="http://pastebin.com/"&gt;PasteBin&lt;/a&gt; user, and I have used its feature of embedding code pieces to the blog. But that made printing much more difficult. Without PasteBin code embedding, a great site, &lt;a href="http://www.printfriendly.com/"&gt;PrintFriendly&lt;/a&gt;, was able to print, but with embedded code from PasteBin, even PrintFriendly could not print the pages. So, I have decided to modify the blog, and make it printable as much as possible.&lt;br /&gt;&lt;br /&gt;The first was to remove the embedded code from PasteBin and directly putting the code inside the blog post body. This way I could also control the colors.&lt;br /&gt;&lt;br /&gt;As I am a Vim user, it is not difficult to find a &lt;a href="http://www.vim.org/scripts/script.php?script_id=1552"&gt;cool Vim plugin, &lt;span class="txth1"&gt;ScreenShot.vim&lt;/span&gt; to convert code pieces to HTML&lt;/a&gt;. By this way, I can easily convert a portion of code to HTML. The output of ScreenShot.vim is different from the built-in "TOhtml" command. ScreenShot.vim provides 3 commands essentially.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Screenshot&lt;/b&gt; : Just like it says, it takes the screenshot of the Vim window.&lt;br /&gt;Its output looks like this:&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="background: #1b1d1e; color: #f8f8f2;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;pre&gt;&lt;span style="color: #f8f8f2;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 31 &lt;/span&gt;&lt;span style="color: #465457;"&gt;# This is only the file name:&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 32 &lt;/span&gt;db_name = &lt;span style="color: #e6db74;"&gt;"our_db.sqlite"&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 33 &lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 34 &lt;/span&gt;&lt;span style="color: #465457;"&gt;# The protocol and full path to our database&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 35 &lt;/span&gt;db = DAL(&lt;span style="color: #e6db74;"&gt;'sqlite://'&lt;/span&gt; + db_name, folder=modul&lt;br /&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 36 &lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 37 &lt;/span&gt;&lt;span style="color: #465457;"&gt;# Define the table "genre", note that the fi&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 38 &lt;/span&gt;db.define_table(&lt;span style="color: #e6db74;"&gt;"genre"&lt;/span&gt;,&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 39 &lt;/span&gt;        Field(&lt;span style="color: #e6db74;"&gt;"name"&lt;/span&gt;))&lt;br /&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 40 &lt;/span&gt;db.genre.name.requires = IS_NOT_EMPTY()&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 41 &lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 42 &lt;/span&gt;&lt;span style="color: #465457;"&gt;# Define the table "band", note that the fie&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 43 &lt;/span&gt;&lt;span style="color: #465457;"&gt;# band.genre_id references to genre.id field&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 44 &lt;/span&gt;db.define_table(&lt;span style="color: #e6db74;"&gt;"band"&lt;/span&gt;,&lt;br /&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt; 45 &lt;/span&gt;        Field(&lt;span style="color: #e6db74;"&gt;"name"&lt;/span&gt;), &lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(69, 83, 84); color: #f8f8f2;"&gt;&lt;b&gt;raw.py                        40,1           42%&lt;/b&gt;&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(69, 83, 84); color: #f8f8f2;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;Second command, &lt;b&gt;Text2Html&lt;/b&gt;, converts the selected text to HTML. Looks like the built-in &lt;b&gt;TOhtml&lt;/b&gt; command, but, &lt;b&gt;TOhtml&lt;/b&gt; command creates a page with &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;html&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&lt;/span&gt;, &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;head&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&lt;/span&gt; etc. On the other hand, Text2Html command creates a portion of an HTML page, starting with a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;table&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&lt;/span&gt; and ending with a &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;/table&lt;/span&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;gt;&lt;/span&gt;, ready to embed in the blog post body or somewhere else. See a &lt;a href="http://caglartoklu.blogspot.com/2011/06/standalone-usage-of-web2pys-dal-gluon.html"&gt;modified, previous blog post&lt;/a&gt; to have an idea on how it looks like. This is the command I will be using frequently from now on.&lt;br /&gt;&lt;br /&gt;And the third command, &lt;b&gt;Diff2Html&lt;/b&gt; is used to display two files comparing with differences highlighted.&lt;br /&gt;&lt;br /&gt;Also there had been some color inconsistencies in this blog, but finally there will be no more. I will be using &lt;a href="http://www.vim.org/scripts/script.php?script_id=2340"&gt;Molokai color scheme for Vim&lt;/a&gt;, based on &lt;a href="http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/"&gt;Monokai for TextMate&lt;/a&gt;, since I like it much and goes very well with the current dark theme of the blog.&lt;br /&gt;&lt;br /&gt;The ScreenShot.vim plugin is configurable. Read &lt;a href="http://www.vim.org/scripts/script.php?script_id=1552"&gt;its script page&lt;/a&gt; for more options. Here are my settings from my &lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;vimrc&lt;/span&gt; targeting saving the maximum screen space:&lt;br /&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="background: #1b1d1e; color: #f8f8f2;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan=""&gt;&lt;pre&gt;&lt;span style="color: #f8f8f2;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #f92672;"&gt;&lt;b&gt;let&lt;/b&gt;&lt;/span&gt; g:ScreenShot &lt;span style="color: #f92672;"&gt;=&lt;/span&gt; { &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(27, 29, 30); color: #66d9ef;"&gt;&lt;i&gt;    \&lt;/i&gt;&lt;/span&gt; &lt;span style="color: #e6db74;"&gt;'Title'&lt;/span&gt; : &lt;span style="color: #ae81ff;"&gt;0&lt;/span&gt;, &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(27, 29, 30); color: #66d9ef;"&gt;&lt;i&gt;    \&lt;/i&gt;&lt;/span&gt; &lt;span style="color: #e6db74;"&gt;'Icon'&lt;/span&gt; : &lt;span style="color: #ae81ff;"&gt;0&lt;/span&gt;, &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(27, 29, 30); color: #66d9ef;"&gt;&lt;i&gt;    \&lt;/i&gt;&lt;/span&gt; &lt;span style="color: #e6db74;"&gt;'Credits'&lt;/span&gt; : &lt;span style="color: #ae81ff;"&gt;0&lt;/span&gt;, &lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(27, 29, 30); color: #66d9ef;"&gt;&lt;i&gt;    \&lt;/i&gt;&lt;/span&gt;} &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that I have deleted the line numbers in the code above using Vim, it has no configuration in ScreenShot.vim it seems, but was a piece of cake using Vim's columnar editing. &lt;br /&gt;&lt;br /&gt;Want to see it on PrintFriendly.com? Click &lt;a href="http://www.printfriendly.com/print/v2?url=http%3A%2F%2Fcaglartoklu.blogspot.com%2F2011%2F06%2Fsome-customizations-on-blog-for.html"&gt;here&lt;/a&gt;. It will remove the gadgets and other giggling things, and you will see clean, printable version of this blog post. I highly recommend PrintFriendly by the way.&lt;br /&gt;&lt;br /&gt;After this modifications, the blog site is faster, more accessible, has more width in the layout, will display anyway if you use a JavaScript blocker like &lt;a href="http://noscript.net/"&gt;NoScript&lt;/a&gt; and it looks better. Have an advice? You are welcome.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-5648921862187149308?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/5648921862187149308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/some-customizations-on-blog-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/5648921862187149308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/5648921862187149308'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/some-customizations-on-blog-for.html' title='Some Customizations on the Blog for Displaying and Printing, Vim Helps'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-7843577748631312797</id><published>2011-06-24T19:04:00.002+03:00</published><updated>2011-06-27T18:03:30.247+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='web programming'/><category scheme='http://www.blogger.com/atom/ns#' term='web2py'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Standalone Usage of web2py's DAL, gluon</title><content type='html'>For a web project, I had to use the model of the &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Model-view-controller"&gt;MVC&lt;/a&gt; pattern outside the web server. I could do without it, but why to drop it if I could use the model without repeating myself? What I need, is to have a conventional web server serving a conventional web application. So far so good. But I also need to access the database from some other servers which has nothing to do with the web interface.&lt;br /&gt;&lt;br /&gt;There are many many web frameworks existing for Python. Among them, both &lt;a href="https://www.djangoproject.com/"&gt;Django&lt;/a&gt; and &lt;a href="http://www.web2py.com/"&gt;web2py&lt;/a&gt; are innovative, great ones. Of course I am not a user of all the frameworks in Python, but these two are the ones that I am focusing on. Both Django and web2py are full-stack web frameworks, that means they provide all the layers of the MVC pattern without using extensions. They are both candidate for the job.&lt;br /&gt;&lt;br /&gt;I had some constraints for this project.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The system should have an easy install. As I will use it in more than one server, I should not repeat myself in each update.&lt;/li&gt;&lt;li&gt;The model layer of the framework must run outside a web server.&lt;/li&gt;&lt;li&gt;&lt;a href="http://south.aeracode.org/docs/whataremigrations.html"&gt;Database Migration&lt;/a&gt; is preferred, but it should be controlled. &lt;/li&gt;&lt;li&gt;When I update the model, the others should not migrate, if they do, they would revert the database to the previous state. Only one migration is required. Somehow I must be able to stop them.&lt;/li&gt;&lt;li&gt;I should be able to reach my Python libraries installed in &lt;a href="http://pastebin.com/2wYp674F"&gt;site-packages&lt;/a&gt;. &lt;/li&gt;&lt;/ul&gt;Both Django(provides an &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Object_relational_mapper"&gt;ORM&lt;/a&gt;) and web2py(provides a &lt;a href="https://secure.wikimedia.org/wikipedia/en/wiki/Data_access_layer"&gt;DAL&lt;/a&gt;) seems capable for my task. Django is more explicit, web2py is more automagic. Django supports database migrations using extensions like Django-South, web2py supports migrations by default.&lt;br /&gt;&lt;br /&gt;I have attacked the problem using web2py.&lt;br /&gt;Please note that this is not a introductory tutorial for web2py, if it were, would not be better than the &lt;a href="http://web2py.com/book"&gt;official web2py book&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I am using Ubuntu 11.04 Natty amd_64, and the commands will be fully compatible with it, but there is no reason not to work for other operating systems too.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Downloading and installing web2py&lt;/b&gt;&lt;br /&gt;This is a great advantage of web2py, it has no configuration nor installation. It works out of the box. I have downloaded the &lt;a href="http://www.web2py.com/examples/default/download"&gt;source distribution&lt;/a&gt;. And just unzipped it, that's it.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Adding the standalone module&lt;/b&gt;&lt;br /&gt;Just created a directory, called "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;alone&lt;/span&gt;" in the web2py directory. This is not a "web2py application", actually it can be anywhere. Added a file "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;single_stuff.py&lt;/span&gt;" inside the directory. Overview of the directory and file structure, is this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ObJwwpeKBcs/TgSts-3-QoI/AAAAAAAAAEc/kTbzRak1ELo/s1600/directory_structure_in_web2py.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-ObJwwpeKBcs/TgSts-3-QoI/AAAAAAAAAEc/kTbzRak1ELo/s320/directory_structure_in_web2py.png" width="299" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You know what, the DAL of web2py, it can handle all my needs and constraints:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The installation is.. There is not even an installation, this constraint is already done.&lt;/li&gt;&lt;li&gt;After adding the root folder of web2py to PYTHON_PATH, only some of the modules that are related with gluon can be imported. See how to do it in the source code. Done.&lt;/li&gt;&lt;li&gt;&lt;a href="http://web2py.com/book/default/chapter/06#Migrations"&gt;Migrations&lt;/a&gt; are automatic in web2py but we can fine tune it, we can disabled migrations for some objects. Done, very done.&lt;/li&gt;&lt;li&gt;The last constraint, accessing other modules, sure it works, we did nothing unconventional. Run it as "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;python single_stuff.py&lt;/span&gt;" as usual and do whatever you like.&lt;/li&gt;&lt;/ul&gt;web2py is now the choice for me in this project, for its simple yet powerful database abstraction layer, gluon.&lt;br /&gt;&lt;br /&gt;Here is the source of the "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;single_stuff.py&lt;/span&gt;" with inline comments:&lt;br /&gt;&lt;br /&gt;Or you can directly &lt;a href="http://pastebin.com/DvXatus7"&gt;jump to see the code&lt;/a&gt; on &lt;a href="http://pastebin.com/"&gt;Pastebin&lt;/a&gt;.&lt;br /&gt;You can also &lt;a href="http://pastebin.com/download.php?i=DvXatus7"&gt;download&lt;/a&gt; whole the code from Pastebin. &lt;br /&gt;&lt;br /&gt;&lt;table cellpadding="0" cellspacing="0" style="background: #1b1d1e; color: #f8f8f2;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td colspan=""&gt;&lt;pre&gt;&lt;span style="color: #f8f8f2;"&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #e6db74;"&gt;"""&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #e6db74;"&gt;An example to use only gluon, which is the name of&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #e6db74;"&gt;web2py's data abstraction layer.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #e6db74;"&gt;"""&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #a6e22e;"&gt;import&lt;/span&gt; os&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #a6e22e;"&gt;import&lt;/span&gt; sys&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# web2py is distributed and deployed with zero configuration.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Let us follow the same approach.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# To do this, I have opened a directory called "alone" inside&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# the web2py directory, next to applications.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# I want to distribute the whole web2py directory.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# So, I want to make sure that the gluon is automatically found.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;sys.path.append(&lt;span style="color: #e6db74;"&gt;"../"&lt;/span&gt;)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# print sys.path&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #a6e22e;"&gt;from&lt;/span&gt; gluon.sql &lt;span style="color: #a6e22e;"&gt;import&lt;/span&gt; DAL, Field&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #a6e22e;"&gt;from&lt;/span&gt; gluon.validators &lt;span style="color: #a6e22e;"&gt;import&lt;/span&gt; *&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# For simplicity, we will be using SQLite.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# First, determine the path for the database file.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# We are headed for portability, so let us open the database&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# file in the same directory with this module.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;module_path = os.path.abspath(os.path.dirname(__file__))&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# print module_path # =&amp;gt; /home/alex/Projects/web2py/alone&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# This is only the file name:&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db_name = &lt;span style="color: #e6db74;"&gt;"our_db.sqlite"&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# The protocol and full path to our database file.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db = DAL(&lt;span style="color: #e6db74;"&gt;'sqlite://'&lt;/span&gt; + db_name, folder=module_path)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Define the table "genre", note that the field "id" is automatic.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.define_table(&lt;span style="color: #e6db74;"&gt;"genre"&lt;/span&gt;,&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;        Field(&lt;span style="color: #e6db74;"&gt;"name"&lt;/span&gt;))&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.genre.name.requires = IS_NOT_EMPTY()&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Define the table "band", note that the field "id" is automatic.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# band.genre_id references to genre.id field.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.define_table(&lt;span style="color: #e6db74;"&gt;"band"&lt;/span&gt;,&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;        Field(&lt;span style="color: #e6db74;"&gt;"name"&lt;/span&gt;),&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;        Field(&lt;span style="color: #e6db74;"&gt;"origin"&lt;/span&gt;),&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;        Field(&lt;span style="color: #e6db74;"&gt;"genre_id"&lt;/span&gt;, db.genre))&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.band.name.requires = IS_NOT_EMPTY()&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.band.genre_id.requires = IS_IN_DB(db, db.genre.&lt;span style="color: #a6e22e;"&gt;id&lt;/span&gt;, &lt;span style="color: #e6db74;"&gt;'%(name)s'&lt;/span&gt;)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.band.genre_id.writable = &lt;span style="color: #a6e22e;"&gt;False&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.band.genre_id.readable = &lt;span style="color: #a6e22e;"&gt;False&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Let us insert some data for table "genre".&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Each insert statement returns the unique_id.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;id_rock = db.genre.insert(name=&lt;span style="color: #e6db74;"&gt;"rock"&lt;/span&gt;)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;id_metal = db.genre.insert(name=&lt;span style="color: #e6db74;"&gt;"metal"&lt;/span&gt;)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;id_grunge = db.genre.insert(name=&lt;span style="color: #e6db74;"&gt;"grunge"&lt;/span&gt;)  &lt;span style="color: #465457;"&gt;# we will use the ID.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;id_jazz = db.genre.insert(name=&lt;span style="color: #e6db74;"&gt;"jazz"&lt;/span&gt;)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# The data will be stored only after a commit.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.commit()&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# We can also do a rollback, before a commit.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #a6e22e;"&gt;print&lt;/span&gt; db.genre.insert(name=&lt;span style="color: #e6db74;"&gt;"banana"&lt;/span&gt;)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# It will print 5 to the screen.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.rollback()&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# But it will not be stored in the database.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Let us insert some data for table "band".&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.band.insert(name=&lt;span style="color: #e6db74;"&gt;"Nirvana"&lt;/span&gt;, origin=&lt;span style="color: #e6db74;"&gt;"Aberdeen"&lt;/span&gt;, genre_id=id_grunge)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# Do not forget to commit.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;db.commit()&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# A simple select.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #f92672;"&gt;&lt;b&gt;for&lt;/b&gt;&lt;/span&gt; row &lt;span style="color: #f92672;"&gt;in&lt;/span&gt; db(db.band.name == &lt;span style="color: #e6db74;"&gt;'Nirvana'&lt;/span&gt;).select():&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;    &lt;span style="color: #a6e22e;"&gt;print&lt;/span&gt; row.name, row.origin&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;    &lt;span style="color: #465457;"&gt;#prints Nirvana Aberdeen&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# We can also take the last query.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #a6e22e;"&gt;print&lt;/span&gt; db._lastsql&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# It will print this:&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# SELECT  band.id, band.name, band.origin, band.genre_id FROM band&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# WHERE (band.name = 'Nirvana');&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# We can use free, raw SQL queries too.&lt;/span&gt;&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #a6e22e;"&gt;print&lt;/span&gt; db.executesql(&lt;span style="color: #e6db74;"&gt;'SELECT * FROM genre;'&lt;/span&gt;)&lt;br /&gt;&lt;span style="background: none repeat scroll 0% 0% rgb(35, 37, 38); color: #bcbcbc;"&gt;&lt;/span&gt;&lt;span style="color: #465457;"&gt;# [(1, u'rock'), (2, u'metal'), (3, u'grunge'), (4, u'jazz')]&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Exploring the database &lt;/b&gt;&lt;br /&gt;If you want to look into the database using a graphical manager, you can use &lt;a href="http://sqlitebrowser.sourceforge.net/"&gt;SQLite Database Browser&lt;/a&gt;, which can already be found in Ubuntu repositories, or &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager/"&gt;SQLite Manager&lt;/a&gt;, which is a &lt;a href="https://addons.mozilla.org/en-US/firefox/"&gt;Mozilla Firefox extension&lt;/a&gt; and works anywhere.&lt;br /&gt;&lt;br /&gt;Here are some screenshots after opening the database created and manipulated by "&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;single_stuff.py&lt;/span&gt;":&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-MSpqeil0Gqg/TgSyzmmSUrI/AAAAAAAAAEg/GymFQHrBJF8/s1600/band.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="92" src="http://1.bp.blogspot.com/-MSpqeil0Gqg/TgSyzmmSUrI/AAAAAAAAAEg/GymFQHrBJF8/s320/band.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-VVYh7oo5K9k/TgSy15HEx-I/AAAAAAAAAEk/tUVaBtg7B_M/s1600/genre.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-VVYh7oo5K9k/TgSy15HEx-I/AAAAAAAAAEk/tUVaBtg7B_M/s1600/genre.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;As a result, web2py is too good to be true, but it is a fact that it is so.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-7843577748631312797?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/7843577748631312797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/standalone-usage-of-web2pys-dal-gluon.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/7843577748631312797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/7843577748631312797'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/standalone-usage-of-web2pys-dal-gluon.html' title='Standalone Usage of web2py&apos;s DAL, gluon'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-ObJwwpeKBcs/TgSts-3-QoI/AAAAAAAAAEc/kTbzRak1ELo/s72-c/directory_structure_in_web2py.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-7447924690439152833</id><published>2011-06-19T16:11:00.000+03:00</published><updated>2011-06-19T16:11:52.155+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='conversion'/><category scheme='http://www.blogger.com/atom/ns#' term='annoyance'/><category scheme='http://www.blogger.com/atom/ns#' term='office suite'/><category scheme='http://www.blogger.com/atom/ns#' term='google'/><category scheme='http://www.blogger.com/atom/ns#' term='google docs'/><title type='text'>Using Google Docs to Convert Files</title><content type='html'>I am a &lt;i&gt;LibreOffice&lt;/i&gt; user. That is already too much for me, I can do anything with it. Since I am an &lt;i&gt;Ubuntu&lt;/i&gt; user, I do not have to even install that, just I am just adding some of its extensions like &lt;i&gt;PDFImport&lt;/i&gt; and &lt;i&gt;LibreOffice&lt;/i&gt; base, all from &lt;i&gt;Ubuntu&lt;/i&gt; repository. I can open, edit and save all the well known documentation formats. But this is not the case for some people:&lt;br /&gt;&lt;br /&gt;Let us say, you are an &lt;i&gt;Microsoft Office 2003&lt;/i&gt; user. And somebody keeps sending you &lt;i&gt;.odt&lt;/i&gt; or &lt;i&gt;.docx&lt;/i&gt; documents. Some of these people are even using &lt;i&gt;OpenOffice.org/LibreOffice&lt;/i&gt; but most probably because of their principles, they are sending you .odt documents which you can not open with &lt;i&gt;Microsoft Office 2003&lt;/i&gt;. The people who use &lt;i&gt;Microsoft Office 2007&lt;/i&gt; and keep sending &lt;i&gt;.docx&lt;/i&gt; documents to &lt;i&gt;Microsoft Office 2003&lt;/i&gt; users are another story, I will try to keep calm, at least for now.&lt;br /&gt;&lt;br /&gt;If you are not able to change or educate the sender, and do not want to install another office productivity suite to your system, there is also another solution : &lt;a href="https://docs.google.com/"&gt;Google Docs&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;You can upload the document there, and download in another format you can edit. Here is how to do it:&lt;br /&gt;&lt;br /&gt;All you need to use Google Docs is a Gmail account. Login to Google Docs, and upload the document.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-kxw9M8DVSS0/Tf3xXnW1zSI/AAAAAAAAAEM/sjaZsDZkeRE/s1600/Selection_005.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://1.bp.blogspot.com/-kxw9M8DVSS0/Tf3xXnW1zSI/AAAAAAAAAEM/sjaZsDZkeRE/s320/Selection_005.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;You can keep the format or let it to be converted to Google Docs format. Do not worry, it does not hurt, you can do both. Here I have had it converted.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-TtkCGFAO8do/Tf3xtt6-VLI/AAAAAAAAAEQ/58k08iREVKM/s1600/Selection_006.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="163" src="http://1.bp.blogspot.com/-TtkCGFAO8do/Tf3xtt6-VLI/AAAAAAAAAEQ/58k08iREVKM/s320/Selection_006.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Open the document you just uploaded in Google Docs.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-m-8g9dqdF0o/Tf3x-r-zWjI/AAAAAAAAAEU/XxcJEfq6qSQ/s1600/Selection_007.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="254" src="http://1.bp.blogspot.com/-m-8g9dqdF0o/Tf3x-r-zWjI/AAAAAAAAAEU/XxcJEfq6qSQ/s320/Selection_007.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now you can download the file in a format of your choice using the upper-left File menu, as in the following figure:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-lZrq8-Im_iI/Tf3yPKOt_DI/AAAAAAAAAEY/lg9c5Atbx6I/s1600/download_as.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-lZrq8-Im_iI/Tf3yPKOt_DI/AAAAAAAAAEY/lg9c5Atbx6I/s320/download_as.png" width="261" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Mister &lt;i&gt;must-send-in-docx-so-that-nobody-can-open-my-files-but-i-send-them-anyway&lt;/i&gt; &lt;i&gt;Microsoft Office 2007&lt;/i&gt; user, sorry, we can edit your files. May be you think that sending .docx files is a kind of encryption, but it is not. We can open them. Come up with something better.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-7447924690439152833?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/7447924690439152833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/using-google-docs-to-convert-files.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/7447924690439152833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/7447924690439152833'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/using-google-docs-to-convert-files.html' title='Using Google Docs to Convert Files'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-kxw9M8DVSS0/Tf3xXnW1zSI/AAAAAAAAAEM/sjaZsDZkeRE/s72-c/Selection_005.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-6414162873795555525</id><published>2011-06-14T16:54:00.003+03:00</published><updated>2011-06-27T17:57:12.970+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='reference'/><category scheme='http://www.blogger.com/atom/ns#' term='rhel'/><category scheme='http://www.blogger.com/atom/ns#' term='yum'/><title type='text'>A Reference on Yum, Yellowdog Updater, Modified</title><content type='html'>Recently, I had to mess with yum a lot. It is a powerful command line package management tool for RPM packages, and if you want to do automatic mass installations and updates, as in my case, GUI is not an option. I have collected the commands I have used among others, and created a reference.&lt;br /&gt;&lt;br /&gt;All these commands have been tested on Scientific Linux 6.0 x86_64.&lt;br /&gt;The version of yum I have used is 3.2.27.&lt;br /&gt;&lt;br /&gt;&lt;table cellspacing=0 cellpadding=0 style="color:#f8f8f2;background:#1b1d1e"&gt;&lt;tr&gt;&lt;td colspan&gt;&lt;pre&gt;&lt;font color=#f8f8f2&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# A reference to Yum, Yellowdog Updater, Modified&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# http://caglartoklu.blogspot.com&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Yum is a command line package manager for&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# RPM-compatible Linux operating systems.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;Note that these commands requires root privileges.&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# _____ Updates&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Check for availability package updates.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum check-update&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Update all installed packages.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum update&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Update a specific package.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum update package_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum update mc&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# _____ Searching and finding about what to install&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# List the depencies of a package.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum deplist package_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum deplist emacs&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Search a string in the metadata of packages.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# This metadata includes: name, summary,&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# description, url.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum search ri&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Let's say you want the command 'ri' but&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# do not know which package is providing it. Type:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum provides ri&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# and you will see that 'ruby-ri-1.8.7.299....'&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# package os providing it.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Information about a package.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Note that the package does not have to be&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# installed on your system, it will display&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# the information anyway.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum info package_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum info mc&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Install a package or packages.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum install package_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum install package_name1 package_name2&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example: yum install mc&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# List the packages.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum list all&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum list available&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum list updates&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum list installed&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum list extra&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum list obsoletes&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum list recent&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# _____ Installing and removing packages&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Remove a package or packages from your system.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum remove package_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum remove package_name1 package_name2&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# erase command can also be used.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum erase package_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum erase package_name1 package_name2&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Install a package or packages.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum install package_name1 package_name2&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum install mc emacs&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# You can also install a package for a specific&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# architecture like this:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum install package_name.architecture&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# See 'Specifying package names' in this document.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Architecture can be x86_64 or i386.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum install mc.x86_64&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Install a local RPM.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum localinstall package_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Update the distro using the RPMs saved locally.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# cd to the directory you saved your rpms, and type:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum localupdate *.rpm&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# _____ Downloading packages&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Download a package (current directory by default)&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yumdownloader package_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# If you do not have the yumdownloader,&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# install yum-utils using:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum install yum-utils&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# _____ Groups&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# See the list of groups installed:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum grouplist&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# This command will first list the installed groups,&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# then the available ones.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# After seeing the list, see the information about.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# about a group. If the group name includes a space,&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# enclose the group name with ' character.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum groupinfo group_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum groupinfo &lt;font color=#f92672&gt;'&lt;/font&gt;&lt;font color=#e6db74&gt;FTP server&lt;/font&gt;&lt;font color=#f92672&gt;'&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Install packages of a group. Note that default&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# and mandatory ones will be installed.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum groupinstall group_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum groupinstall &lt;font color=#f92672&gt;'&lt;/font&gt;&lt;font color=#e6db74&gt;FTP server&lt;/font&gt;&lt;font color=#f92672&gt;'&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Update packages of a group.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum groupupdate group_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum groupupdate &lt;font color=#f92672&gt;'&lt;/font&gt;&lt;font color=#e6db74&gt;FTP server&lt;/font&gt;&lt;font color=#f92672&gt;'&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Remove all packages of a group.&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum groupremove group_name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# Example:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum groupremove &lt;font color=#f92672&gt;'&lt;/font&gt;&lt;font color=#e6db74&gt;FTP server&lt;/font&gt;&lt;font color=#f92672&gt;'&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# _____ Specifying package names&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# A package can be referred to for install, update,&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# list, remove etc with any of the following:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;name&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;name.arch&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;name-ver&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;name-ver-rel&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;name-ver-rel.arch&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;name-epoch:ver-rel.arch&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;epoch:name-ver-rel.arch&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# _____ Shell&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# To start the interactive shell, type:&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;yum shell&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;font color=#465457&gt;# _____ References&lt;/font&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;http://www.linuxcommand.org/man_pages/yum8.html&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;http://yum.baseurl.org/&lt;br /&gt;&lt;span style="color:#bcbcbc;background:#232526"&gt;&lt;/span&gt;http://en.wikipedia.org/wiki/Yellowdog_Updater,_Modified &lt;/font&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;If you do not see the code, you may be running a JavaScript blocker. Then you can directly jump to the source of the code on Pastebin: &lt;a href="http://pastebin.com/dbCHYEh0"&gt;http://pastebin.com/dbCHYEh0&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-6414162873795555525?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/6414162873795555525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/reference-on-yum-yellowdog-updater.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/6414162873795555525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/6414162873795555525'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/reference-on-yum-yellowdog-updater.html' title='A Reference on Yum, Yellowdog Updater, Modified'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-4728300743047360382</id><published>2011-06-14T14:44:00.000+03:00</published><updated>2011-06-14T14:44:07.825+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rhel'/><category scheme='http://www.blogger.com/atom/ns#' term='yum'/><title type='text'>Enabling Caching Yum Downloads on Linux</title><content type='html'>I needed to copy the packages and updates performed on a &lt;b&gt;Scientific Linux 6.0 x86_64&lt;/b&gt; (call it A, connected to Internet) to another server(call it B). This second server has no Internet connection, and can not access to repositories but it is the main server in a project. So, I am keeping the server A as "mirror" of the server B. By this way, I can copy the updates as RPM files from server A to the unconnected server B.&lt;br /&gt;&lt;br /&gt;Here is what I did to perform it using &lt;b&gt;Yum&lt;/b&gt;:&lt;br /&gt;First, make sure that the downloaded packages are cached in server A, that is, they are not deleted after the installation. To do that become root and type&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #b4a7d6; color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;vi /etc/yum.conf&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;And edit the line starting with &lt;b&gt;keepcache&lt;/b&gt;, make sure that it is like this:&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #b4a7d6; color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;keepcache=1&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Note your &lt;b&gt;cachedir&lt;/b&gt; there.&lt;br /&gt;It is defined as&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #b4a7d6; color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;cachedir=/var/cache/yum/$basearch/$releasever&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;It is expanded in my system as:&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #b4a7d6; color: blue; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&lt;b&gt;/var/cache/yum/x86_64/6.0/sl/packages&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Now, whenever you use yum from command line or GUI, the downloaded packages can be found there and copied freely.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-4728300743047360382?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/4728300743047360382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/enabling-caching-yum-downloads-on-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4728300743047360382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4728300743047360382'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/06/enabling-caching-yum-downloads-on-linux.html' title='Enabling Caching Yum Downloads on Linux'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-2993533361801271314</id><published>2011-05-29T17:49:00.001+03:00</published><updated>2011-05-29T17:49:59.812+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='scribefire'/><category scheme='http://www.blogger.com/atom/ns#' term='blog'/><title type='text'>Testing ScribeFire</title><content type='html'>&lt;div xmlns='http://www.w3.org/1999/xhtml'&gt;There is still hope when everything seems to be lost.&lt;br/&gt;Kidding, I was not that desperate but I would be happy if I found a feasible blogging client.&lt;br/&gt;After trying Drivel, which has less features, BloGTK, which requires python-gtkhtml2 which is not found in Ubuntu repositories and Blogilo, a feature complete blogging client for KDE which experienced me crashes on my Ubuntu 11.04, I am now using ScribeFire, and this will be my first post, if everything goes well.&lt;br/&gt;&lt;br/&gt;&lt;a href='http://www.scribefire.com/'&gt;ScribeFire&lt;/a&gt;, is an extension for the &lt;a href='http://www.mozilla.com/en-US/firefox/' class='green'&gt;Mozilla Firefox Web browser&lt;/a&gt;, &lt;a href='http://chrome.google.com/' class='green'&gt;Google Chrome Web browser&lt;/a&gt;, &lt;a href='http://www.opera.com/' class='green'&gt;Opera Web Browser&lt;/a&gt;, and &lt;a href='http://www.apple.com/safari/' class='green'&gt;Apple Safari Web browser&lt;/a&gt; that allows you to easily post to all of your blogs.&lt;br/&gt;&lt;br/&gt;Since it is an extension, I can easily use it on my several computers without compatibility problems. The text is also being spell checked in my browser. It easily grabbed my previous tags (called labels in Blogspot). I can see my previous posts too.&lt;br/&gt;&lt;br/&gt;Its default shortcut is &lt;b&gt;F8&lt;/b&gt;. I have made a small configuration in settings since I want to see it in full screen, so I have chosen "new tab" option. Now I can see my text.&lt;br/&gt;&lt;br/&gt;The only thing bugs me, is uploading an image. I am not a Picasa user, may be I will switch to Flicker for pictures. We will see what happens.&lt;br/&gt;&lt;br/&gt;Now it is time to post this.&lt;br/&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class='scribefire-powered'&gt;Powered by &lt;a href='http://www.scribefire.com/'&gt;ScribeFire&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-2993533361801271314?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/2993533361801271314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/05/testing-scribefire.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/2993533361801271314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/2993533361801271314'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/05/testing-scribefire.html' title='Testing ScribeFire'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-3124249865009765446</id><published>2011-05-05T19:09:00.003+03:00</published><updated>2011-05-29T19:01:55.904+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='pastebin'/><category scheme='http://www.blogger.com/atom/ns#' term='twitter'/><title type='text'>Started Using Twitter</title><content type='html'>&lt;div style="background-color: black; color: #eeeeee;"&gt;&lt;/div&gt;&lt;br /&gt;I have started using Twitter a while ago.&lt;br /&gt;You can follow me on Twitter here:&lt;br /&gt;&lt;a href="http://twitter.com/caglartoklu"&gt;http://twitter.com/caglartoklu&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Since code posting to blogs (formatting them to HTML, etc) is time consuming, I have also created a Pastebin account here:&lt;br /&gt;&lt;a href="http://pastebin.com/u/caglartoklu"&gt;http://pastebin.com/u/caglartoklu&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-3124249865009765446?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/3124249865009765446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/05/started-using-twitter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/3124249865009765446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/3124249865009765446'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/05/started-using-twitter.html' title='Started Using Twitter'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-6054988728187102094</id><published>2011-03-31T15:36:00.012+03:00</published><updated>2011-03-31T16:36:43.493+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Running Vim from Eclipse IDE</title><content type='html'>I needed to jump from Eclipse to Vim sometimes.&lt;br /&gt;&lt;br /&gt;Although there are lots of ways to do this, my way is simple, I will just add a menu item to Eclipse to open the current file/resource in Vim, save it in Vim, and see the effect in Eclipse.&lt;br /&gt;&lt;br /&gt;You can find some links to alternative methods and programs at the end of this blog according to your needs. By using these more powerful solutions, you will be able to emulate Vim in Eclipse, or you will have the Vi keys in Eclipse or even you can contain the Vim itself in Eclipse.&lt;br /&gt;&lt;br /&gt;By the time, my Eclipse version is &lt;a href="http://www.eclipse.org/helios/"&gt;Helios Service Release 1&lt;/a&gt; and I'm using the &lt;a href="http://portableapps.com/apps/development/gvim_portable"&gt;gVimPortable&lt;/a&gt; from &lt;a href="http://portableapps.com/"&gt;PortableApps&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Now it is time to launch Eclipse. Eclipse has an external tools feature which we will be using. First, click &lt;span style="font-weight:bold;"&gt;Run&lt;/span&gt; and then &lt;span style="font-weight:bold;"&gt;External Tools&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;External Tools Configurations...&lt;/span&gt; as in the following figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/-dqGx1EWKj_k/TZR6O2n6kbI/AAAAAAAAADQ/ZeK_B4zF5tk/s1600/01_external_command_menu.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 261px; height: 320px;" src="http://4.bp.blogspot.com/-dqGx1EWKj_k/TZR6O2n6kbI/AAAAAAAAADQ/ZeK_B4zF5tk/s320/01_external_command_menu.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5590227433073316274" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This will open a dialog titled &lt;span style="font-weight:bold;"&gt;External Tools Configurations&lt;/span&gt;. Since we will be adding a new program configuration, choose &lt;span style="font-weight:bold;"&gt;Program&lt;/span&gt; and then click on the icon of &lt;span style="font-weight:bold;"&gt;New launch configuration&lt;/span&gt; at the top left as in the following figure.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-Aab1YBtLDCY/TZR58V2Kk1I/AAAAAAAAADI/Tq9f8CNoP0s/s1600/02_new_launch_configuration.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 162px;" src="http://2.bp.blogspot.com/-Aab1YBtLDCY/TZR58V2Kk1I/AAAAAAAAADI/Tq9f8CNoP0s/s320/02_new_launch_configuration.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5590227115037070162" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, give a descriptive &lt;span style="font-weight:bold;"&gt;Name&lt;/span&gt; for the task. Here, I will use the name "&lt;span style="font-weight:bold;"&gt;Open with Vim&lt;/span&gt;". Also we need to indicate the &lt;span style="font-weight:bold;"&gt;Location&lt;/span&gt; which is the path to the executable. In my system, it was "&lt;span style="font-weight:bold;"&gt;C:\PortableApps\PortableApps\gVimPortable\gVimPortable.exe&lt;/span&gt;", but it can be different on your system. Set the &lt;span style="font-weight:bold;"&gt;Working Directory&lt;/span&gt; to "&lt;span style="font-weight:bold;"&gt;${container_loc}&lt;/span&gt;" and &lt;span style="font-weight:bold;http://www.blogger.com/img/blank.gif"&gt;Arguments&lt;/span&gt; to "&lt;span style="font-weight:bold;"&gt;${resource_loc}&lt;/span&gt;". You can also have the same effect of changing working directory by using "&lt;span style="font-weight:bold;"&gt;set autochdir&lt;/span&gt;" in your vimrc. Sadly, I could not find a way to send the line number of the cursor from Eclipse. If I could, Vim could directly jump to that line like in my blog entry &lt;a href="http://caglartoklu.blogspot.com/2010/03/running-vim-from-lazarus-ide.html"&gt;Running Vim from Lazarus IDE&lt;/a&gt;. The tab &lt;span style="font-weight:bold;"&gt;Main&lt;/span&gt; should look like as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/-t0eOVqXimJ4/TZR_IxDLigI/AAAAAAAAADY/hHqYoQOP-EQ/s1600/03_command_and_arguments.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 288px;" src="http://1.bp.blogspot.com/-t0eOVqXimJ4/TZR_IxDLigI/AAAAAAAAADY/hHqYoQOP-EQ/s320/03_command_and_arguments.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5590232826055985666" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;By the way, clicking on &lt;span style="font-weight:bold;"&gt;Variables&lt;/span&gt; will give you more options as follows. Keep in mind that you can use all of these options.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-MQ2ZiNC59gA/TZSAItHxKYI/AAAAAAAAADo/GW-T6cKE8RA/s1600/033_variables.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 266px; height: 320px;" src="http://2.bp.blogspot.com/-MQ2ZiNC59gA/TZSAItHxKYI/AAAAAAAAADo/GW-T6cKE8RA/s320/033_variables.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5590233924513114498" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, jump to the tab &lt;span style="font-weight:bold;"&gt;Refresh&lt;/span&gt; and activate the option &lt;span style="font-weight:bold;"&gt;Refresh resources upon completion.&lt;/span&gt;. This way, you can also open other files of the project in Vim and Eclipse will refresh them. I also recommend to keep the option &lt;span style="font-weight:bold;"&gt;Recursively include sub-folders&lt;/span&gt; activated like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-ZirB83w-n5Y/TZR_57bhcLI/AAAAAAAAADg/5zDo9KY0Zd8/s1600/04_refresh.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 288px;" src="http://3.bp.blogspot.com/-ZirB83w-n5Y/TZR_57bhcLI/AAAAAAAAADg/5zDo9KY0Zd8/s320/04_refresh.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5590233670656028850" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now, apply and close the &lt;span style="font-weight:bold;"&gt;External Tools Configurations&lt;/span&gt; dialog. Open a file from your workspace, and click &lt;span style="font-weight:bold;"&gt;Run&lt;/span&gt; and &lt;span style="font-weight:bold;"&gt;Open with Vim&lt;/span&gt; (or whatever you have named it) to open your file in Vim as in the following figures:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-ZRoNjJEyCyw/TZSA5iDSbeI/AAAAAAAAADw/Mg7voRlfepQ/s1600/05_run_it.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 122px;" src="http://3.bp.blogspot.com/-ZRoNjJEyCyw/TZSA5iDSbeI/AAAAAAAAADw/Mg7voRlfepQ/s320/05_run_it.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5590234763355123170" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-Cd8fV5Z63a8/TZSA_Xae-EI/AAAAAAAAAD4/iU_Zjh4RayE/s1600/06_vim.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 231px;" src="http://2.bp.blogspot.com/-Cd8fV5Z63a8/TZSA_Xae-EI/AAAAAAAAAD4/iU_Zjh4RayE/s320/06_vim.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5590234http://www.blogger.com/img/blank.gif863578839106" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is a very very simple way to connect Eclipse and Vim. There are more approaches here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://eclim.org/"&gt;Eclim&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;The primary goal of eclim is to bring Eclipse functionality to the Vim editor. The initial goal was to provide Eclipse’s java functionality in vim, but support for various other languages (c/c++, php, python, ruby, css, html, xml, etc.) have been added and several more are planned. That is where eclim comes into play. Instead of trying to write an IDE in Vim or a Vim editor in Eclipse, eclim provides an Eclipse plug-in that exposes Eclipse features through a server interface, and a set of Vim plug-ins that communicate with Eclipse over that interface.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://sourceforge.net/projects/vimplugin/"&gt;Vimplugin&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Vimplugin is an attempt to use the vim editor inside the eclipse IDE. This is handy especially for longtime vim users. But other users (say occasional vim users) can also profit: macros, regexes, syntax-highlighting for 1001 languages etcpp.&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://vrapper.sourceforge.net/home/"&gt;Vrapper - Vim-like editing in Eclipse&lt;/a&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;Vrapper is an eclipse plugin which acts as a wrapper for eclipse text editors to provide a Vim-like input scheme for moving around and editing text. Unlike other plugins which embed Vim in Eclipse, Vrapper imitates the behaviour of Vim while still using whatever editor you have opened in the workbench. The goal is to have the comfort and ease which comes with the different modes, complex commands and count/operator/motion combinations which are the key features behind editing with Vim, while preserving the powerful features of the different Eclipse text editors, like code generation and refactoring.&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-6054988728187102094?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/6054988728187102094/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2011/03/running-vim-from-eclipse-ide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/6054988728187102094'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/6054988728187102094'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2011/03/running-vim-from-eclipse-ide.html' title='Running Vim from Eclipse IDE'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-dqGx1EWKj_k/TZR6O2n6kbI/AAAAAAAAADQ/ZeK_B4zF5tk/s72-c/01_external_command_menu.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-7774250222138764836</id><published>2010-03-10T19:06:00.007+02:00</published><updated>2010-03-10T19:35:31.483+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='free pascal compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='lazarus'/><title type='text'>Running Vim from Lazarus IDE</title><content type='html'>I would like to edit my program both in &lt;a href="http://www.lazarus.freepascal.org/"&gt;Lazarus IDE&lt;/a&gt; and &lt;a href="http://www.vim.org/"&gt;Vim&lt;/a&gt;. Lazarus IDE is good, but Vim is faster for hard core text processing. Thanks to both of them, this task is easy.&lt;br /&gt;&lt;br /&gt;First step is to launch Lazarus IDE, and selecting "&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;Configure external tools ...&lt;/span&gt;" from the "&lt;span style="color: rgb(0, 0, 152);font-family:courier new;" &gt;Tools&lt;/span&gt;" menu.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_duBjCH1UDvY/S5fTdhqBCxI/AAAAAAAAACQ/qYgAvxo-e_w/s1600-h/Lazarus_and_Vim_01.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 86px;" src="http://1.bp.blogspot.com/_duBjCH1UDvY/S5fTdhqBCxI/AAAAAAAAACQ/qYgAvxo-e_w/s320/Lazarus_and_Vim_01.png" alt="" id="BLOGGER_PHOTO_ID_5447054778532170514" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next step is trivial, just adding a new entry by clicking "&lt;span style="color: rgb(0, 0, 153);font-family:courier new;" &gt;Add&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_duBjCH1UDvY/S5fT610OTdI/AAAAAAAAACY/m_nM2xz_YWY/s1600-h/Lazarus_and_Vim_02.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 290px;" src="http://3.bp.blogspot.com/_duBjCH1UDvY/S5fT610OTdI/AAAAAAAAACY/m_nM2xz_YWY/s320/Lazarus_and_Vim_02.png" alt="" id="BLOGGER_PHOTO_ID_5447055282159898066" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;In the final step, type the following information into specified fields.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-style: italic;"&gt;Title:&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(51, 0, 153);"&gt;Edit with Vim&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-style: italic;"&gt;Program File Name:&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(51, 0, 153);"&gt;C:\PortableApps\PortableApps\gVimPortable\gVimPortable.exe&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-style: italic;"&gt;Parameters:&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(51, 0, 153);"&gt;+$Row() "$EdFile()"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-style: italic;"&gt;Working Directory:&lt;/span&gt; &lt;span style="font-weight: bold; color: rgb(51, 0, 153);"&gt;$Path()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 153);"&gt;+$Row()&lt;/span&gt;&lt;/span&gt; allows Vim to directly locate the cursor when the file is opened so that you can keep going on, very useful for large files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 153);"&gt;"$EdFile()"&lt;/span&gt;&lt;/span&gt; is the full path to the file. Note that this will work even though you have a single file on Lazarus, not a project. (If you want that, there are options for that too.)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-weight: bold; color: rgb(51, 0, 153);"&gt;$Path() &lt;/span&gt;&lt;/span&gt;is the working directory of the file. It will be useful to locate that directory so that you can easily open more files from Vim.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After all, your final screen should look like this:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_duBjCH1UDvY/S5fXMO70YGI/AAAAAAAAACg/R3al90IQ1GE/s1600-h/Lazarus_and_Vim_03.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 258px;" src="http://2.bp.blogspot.com/_duBjCH1UDvY/S5fXMO70YGI/AAAAAAAAACg/R3al90IQ1GE/s320/Lazarus_and_Vim_03.png" alt="" id="BLOGGER_PHOTO_ID_5447058879495299170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can now open a file from Lazarus IDE in Vim as follows:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_duBjCH1UDvY/S5fXzmkJbcI/AAAAAAAAACo/Wk2dwXS--dM/s1600-h/Lazarus_and_Vim_04.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 74px;" src="http://1.bp.blogspot.com/_duBjCH1UDvY/S5fXzmkJbcI/AAAAAAAAACo/Wk2dwXS--dM/s320/Lazarus_and_Vim_04.png" alt="" id="BLOGGER_PHOTO_ID_5447059555853364674" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note that you should have a file opened it must be saved to appear in Vim.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-7774250222138764836?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/7774250222138764836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2010/03/running-vim-from-lazarus-ide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/7774250222138764836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/7774250222138764836'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2010/03/running-vim-from-lazarus-ide.html' title='Running Vim from Lazarus IDE'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_duBjCH1UDvY/S5fTdhqBCxI/AAAAAAAAACQ/qYgAvxo-e_w/s72-c/Lazarus_and_Vim_01.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-4788141280308026230</id><published>2009-12-27T19:24:00.009+02:00</published><updated>2009-12-27T19:48:23.331+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ironpython'/><title type='text'>Using CPython modules from IronPython</title><content type='html'>I have &lt;a href="http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=12482" target="_blank"&gt;IronPython 2.6&lt;/a&gt; and &lt;a href="http://www.python.org/download/releases/2.6.4/" target="_blank"&gt;Python 2.6.4&lt;/a&gt; installed on a Windows box.&lt;br /&gt;&lt;br /&gt;IronPython's interpreter ipy.exe is not installed on a directory on path, just unzipped in an arbitrary folder.&lt;br /&gt;Python 2.6.4 is installed in &lt;span style="font-family:monospace;"&gt;C:\Python26&lt;/span&gt; directory.&lt;br /&gt;&lt;br /&gt;You can import pure CPython modules from IronPython as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;C:\Users\dude\Documents\SharpDevelop Projects\Faman5&gt;ipy&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;IronPython 2.6 (2.6.10920.0) on .NET 2.0.50727.4927&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;Type "help", "copyright", "credits" or "license" for more information.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;# Try to import the os module.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(255, 153, 0);"&gt;import os&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;Traceback (most recent call last):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;  File "&lt;stdin&gt;", line 1, in &lt;module&gt;&lt;/module&gt;&lt;/stdin&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;ImportError: No module named os&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(255, 153, 0);"&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;# OK, we are sure that the module is can not be imported.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;# Now we need to import the sys module to achive our goal.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(255, 153, 0);"&gt;import sys&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;# sys.path is the list of directories to look for when importing modules.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(255, 153, 0);"&gt;sys.path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;['.', '.', 'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5', 'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5\\Lib', 'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5\\DLLs', 'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5']&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;# Add the Cpython path to the sys.path as follows:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(255, 153, 0);"&gt;sys.path.append("C:\Python26\Lib")&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(255, 153, 0);"&gt;sys.path&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;['.', '.', 'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5', 'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5\\Lib', 'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5\\DLLs', 'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5', 'C:\\Python26\\Lib']&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;# Now we are sure that &lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);font-family:monospace;" &gt;'C:\\Python26\\Lib' is added.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;# Let us try to import the os module again.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(255, 153, 0);"&gt;import os&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(255, 153, 0);"&gt;os.getcwd()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;'C:\\Users\\dude\\Documents\\SharpDevelop Projects\\Faman5'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&gt;&gt;&gt; &lt;span style="color: rgb(0, 153, 0);"&gt;# Success!&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-4788141280308026230?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/4788141280308026230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2009/12/using-cpython-modules-from-ironpython.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4788141280308026230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4788141280308026230'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2009/12/using-cpython-modules-from-ironpython.html' title='Using CPython modules from IronPython'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-7332634021979220245</id><published>2009-12-03T16:42:00.005+02:00</published><updated>2009-12-03T16:47:48.604+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MIB'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='SNMP'/><category scheme='http://www.blogger.com/atom/ns#' term='OID'/><title type='text'>SNMP OID translator plugin for Vim</title><content type='html'>I have written an SNMP OID translator plugin for Vim.&lt;br /&gt;By using this plugin, one can translate OIDs directly within Vim without exiting from the editor.&lt;br /&gt;I find it useful for discovering the MIB files, and translating while reading them.&lt;br /&gt;&lt;br /&gt;Note that you have to have &lt;a href="http://www.net-snmp.org/"&gt;Net-SNMP&lt;/a&gt; installed on your system.&lt;br /&gt;&lt;a href="http://www.net-snmp.org/"&gt;http://www.net-snmp.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can see the detais and download the plugin from the following link:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=2881"&gt;http://www.vim.org/scripts/script.php?script_id=2881&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is a screenshot of the plugin.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_duBjCH1UDvY/SxfOkXF03oI/AAAAAAAAACE/F1l1m7TVSAw/s1600-h/MibTranslator.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 241px;" src="http://3.bp.blogspot.com/_duBjCH1UDvY/SxfOkXF03oI/AAAAAAAAACE/F1l1m7TVSAw/s320/MibTranslator.png" alt="" id="BLOGGER_PHOTO_ID_5411020601378004610" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-7332634021979220245?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/7332634021979220245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2009/12/snmp-oid-translator-plugin-for-vim.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/7332634021979220245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/7332634021979220245'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2009/12/snmp-oid-translator-plugin-for-vim.html' title='SNMP OID translator plugin for Vim'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_duBjCH1UDvY/SxfOkXF03oI/AAAAAAAAACE/F1l1m7TVSAw/s72-c/MibTranslator.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-2616723034631889450</id><published>2009-12-03T16:16:00.005+02:00</published><updated>2009-12-03T16:27:16.343+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='fortran'/><title type='text'>FORTRAN valid line length plugin for Vim</title><content type='html'>I have written a Vim plugin to help my FORTRAN coding in Vim.&lt;br /&gt;&lt;br /&gt;According to the file extension of a FORTRAN source file, this plugin sets a valid line length. Any characters occurring after this column are considered as error, and are matched so by highlighting.&lt;br /&gt;&lt;br /&gt;This plugin is run automatically. But, if you want to use any other valid size for some reason, the commands are available.&lt;br /&gt;&lt;br /&gt;You can download the plugin from the following link.&lt;br /&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=2868"&gt;http://www.vim.org/scripts/script.php?script_id=2868&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The following commands are available after installing this plugin.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold; color: rgb(0, 0, 153);"&gt;:FORTRANLengthAccordingToExtension&lt;/span&gt;&lt;br /&gt;  Sets the valid line length according to the file extension.&lt;br /&gt;  This command is applied by default.&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold; color: rgb(0, 0, 153);"&gt;:FORTRANStandardLength72&lt;/span&gt;&lt;br /&gt;  The columns occurring after the 72nd character are marked.&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 0, 153); font-weight: bold;"&gt;:FORTRANCardImageLength80&lt;/span&gt;&lt;br /&gt;  The columns occurring after the 80th character are marked.&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold; color: rgb(0, 0, 153);"&gt;:FORTRANExtendedLength132&lt;/span&gt;&lt;br /&gt;  The columns occurring after the 132nd character are marked.&lt;br /&gt;&lt;span style="font-family: courier new; color: rgb(0, 0, 153); font-weight: bold;"&gt;:FORTRANRemoveMatching&lt;/span&gt;&lt;br /&gt;  Removes the matching set by this plugin.&lt;br /&gt;&lt;br /&gt;Here is the screenshot of the plugin. (Colorscheme is Molokai).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_duBjCH1UDvY/SxfJk6ulH_I/AAAAAAAAAB8/YJXx4-xFIH8/s1600-h/fortran_line_length.png"&gt;&lt;img style="cursor: pointer; width: 320px; height: 180px;" src="http://2.bp.blogspot.com/_duBjCH1UDvY/SxfJk6ulH_I/AAAAAAAAAB8/YJXx4-xFIH8/s320/fortran_line_length.png" alt="" id="BLOGGER_PHOTO_ID_5411015113386041330" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold; color: rgb(0, 0, 153);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-2616723034631889450?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/2616723034631889450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2009/12/fortran-valid-line-length-plugin-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/2616723034631889450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/2616723034631889450'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2009/12/fortran-valid-line-length-plugin-for.html' title='FORTRAN valid line length plugin for Vim'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_duBjCH1UDvY/SxfJk6ulH_I/AAAAAAAAAB8/YJXx4-xFIH8/s72-c/fortran_line_length.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-4259534587053329374</id><published>2009-06-29T11:14:00.012+03:00</published><updated>2009-06-29T15:41:33.314+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='freebasic'/><category scheme='http://www.blogger.com/atom/ns#' term='basic'/><category scheme='http://www.blogger.com/atom/ns#' term='compiler'/><title type='text'>Vim compiler plugin for FreeBASIC</title><content type='html'>I have uploaded a &lt;a href="http://www.vim.org/"&gt;Vim&lt;/a&gt; compiler plugin for &lt;a href="http://www.freebasic.net/"&gt;FreeBASIC&lt;/a&gt;.&lt;br /&gt;You can download the &lt;a href="http://www.vim.org/scripts/script.php?script_id=2691"&gt;fbc.vim&lt;/a&gt; at&lt;br /&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=2691"&gt;http://www.vim.org/scripts/script.php?script_id=2691&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For the following code:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_duBjCH1UDvY/Skh6wxjiObI/AAAAAAAAAB0/PEiX5LyY4V8/s1600-h/fbc.vim_demo_code.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 192px;" src="http://4.bp.blogspot.com/_duBjCH1UDvY/Skh6wxjiObI/AAAAAAAAAB0/PEiX5LyY4V8/s320/fbc.vim_demo_code.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5352663135484524978" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;the&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:12px;"&gt;:make&lt;br /&gt;&lt;/div&gt;command produces an output as follows:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_duBjCH1UDvY/Skh6SjYeX3I/AAAAAAAAABs/dDdDvu_q7hQ/s1600-h/fbc.vim.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 237px;" src="http://3.bp.blogspot.com/_duBjCH1UDvY/Skh6SjYeX3I/AAAAAAAAABs/dDdDvu_q7hQ/s320/fbc.vim.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5352662616283963250" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Traditonally, you can see the all error messages with&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:12px;"&gt;:cl&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;you can jump to next error with&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:12px;"&gt;:cn&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;and you can jump to the previous error message with&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:12px;"&gt;:cp&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;To install it, copy the script into your compiler folder. Assuming standart installations, it should be&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:12px;"&gt;C:\Program Files\Vim\vimfiles\compiler\&lt;/div&gt; in Microsoft Windows, and&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:12px;"&gt;$HOME/.vim/compiler&lt;/div&gt; in Linux operating systems.&lt;br /&gt;&lt;br /&gt;In Vim, the compiler plugins are not automatically triggered unlike file type plugins. To set it whenever you need, use the command&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:12px;"&gt;&lt;span style="background-color: #232526"&gt;&lt;font color="#bcbcbc"&gt;1 &lt;/font&gt;&lt;/span&gt;&lt;font color="#f92672"&gt;&lt;b&gt;:compiler&lt;/b&gt;&lt;/font&gt;&amp;nbsp;fbc&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;To set it once and for all if a .bas file is edited, type the following into your VIMRC file:&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:12px;"&gt;&lt;span style="background-color: #232526"&gt;&lt;font color="#bcbcbc"&gt;1 &lt;/font&gt;&lt;/span&gt;&lt;font color="#f92672"&gt;&lt;b&gt;autocmd&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color="#66d9ef"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#66d9ef"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.bas&amp;nbsp;&lt;font color="#f92672"&gt;&lt;b&gt;compiler&lt;/b&gt;&lt;/font&gt;&amp;nbsp;fbc&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If you need a syntax file for the upcoming FreeBASIC 0.21, you can download a syntax file at &lt;a href="http://cubaxd.net/?en&amp;p=syntaxfile"&gt;http://cubaxd.net/?en&amp;p=syntaxfile&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-4259534587053329374?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/4259534587053329374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2009/06/vim-compiler-plugin-for-freebasic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4259534587053329374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4259534587053329374'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2009/06/vim-compiler-plugin-for-freebasic.html' title='Vim compiler plugin for FreeBASIC'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_duBjCH1UDvY/Skh6wxjiObI/AAAAAAAAAB0/PEiX5LyY4V8/s72-c/fbc.vim_demo_code.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-4691818099298756444</id><published>2009-06-05T17:18:00.014+03:00</published><updated>2009-06-05T20:30:26.799+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='free pascal compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><category scheme='http://www.blogger.com/atom/ns#' term='plugin'/><category scheme='http://www.blogger.com/atom/ns#' term='color'/><category scheme='http://www.blogger.com/atom/ns#' term='pascal'/><category scheme='http://www.blogger.com/atom/ns#' term='compiler'/><category scheme='http://www.blogger.com/atom/ns#' term='syntax'/><title type='text'>Delphi Pascal/Object Pascal editing in Vim</title><content type='html'>Here are a few Vim plugins for Pascal editing.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Compiler&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1376"&gt;fpc.vim : "Free Pascal Compiler" compiler plugin&lt;/a&gt;&lt;br /&gt;It can already be bundled in your Vim. If it is not, you can download it. After opening a .pas file, type&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier"&gt;:compiler fpc&lt;br /&gt;&lt;/div&gt;Compiler plugins are not loaded automatically in Vim. You'll have to load them explicitly.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Syntax&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=60"&gt;Syntax file for Borlands Delphi/Kylix&lt;/a&gt;&lt;br /&gt;Vim 7 is already bundled with Pascal syntax plugin. But Object Pascal is more than that. To colorize the keywords of Object Pascal, you can use this plugin which is derived from the original Pascal syntax plugin.&lt;br /&gt;&lt;br /&gt;Note that although this plugin is a syntax file, if you look in the script, you will see that it also contains color codes. That is why you will not see the color scheme you selected if you have this plugin. To overcome this issue, you can delete the following lines from the delphi.vim :&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier,'Lucida Console','DejaVu Sans Mono'; font-size:9px;"&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;261 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalObject&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=white&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=white&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;italic&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;262 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalFunction&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=LightRed&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Orange&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;263 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalStatement&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;264 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalNumber&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=LightBlue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=LightBlue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;265 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalByte&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=LightRed&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=LightRed&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;bold&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;266 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalString&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=LightBlue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=LightBlue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;267 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalMatrixDelimiter&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=lightred&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=lightred&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;268 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalConditional&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;269 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalConstant&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=white&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=white&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;270 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalModifier&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;271 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=white&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=white&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;272 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalStructure&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;273 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalRepeat&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;274 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalOperator&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;275 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalAssignment&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Magenta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Magenta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;276 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalComment&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=LightBlue&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=&lt;font color="#dfaf87"&gt;#00A0A0&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;italic&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;277 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalLabel&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Green&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;278 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalDelimiter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Yellow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Yellow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;279 &lt;/font&gt;&lt;font color="#87afdf"&gt;hi&lt;/font&gt;&amp;nbsp;pascalComparator&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;ctermfg&lt;/font&gt;=Yellow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;guifg&lt;/font&gt;=Yellow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color="#afafdf"&gt;gui&lt;/font&gt;=&lt;font color="#afdf87"&gt;NONE&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;I should remind you that the colors are not bad though. Delete them if you want to use the color scheme selected; otherwise leave it as it is, it just works.&lt;br /&gt;If you are curious, here is the screenshot of the colors provided by the syntax plugin:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_duBjCH1UDvY/Sik1Xc-mVXI/AAAAAAAAAAs/JlKRRUIdCwA/s1600-h/ScreenshotOfDelphiSyntaxPlugin.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 262px;" src="http://3.bp.blogspot.com/_duBjCH1UDvY/Sik1Xc-mVXI/AAAAAAAAAAs/JlKRRUIdCwA/s320/ScreenshotOfDelphiSyntaxPlugin.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5343861109883819378" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Also the author of this plugin provides some code to be put on your .vimrc and it is quite useful.&lt;br /&gt;This is the code to be put on your .vimrc:&lt;br /&gt;&lt;div style="background-color: #000000; color:#eeeeee; font-family:'Courier New', Courier; font-size:12px"&gt;&lt;font color="#a8a8a8"&gt;&amp;nbsp;1 &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot; Pascal / Delphi&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;&amp;nbsp;2 &lt;/font&gt;&lt;font color="#87afdf"&gt;if&lt;/font&gt;&amp;nbsp;&lt;font color="#87afdf"&gt;(&lt;/font&gt;&lt;font color="#dfaf87"&gt;1&lt;/font&gt;&lt;font color="#87afdf"&gt;==&lt;/font&gt;&lt;font color="#dfaf87"&gt;1&lt;/font&gt;&lt;font color="#87afdf"&gt;)&lt;/font&gt;&amp;nbsp;&lt;font color="#808080"&gt;&amp;quot;change to 1==0 to use original syntax&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;&amp;nbsp;3 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.pas,*.PAS&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=delphi&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;&amp;nbsp;4 &lt;/font&gt;&lt;font color="#87afdf"&gt;else&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;&amp;nbsp;5 &lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.pas,*.PAS&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=pascal&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;&amp;nbsp;6 &lt;/font&gt;&lt;font color="#87afdf"&gt;endif&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;&amp;nbsp;7 &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot; Delphi project file&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;&amp;nbsp;8 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.dpr,*.DPR&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=delphi&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;&amp;nbsp;9 &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot; Delphi form file&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;10 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.dfm,*.DFM&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=delphi&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;11 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.xfm,*.XFM&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=delphi&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;12 &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot; Delphi package file&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;13 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.dpk,*.DPK&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=delphi&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;14 &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot; Delphi .DOF file = INI file for MSDOS&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;15 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.dof,*.DOF&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=dosini&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;16 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.kof,*.KOF&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=dosini&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;17 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.dsk,*.DSK&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=dosini&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;18 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.desk,*.DESK&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=dosini&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;19 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.dti,*.DTI&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=dosini&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;20 &lt;/font&gt;&lt;font color="#808080"&gt;&amp;quot; Delphi .BPG = Makefile&lt;/font&gt;&lt;br /&gt;    &lt;font color="#a8a8a8"&gt;21 &lt;/font&gt;&lt;font color="#87afdf"&gt;au&lt;/font&gt;&amp;nbsp;&lt;font color="#afafdf"&gt;BufNewFile&lt;/font&gt;,&lt;font color="#afafdf"&gt;BufRead&lt;/font&gt;&amp;nbsp;*.bpg,*.BPG&amp;nbsp;&lt;font color="#87afdf"&gt;set&lt;/font&gt;&amp;nbsp;&lt;font color="#afdf87"&gt;ft&lt;/font&gt;=make|setlocal &lt;font color="#afdf87"&gt;makeprg&lt;/font&gt;=make\ -f\ %&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Color Schemes&lt;/span&gt;&lt;br /&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1476"&gt;Delphi color scheme&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_duBjCH1UDvY/Sik2S3xTdsI/AAAAAAAAABE/67Ycccd380o/s1600-h/DelphiColorScheme.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 262px;" src="http://2.bp.blogspot.com/_duBjCH1UDvY/Sik2S3xTdsI/AAAAAAAAABE/67Ycccd380o/s320/DelphiColorScheme.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5343862130688095938" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=1185"&gt;Turbo color scheme&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_duBjCH1UDvY/Sik2HwWeDMI/AAAAAAAAAA8/3vV6fp3lC5k/s1600-h/TurboColorScheme.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 262px;" src="http://1.bp.blogspot.com/_duBjCH1UDvY/Sik2HwWeDMI/AAAAAAAAAA8/3vV6fp3lC5k/s320/TurboColorScheme.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5343861939717934274" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.vim.org/scripts/script.php?script_id=92"&gt;Borland color scheme&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_duBjCH1UDvY/Sik1-5XphYI/AAAAAAAAAA0/NsrsdypLocg/s1600-h/BorlandColorScheme.png"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 320px; height: 262px;" src="http://4.bp.blogspot.com/_duBjCH1UDvY/Sik1-5XphYI/AAAAAAAAAA0/NsrsdypLocg/s320/BorlandColorScheme.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5343861787519976834" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-4691818099298756444?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/4691818099298756444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2009/06/delphi-pascalobject-pascal-editing-vim.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4691818099298756444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4691818099298756444'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2009/06/delphi-pascalobject-pascal-editing-vim.html' title='Delphi Pascal/Object Pascal editing in Vim'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_duBjCH1UDvY/Sik1Xc-mVXI/AAAAAAAAAAs/JlKRRUIdCwA/s72-c/ScreenshotOfDelphiSyntaxPlugin.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-4645820560520232389</id><published>2009-06-04T20:03:00.001+03:00</published><updated>2009-06-04T22:21:58.515+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='ironpython'/><title type='text'>IronPython and C#, Hosting/Embedding, Part I</title><content type='html'>As &lt;a href="http://www.codeplex.com/IronPython"&gt;IronPython&lt;/a&gt; improves, the way to embed it in other applications is changed too. It is constantly becoming easier and more general. When the C# 4.0 is released, it will be even more easier and useful.&lt;br /&gt;&lt;br /&gt;I have written a simple hosting example for the current stable version. I have used &lt;a href="http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=12481"&gt;IronPython 2.0.1&lt;/a&gt;, Visual Studio 2005 SP1, and .NET Framework 2.0 SP2. This example has not been tested with &lt;a href="http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=25126"&gt;IronPython 2.6 Beta 1&lt;/a&gt; nor &lt;a href="http://ironpython.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27320"&gt;IronPython 2.6 for .NET 4.0 Beta 1&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The example code can be seen as follows:&lt;br /&gt;&lt;div   style="background-color: rgb(0, 0, 0); color: rgb(238, 238, 238);font-family:'Courier New','Lucida Console','DejaVu Sans Mono';font-size:10px;"&gt;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 1 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span style="color: rgb(170, 170, 119);"&gt;namespace&lt;/span&gt; IronPythonHostingExample&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 2 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;{&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 3 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: rgb(255, 102, 0);"&gt;using&lt;/span&gt; System;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 4 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: rgb(255, 102, 0);"&gt;using&lt;/span&gt; IronPython.Hosting;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 5 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: rgb(255, 102, 0);"&gt;using&lt;/span&gt; Microsoft.Scripting.Hosting;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 6 &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 7 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: rgb(170, 170, 119);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(170, 170, 119);"&gt;class&lt;/span&gt; IronPythonStatementHostingExample&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 8 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt; 9 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: rgb(170, 170, 119);"&gt;public&lt;/span&gt; &lt;span style="color: rgb(170, 170, 119);"&gt;static&lt;/span&gt; &lt;span style="color: rgb(170, 170, 119);"&gt;void&lt;/span&gt; ShowDemo()&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;10 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;11 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(&lt;span style="color: rgb(51, 153, 153);"&gt;null&lt;/span&gt;);&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;12 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptRuntime runtime = &lt;span style="color: rgb(255, 102, 0);"&gt;new&lt;/span&gt; ScriptRuntime(setup);&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;13 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptEngine engine = Python.GetEngine(runtime);&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;14 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptScope scope = engine.CreateScope();&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;15 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptSource source;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;16 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style="color: rgb(170, 170, 119);"&gt;string&lt;/span&gt; sourceCode = &lt;span style="color: rgb(170, 170, 119);"&gt;string&lt;/span&gt;.Empty;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;17 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"def factorial(n):"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;18 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f = 1"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;19 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i = 1"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;20 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (i &amp;gt; n):"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;21 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return -1"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;22 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;while (i &amp;lt; n):"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;23 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;f = f * i"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;24 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;i = i + 1"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;25 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return f"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;26 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"def add_two_numbers(n1, n2):"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;27 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return n1+n2"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;28 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"for i in range(5):"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;29 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print i"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;30 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"print factorial(5)"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;31 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"print factorial(-4)"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;32 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sourceCode += &lt;span style="color: rgb(102, 255, 0);"&gt;"print add_two_numbers(1, 2)"&lt;/span&gt; + Environment.NewLine;&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;33 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;source = scope.Engine.CreateScriptSourceFromString(sourceCode, Microsoft.Scripting.SourceCodeKind.Statements);&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;34 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;source.Execute(scope);&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;35 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;36 &lt;/span&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;span style="background-color: rgb(34, 34, 34);"&gt;&lt;span style="color: rgb(221, 238, 255);"&gt;37 &lt;/span&gt;&lt;/span&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;To compile it as a project, you need the following DLLs to be added to your project:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_duBjCH1UDvY/SigJ_5lkl1I/AAAAAAAAAAk/B0r3EYxs_ek/s1600-h/IronPythonReferences.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 304px;" src="http://2.bp.blogspot.com/_duBjCH1UDvY/SigJ_5lkl1I/AAAAAAAAAAk/B0r3EYxs_ek/s320/IronPythonReferences.png" alt="" id="BLOGGER_PHOTO_ID_5343531951269910354" border="0" /&gt;&lt;/a&gt;The DLL files can be found in the directory&lt;br /&gt;"C:\Program Files\IronPython 2.0.1".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-4645820560520232389?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/4645820560520232389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2009/06/ironpython-and-c-hosting-embedding-part.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4645820560520232389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/4645820560520232389'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2009/06/ironpython-and-c-hosting-embedding-part.html' title='IronPython and C#, Hosting/Embedding, Part I'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_duBjCH1UDvY/SigJ_5lkl1I/AAAAAAAAAAk/B0r3EYxs_ek/s72-c/IronPythonReferences.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1936840356390581357.post-8269243935808489092</id><published>2009-05-16T10:26:00.000+03:00</published><updated>2009-05-16T12:13:23.100+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='vim'/><title type='text'>Vim and Visual Studio</title><content type='html'>There is a VIM script, visual_studio.vim which can be found at &lt;a href="http://code.google.com/p/vim-visual-studio/"&gt;http://code.google.com/p/vim-visual-studio/&lt;/a&gt;. It uses the &lt;a href="http://sourceforge.net/projects/pywin32/"&gt;Python Extensions for Windows&lt;/a&gt; to integrate VIM and Visual Studio. It can get the files, solutions and its projects from Visual Studio. You can directly compile the solution from within VIM and you can obviously use the "&lt;a href="http://www.vim.org/htmldoc/quickfix.html"&gt;quickfix&lt;/a&gt;". It is not an emulation mode for Visual Studio unlike &lt;a href="http://www.viemu.com/"&gt;ViEmu&lt;/a&gt;, you will be using VIM again.&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://www.vim.org/scripts/script.php?script_id=864"&gt;page on vim.org&lt;/a&gt; says that you need to have Python 2.4. On my Windows box, I have Visual Studio 2008 and GVIM 7.2, which has been compiled with Python 2.4 support. But, the Python interpreter I am using is Python 2.5, which I keep compatible with the Python interpreter on a production machine. As a result, I had no chance to uninstall Python 2.5 for Python 2.4 and no intention to uninstall GVIM 7.2 for GVIM 7.0.&lt;br /&gt;&lt;br /&gt;So, I have found &lt;a href="http://www.gooli.org/blog/gvim-72-with-python-2526-support-windows-binaries/"&gt;Vim binaries compiled for Python 2.5 and Python 2.6&lt;/a&gt;. I have downloaded the zip file and overwritten the executables in my Vim directory. If I type&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 51, 102); font-weight: bold;font-family:courier new;" &gt;:version&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;in Vim, I get the following screens:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_duBjCH1UDvY/Sg5vHpvmgNI/AAAAAAAAAAM/jI80qeykjsI/s1600-h/vim_version_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 246px;" src="http://1.bp.blogspot.com/_duBjCH1UDvY/Sg5vHpvmgNI/AAAAAAAAAAM/jI80qeykjsI/s320/vim_version_1.png" alt="" id="BLOGGER_PHOTO_ID_5336324785735893202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_duBjCH1UDvY/Sg5vlUfr-NI/AAAAAAAAAAU/epWkj2Y8r58/s1600-h/vim_version_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 246px;" src="http://1.bp.blogspot.com/_duBjCH1UDvY/Sg5vlUfr-NI/AAAAAAAAAAU/epWkj2Y8r58/s320/vim_version_2.png" alt="" id="BLOGGER_PHOTO_ID_5336325295428073682" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Which shows that I have finally a Python 2.5 compatible Vim.&lt;br /&gt;&lt;br /&gt;By the way, do not forget to install &lt;a href="http://sourceforge.net/projects/pywin32/"&gt;Python Extensions for Windows&lt;/a&gt; if you did not installed yet.&lt;br /&gt;&lt;br /&gt;If we make a summary&lt;br /&gt;- We have Visual Studio 2008&lt;br /&gt;- We have Python 2.5&lt;br /&gt;- We have Python Extensions for Windows&lt;br /&gt;- We have GVIM 7.2&lt;br /&gt;- We have Python 2.5 binaries for GVIM&lt;br /&gt;- We have the visual_studio.vim&lt;br /&gt;&lt;br /&gt;And finally, I have been able to see and use the following menu:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_duBjCH1UDvY/Sg5yOsLazrI/AAAAAAAAAAc/dVm34vY_ITA/s1600-h/visual_studio_menu.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 185px; height: 291px;" src="http://1.bp.blogspot.com/_duBjCH1UDvY/Sg5yOsLazrI/AAAAAAAAAAc/dVm34vY_ITA/s320/visual_studio_menu.png" alt="" id="BLOGGER_PHOTO_ID_5336328205183405746" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1936840356390581357-8269243935808489092?l=caglartoklu.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://caglartoklu.blogspot.com/feeds/8269243935808489092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://caglartoklu.blogspot.com/2009/05/vim-and-visual-studio.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/8269243935808489092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1936840356390581357/posts/default/8269243935808489092'/><link rel='alternate' type='text/html' href='http://caglartoklu.blogspot.com/2009/05/vim-and-visual-studio.html' title='Vim and Visual Studio'/><author><name>Caglar Toklu</name><uri>http://www.blogger.com/profile/00280827895330579623</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_duBjCH1UDvY/Sg5vHpvmgNI/AAAAAAAAAAM/jI80qeykjsI/s72-c/vim_version_1.png' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
