Python comes with the great modules which you can use them to improve your application functionalities. Recently I felt in love with Python and trying to implement some of my daily usages with it. I was always interested in Unicode and Fonts so that I had a glance at Python abilities in these fields and I have to say that Python has a lot to say when it comes to these areas. It is really fantastic and powerful and you have access to whatever you want just a a peace of a cake. In this Article I show you how to use python abilities to save a font as an XML document. It may be wierd for you but sometimes it is necessary to check font tables and the rest of its information.
To start working with fonts it’s worth to add FontTools library to Python; it will extend your abilities to work with fonts. You can download it from here.
Each Python module has its own way for installation. Some of them only needs a simple copy to the appropriate folders and some of them should be installed. FontTools uses the second approach so that you have to follow the following instruction to install it in your Python.
Important Note: I first Installed My FontTools and Then take the above photo from my comand prompt so that the command reply may be different for the first time and the second. You just use the mentioned commands instead of considering provided replies by Python
Some lines will appear in your command prompt and then installation will complete within a minute. Now, to use this module in your application you have to load ( or import or use ) this module in your application, so write the following command in your Python application just like other commands
from fontTools.ttLib import ttfont
Note that commands are case sensitive so write it in the exact mentioned way.
Till now you are able to use FontTools abilities in your application so that to test it we create a font object and then get a simple export from it.
To create a font object in Python write the below command in your application; just note that you have to use for slash instead (/) of back slash (\) for addressing
font = TTFont("d:/fontname.ttf")
Till now you created a new object of your font in the object named font. It’s time to use it in our application so that I save the font as an XML document just like
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive forRapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python’s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
Often, programmers fall in love with Python because of the increased productivity it provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the interpreter discovers an error, it raises an exception. When the program doesn’t catch the exception, the interpreter prints a stack trace. A source level debugger allows inspection of local and global variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line at a time, and so on. The debugger is written in Python itself, testifying to Python’s introspective power. On the other hand, often the quickest way to debug a program is to add a few print statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.
How to install Python?
Installing Python is as easy as drinking a coffee. Follow these instructions to install Python
Install it the root drive ( for instance C:\Python )
Start drinking your coffee while it is installing on your computer
Setup will finish before your coffee finishes
That’s all about Python installation but I myself rather to use it in command line wherever in windos so that I have to add its path to windows variables. To do this open the Advanced System Settings (former System Properties) and add Python path to it like the following picture
To code within the windows command prompt First Open Command Prompt
Write python and press enter
Python command line will appear and you can start coding. To write first command write print (“Hello World”) // write print in lower case
and press enter then you will see the result in the next line
To write your application in IDLE you have to open the editor from Start Menu>Python x.x>IDLE
Then again write print (“hello world”) and press enter
As you can see coding in Python is a peace of cake and I strongly recommend you to start programming in Python for your daily usages if you have such a need. It helped me a lot and I learned a lot from its concept in a short time. It worth to try it even once. You can share your experiences with Python or Ruby or other similar tools here.
I hardly ever use my blog to publish unrelated subjects to programming. This is one of them.
Our company Faraconesh Corporation is bound to hire new talented and professional .NET developers. If you like working with me in person in a small-growing company which offer good salary, insurance, flexitime working beside experts which are pioneers in Iran in their skills and you meet the following needs
Faraconesh Corporation appreciates in advance your kind request to join and will arrange a meeting with you in next few days.
This is the Persian text for this advertisement.
من به ندرت در این وبلاگ مطالب غیرمرتبط با برنامه نویسی مینویسم. این مطلب یکی از آنهاست.شرکت ما، فراکنش قصد استخدام چند برنامهنویس بااستعداد و حرفهای دات نت را دارد. اگر شما دوست دارید که با من از نزدیک در یک شرکت کوچک رو به رشد که حقوق کافی، بیمه، زمان کار آزاد و کار شانه به شانه با متخصصینی که در زمینه کاری خودشان از پیشروان هستند همکاری کنید و نیز درصورتی که شرایط زیر را دارید
حداقل سه سال سابقه کار مرتبط
درک و تسلط کافی و عمیق از .NET, C#, SQL Server و NHibernate
همچنین توانایی کار گروهی و استفاده از ابزارهای کار تیمی مانند ایشوترکر ها و سورس کنترها
توانایی کار با WPF, WCF, WF و REST مزیت به شمار میآید
Recently I’m upgrading JIRA from 3.x to 4.x version for my company. During this upgrade procedure, I learnt a lot from Atlassian. When I was using Jira 3.x, I just using Jira as a simple (but) powerful issue tracking system. I was always content with it. I never felt that I have to upgrade to a newer version. It was good enough to ignore ordering a newer version. I used (a cracked version of) Jira about 3 to 4 years; because my company wasn’t able to afford it.
Jira used a simple UI in 3.x version, honestly I should say that I never impressed by it. By the way, I changed my career and in the new company they are using a licensed Jira 4.x version. After two weeks of using new Jira, I wondered that, how much changes happened on Jira. I couln’t believe that they redesigned UI completely, in a way that amazed me. Almost everything relocated and new menu works great. New Plug-ins, especially Green Hopper, forced me to confess that all in all, Jira is the best web application I’ve ever used.
One of the things that is really special to me, is that new version has a really affordable price. 10$ for 10 users! Most of the small companies don’t have more than 10 active users (developers) so that they can easily afford it. I have to mention that Atlassian give all of these (10$) prices to RoomToRead charity organization and they are going to raise it to 1,000,000$.
Here I want to appreciate Atlassian team because of their good software and their effort for education. I also obliged to ask for an excuse from Atlassian, because of my unfair usages at past. I write this to say that this is the first time that I really have a shame of using a cracked version of a software. I wish they forgive me for this.
Atlassian is an Australlian corporation which has some cool products like JIRA, Confluence, Fish Eye, Green Hopper, JIRA Studio and etc. For last 5 years I’m using Jira as an Issue Tracker and I’m really content with it. Attlasian helps Open Source and Free Software and give its software free to the open community. They also help some charities and let their customer help charities by their hand. Actually they pay total price of Standard verions of their products to charity so thatif you buy one, you help charity too. Because of all these good things and these useful application I decided to localize Jira totaly free a year ago.
There is a problem with Persian (fa_IR), it is not supported by JDK. There is no support for the fa_IR locale.
Do we have the wrong locale? It sounds like we may.
Alternatively, if the locale is correct we will have to postpone the implementation. There are two solutions we can explore, but neither in the short term:
try to force java to support fa_IR
refactor TAC so having locale is optional
Thank you Nasser, I appreciate your patience,
I really amazed that JDK doesn’t support fa-IR locale! I’m not a Java man, but if a java geek is reading this, I kindly ask him do a favor to Iranian people. Start localizing JDK for Persian. To start you can go to this page and follow the manual to add Persian to JDK.
I use this blog to thanks Jira team, You guys really rock. I wish you keep on your nice job.
Working with command prompt always been a nice job, it helps you to schedule your routines and gives you more understanding of what’s going on the background. You will give more and on-time information; you can check the result as they happen. You can create a batch fileto build your solutions one after another and many other advantages.Visual Studio command prompt gives you all of the simple windows command prompt abilities plus some tools to control build and publish your source codesand many other abilities which you can find here. You can run Visual Studio command prompt from
Start Menu \ Visual Studio [2005|2008|2010] \ Visual Studio Tools \ Visual Studio 2008 Command Prompt
You can use other prompts like – Visual Studio 2008 x64 Cross Tools Command Prompt – for general x64 system. None of them are different; the only difference is that they are provided for different platforms. As it is hard to run Visual Studio Command Prompt from Windows Task manager, you have to call it from a simple Command Prompt; it means that you have to run the following command in your Command Prompt. After that Visual Studio tools will include into your simple command prompt.
call "C:\Program Files (x86) \ Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86_amd64
x86_amd64 will call x64 Cross Tools. To build your solutions you can use following commands
Note that you can use a path like MSBuild D:\src\YourSolution.sln for your projects. As you all know .NET provide two different type of output for each project, Debug & Release. To specify the type of output you can use following code
I wanted to run a Continues Integration for my company and I set up Team City at first. It is a great application which works very nice and I configured it easily. Unfortunately our portal is one of the old asp.net website so that I couldn’t use Team City to publish my website because it work just with Web Application.
Then I try to use MSBuild for compiling and publishing my website and it wasn’t a good solution in order to the type of projects. Finally I had to use AspNetCompiler. It is a compiler to publish and build Asp.net website and you have to customize it to work with your project. Here are steps in which I did to publish my website via command line.
1 – Create a XML file with desire name next to your Portal Solution (portal.sln). I use this name “AutomateBuildConfiguration.xml”.
2 – Then you have to configure this XML file with this instruction. For me following configuration was enough:
Podcast is one of the most interesting innovations on the web. Usually technology pioneers trying to share their knoweledge or products to gain more attention or to earn more money. Some ones creates podcast in order to teach something freely or to challenge a technology. Podcast is a good way to share something with a group of people.
I was looking for an Audio Book and I faced with a bunch of good references, so that I decided toshare these references with you. These are some weblogs or websites in which you can find programming related podcasts or audio books.
4 – http://channel9.msdn.com , Microsoft is one of the leaders in software industry, and try to broadcast it’s developing from the inside out. The project managers talk about their projects and show you what will release in near future. It is one of my favourites.
Two days ago Unicode 6.0.0 was released and it has important changes. There are also some changes that Iranian developers should be aware of, or is better to be aware. I try to summarize the changes base on what Roozbeh Pournader said in Persian Computing Community, and I also add some other information that mentioned in Unicode Official Website. I will post two article for this, the first one (this article) includes Unicode 6.0 information and the second one is some description about whatever is important for Iranian developers.
Note: Most of the text that you are going to read is copied from Unicode Official Website and Roozbeh Pournader text, so that the main writers are them. I just summarized and categorized text for complete information and revise it in some parts.
What is inside of Unicode 6.0
Version 6.0 of the Unicode Standard consists of the core specification, the delta and archival code charts for this version, the Unicode Standard Annexes, and the Unicode Character Database (UCD).
The core specification gives the general principles, requirements for conformance, and guidelines for implementers.
The code charts show representative glyphs for all the Unicode characters.
The Unicode Standard Annexes supply detailed normative information about particular aspects of the standard.
The Unicode Character Database supplies normative and informative data for implementers to allow them to implement the Unicode Standard.
“The links for most Version 6.0.0 chapters, and the front and back matter of the core specification are not yet active, because that text is still undergoing its last stage of editorial review” Unicode Official Website said. “These links will be activated over the next several months, once the editorial review is complete”.
For Unicode 6.0.0 in particular two additional sets of code chart pages are provided:
A set of delta code charts showing only the new blocks for Unicode 6.0.0 and any existing blocks for which new characters were added in Unicode 6.0.0. All new characters are visually highlighted in those charts.
A set of archival code charts that represent the entire set of characters, names and representative glyphs at the time of publication of Unicode 6.0.0.
The delta and archival code charts are a stable part of this release of the Unicode Standard. They will never be updated.
What is new in Unicode 6.0?
1 – 2088 new characters have been added, including
Over 1,000 additional symbols—chief among them the additional Emoji symbols, which are especially important for mobile phones.
The new official Indian currency symbol: the Indian Rupee Sign.
222 additional CJK Unified Ideographs in common use in China, Taiwan, and Japan.
603 additional characters for African language support, including extensions to the Tifinagh, Ethiopic, and Bamum scripts.
Three additional scripts: Mandaic, Batak, and Brahmi.
2 – Some new properties and data files have been added including
A data file, EmojiSources.txt, which maps the Emoji symbols to their original Japanese telco source sets
Two provisional properties for support of Indic scripts: IndicMatraCategory and IndicSyllabicCategory
Provisional script extension data for use in segmentation, regular expressions, and spoof detection
3 – Some character properties for existing characters have been corrected including
Numerous improvements to provisional properties for CJK Unified Ideographs
Format updates for many normative IRG source tags, to better synchronize with ISO/IEC 10646 (see UAX #38, Unicode Han Database, for details)
4 – Amends the text of the Standard
Many changes to the core specification, listed in D. Textual Changes and Character Additions
Small clarifications of the conformance clauses in UAX #9, The Unicode Bidirectional Algorithm, but no significant changes to conformance requirements
Major editorial revisions of UAX #44, Unicode Character Database, and UAX #15, Unicode Normalization Forms, but no significant changes to conformance requirements
5 – Provides format improvements, including
Charts for CJK Compatibility Ideographs are now laid out in a multicolumn format showing sources, comparable to the structure of the charts for the CJK Unified Ideographs
UTS #10, Unicode Collation Algorithm, and UTS #46, Unicode IDNA Compatibility Processing, maintained in synchrony with the Unicode Standard, and have updates for Version 6.0.
The repertoire for Unicode Version 6.0 includes all the characters of the Second Edition, plus one additional character U+20B9 INDIAN RUPEE SIGN, which is still in the process of addition to 10646.
Character Assignment Overview
230 characters have been added to the BMP, while 1,858 characters have been added in the supplementary planes. For the first time in the history of the Unicode Standard, the majority of the regular encoded characters (graphic and format) are not in the BMP.
Most character additions are in new blocks, but there are also character additions to a number of existing blocks.
The following table shows the allocation of code points in Unicode 6.0, by character type. It highlights the numbers for the BMP and the supplementary planes separately. For more information on the specific characters newly assigned in Unicode 6.0, see the file DerivedAge.txt in the Unicode Character Database. For more details regarding character counts, see Appendix D, Changes from Previous Versions.
The newly-defined blocks in Version 6.0 are:
Miscellaneous Symbols And Pictographs
Transport And Map Symbols
CJK Unified Ideographs Extension D
Text Changes and Additions
Numbers indicate the chapter or section in the Unicode 6.0 core specification where there are some significant changes or additions. This list is not exhaustive. Select changes for Chapter 3, Conformance, are listed separately under E. Conformance Changes. Many figures have been updated or added throughout.
Preface: Rewrote extensively
5.17: Updated shift/rotate in UTF8/UTF16 binary order algorithm
6.2: Documented dandas
7.1: Added new text on Latvian (and Sorbian) letters in Latin Extended-D
8.2: Updates to Arabic, including Arabic pedagogical symbols (nuktas) and Kashmiri additions for Arabic
9: Various updates to Indic, including additions to tables of vowel letters
9.1: Updates to Devanagari, including Kashmiri additions for Devanagari
9.5: Added text on Oriya fraction signs
9.6: Improvements to Tamil
9.9: Added text on new Malayalam characters, including Dot Reph
10.2: Various updates to Tibetan
11.13: Various updates to Balinese
11.14: Various updates to Javanese
12.1: Various updates to Han; added new section on CJK Extension D
12.4: Added new subsection on Kana Supplement in Hiragana and Katakana
12.6: Various updates to Hangul
13.1: New text on Ethiopic additions in Ethiopic Extended-A
13.4: Added new text on Tifinagh bi-consonants
13.7: Added new text for Bamum Supplement
15: New text on Emoji affecting the description of the following code ranges:
o 2300-23FF Miscellaneous Technical
o 2700-27BF Dingbats
o 1F0A0-1F0FF Playing Cards
o 1F100-1F1FF Enclosed Alphanumeric Supplement
o 1F300-1F5FF Miscellaneous Symbols And Pictographs
o 1F600-1F64F Emoticons
o 1F680-1F6FF Transport And Map symbols
15.1: New text on U+20B9 INDIAN RUPEE SIGN
15.8: New subsection on Alchemical Symbols
16.8: Updates regarding annotation characters and bidi
17.2: Updated to note the new presentation format for compatibility ideographs
Appendices and Back Matter: various updates
Han Radical-Stroke Index now online only; introductory material moved to chapter 12
Unicode Character Database changes
A general category change to two Kannada characters (U+0CF1, U+0CF2), which has the effect of making them newly eligible for inclusion in identifiers
A general category change to one New Tai Lue numeric character (U+19CA), which would have the effect of disqualifying it from inclusion in identifiers unless grandfathering measures are in place for the defining identifier syntax
Changes to ten characters affecting the determination of script runs
The formal deprecation of one Arabic character
Reversal of the default grapheme cluster boundary determination for Thai and Lao to the behavior specified in Unicode 5.0
Other significant changes include:
Addition of the EmojiSources.txt data file, detailing source mapping information for the Emoji characters
Addition of the provisional ScriptExtensions.txt data file, providing information about use of certain characters with multiple scripts
Addition of new provisional properties related to the structure of syllables in Indic scripts
Deprecation of several derived properties related to Unicode normalization
Improvement of the LineBreakTest.txt and BidiTest.txt files
In order to complete Web 2.0 Design Guide series, I’ll explain some point to bring simplicity to your pages, today. There is an unwritten law that says “An unfocused page will guide visitors to hell”. So, how to make a Focus page? Or it is better to say How to bring Simplicity to your Web forms ?
Using White Space
Most of Web 2.0 pages are flat. Actually designers use empty space of a page to make it simple and focused. For example, imagine that you have a page with a Top Menu and a Main Content area, to get focus to your Main Contents you have to use a simple Top Menu and some white space between menu and Main Contents, by this, your Top & Main Sections will separate completely and visitor will determine the content area as easy as possible. It helps that Top Navigation and Main Contents, focus to their own content with no conflict to other parts.
Using Solid Area
You can use white space to split your page areas up in which your page sections are seperated from each other, or using Solid Areas for integrate sections. This approach help those which doesn’t like White Spaces on page and want to design an integrate page, so that, to make focus, use some Solid Areas on page. Simplest approach to make Solid areas is to use Color. You can assign different colors to different areas to distinct them. But note that you have to use different range of color for each section and finding a good composition is not so easy.
There are some Websites that gives you idea to have a good composition. One of the best one is http://www.ColorLovers.com. I like it so much, most of the time I choose one composition from suggested colors.
You have to make sure that your different areas are completly seperated by using different colors and they are in touch with each other with a good composition.
Bigger and Bold Texts
Text size in web pages can split your content areas. Actually when you got focus to an area (like Main Content or Top Menu or etc) you can break it into some local regions. You have some choices to do this, for instance, you can use images, Icons, Bold or Bigger Text sizes. (I’ll talk about using Icons and images later in another post). Using text to separate regions has some advantages like:
It is Search Engine Friendly
Cause to higher rank in search results (if you use standard html tag – h1, strong)
It is easier to implement
Users can understand it at a glance
It is integrate with your contents
If you are familiar with some other approaches to make pages simpler share it with me.