python


Indroducing DropRC – the cloud sync remote control program

DropRC Client sending commands

DropRC Client sending commands

DropRC is a server-client open source solution (GNU GPL 3), to Remote Control a PC via on-line storage sync services.

This program is developed with Python, so it can be run, under every system which support Python 2.x. Especially for MS Windows, Server and Client programs are distributed as precompiled standalone executables, which can run, out of the box, without any dependencies.

For more info, updates and downloads see at the Project’s Home Page.


Python syntax highlighter for PrismJS

Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind, developed by Lea Verou.

I recently changed to this highlighter on my website. But except the officialy supported languages I need to use it for highlight a WOL Python script. Thanks to the fact that it is easy extensible, I create some add-on code for Python syntax.

Python Highlighting Sample

# comment
import library
def main(arg=15):
    print("Hello world!") ;

 
Here you can see the source code of the addon.

Add-on source code (minified)

Prism.languages.python={comment:{pattern:/(^|[^\\])#.*?(\r?\n|$)/g,lookbehind:!0},string:/("|')(\\?.)*?\1/g,keyword:/\b(as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|with|yield)\b/g,boolean:/\b(True|False)\b/g,number:/\b-?(0x)?\d*\.?[\da-f]+\b/g,operator:/[-+]{1,2}|=?<|=?>|!|={1,2}|(&){1,2}|(&){1,2}|\|?\||\?|\*|\/|~|\^|%|\b(or|and|not)\b/g,ignore:/&(lt|gt|amp);/gi,punctuation:/[{}[\];(),.:]/g};

 
Until my GitHub fork merged with the original PrismJS project you can use it with the existing PrismJS script, by putting it after the the prism.min.js script definition and by using the value language-python at class property of the code element you like to highlight.

Usage

. . .
<script src="prism.min.js"></script>
<script src="prism-python.min.js"></script>
. . .
<pre><code class="language-python">
. . .

 
Download Prism Python Higlighter

 


Mna Currency Converter 1.4.0 Available

A new version of the open source Mna Currency Converter is available.
And now also with MS Windows bundle, an OSX .app bundle.
Special thanks to Ljubisa Gavrilovic for this and the feedback for the OSX UI optimization.

What’s new in this version?

  • On-line check for available updated version
  • Selection for the Precision of the result, with 2, 4, 6 & 8 decimal digits.
  • Network traffic minimized, by determine when need to retrieve fresh data.
  • OSX UI improvements.
  • Code reliability improvements.

For downloads and more info see at the Mna project home page


Mna – Currency Converter

iconMna is an open source currency converter program writed in Python using the wxPython library for the user interface and urllib2 library with Google Calculator service API to retrieve updated data. The program supports convertion for 87 currencies.

Also, program uses the local storage and create a file, called “mna.cfg” to remember the last selected currencies and at the next start set selected them by default. To work this feature sure that you install the program at a folder in wich you have priviliges to write.

Mna distributed under the FreeBSD License, with the main script “mna.py” packed in archive or in portable binary format (wich include all nessesary libraries) as standalone program for MS Windows systems, without the Python and wxPython installed, or for MS Windows with Python & wxPython as archive with script runner. Also, if you are intresting to package Mna for other systems etc. OSX with utils like pyInstaller etc. you are welcome and contact with me to get the appropriate credits on the program’s home page.

For downloading, more info and updates see the project’s home page at multipetros.gr/public-projects/mna/