[pygccxml-commit] SF.net SVN: pygccxml:[1729]
Brought to you by:
mbaas,
roman_yakovenko
From: <rom...@us...> - 2009-05-13 11:58:30
|
Revision: 1729 http://pygccxml.svn.sourceforge.net/pygccxml/?rev=1729&view=rev Author: roman_yakovenko Date: 2009-05-13 11:58:25 +0000 (Wed, 13 May 2009) Log Message: ----------- updating encoding Modified Paths: -------------- pyplusplus_dev/docs/download.rest Added Paths: ----------- developer_scripts/ensure_utf8.py Added: developer_scripts/ensure_utf8.py =================================================================== --- developer_scripts/ensure_utf8.py (rev 0) +++ developer_scripts/ensure_utf8.py 2009-05-13 11:58:25 UTC (rev 1729) @@ -0,0 +1,43 @@ +# Copyright 2004-2008 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. (See +# accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) + +import os +import codecs +from file_system_iter import files_iterator, folders_iterator + +to_be_validated_file_exts = [ + '*.rest' +] + +def ensure_utf8( fpath ): + def read_content( fpath ): + last_error = None + for encoding in [ 'ascii', 'UTF8', 'UTF16' ]: + try: + f = codecs.open( fpath, 'rb', encoding ) + fcontent = f.read() + f.close() + return fcontent + except UnicodeDecodeError, err: + last_error = err + else: + raise last_error + + def write_content( fpath, content ): + fcontent_new = content #unicode( content, 'UTF8' ) + f = codecs.open( fpath, 'w+b', 'UTF8' ) + f.write( fcontent_new ) + f.close() + + write_content( fpath, read_content( fpath ) ) + + +if __name__ == '__main__': + sources_dir = os.path.join( os.path.abspath( os.curdir ), '..' ) + + for fpath in files_iterator( sources_dir, to_be_validated_file_exts ): + print 'converting %s' % fpath + ensure_utf8( fpath ) + print 'converting %s - done' % fpath Modified: pyplusplus_dev/docs/download.rest =================================================================== --- pyplusplus_dev/docs/download.rest 2009-05-13 11:25:12 UTC (rev 1728) +++ pyplusplus_dev/docs/download.rest 2009-05-13 11:58:25 UTC (rev 1729) @@ -1,58 +1,58 @@ -================== -Download & Install -================== - -------------------- -Py++ on SourceForge -------------------- - -:doc:`Py++ <pyplusplus>` project is hosted on SourceForge. Using SourceForge services you -can: - -1) get access to source code -2) get access to latest release version of :doc:`Py++ <pyplusplus>` - - ------------------ -Subversion access ------------------ - -http://sourceforge.net/svn/?group_id=118209 - --------- -Download --------- - -https://sourceforge.net/project/showfiles.php?group_id=118209 - ------------- -Installation ------------- - -In command prompt or shell change current directory to be "pyplusplus-X.Y.Z". -"X.Y.Z" is version of :doc:`Py++ <pyplusplus>`. Type the following command: - -| ``python setup.py install`` - -After this command complete, you should have installed :doc:`Py++ <pyplusplus>` package. - -Boost.Python installation -------------------------- - -Users of Microsoft Windows can enjoy from simple `installer for Boost Libraries`_. -You can find it `here`_. Take a look on new `getting started guide`_ for Boost -libraries. - -Another very valuable link related to Boost is http://engineering.meta-comm.com/boost.aspx . -You will find hourly snapshots of the source code and the documentation for all -Boost libraries. - -.. _`getting started guide` : http://boost.cvs.sourceforge.net/*checkout*/boost/boost/more/getting_started.html -.. _`here` : http://www.boost-consulting.com/products/free -.. _`installer for Boost Libraries` : http://www.boost-consulting.com/products/free - ------------- -Dependencies ------------- - -* :doc:`pygccxml <../pygccxml/pygccxml>` +================== +Download & Install +================== + +------------------- +Py++ on SourceForge +------------------- + +:doc:`Py++ <pyplusplus>` project is hosted on SourceForge. Using SourceForge services you +can: + +1) get access to source code +2) get access to latest release version of :doc:`Py++ <pyplusplus>` + + +----------------- +Subversion access +----------------- + +http://sourceforge.net/svn/?group_id=118209 + +-------- +Download +-------- + +https://sourceforge.net/project/showfiles.php?group_id=118209 + +------------ +Installation +------------ + +In command prompt or shell change current directory to be "pyplusplus-X.Y.Z". +"X.Y.Z" is version of :doc:`Py++ <pyplusplus>`. Type the following command: + +| ``python setup.py install`` + +After this command complete, you should have installed :doc:`Py++ <pyplusplus>` package. + +Boost.Python installation +------------------------- + +Users of Microsoft Windows can enjoy from simple `installer for Boost Libraries`_. +You can find it `here`_. Take a look on new `getting started guide`_ for Boost +libraries. + +Another very valuable link related to Boost is http://engineering.meta-comm.com/boost.aspx . +You will find hourly snapshots of the source code and the documentation for all +Boost libraries. + +.. _`getting started guide` : http://boost.cvs.sourceforge.net/*checkout*/boost/boost/more/getting_started.html +.. _`here` : http://www.boost-consulting.com/products/free +.. _`installer for Boost Libraries` : http://www.boost-consulting.com/products/free + +------------ +Dependencies +------------ + +* :doc:`pygccxml <../pygccxml/pygccxml>` This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |