<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>pnotepad.org forums &#187; Tag: PyPN - Recent Topics</title>
		<link>http://pnotepad.org/forums/tags/pypn</link>
		<description>Programmer&#039;s Notepad Forums</description>
		<language>en-US</language>
		<pubDate>Thu, 09 Feb 2012 10:58:08 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://pnotepad.org/forums/search.php</link>
		</textInput>
		<atom:link href="http://pnotepad.org/forums/rss/tags/pypn/topics" rel="self" type="application/rss+xml" />

		<item>
                        <title>PyPN for Python 2.7 (tanveer)</title>
			<link>http://pnotepad.org/forums/topic/7452#post-10631</link>
			<pubDate>Wed, 01 Feb 2012 02:08:13 +0000</pubDate>
			<dc:creator>tanveer</dc:creator>
			<guid isPermaLink="false">10631@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I find the installer for PyPN for Python 2.6 but there is no installer for Python 2.7. Is this intentional or unsupported on 2.7?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>auto-indent Python code (bhengh)</title>
			<link>http://pnotepad.org/forums/topic/5441#post-8288</link>
			<pubDate>Thu, 01 Sep 2011 18:44:01 +0000</pubDate>
			<dc:creator>bhengh</dc:creator>
			<guid isPermaLink="false">8288@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I would like to use Programmer's Notepad to write Python apps.  Is there anyway to get Programmer's Notepad to auto-indent after a block statement?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>RegEx in PN  - Example (NickDMax)</title>
			<link>http://pnotepad.org/forums/topic/7416#post-10559</link>
			<pubDate>Wed, 11 Jan 2012 02:51:44 +0000</pubDate>
			<dc:creator>NickDMax</dc:creator>
			<guid isPermaLink="false">10559@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;So I was thinking about this &#60;a href=&#34;http://untidy.net/blog/2011/05/18/regular-expressions-and-scripts-worked-example/&#34;&#62;RegEx/Script example from the Untidy blog&#60;/a&#62; and I thought: &#34;Can that be one in 1 RegEx?&#34;&#60;/p&#62;
&#60;p&#62;The answer is of course: Yes - but would you really want to.&#60;/p&#62;
&#60;p&#62;Search: ^(?:(?!LogStep).*(?:\r\n)+)&#124;(?:LogStep\(\s*&#34;([^&#34;]+)&#34;\s*\).*(\r\n)(\r\n)*)&#60;br /&#62;
Replace: \1\2&#60;/p&#62;
&#60;p&#62;hit &#38;lt;Replace All&#38;gt;&#60;/p&#62;
&#60;p&#62;This is a pretty complex RegEx so lets break it up. The overall structure is A&#124;B&#60;/p&#62;
&#60;p&#62;A: RegEx to match the rest of a line NOT BEGINNING with &#34;LogStep&#34;&#60;br /&#62;
B: RegEx to match the rest of a line that DOES begin with &#34;LogStep&#34; - capture the text (and a CRLF new line)&#60;/p&#62;
&#60;p&#62;The whole thing is wrapped in a the expression: ^(?:A&#124;B)&#60;/p&#62;
&#60;p&#62;where ^ asserts the beginning of a line, and (?: ) is a non-capture group - that is it treated as a group but not captured into \1 or \2 etc. - this outer non-capture group creates separation. Without it our expression would need to be: ^A&#124;^B&#60;/p&#62;
&#60;p&#62;Since the expression A contains no capture groups BUT the overall expression DOES contain capture 2 capture groups \1 and \2 will be empty when expression A matches. When B matches \1 is the text inside of the quotation marks, and \2 is a crlf (\r\n) pair.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Scintilla document functions/methods not mapped in PyPN (Nux)</title>
			<link>http://pnotepad.org/forums/topic/5483#post-8400</link>
			<pubDate>Sat, 15 Oct 2011 20:07:59 +0000</pubDate>
			<dc:creator>Nux</dc:creator>
			<guid isPermaLink="false">8400@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Simon could you add some note on top of &#60;a href=&#34;http://pnotepad.org/docs/pypn_api_pages&#34;&#62;PyPN API Description&#60;/a&#62; that methods of scintilla module not mapped/implemented in PyPN can still be used with SendMessage function like this:&#60;br /&#62;
&#60;code&#62;pn.CurrentDoc().SendMessage(methodCode, firstArgument, secondArgument)&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;And that codes of methods can be found at:&#60;br /&#62;
&#60;a href=&#34;http://scintilla.hg.sourceforge.net/hgweb/scintilla/scintilla/file/tip/include/Scintilla.iface&#34; rel=&#34;nofollow&#34;&#62;http://scintilla.hg.sourceforge.net/hgweb/scintilla/scintilla/file/tip/include/Scintilla.iface&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I think it might save some time for others.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Can&#039;t get PyPN to work with PN 2.3.4 (horus)</title>
			<link>http://pnotepad.org/forums/topic/5475#post-8376</link>
			<pubDate>Wed, 28 Sep 2011 13:43:44 +0000</pubDate>
			<dc:creator>horus</dc:creator>
			<guid isPermaLink="false">8376@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I have PN 2.3.4 installed.  I went to &#60;a href=&#34;http://www.pnotepad.org/add-ons/&#34; rel=&#34;nofollow&#34;&#62;http://www.pnotepad.org/add-ons/&#60;/a&#62; to try out the PyPN.&#60;/p&#62;
&#60;p&#62;So I downloaded pypn-1.1.2350-py26.zip from that page, unzipped everything to PN2 directory and run “pn --findexts” as stated in that page, but I got an error saying something that:&#60;/p&#62;
&#60;p&#62;.... python26.dll is missing from your computer. ...&#60;/p&#62;
&#60;p&#62;I searched PN2 directory and then my whole computer's hard drive and instead there is no such file.  Missing python26.dll file in the zip file?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Using F1 to open a custom .chm help file (HeelX)</title>
			<link>http://pnotepad.org/forums/topic/5448#post-8309</link>
			<pubDate>Fri, 09 Sep 2011 14:55:04 +0000</pubDate>
			<dc:creator>HeelX</dc:creator>
			<guid isPermaLink="false">8309@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I want to let F1 open a .chm file, that is associated with the C/C++ scheme. In the Options\Tools dialog, I created with Add a new entry, assigned F1 as shortcut and entered the following command:&#60;/p&#62;
&#60;p&#62;C:\Windows\hh.exe D:\Dev\Engines\A8.30.1\3dgs_manual.chm&#60;/p&#62;
&#60;p&#62;I just want to let the Windows CHM viewer show the above listed .chm file. In the Windws command line, I successfully can open it either with just entering the path to the .chm as well as using explicitely the hh.exe. PN always says&#60;/p&#62;
&#60;p&#62;&#38;gt; &#34;C:\Windows\hh.exe D:\Dev\Engines\A8.30.1\3dgs_manual.chm&#34;&#60;br /&#62;
&#38;gt; Failed to create process: Das System kann die angegebene Datei nicht finden.&#60;br /&#62;
&#38;gt; Process Exit Code: 0&#60;br /&#62;
&#38;gt; Time Taken: 00:00&#60;/p&#62;
&#60;p&#62;What am I doing wrong?&#60;/p&#62;
&#60;p&#62;Thanks in advance,&#60;br /&#62;
-Christian
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Indicator functions not available for PyPN? (CoDEmanX)</title>
			<link>http://pnotepad.org/forums/topic/5447#post-8308</link>
			<pubDate>Fri, 09 Sep 2011 14:34:59 +0000</pubDate>
			<dc:creator>CoDEmanX</dc:creator>
			<guid isPermaLink="false">8308@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hey Simon,&#60;/p&#62;
&#60;p&#62;you suggested to have a look at the TextUtil code to get an idea, how Scintilla indicator styles work and that one could use it with PyPN ( &#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1374#c2&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/pnotepad/issues/detail?id=1374#c2&#60;/a&#62; )&#60;/p&#62;
&#60;p&#62;But the needed Indicator functions aren't available: &#60;a href=&#34;http://www.pnotepad.org/docs/pypn_api_pages&#34; rel=&#34;nofollow&#34;&#62;http://www.pnotepad.org/docs/pypn_api_pages&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;- Python error: &#38;lt;type 'exceptions.AttributeError'&#38;gt;: 'Scintilla' object has no attribute '&#60;strong&#62;SetIndicatorCurrent&#60;/strong&#62;' / '&#60;strong&#62;IndicatorClearRange&#60;/strong&#62;' / '&#60;strong&#62;IndicatorFillRange&#60;/strong&#62;'&#60;/p&#62;
&#60;p&#62;Am I overlooking something (imports?) or aren't they supported yet?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Trouble Installing PyPN (Patabugen)</title>
			<link>http://pnotepad.org/forums/topic/5138#post-7566</link>
			<pubDate>Fri, 14 Jan 2011 12:29:52 +0000</pubDate>
			<dc:creator>Patabugen</dc:creator>
			<guid isPermaLink="false">7566@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I'm trying to setup PyPN to make use of some of the python scripts available. I'm not much of a Python user (yet!) so I might be messing something up with installing Python.&#60;/p&#62;
&#60;p&#62;I'm on x64 Windows 7 with PN v2.2.0.2240-ellington.&#60;br /&#62;
I've installed this:&#60;br /&#62;
&#60;a href=&#34;http://www.python.org/download/releases/2.6.6/&#34; rel=&#34;nofollow&#34;&#62;http://www.python.org/download/releases/2.6.6/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Then extracted this into my PN dir:&#60;br /&#62;
&#60;a href=&#34;http://pnotepad.googlecode.com/files/pypn-0.10.973-py26.zip&#34; rel=&#34;nofollow&#34;&#62;http://pnotepad.googlecode.com/files/pypn-0.10.973-py26.zip&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;And run&#60;br /&#62;
pn.exe --findexts&#60;/p&#62;
&#60;p&#62;Running the last command gives no output (but not does it open the windows) so I'm guessing it's either worked, or gone very wrong.&#60;/p&#62;
&#60;p&#62;My scripts/ folder then has the default scripts in, but the Scripts windows is empty and I'm not sure what else to check.&#60;/p&#62;
&#60;p&#62;PN was closed the whole time I installed.&#60;/p&#62;
&#60;p&#62;I'm not sure what to do now, how can I check whether any of the steps above have worked?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>feature request: Zen Coding plugin (robonoob)</title>
			<link>http://pnotepad.org/forums/topic/5440#post-8285</link>
			<pubDate>Thu, 01 Sep 2011 02:38:50 +0000</pubDate>
			<dc:creator>robonoob</dc:creator>
			<guid isPermaLink="false">8285@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi Simon,&#60;/p&#62;
&#60;p&#62;I found programmer notepad is great.&#60;br /&#62;
Do you have plan on adding zen coding plugin?&#60;br /&#62;
&#60;a href=&#34;http://code.google.com/p/zen-coding/&#34; rel=&#34;nofollow&#34;&#62;http://code.google.com/p/zen-coding/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I wish I can do it, but I am new to CPP.....
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Python 2.6 Installer (Patabugen)</title>
			<link>http://pnotepad.org/forums/topic/5356#post-8145</link>
			<pubDate>Tue, 26 Jul 2011 11:13:06 +0000</pubDate>
			<dc:creator>Patabugen</dc:creator>
			<guid isPermaLink="false">8145@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hey,&#60;/p&#62;
&#60;p&#62;I had a hard time finding a Python 2.6 installer, required for PyPN. Since Python 2.7 is what they want you to use, they seem to have made it hard to get hold of an installer for the old.&#60;/p&#62;
&#60;p&#62;However with this link you can get it:&#60;br /&#62;
&#60;a href=&#34;http://www.python.org/download/releases/2.6.6/&#34; rel=&#34;nofollow&#34;&#62;http://www.python.org/download/releases/2.6.6/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Simon, can I suggest/request you either update the python PyPN requires, or host a copy of the Python 2.6 installer yourself to make it easier for us to find.&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Sami&#60;br /&#62;
p.s I've just been in Netbeans for a few months, and it feels very good to be back in PN :)
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Strafe rectangular selection (Nux)</title>
			<link>http://pnotepad.org/forums/topic/5315#post-8054</link>
			<pubDate>Mon, 27 Jun 2011 20:59:45 +0000</pubDate>
			<dc:creator>Nux</dc:creator>
			<guid isPermaLink="false">8054@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi. I've been playing a lot with rectangular selection lately (best programming discovery of a year for me ;-)). There is one this I miss though - strafing selection (moving to the right/left). For me  this is especially useful when I have a long cursor (0-lenght selection through few lines) and want to edit few lines at once in two or more places.&#60;/p&#62;
&#60;p&#62;So I've made this script:&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/gCyhCmr9&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/gCyhCmr9&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;But I'm wondering if this is bundled in PN2? Also I'm looking for a feedback of what do you think should happen when you reach right/left edge? Should it behave differently in normal and rectangular selection mode?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>PyPN - Defects and Enhancement requests (CoDEmanX)</title>
			<link>http://pnotepad.org/forums/topic/5267#post-7955</link>
			<pubDate>Fri, 27 May 2011 14:05:32 +0000</pubDate>
			<dc:creator>CoDEmanX</dc:creator>
			<guid isPermaLink="false">7955@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;(This is meant as a collective thread)&#60;/p&#62;
&#60;ul&#62;
&#60;li&#62;&#60;strong&#62;GetCharAt returns an int instead of a character&#60;/strong&#62;&#60;br /&#62;
&#60;code&#62;GetCharAt(self, pos) : int 	Get the character at the given position.&#60;/code&#62;&#60;br /&#62;
The PyPN API doc is right, it returns a number, which is basically what you pass to it (pos). Doesn't make much sense, it should return the character - shouldn't it?&#60;/p&#62;
&#60;p&#62;Workaround: GetTextRange(pos, pos+1)&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;Stock PyPN textclip contain bad indentation&#60;/strong&#62;&#60;br /&#62;
PyPN Script File and PyPN Script Method got 4 leading spaces here:&#60;br /&#62;
&#60;code&#62;${0:pass}&#60;/code&#62;&#60;br /&#62;
The above comment line uses tab indent, leading to indentation error.&#60;/p&#62;
&#60;p&#62;Moreover, the $0 placeholder of PyPN Undo Block is at the beginning of the line, followed by a tab. Either the tab is too much or $0 should be behind it.
&#60;/li&#62;
&#60;li&#62;&#60;strong&#62;PyPN in textclip - problems with line endings and indentation&#60;/strong&#62;&#60;br /&#62;
PyPN code only works in textclips, if you set line endings of your document to Unix (LF) &#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1339&#38;amp;sort=-id&#34;&#62;issue #1339&#60;/a&#62;&#60;br /&#62;
Multi-line PyPN script in textclip doesn't work if you insert it in a line with leading whitespace via shortcut &#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1346&#38;amp;sort=-id&#34;&#62;issue #1346&#60;/a&#62;
&#60;/li&#62;
&#60;li&#62;Unfortunately, it's not possibly to combine &#60;strong&#62;PyPN in textclip and the placeholder&#60;/strong&#62; system. It would be quite useful tho. &#60;a href=&#34;http://code.google.com/p/pnotepad/issues/detail?id=1345&#38;amp;sort=-id&#34;&#62;issue #1345&#60;/a&#62;
&#60;/li&#62;
&#60;/ul&#62;</description>
		</item>
		<item>
                        <title>PyPN basics (es_es)</title>
			<link>http://pnotepad.org/forums/topic/436#post-1535</link>
			<pubDate>Fri, 11 Jul 2008 11:32:03 +0000</pubDate>
			<dc:creator>es_es</dc:creator>
			<guid isPermaLink="false">1535@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I started using PN and would like to customize it for my needs with minor efforts so I would like to use PyPN for this and I have few questions:&#60;br /&#62;
1. Is there any documentation describing PyPN and scintilla APIs?&#60;br /&#62;
2. Is there access to CTags dictionary from PyPN?&#60;br /&#62;
3. Do results of CTags reside in memory or dumped to a file during a work of PN?&#60;br /&#62;
4. Can I create dialogs in PyPN in order to add my own fuctionality?&#60;/p&#62;
&#60;p&#62;Thanks.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>PyPN can&#039;t find python26.dll (kuukkeli)</title>
			<link>http://pnotepad.org/forums/topic/603#post-2174</link>
			<pubDate>Sat, 20 Jun 2009 17:33:56 +0000</pubDate>
			<dc:creator>kuukkeli</dc:creator>
			<guid isPermaLink="false">2174@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I'm trying to use the latest portable version and while PN itself works fine I can't get PyPN working. After manually adding pypn.dll to config file I get the following error:&#60;/p&#62;
&#60;p&#62;&#38;quot;The program can't start because python26.dll is missing from your computer. Try installing the program to fix this problem&#38;quot;&#60;/p&#62;
&#60;p&#62;Yet I do have Python 2.6.2 installed and the said .dll file is in system32 folder. After I close the error dialog PN starts but PyPN isn't not listed in extensions. If I copy the .dll file to PN folder there's no error but PyPN still doesn't show in extensions. Any ideas how to fix this?&#60;/p&#62;
&#60;p&#62;I'm running 64-bit Windows 7 RC build 7100.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Guiding and Tracking an Experiment with PN (heinz2006pnp)</title>
			<link>http://pnotepad.org/forums/topic/5117#post-7499</link>
			<pubDate>Mon, 06 Dec 2010 23:25:13 +0000</pubDate>
			<dc:creator>heinz2006pnp</dc:creator>
			<guid isPermaLink="false">7499@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hello, &#60;/p&#62;
&#60;p&#62;I would like to use PN for an experiment on program comprehension and I was hoping that you could guide me on how to add the missing functionality by creating a script. What I don't want is to create things that already exist and I want to make sure that what I want is actually possible. So, any guidance is very welcome. &#60;/p&#62;
&#60;p&#62;What I have in mind is the following:&#60;br /&#62;
- task descriptions shall appear in a side pane, one after another by clicking a button&#60;br /&#62;
- the time that a task description is displayed shall be measured and stored&#60;br /&#62;
- while a task description is displayed, all viewed files (if possible methods, classes) shall be tracked and stored &#60;/p&#62;
&#60;p&#62;It would be great if you could help me on getting started. Are there any plugins/scripts that maybe implement part of what I'm looking for already? &#60;/p&#62;
&#60;p&#62;Thank you very much
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Select text between specified line numbers (mexmanz)</title>
			<link>http://pnotepad.org/forums/topic/5176#post-7677</link>
			<pubDate>Wed, 16 Feb 2011 07:58:25 +0000</pubDate>
			<dc:creator>mexmanz</dc:creator>
			<guid isPermaLink="false">7677@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;Is there a function to select text between two specified line numbers:&#60;/p&#62;
&#60;p&#62;for example, if the file has 100 lines and I want to select the text between and including lines 25-50 using a keyboard shortcut. &#60;/p&#62;
&#60;p&#62;How can this be done, or if lines are bookmarked, can the text be selected between the two bookmarks.&#60;/p&#62;
&#60;p&#62;Many thanks for advice&#60;br /&#62;
Andrew
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Any way to flag non-ASCII (7bit) characters? (enquirer)</title>
			<link>http://pnotepad.org/forums/topic/5200#post-7767</link>
			<pubDate>Wed, 23 Mar 2011 00:17:21 +0000</pubDate>
			<dc:creator>enquirer</dc:creator>
			<guid isPermaLink="false">7767@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Greetings!&#60;/p&#62;
&#60;p&#62;Need to exclude characters beyond the 7bit ASCII range from plain text files... &#60;/p&#62;
&#60;p&#62;Currently using ANSI encoding, unix file format, which is perfect except that it allows unwelcome characters. Any thoughts on how these can easily be flagged?&#60;/p&#62;
&#60;p&#62;Many thanks!
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>PyPN not showing / recording scripts in Portable PN 2.2.0.2240 (Sam)</title>
			<link>http://pnotepad.org/forums/topic/5167#post-7656</link>
			<pubDate>Fri, 11 Feb 2011 12:36:20 +0000</pubDate>
			<dc:creator>Sam</dc:creator>
			<guid isPermaLink="false">7656@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I have updated to Portable PN 2.2.0.2240 and enabled PyPN, but it is only partially working. The scripts in the pypn folder are getting compiled (I see pyc files in there), however not any of the other scripts (init.py in PN2 directory and the py files in the scripts directory).&#60;/p&#62;
&#60;p&#62;When I run Tools &#38;gt; Record script, type something, then stop recording, nothing happens. There are also no scripts showing the the scripts window.&#60;/p&#62;
&#60;p&#62;Anyone got PyPN working in the latest 2.2 version? I am running Windows 7 64bit.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>PyPn for Py3K, Py2.7 (stier08)</title>
			<link>http://pnotepad.org/forums/topic/5199#post-7755</link>
			<pubDate>Sun, 20 Mar 2011 17:03:31 +0000</pubDate>
			<dc:creator>stier08</dc:creator>
			<guid isPermaLink="false">7755@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I just wondering if there any plans for migration of PyPn to new python versions?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>PyPN Save() Not Working? (rimkojr)</title>
			<link>http://pnotepad.org/forums/topic/5125#post-7523</link>
			<pubDate>Mon, 20 Dec 2010 14:03:13 +0000</pubDate>
			<dc:creator>rimkojr</dc:creator>
			<guid isPermaLink="false">7523@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I am having trouble getting the PyPN Save() method to work using portable PN2 v2.2.0.2240 and PyPN v0.12.2222.&#60;/p&#62;
&#60;p&#62;The following code works with portable PN v2.0.10.1010 and PyPN v0.10.973 but not the new configuration:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
&#60;code&#62;&#60;br /&#62;
@script(&#34;Save Current Document&#34;, &#34;Editor&#34;)&#60;br /&#62;
def saveCurrentDoc():&#60;br /&#62;
    doc = pn.CurrentDoc()&#60;br /&#62;
    filename = doc.FileName&#60;br /&#62;
    doc.Save(filename, True)&#60;br /&#62;
&#60;/code&#62;
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;The error message when running on the new configuration is the following:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
&#60;em&#62;&#60;br /&#62;
Python error: &#38;lt;class 'Boost.Python.ArgumentError'&#38;gt;: Python argument types in&#60;br /&#62;
    IDocument.Save(IDocument, unicode, bool)&#60;br /&#62;
did not match C++ signature:&#60;br /&#62;
    Save(class extensions::IDocument {lvalue}, wchar_t const *, bool)&#60;br /&#62;
&#60;/em&#62;
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;I've tried casting the filename variable as a string (it is a unicode) but no luck. Any ideas?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Improving PyPN CHM Help script (leledumbo)</title>
			<link>http://pnotepad.org/forums/topic/5166#post-7655</link>
			<pubDate>Fri, 11 Feb 2011 02:32:20 +0000</pubDate>
			<dc:creator>leledumbo</dc:creator>
			<guid isPermaLink="false">7655@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I'd like to improve PyPN CHM Help script so that if there's no selection, it takes a word around the cursor, if the character at the current position is an alphabet. Here's what I've done:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;def expandWord(s):
	st = s.CurrentPos - 1
	while chr(s.GetCharAt(st)).isalpha():
		st -= 1
	ed = s.CurrentPos + 1
	while chr(s.GetCharAt(ed)).isalpha():
		ed += 1
	return s.GetTextRange(st + 1,ed)

@script(&#38;quot;CHM help&#38;quot;, &#38;quot;HELP&#38;quot;)
def Help():
	doc = pn.CurrentDoc()
	if doc is not None:
		s = scintilla.Scintilla(doc)
		sch = doc.CurrentScheme
		config = ConfigParser.ConfigParser()
		config.read(&#38;#39;plugin.ini&#38;#39;)
		chm_path = config.get(sch, &#38;#39;chm_path&#38;#39;, 0)
		if chr(s.GetCharAt(s.CurrentPos)).isalpha():
			selLen = s.SelectionEnd - s.SelectionStart
			selText = s.SelText if selLen &#38;gt; 0 else expandWord(s)
			if test_import(&#38;#39;win32help&#38;#39;):
				import win32help
				win32help.HtmlHelp(0, None, win32help.HH_INITIALIZE, None)
				link = win32help.HH_AKLINK()
				link.indexOnFail = 1
				link.keywords = selText
				link.url = &#38;quot;&#38;quot;
				link.msgText = &#38;quot;&#38;quot;
				link.msgTitle = &#38;quot;&#38;quot;
				link.window = &#38;quot;&#38;quot;
				win32help.HtmlHelp(0, chm_path, win32help.HH_KEYWORD_LOOKUP, link)
			elif os.path.isfile(os.environ[&#38;quot;WINDIR&#38;quot;]+&#38;quot;\keyHH.exe&#38;quot;):
				os.popen (&#38;quot;keyHH.exe -#klink &#38;quot; + s.SelText + &#38;quot; &#38;quot; + chm_path)
			else:
				pn.AddOutput(&#38;quot;win32help api and keyHH.exe not found, falling back to hh.exe&#38;quot;)
				os.popen(&#38;quot;hh &#38;quot; + chm_path)&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;as you can see, the difference lies only in the addition of expandWord method and the way to retrieve the keyword. However, upon execution it gives me:&#60;/p&#62;
&#60;p&#62;Python error: &#38;lt;class 'ConfigParser.NoSectionError'&#38;gt;: No section: 'pascal'&#60;/p&#62;
&#60;p&#62;even though I have [pascal] with chm_path key defined. The weird thing is, when I revert it back to the original script, it works like a charm.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Is glue.onCharAdded fired? (leledumbo)</title>
			<link>http://pnotepad.org/forums/topic/5169#post-7664</link>
			<pubDate>Sun, 13 Feb 2011 17:20:52 +0000</pubDate>
			<dc:creator>leledumbo</dc:creator>
			<guid isPermaLink="false">7664@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;The following script should at least write something to output window, but it doesn't. Don't really care about the contents, just read the last function and the enclosing assignment (that backups old onCharAdded handler and registers the new one).&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;###############################################################################
## Close opening block on previous line.
## By: Mario Ray M.

import pn, pypn.glue
import scintilla
from pypn.decorators import script

# 2-level map containing scheme name with
# opening-closing block pairs as its value
blockPairs = {
  &#38;#39;pascal&#38;#39;: {
    &#38;#39;begin&#38;#39; :&#38;#39;end&#38;#39;,
    &#38;#39;repeat&#38;#39;:&#38;#39;until&#38;#39;
  }
}

# @brief Return a scheme name for the current file
# @returns an empty string upon error
def GetCurSchName():
  doc = pn.CurrentDoc()
  if doc is not None:
    sch = doc.CurrentScheme
    return sch
  else:
    return &#38;#39;&#38;#39;

def GetLastTypedWord():
  editor = scintilla.Scintilla(pn.CurrentDoc())
  start = editor.WordStartPosition(sct.CurrentPos, 1)
  end = editor.WordEndPosition(sct.CurrentPos, 1)
  return editor.GetTextRange(start,end)

oldonCharAdded = pypn.glue.onCharAdded

def onCharAdded(c, doc):
  &#38;quot;&#38;quot;&#38;quot; Close opening block on previous line &#38;quot;&#38;quot;&#38;quot;
  # do it only on new lines
  pn.AddOutput(&#38;quot;c = %c\n&#38;quot;,c)
  if c == &#38;#39;\n&#38;#39;:
    scheme = GetCurSchName()
    # ensure scheme is defined and there&#38;#39;re block pairs for it
    pn.AddOutput(&#38;quot;scheme = %s\n&#38;quot;,scheme)
    if scheme != &#38;#39;&#38;#39; and blockPairs.has_key(scheme):
      word = GetLastTypedWord()
      pn.AddOutput(&#38;quot;word = %s\n&#38;quot;,word)
      if blockPairs[scheme].has_key(word):
        editor.AddText(1,blockPairs[scheme][word])
  # we do this last because it has to happen BEFORE the char is added
  oldonCharAdded(c, doc)

pypn.glue.onCharAdded = onCharAdded&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
                        <title>How to run script or bind key to script (cncsnw)</title>
			<link>http://pnotepad.org/forums/topic/5175#post-7675</link>
			<pubDate>Tue, 15 Feb 2011 23:36:21 +0000</pubDate>
			<dc:creator>cncsnw</dc:creator>
			<guid isPermaLink="false">7675@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I have PN 2.2.0.2240 and PyPN 0.10 installed.&#60;/p&#62;
&#60;p&#62;The &#34;Record Script&#34; and &#34;Stop Recording&#34; options are enabled and produce the script in an &#34;untitled&#34; window.  I can save the contents of that window as &#34;somescript.py&#34;.&#60;/p&#62;
&#60;p&#62;How do I play back a recorded script?&#60;/p&#62;
&#60;p&#62;How do I bind a key to a recorded/saved script?&#60;/p&#62;
&#60;p&#62;There must be something simple and obvious I am overlooking....
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Current Project in PyPn (Patabugen)</title>
			<link>http://pnotepad.org/forums/topic/5141#post-7575</link>
			<pubDate>Mon, 17 Jan 2011 18:16:15 +0000</pubDate>
			<dc:creator>Patabugen</dc:creator>
			<guid isPermaLink="false">7575@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hey,&#60;/p&#62;
&#60;p&#62;Is there some way I can find out anything about the current project from PyPN?&#60;/p&#62;
&#60;p&#62;Ideally I'd like to be able to iterate through all the files within a project, or get a list of the folders/magic folders.&#60;/p&#62;
&#60;p&#62;It's only early but here's what I've started:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;###############################################################################
## Jump to File
## By: Patabugen (www.patabugen.co.uk)

import pn
import scintilla
import os, glob
from pypn.decorators import script

@script(&#38;quot;Jump to File&#38;quot;, &#38;quot;Files&#38;quot;)
def JumpToFile():
	&#38;quot;&#38;quot;&#38;quot; Load all files which match the given mask &#38;quot;&#38;quot;&#38;quot;
	file = pn.InputBox(&#38;quot;Jump To...&#38;quot;, &#38;quot;Enter a Filename:&#38;quot;)
	path = &#38;quot;C:/temp/pypn&#38;quot;

	if (len(file) &#38;gt; 0):
		for infile in glob.iglob( os.path.join(path, file) ):
			file = str(infile)
			openDoc = pn.OpenDocument(file, None)
			editor = scintilla.Scintilla(openDoc)
pass&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Patabugen
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>New Script: Jump To... (Patabugen)</title>
			<link>http://pnotepad.org/forums/topic/5142#post-7576</link>
			<pubDate>Mon, 17 Jan 2011 21:14:36 +0000</pubDate>
			<dc:creator>Patabugen</dc:creator>
			<guid isPermaLink="false">7576@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hey,&#60;/p&#62;
&#60;p&#62;One of the features I learned to take for granted in some other editors is a Jump To File dialog, where you can enter a partial filename (such as myfile*) and be presented with a list of files found within your working directory.&#60;/p&#62;
&#60;p&#62;I have written something in PyPN to offer some of this functionality. This is my first go at Python so any feedback on, or improvements to, the code are very welcome.&#60;/p&#62;
&#60;p&#62;Rather than going into the world of GUI's I have made use of a new document within PN to display the output, I'd be interested to know how well this works for you on your systems.&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://scriptshare.rocketmonkeys.com/script/30&#34; rel=&#34;nofollow&#34;&#62;http://scriptshare.rocketmonkeys.com/script/30&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;If you want suggestions for keyboard shortcuts to bind this to Netbeans uses Alt + Shift + O (for Open) and Eclipse uses Ctrl + Shift + R (for Resource). Personally I use Alt + Shift + A because it's handy.&#60;/p&#62;
&#60;p&#62;--&#60;br /&#62;
Patabugen&#60;/p&#62;
&#60;p&#62;p.s I realise this is a feature planned for PN in the future, this is intended as an interim measure.
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>PyPN: Problem with example script Number Converter (mossi2000)</title>
			<link>http://pnotepad.org/forums/topic/5137#post-7563</link>
			<pubDate>Tue, 11 Jan 2011 14:13:45 +0000</pubDate>
			<dc:creator>mossi2000</dc:creator>
			<guid isPermaLink="false">7563@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I just updated to PN 2.2 today and tried playing bit with PyPN.&#60;br /&#62;
The first user-supplied script I tried &#34;Number Converter&#34; always fails to show up in the Scripts Window giving the following message in the output window:&#60;/p&#62;
&#60;p&#62;Traceback (most recent call last):&#60;br /&#62;
  File &#34;&#38;lt;string&#38;gt;&#34;, line 41, in &#38;lt;module&#38;gt;&#60;br /&#62;
  File &#34;&#38;lt;string&#38;gt;&#34;, line 37, in import_libs&#60;br /&#62;
ArgumentError: Python argument types in&#60;br /&#62;
    pn.AddOutput(unicode)&#60;br /&#62;
did not match C++ signature:&#60;br /&#62;
    AddOutput(char const *)&#60;/p&#62;
&#60;p&#62;As I'm a beginner regarding programming in Python, I cannot see any obvious error in the mentioned script.&#60;/p&#62;
&#60;p&#62;I have Python 2.6 installed, and other scripts I tried work fine (e.g. HexDump)&#60;/p&#62;
&#60;p&#62;So what's wrong with that one?&#60;/p&#62;
&#60;p&#62;Regards,&#60;br /&#62;
  Axel
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>PyPn: problem with OpenDocument (sweinst)</title>
			<link>http://pnotepad.org/forums/topic/5135#post-7546</link>
			<pubDate>Mon, 10 Jan 2011 12:31:59 +0000</pubDate>
			<dc:creator>sweinst</dc:creator>
			<guid isPermaLink="false">7546@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I've written a simple script for switching between C++ header and source:&#60;br /&#62;
========================================&#60;/p&#62;
&#60;p&#62;import pn, os.path&#60;br /&#62;
from pypn.decorators import script&#60;/p&#62;
&#60;p&#62;cpp_headers = [&#34;.h&#34;, &#34;.hpp&#34;, &#34;.hxx&#34;, &#34;.inl&#34;]&#60;br /&#62;
cpp_sources = [&#34;.c&#34;, &#34;.cpp&#34;, &#34;.cxx&#34;]&#60;/p&#62;
&#60;p&#62;@script(&#34;SwitchHeaderSource&#34;, &#34;C/C++&#34;)&#60;br /&#62;
def SwitchHeaderSource():&#60;br /&#62;
	filename, ext = os.path.splitext(pn.CurrentDoc().FileName)&#60;br /&#62;
	if ext in headers:&#60;br /&#62;
		exts = cpp_sources&#60;br /&#62;
	elif ext in sources:&#60;br /&#62;
		exts = cpp_headers&#60;br /&#62;
	else:&#60;br /&#62;
		return&#60;br /&#62;
	for e in exts:&#60;br /&#62;
		f = filename + e&#60;br /&#62;
		if os.path.exists(f):&#60;br /&#62;
			# found one, open it&#60;br /&#62;
			pn.OpenDocument(f, None)&#60;br /&#62;
			return&#60;br /&#62;
=======================================&#60;br /&#62;
My problem is that OpenDocument always creates a new editor even if the document is already open.&#60;/p&#62;
&#60;p&#62;I've searched through the API but I've been unable to find an alternate way for opening one. Is there one?&#60;/p&#62;
&#60;p&#62;Thanks&#60;br /&#62;
Serge
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>Operating on a rectangular selection (Nux)</title>
			<link>http://pnotepad.org/forums/topic/5114#post-7490</link>
			<pubDate>Sun, 05 Dec 2010 23:58:39 +0000</pubDate>
			<dc:creator>Nux</dc:creator>
			<guid isPermaLink="false">7490@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi. I'm just wondering if it is possible to know that the selected block is a rectangular selection and how to make operations on this selection? What I would need is at least an information at which line does the selection starts and ends and probably column numbers... Or maybe simply dimensions and a starting position... But some kind of access to a collection of lines in this selection would be wonderful.&#60;/p&#62;
&#60;p&#62;I'm asking because I want to do a script that would add tags around each selected line of code in this block. Picture for example a space indented table to which you want to add an extra cell in each row or add links inside this cells...&#60;/p&#62;
&#60;p&#62;BTW. I just discovered something amazing :-). When I select few lines of code with ALT pressed I can write on few lines of code at once and even delete characters on each of these lines. This is great :D!
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>How to use ISearchOptions in PyPN-Script? (CoDEmanX)</title>
			<link>http://pnotepad.org/forums/topic/5077#post-7401</link>
			<pubDate>Mon, 04 Oct 2010 22:43:11 +0000</pubDate>
			<dc:creator>CoDEmanX</dc:creator>
			<guid isPermaLink="false">7401@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;Hi simon,&#60;br /&#62;
i wrote a little python script to format some c-like code, which has all whitespace removed. Before i run it, i have to replace all appearences of:&#60;/p&#62;
&#60;p&#62;\{ &#60;strong&#62; --&#38;gt; &#60;/strong&#62; \r\n{\r\n &#60;em&#62;(add line break before and after left brace)&#60;/em&#62;&#60;br /&#62;
\} &#60;strong&#62; --&#38;gt; &#60;/strong&#62; \r\n}\r\n &#60;em&#62;(same for right brace)&#60;/em&#62;&#60;br /&#62;
; &#60;strong&#62; --&#38;gt; &#60;/strong&#62; ;\r\n &#60;em&#62;(line break after semicolon)&#60;/em&#62;&#60;br /&#62;
(for[ ]*\([ ]*[^;]+;)\r\n([^;]+;)\r\n([^)]+\)) &#60;strong&#62; --&#38;gt; &#60;/strong&#62; \1 \2 \3\r\n &#60;em&#62;(repair for-loops, they contain semicolons)&#60;/em&#62;&#60;/p&#62;
&#60;p&#62;these regular expressions add the missing line breaks&#60;/p&#62;
&#60;p&#62;then i use my python script to add indentation:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;import pn
import string
import scintilla
from pypn.decorators import script

@script(&#38;quot;Indent (C++)&#38;quot;, &#38;quot;Script&#38;quot;)
def IndentCpp():
    editor = scintilla.Scintilla(pn.CurrentDoc())

    indentLevel = 0
    tab_width = 4
    left_brace_cur_line = False
    end = editor.Length

    editor.BeginUndoAction()

    for l in range(editor.LineCount):
        line = editor.GetLine(l)
        a = 0
        while True:
            if (a &#38;gt;= len(line)):
                if (left_brace_cur_line):
                    if (indentLevel &#38;gt; 0):
                        editor.SetLineIndentation(l,(indentLevel-1)*tab_width)
                else:
                    editor.SetLineIndentation(l,indentLevel*tab_width)
                left_brace_cur_line = False
                break
            if (line[a] == &#38;quot;{&#38;quot;):
                indentLevel = indentLevel + 1
                left_brace_cur_line = True
            elif (line[a] == &#38;quot;}&#38;quot; and indentLevel &#38;gt; 0):
                indentLevel = indentLevel - 1
            a = a + 1

    editor.EndUndoAction()&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I'd like to automate the regex stuff, but there's no replace/replaceall function python. I found IDocument.ReplaceAll and ISearchOptions.* in the PyPN API documentation but i don't know how to use the search options.&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;p = pn.CurrentDoc()&#60;br /&#62;
p.ISearchOptions ???&#60;/strong&#62;&#60;/p&#62;
&#60;p&#62;can you tell me how use it properly or tell me another way to this task?
&#60;/p&#62;</description>
		</item>
		<item>
                        <title>pypn doesn&#039;t see scripts? (mac3n)</title>
			<link>http://pnotepad.org/forums/topic/5092#post-7433</link>
			<pubDate>Wed, 20 Oct 2010 15:01:29 +0000</pubDate>
			<dc:creator>mac3n</dc:creator>
			<guid isPermaLink="false">7433@http://pnotepad.org/forums/</guid>
			<description>&#60;p&#62;I recently upgraded from 2.0.10 to 2.1.4.2191, mostly for the split windows.&#60;/p&#62;
&#60;p&#62;I seem to have lost my PyPN scripts. I tried re-installing pypn. It shows up in &#34;Application Data\Echo Software\PN2\config.xml&#34;, but no scripts appear in the View&#38;gt;Windows&#38;gt;Scripts window. The scripts are still there in &#34;Program Files\Programmer's Notepad\scripts&#34;&#60;/p&#62;
&#60;p&#62;You can tell from these paths that I'm still running XP.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>

