diff --git a/pot/Appendix.pot b/pot/Appendix.pot index 4586486..f2ec079 100644 --- a/pot/Appendix.pot +++ b/pot/Appendix.pot @@ -1,27 +1,24 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:12\n" +"PO-Revision-Date: 2010-09-27T11:50:12\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: Appendix.xml:9 #, no-c-format msgid "Revision History" msgstr "" #. Tag: para -#: Appendix.xml:10 #, no-c-format msgid "Publican" msgstr "" + diff --git a/pot/Author_Group.pot b/pot/Author_Group.pot index a8e970d..4f2e29b 100644 --- a/pot/Author_Group.pot +++ b/pot/Author_Group.pot @@ -1,24 +1,29 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#. Tag: author -#: Author_Group.xml:6 +#. Tag: firstname #, no-c-format -msgid "" -"Kushal Das " -" Linux User Group of Durgapur kushal@fedoraproject.org" +msgid "Kushal" +msgstr "" + +#. Tag: surname +#, no-c-format +msgid "Das" msgstr "" + +#. Tag: orgdiv +#, no-c-format +msgid "Linux User Group of Durgapur" +msgstr "" + diff --git a/pot/Book_Info.pot b/pot/Book_Info.pot index cecbd18..4ec1bad 100644 --- a/pot/Book_Info.pot +++ b/pot/Book_Info.pot @@ -1,45 +1,24 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: Book_Info.xml:6 #, no-c-format -msgid "Python for you and me" -msgstr "" - -#. Tag: subtitle -#: Book_Info.xml:7 -#, no-c-format -msgid "Python for you and me" +msgid "Python for you and me" msgstr "" #. Tag: para -#: Book_Info.xml:11 #, no-c-format msgid "This book is for the python newbies" msgstr "" -#. Tag: phrase -#: Book_Info.xml:17 -#, no-c-format -msgid "Logo" -msgstr "" - -#. Tag: holder -#: Book_Info.xml:21 -#, no-c-format -msgid "&HOLDER;" -msgstr "" diff --git a/pot/Chapter.pot b/pot/Chapter.pot index 0c65a66..4a17a29 100644 --- a/pot/Chapter.pot +++ b/pot/Chapter.pot @@ -1,45 +1,39 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: Chapter.xml:6 #, no-c-format msgid "Test" msgstr "" #. Tag: para -#: Chapter.xml:7 #, no-c-format msgid "This is a test paragraph" msgstr "" #. Tag: title -#: Chapter.xml:11 #, no-c-format msgid "Section 1 Test" msgstr "" #. Tag: para -#: Chapter.xml:12 Chapter.xml:19 #, no-c-format msgid "Test of a section" msgstr "" #. Tag: title -#: Chapter.xml:18 #, no-c-format msgid "Section 2 Test" msgstr "" + diff --git a/pot/LegalNotice.pot b/pot/LegalNotice.pot index 8d66168..99525a8 100644 --- a/pot/LegalNotice.pot +++ b/pot/LegalNotice.pot @@ -1,277 +1,169 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: para -#: LegalNotice.xml:29 #, no-c-format -msgid "" -"Permission is granted to copy, distribute, and/or modify this document under " -"the terms of the Open Publication Licence, Version 1.0, or any later " -"version. The terms of the OPL are set out below." +msgid "Permission is granted to copy, distribute, and/or modify this document under the terms of the Open Publication Licence, Version 1.0, or any later version. The terms of the OPL are set out below." msgstr "" #. Tag: bridgehead -#: LegalNotice.xml:36 #, no-c-format msgid "REQUIREMENTS ON BOTH UNMODIFIED AND MODIFIED VERSIONS" msgstr "" #. Tag: para -#: LegalNotice.xml:38 #, no-c-format -msgid "" -"Open Publication works may be reproduced and distributed in whole or in " -"part, in any medium physical or electronic, provided that the terms of this " -"license are adhered to, and that this license or an incorporation of it by " -"reference (with any options elected by the author(s) and/or publisher) is " -"displayed in the reproduction." +msgid "Open Publication works may be reproduced and distributed in whole or in part, in any medium physical or electronic, provided that the terms of this license are adhered to, and that this license or an incorporation of it by reference (with any options elected by the author(s) and/or publisher) is displayed in the reproduction." msgstr "" #. Tag: para -#: LegalNotice.xml:47 #, no-c-format msgid "Proper form for an incorporation by reference is as follows:" msgstr "" #. Tag: para -#: LegalNotice.xml:51 #, no-c-format -msgid "" -"Copyright (c) <year> by <author's name or designee>. This " -"material may be distributed only subject to the terms and conditions set " -"forth in the Open Publication License, vX.Y or later (the latest version is " -"presently available at )." +msgid "Copyright (c) <year> by <author's name or designee>. This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, vX.Y or later (the latest version is presently available at )." msgstr "" #. Tag: para -#: LegalNotice.xml:58 #, no-c-format -msgid "" -"The reference must be immediately followed with any options elected by the " -"author(s) and/or publisher of the document (see section VI). Commercial " -"redistribution of Open Publication-licensed material is permitted. Any " -"publication in standard (paper) book form shall require the citation of the " -"original publisher and author. The publisher and author's names shall appear " -"on all outer surfaces of the book. On all outer surfaces of the book the " -"original publisher's name shall be as large as the title of the work and " -"cited as possessive with respect to the title." +msgid "The reference must be immediately followed with any options elected by the author(s) and/or publisher of the document (see section VI). Commercial redistribution of Open Publication-licensed material is permitted. Any publication in standard (paper) book form shall require the citation of the original publisher and author. The publisher and author's names shall appear on all outer surfaces of the book. On all outer surfaces of the book the original publisher's name shall be as large as the title of the work and cited as possessive with respect to the title." msgstr "" #. Tag: bridgehead -#: LegalNotice.xml:72 #, no-c-format msgid "COPYRIGHT" msgstr "" #. Tag: para -#: LegalNotice.xml:73 #, no-c-format -msgid "" -"The copyright to each Open Publication is owned by its author(s) or designee." +msgid "The copyright to each Open Publication is owned by its author(s) or designee." msgstr "" #. Tag: bridgehead -#: LegalNotice.xml:79 #, no-c-format msgid "SCOPE OF LICENSE" msgstr "" #. Tag: para -#: LegalNotice.xml:81 #, no-c-format -msgid "" -"The following license terms apply to all Open Publication works, unless " -"otherwise explicitly stated in the document." +msgid "The following license terms apply to all Open Publication works, unless otherwise explicitly stated in the document." msgstr "" #. Tag: para -#: LegalNotice.xml:86 #, no-c-format -msgid "" -"Mere aggregation of Open Publication works or a portion of an Open " -"Publication work with other works or programs on the same media shall not " -"cause this license to apply to those other works. The aggregate work shall " -"contain a notice specifying the inclusion of the Open Publication material " -"and appropriate copyright notice." +msgid "Mere aggregation of Open Publication works or a portion of an Open Publication work with other works or programs on the same media shall not cause this license to apply to those other works. The aggregate work shall contain a notice specifying the inclusion of the Open Publication material and appropriate copyright notice." msgstr "" #. Tag: para -#: LegalNotice.xml:95 #, no-c-format -msgid "" -"SEVERABILITY. If any part of this license is found to be unenforceable in " -"any jurisdiction, the remaining portions of the license remain in force." +msgid "SEVERABILITY. If any part of this license is found to be unenforceable in any jurisdiction, the remaining portions of the license remain in force." msgstr "" #. Tag: para -#: LegalNotice.xml:101 #, no-c-format -msgid "" -"NO WARRANTY. Open Publication works are licensed and provided \"as is\" " -"without warranty of any kind, express or implied, including, but not limited " -"to, the implied warranties of merchantability and fitness for a particular " -"purpose or a warranty of non-infringement." +msgid "NO WARRANTY. Open Publication works are licensed and provided "as is" without warranty of any kind, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose or a warranty of non-infringement." msgstr "" #. Tag: bridgehead -#: LegalNotice.xml:110 #, no-c-format msgid "REQUIREMENTS ON MODIFIED WORKS" msgstr "" #. Tag: para -#: LegalNotice.xml:112 #, no-c-format -msgid "" -"All modified versions of documents covered by this license, including " -"translations, anthologies, compilations and partial documents, must meet the " -"following requirements:" +msgid "All modified versions of documents covered by this license, including translations, anthologies, compilations and partial documents, must meet the following requirements:" msgstr "" #. Tag: para -#: LegalNotice.xml:120 #, no-c-format msgid "The modified version must be labeled as such." msgstr "" #. Tag: para -#: LegalNotice.xml:125 #, no-c-format -msgid "" -"The person making the modifications must be identified and the modifications " -"dated." +msgid "The person making the modifications must be identified and the modifications dated." msgstr "" #. Tag: para -#: LegalNotice.xml:131 #, no-c-format -msgid "" -"Acknowledgement of the original author and publisher if applicable must be " -"retained according to normal academic citation practices." +msgid "Acknowledgement of the original author and publisher if applicable must be retained according to normal academic citation practices." msgstr "" #. Tag: para -#: LegalNotice.xml:138 #, no-c-format msgid "The location of the original unmodified document must be identified." msgstr "" #. Tag: para -#: LegalNotice.xml:144 #, no-c-format -msgid "" -"The original author's (or authors') name(s) may not be used to assert or " -"imply endorsement of the resulting document without the original author's " -"(or authors') permission." +msgid "The original author's (or authors') name(s) may not be used to assert or imply endorsement of the resulting document without the original author's (or authors') permission." msgstr "" #. Tag: bridgehead -#: LegalNotice.xml:153 #, no-c-format msgid "GOOD-PRACTICE RECOMMENDATIONS" msgstr "" #. Tag: para -#: LegalNotice.xml:155 #, no-c-format -msgid "" -"In addition to the requirements of this license, it is requested from and " -"strongly recommended of redistributors that:" +msgid "In addition to the requirements of this license, it is requested from and strongly recommended of redistributors that:" msgstr "" #. Tag: para -#: LegalNotice.xml:162 #, no-c-format -msgid "" -"If you are distributing Open Publication works on hardcopy or CD-ROM, you " -"provide email notification to the authors of your intent to redistribute at " -"least thirty days before your manuscript or media freeze, to give the " -"authors time to provide updated documents. This notification should describe " -"modifications, if any, made to the document." +msgid "If you are distributing Open Publication works on hardcopy or CD-ROM, you provide email notification to the authors of your intent to redistribute at least thirty days before your manuscript or media freeze, to give the authors time to provide updated documents. This notification should describe modifications, if any, made to the document." msgstr "" #. Tag: para -#: LegalNotice.xml:172 #, no-c-format -msgid "" -"All substantive modifications (including deletions) be either clearly marked " -"up in the document or else described in an attachment to the document." +msgid "All substantive modifications (including deletions) be either clearly marked up in the document or else described in an attachment to the document." msgstr "" #. Tag: para -#: LegalNotice.xml:179 #, no-c-format -msgid "" -"Finally, while it is not mandatory under this license, it is considered good " -"form to offer a free copy of any hardcopy and CD-ROM expression of an Open " -"Publication-licensed work to its author(s)." +msgid "Finally, while it is not mandatory under this license, it is considered good form to offer a free copy of any hardcopy and CD-ROM expression of an Open Publication-licensed work to its author(s)." msgstr "" #. Tag: bridgehead -#: LegalNotice.xml:190 #, no-c-format msgid "LICENSE OPTIONS" msgstr "" #. Tag: para -#: LegalNotice.xml:192 #, no-c-format -msgid "" -"The author(s) and/or publisher of an Open Publication-licensed document may " -"elect certain options by appending language to the reference to or copy of " -"the license. These options are considered part of the license instance and " -"must be included with the license (or its incorporation by reference) in " -"derived works." +msgid "The author(s) and/or publisher of an Open Publication-licensed document may elect certain options by appending language to the reference to or copy of the license. These options are considered part of the license instance and must be included with the license (or its incorporation by reference) in derived works." msgstr "" #. Tag: para -#: LegalNotice.xml:201 #, no-c-format -msgid "" -"A. To prohibit distribution of substantively modified versions without the " -"explicit permission of the author(s). \"Substantive modification\" is " -"defined as a change to the semantic content of the document, and excludes " -"mere changes in format or typographical corrections." +msgid "A. To prohibit distribution of substantively modified versions without the explicit permission of the author(s). "Substantive modification" is defined as a change to the semantic content of the document, and excludes mere changes in format or typographical corrections." msgstr "" #. Tag: para -#: LegalNotice.xml:209 #, no-c-format -msgid "" -"To accomplish this, add the phrase 'Distribution of substantively modified " -"versions of this document is prohibited without the explicit permission of " -"the copyright holder.' to the license reference or copy." +msgid "To accomplish this, add the phrase 'Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder.' to the license reference or copy." msgstr "" #. Tag: para -#: LegalNotice.xml:216 #, no-c-format -msgid "" -"B. To prohibit any publication of this work or derivative works in whole or " -"in part in standard (paper) book form for commercial purposes is prohibited " -"unless prior permission is obtained from the copyright holder." +msgid "B. To prohibit any publication of this work or derivative works in whole or in part in standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder." msgstr "" #. Tag: para -#: LegalNotice.xml:223 #, no-c-format -msgid "" -"To accomplish this, add the phrase 'Distribution of the work or derivative " -"of the work in any standard (paper) book form is prohibited unless prior " -"permission is obtained from the copyright holder.' to the license reference " -"or copy." +msgid "To accomplish this, add the phrase 'Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder.' to the license reference or copy." msgstr "" + diff --git a/pot/Preface.pot b/pot/Preface.pot index 867b5fc..194527d 100644 --- a/pot/Preface.pot +++ b/pot/Preface.pot @@ -1,21 +1,19 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: Preface.xml:6 #, no-c-format msgid "Preface" msgstr "" + diff --git a/pot/Python_for_you_and_me.pot b/pot/Python_for_you_and_me.pot index e69de29..8789975 100644 --- a/pot/Python_for_you_and_me.pot +++ b/pot/Python_for_you_and_me.pot @@ -0,0 +1,14 @@ +# +# AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + diff --git a/pot/Revision_History.pot b/pot/Revision_History.pot index 19dba30..da5d402 100644 --- a/pot/Revision_History.pot +++ b/pot/Revision_History.pot @@ -1,29 +1,29 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#. Tag: author -#: Revision_History.xml:9 +#. Tag: firstname #, no-c-format -msgid "" -"Kushal Das " -"kushal@fedoraproject.org" +msgid "Kushal" +msgstr "" + +#. Tag: surname +#, no-c-format +msgid "Das" msgstr "" #. Tag: member -#: Revision_History.xml:16 #, no-c-format msgid "First release" msgstr "" + diff --git a/pot/acknowledgment.pot b/pot/acknowledgment.pot index 425ad89..acecb8f 100644 --- a/pot/acknowledgment.pot +++ b/pot/acknowledgment.pot @@ -1,126 +1,109 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: acknowledgment.xml:6 #, no-c-format msgid "Acknowledgment" msgstr "" #. Tag: para -#: acknowledgment.xml:7 #, no-c-format -msgid "" -"I would like to thank the following people who have helped me make it " -"through this book. Specially #fedora-docs in irc.freenode.net and also " -"#fedora-art . Names are in alphabetic order:" +msgid "I would like to thank the following people who have helped me make it through this book. Specially #fedora-docs in irc.freenode.net and also #fedora-art . Names are in alphabetic order:" msgstr "" #. Tag: para -#: acknowledgment.xml:13 #, no-c-format msgid "Jared Smith" msgstr "" #. Tag: para -#: acknowledgment.xml:14 #, no-c-format msgid "Marco Mornati" msgstr "" #. Tag: para -#: acknowledgment.xml:15 #, no-c-format msgid "Nicu Buculei" msgstr "" #. Tag: para -#: acknowledgment.xml:16 #, no-c-format msgid "Paul W. Frields" msgstr "" #. Tag: para -#: acknowledgment.xml:17 #, no-c-format msgid "Pradeepto K Bhattacharya" msgstr "" #. Tag: para -#: acknowledgment.xml:18 #, no-c-format msgid "Sankarshan Mukhopadhyay" msgstr "" #. Tag: para -#: acknowledgment.xml:19 #, no-c-format msgid "Sayamindu Dasgupta" msgstr "" #. Tag: para -#: acknowledgment.xml:20 #, no-c-format msgid "Stephanie Whiting" msgstr "" #. Tag: para -#: acknowledgment.xml:21 +#, no-c-format +msgid "Prashad J. Pandit" +msgstr "" + +#. Tag: para #, no-c-format msgid "I am missing some names in the above list, will add them soon" msgstr "" #. Tag: para -#: acknowledgment.xml:24 #, no-c-format msgid "I also took help from the following sites" msgstr "" #. Tag: para -#: acknowledgment.xml:29 #, no-c-format msgid "http://docs.python.org" msgstr "" #. Tag: para -#: acknowledgment.xml:30 #, no-c-format msgid "http://en.wikipedia.org" msgstr "" #. Tag: para -#: acknowledgment.xml:33 #, no-c-format msgid "Few books or sites I would recommend to read" msgstr "" -#. Tag: citetitle -#: acknowledgment.xml:36 +#. Tag: para #, no-c-format -msgid "Byte of Python" +msgid "Byte of Python" msgstr "" -#. Tag: citetitle -#: acknowledgment.xml:37 +#. Tag: para #, no-c-format -msgid "Dive into Python" +msgid "Dive into Python" msgstr "" -#. Tag: citetitle -#: acknowledgment.xml:38 +#. Tag: para #, no-c-format -msgid "Python Tutorial" +msgid "Python Tutorial" msgstr "" + diff --git a/pot/classes.pot b/pot/classes.pot index 05b9773..a6642ad 100644 --- a/pot/classes.pot +++ b/pot/classes.pot @@ -1,136 +1,312 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: classes.xml:6 #, no-c-format msgid "Class" msgstr "" #. Tag: para -#: classes.xml:7 #, no-c-format -msgid "" -"What is a class? In our daily life, we come accross " -"many objects which are similar kind or in words which are basically same. " -"For example we can think about a car. There are different brands , color, " -"look, style, parts, but basically they all are cars. All them of are made by " -"different companies but with similar kind of components." +msgid "What is a class? In our daily life, we come across many objects which are similar kind or in words which are basically same. For example we can think about a car. There are different brands , color, look, style, parts, but basically they all are cars. All them of are made by different companies but with similar kind of components." msgstr "" #. Tag: para -#: classes.xml:10 #, no-c-format -msgid "" -"We can say all of them are different instances of the class car. They all belongs to the car class. Every instance is known as " -"an object in computer world. A class can contain variables or methods to access those variables.In " -"Python everything is an object. Even if you create an " -"integer, that is an object of the Integer class. In C++ " -"this is different." +msgid "We can say all of them are different instances of the class car. They all belongs to the car class. Every instance is known as an object in computer world. A class can contain variables or methods to access those variables.In Python everything is an object. Even if you create an integer, that is an object of the Integer class. In C++ this is different." msgstr "" #. Tag: title -#: classes.xml:14 #, no-c-format msgid "Your first class" msgstr "" #. Tag: para -#: classes.xml:15 #, no-c-format -msgid "" -"Before writing your first class, you should know the syntax. We define a " -"class in the following way.." +msgid "Before writing your first class, you should know the syntax. We define a class in the following way.." msgstr "" #. Tag: screen -#: classes.xml:18 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: classes.xml:19 #, no-c-format -msgid "" -"in the statements you can write any python statement, you can define " -"functions (which we call methods of a class)." +msgid "in the statements you can write any python statement, you can define functions (which we call methods of a class)." msgstr "" #. Tag: screen -#: classes.xml:22 #, no-c-format -msgid "" -">> class MyClass:\n" -"...\n" -"Display all 180 possibilities? (y or n)\n" +msgid "\n" +"\n" +">>> class MyClass:\n" "... a = 90\n" "... b = 88\n" "...\n" -">>> p = MyClass()\n" -">>> p\n" -"<__main__.MyClass instance at 0xb7c8aa6c>\n" -"]]>" +">>> p = MyClass()\n" +">>> p\n" +"<__main__.MyClass instance at 0xb7c8aa6c>\n" +"\n" +"" msgstr "" #. Tag: para -#: classes.xml:23 #, no-c-format -msgid "" -"In the above example you can see first we are declaring a class called " -"MyClass, wrting some random statements inside that class. After the class " -"defination, we are creating an object p of the " -"class MyClass.If you do a dir on that..." +msgid "In the above example you can see first we are declaring a class called MyClass, writing some random statements inside that class. After the class definition, we are creating an object p of the class MyClass.If you do a dir on that..." msgstr "" #. Tag: screen -#: classes.xml:26 #, no-c-format -msgid "" -">> dir(p)\n" -"['__doc__', '__module__', 'a', 'b']\n" -"]]>" +msgid "\n" +"\n" +">>> dir(p)\n" +"['__doc__', '__module__', 'a', 'b']\n" +"\n" +"" msgstr "" #. Tag: para -#: classes.xml:27 #, no-c-format -msgid "" -"You can see the variables a and b " -"inside it." +msgid "You can see the variables a and b inside it." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "__init__ method" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "__init__ is a special method in python classes, it is the constructor method for a class. In the following example you can see how to use it" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> class Student:\n" +"... def __init__(self, name, branch, year):\n" +"... self.name = name\n" +"... self.branch = branch\n" +"... self.year = year\n" +"... print "A student object is created"\n" +"... def getName(self):\n" +"... return self.name\n" +"... def setName(self, name):\n" +"... self.name = name\n" +"...\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "__init__ is called when ever an object of the class is constructed.That means when ever we will create a student object we will see the message "Creating a new student" in the prompt. You can see the first argument to the method is self. It is a special variable which points to the current object (like `this` in C++). The object is passed implicitly to every method available in it , but we have to get it explicitly in every method while writing the methods. Example shown below." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> std1 = Student()\n" +"Traceback (most recent call last):\n" +" File "<stdin>", line 1, in <module>\n" +"TypeError: __init__() takes exactly 4 arguments (1 given)\n" +">>> std1 = Student('Kushal','CSE','2005')\n" +"A student object is created\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In this example at first we tried to create a Student object with passing any argument and python interpreter complained that it takes exactly 4 arguments but received only one (self). Then we created an object with proper argument values and from the message printed, one can easily understand that __init__ method was called as the constructor method." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now we are going to call getName() and setName() methods." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> std1.getName()\n" +"'Kushal'\n" +">>> std1.setName()\n" +"Traceback (most recent call last):\n" +" File "<stdin>", line 1, in <module>\n" +"TypeError: setName() takes exactly 2 arguments (1 given)\n" +">>> std1.setName('Shreyank Gupta')\n" +">>> std1.getName()\n" +"'Shreyank Gupta'\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First we called getName on the object we created, then tried to call setName without any arguments and we got an error. Next we again called setName with argument 'Shreyank Gupta'. Now calling getName gives 'Shreyank Gupta' as the output." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Inheritance" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In general we human beings always know about inheritance. In programming it is almost the same. When a class inherits another class it inherits all features(like variables and methods) of the parent class. This helps in reusing codes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the next example we first create a class called Person and create two sub-classes Student and Teacher. As both of the classes are inherited from Person class they will have all methods of Person and will have new methods and variables for their own purpose." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "student_teacher.py" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +"#!/usr/bin/env python\n" +"\n" +"class Person:\n" +" def __init__(self,name):\n" +" self.name = name\n" +"\n" +" def getDetails(self):\n" +" return self.name\n" +"\n" +"\n" +"class Student(Person):\n" +" def __init__(self,name,branch,year):\n" +" Person.__init__(self,name)\n" +" self.branch = branch\n" +" self.year = year\n" +"\n" +" def getDetails(self):\n" +" return (self.name, self.branch, self.year)\n" +"\n" +"\n" +"class Teacher(Person):\n" +" def __init__(self,name,papers):\n" +" Person.__init__(self,name)\n" +" self.papers = papers\n" +"\n" +" def getDetails(self):\n" +" return (self.name, self.papers)\n" +"\n" +"\n" +"person1 = Person('Rahul')\n" +"student1 = Student('Kushal','CSE',2005)\n" +"teacher1 = Teacher('Prashad',['C','C++'])\n" +"\n" +"print person1.getDetails()\n" +"print student1.getDetails()\n" +"print teacher1.getDetails()\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The output:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +"[kdas@kdas code]$ ./student_teacher.py\n" +"Rahul\n" +"('Kushal', 'CSE', 2005)\n" +"('Prashad', ['C', 'C++'])\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In this example you can see how we called the __init__ method of the class Person in both Studentą¦¾ and Teacher classes' __init__ method. We also reimplemented getDetails() method of Person class in both Student and Teacher class. So, when we are calling getDetails() method on the teacher1 object it returns based on the object itself (which is of teacher class) and when we call getDetails() on the student1 or person1 object it returns based on getDetails() method implemented in it's own class." msgstr "" #. Tag: title -#: classes.xml:33 #, no-c-format -msgid "Section 2 Test" +msgid "Multiple Inheritance" msgstr "" #. Tag: para -#: classes.xml:34 #, no-c-format -msgid "Test of a section" +msgid "One class can inherit more than one classes. It gets access to all methods and variables of the parent classes. The general syntax is:" msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +"class MyClass(Parentclass1, Parentclass2,...):\n" +" def __init__(self):\n" +" Parentclass1.__init__(self)\n" +" Parentclass2.__init__(self)\n" +" ...\n" +" ...\n" +"\n" +"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Deleting an object" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "As we already know how to create an object , now we are going to see how to delete an python object. We use del for this." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> s = "I love you"\n" +">>> del s\n" +">>> s\n" +"Traceback (most recent call last):\n" +" File "<stdin>", line 1, in <module>\n" +"NameError: name 's' is not defined\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "del actually decreases reference count by one. When the reference count of an object becomes zero the garbage collector will delete that object." +msgstr "" + diff --git a/pot/datastructure.pot b/pot/datastructure.pot index 9c536fe..a6efd5f 100644 --- a/pot/datastructure.pot +++ b/pot/datastructure.pot @@ -1,756 +1,636 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: datastructure.xml:6 #, no-c-format msgid "Data Structures" msgstr "" #. Tag: para -#: datastructure.xml:7 #, no-c-format -msgid "" -"Python is having a few built-in data structure. If you are still wondering " -"what is a data structure, then it is nothing a but a way to store data and " -"the having particular methods to retrieve or manipulate it. We already saw " -"lists before, now we will go in depth." +msgid "Python is having a few built-in data structure. If you are still wondering what is a data structure, then it is nothing a but a way to store data and the having particular methods to retrieve or manipulate it. We already saw lists before, now we will go in depth." msgstr "" #. Tag: title -#: datastructure.xml:12 #, no-c-format msgid "Lists" msgstr "" #. Tag: screen -#: datastructure.xml:13 #, no-c-format -msgid "" -">> a = [23, 45, 1, -3434, 43624356, 234]\n" -">>> a.append(45)\n" -">>> a\n" +msgid "\n" +"\n" +">>> a = [23, 45, 1, -3434, 43624356, 234]\n" +">>> a.append(45)\n" +">>> a\n" "[23, 45, 1, -3434, 43624356, 234, 45]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:14 #, no-c-format -msgid "" -"At first we created a list a. Then to add 45 at the end of the list we call a.append(45) " -"method. You can see that 45 added at the end of the " -"list. Sometimes it may require to insert data at any place within the list, " -"for that we have insert() method." +msgid "At first we created a list a. Then to add 45 at the end of the list we call a.append(45) method. You can see that 45 added at the end of the list. Sometimes it may require to insert data at any place within the list, for that we have insert() method." msgstr "" #. Tag: screen -#: datastructure.xml:17 #, no-c-format -msgid "" -">> a.insert(0, 1) # 1 added at the 0th position of the list\n" -">>> a\n" +msgid "\n" +"\n" +">>> a.insert(0, 1) # 1 added at the 0th position of the list\n" +">>> a\n" "[1, 23, 45, 1, -3434, 43624356, 234, 45]\n" -">>> a.insert(0, 111)\n" -">>> a\n" +">>> a.insert(0, 111)\n" +">>> a\n" "[111, 1, 23, 45, 1, -3434, 43624356, 234, 45]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:18 #, no-c-format -msgid "" -"count(s) will return you number of times s is in the list. Here we are going to check how many times " -"45 is there in the list." +msgid "count(s) will return you number of times s is in the list. Here we are going to check how many times 45 is there in the list." msgstr "" #. Tag: screen -#: datastructure.xml:21 #, no-c-format -msgid "" -">> a.count(45)\n" +msgid "\n" +"\n" +">>> a.count(45)\n" "2\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:22 #, no-c-format -msgid "" -"If you want to any particular value from the list you have to use " -"remove() method." +msgid "If you want to any particular value from the list you have to use remove() method." msgstr "" #. Tag: screen -#: datastructure.xml:25 #, no-c-format -msgid "" -">> a.remove(234)\n" -">>> a\n" +msgid "\n" +"\n" +">>> a.remove(234)\n" +">>> a\n" "[111, 1, 23, 45, 1, -3434, 43624356, 45]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:26 #, no-c-format msgid "Now to reverse the whole list" msgstr "" #. Tag: screen -#: datastructure.xml:29 #, no-c-format -msgid "" -">> a.reverse()\n" -">>> a\n" +msgid "\n" +"\n" +">>> a.reverse()\n" +">>> a\n" "[45, 43624356, -3434, 1, 45, 23, 1, 111]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:30 #, no-c-format -msgid "" -"We can store anything in the list, so first we are going to add another list " -"b in a , then we will learn how " -"to add the values of b into a ." +msgid "We can store anything in the list, so first we are going to add another list b in a , then we will learn how to add the values of b into a ." msgstr "" #. Tag: screen -#: datastructure.xml:33 #, no-c-format -msgid "" -">> b = [45, 56, 90]\n" -">>> a.append(b)\n" -">>> a\n" +msgid "\n" +"\n" +">>> b = [45, 56, 90]\n" +">>> a.append(b)\n" +">>> a\n" "[45, 43624356, -3434, 1, 45, 23, 1, 111, [45, 56, 90]]\n" -">>> a[-1]\n" +">>> a[-1]\n" "[45, 56, 90]\n" -">>> a.extend(b) #To add the values of b not the b itself\n" -">>> a\n" +">>> a.extend(b) #To add the values of b not the b itself\n" +">>> a\n" "[45, 43624356, -3434, 1, 45, 23, 1, 111, [45, 56, 90], 45, 56, 90]\n" -">>> a[-1]\n" +">>> a[-1]\n" "90\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:34 #, no-c-format -msgid "" -"Above you can see how we used a.extend() method to " -"extend the list. To sort any list we have sort() method." +msgid "Above you can see how we used a.extend() method to extend the list. To sort any list we have sort() method." msgstr "" #. Tag: screen -#: datastructure.xml:37 #, no-c-format -msgid "" -">> a.sort()\n" -">>> a\n" +msgid "\n" +"\n" +">>> a.sort()\n" +">>> a\n" "[-3434, 1, 1, 23, 45, 45, 45, 56, 90, 111, 43624356, [45, 56, 90]]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:38 #, no-c-format -msgid "" -"You can also delete element at any particular position of the list using the " -"del keyword." +msgid "You can also delete element at any particular position of the list using the del keyword." msgstr "" #. Tag: screen -#: datastructure.xml:41 #, no-c-format -msgid "" -">> del a[-1]\n" -">>> a\n" +msgid "\n" +"\n" +">>> del a[-1]\n" +">>> a\n" "[-3434, 1, 1, 23, 45, 45, 45, 56, 90, 111, 43624356]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: datastructure.xml:46 #, no-c-format msgid "Using lists as stack and queue" msgstr "" #. Tag: para -#: datastructure.xml:47 #, no-c-format -msgid "" -"Stacks are often known as LIFO (Last In First Out) structure. It means the " -"data will enter into it at the end , and the last data will come out first. " -"The easiest example can be of couple of marbles in an one side closed pipe. " -"So if you want to take the marbles out of it you have to do that from the " -"end where you entered the last marble. To achieve the same in code" +msgid "Stacks are often known as LIFO (Last In First Out) structure. It means the data will enter into it at the end , and the last data will come out first. The easiest example can be of couple of marbles in an one side closed pipe. So if you want to take the marbles out of it you have to do that from the end where you entered the last marble. To achieve the same in code" msgstr "" #. Tag: screen -#: datastructure.xml:50 #, no-c-format -msgid "" -">> a\n" +msgid "\n" +"\n" +">>> a\n" "[1, 2, 3, 4, 5, 6]\n" -">>> a.pop()\n" +">>> a.pop()\n" "6\n" -">>> a.pop()\n" +">>> a.pop()\n" "5\n" -">>> a.pop()\n" +">>> a.pop()\n" "4\n" -">>> a.pop()\n" +">>> a.pop()\n" "3\n" -">>> a\n" +">>> a\n" "[1, 2]\n" -">>> a.append(34)\n" -">>> a\n" +">>> a.append(34)\n" +">>> a\n" "[1, 2, 34)\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:51 #, no-c-format -msgid "" -"We learned a new method above pop(). pop(i) will take out the ith data from the list." +msgid "We learned a new method above pop(). pop(i) will take out the ith data from the list." msgstr "" #. Tag: para -#: datastructure.xml:54 #, no-c-format -msgid "" -"In our daily life we have to encounter queues many times, like in ticket " -"counters or in library or in the billing section of any supermarket. Queue " -"is the data structure where you can append more data at the end and take out " -"data from the beginning. That is why it is known as FIFO (First In First " -"Out)." +msgid "In our daily life we have to encounter queues many times, like in ticket counters or in library or in the billing section of any supermarket. Queue is the data structure where you can append more data at the end and take out data from the beginning. That is why it is known as FIFO (First In First Out)." msgstr "" #. Tag: screen -#: datastructure.xml:57 #, no-c-format -msgid "" -">> a = [1, 2, 3, 4, 5]\n" -">>> a.append(1)\n" -">>> a\n" +msgid "\n" +"\n" +">>> a = [1, 2, 3, 4, 5]\n" +">>> a.append(1)\n" +">>> a\n" "[1, 2, 3, 4, 5, 1]\n" -">>> a.pop(0)\n" +">>> a.pop(0)\n" "1\n" -">>> a.pop(0)\n" +">>> a.pop(0)\n" "2\n" -">>> a\n" +">>> a\n" "[3, 4, 5, 1]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:58 #, no-c-format -msgid "" -"To take out the first element of the list we are using a.pop(0)." +msgid "To take out the first element of the list we are using a.pop(0)." msgstr "" #. Tag: title -#: datastructure.xml:64 #, no-c-format msgid "List Comprehensions" msgstr "" #. Tag: para -#: datastructure.xml:65 #, no-c-format -msgid "" -"List comprehensions provide a concise way to create lists. Each list " -"comprehension consists of an expression followed by a for clause, then zero " -"or more for or if clauses. The result will be a list resulting from " -"evaluating the expression in the context of the for and if clauses which " -"follow it." +msgid "List comprehensions provide a concise way to create lists. Each list comprehension consists of an expression followed by a for clause, then zero or more for or if clauses. The result will be a list resulting from evaluating the expression in the context of the for and if clauses which follow it." msgstr "" #. Tag: para -#: datastructure.xml:68 #, no-c-format -msgid "" -"For example if we want to make a list out of the square values of another " -"list, then" +msgid "For example if we want to make a list out of the square values of another list, then" msgstr "" #. Tag: screen -#: datastructure.xml:71 #, no-c-format -msgid "" -">> a = [1, 2, 3]\n" -">>> [x ** 2 for x in a]\n" +msgid "\n" +"\n" +">>> a = [1, 2, 3]\n" +">>> [x ** 2 for x in a]\n" "[1, 4, 9]\n" -">>> z = [x + 1 for x in [x ** 2 for x in a]]\n" -">>> z\n" +">>> z = [x + 1 for x in [x ** 2 for x in a]]\n" +">>> z\n" "[2, 5, 10]\n" -"]]>" +"\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:72 #, no-c-format -msgid "" -"Above in the second case we used two list comprehensions in a same line." +msgid "Above in the second case we used two list comprehensions in a same line." msgstr "" #. Tag: title -#: datastructure.xml:78 #, no-c-format msgid "Tuples" msgstr "" #. Tag: para -#: datastructure.xml:79 #, no-c-format msgid "Tuples are data separated by comma." msgstr "" #. Tag: screen -#: datastructure.xml:82 #, no-c-format -msgid "" -">> a = 'Fedora', 'Debian', 'Kubuntu', 'Pardus'\n" -">>> a\n" -"('Fedora', 'Debian', 'Kubuntu', 'Pardus')\n" -">>> a[1]\n" -"'Debian'\n" -">>> for x in a:\n" +msgid "\n" +"\n" +">>> a = 'Fedora', 'Debian', 'Kubuntu', 'Pardus'\n" +">>> a\n" +"('Fedora', 'Debian', 'Kubuntu', 'Pardus')\n" +">>> a[1]\n" +"'Debian'\n" +">>> for x in a:\n" "... print x,\n" "...\n" "Fedora Debian Kubuntu Pardus\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:83 #, no-c-format msgid "You can also unpack values of any tuple in to variables, like" msgstr "" #. Tag: screen -#: datastructure.xml:86 #, no-c-format -msgid "" -">> divmod(15,2)\n" +msgid "\n" +"\n" +">>> divmod(15,2)\n" "(7, 1)\n" -">>> x, y = divmod(15,2)\n" -">>> x\n" +">>> x, y = divmod(15,2)\n" +">>> x\n" "7\n" -">>> y\n" +">>> y\n" "1\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:87 #, no-c-format -msgid "" -"Tuples are immutable, that means you can not del/add/edit any value inside " -"the tuple. Here is another example" +msgid "Tuples are immutable, that means you can not del/add/edit any value inside the tuple. Here is another example" msgstr "" #. Tag: screen -#: datastructure.xml:90 #, no-c-format -msgid "" -">> a = (1, 2, 3, 4)\n" -">>> del a[0]\n" +msgid "\n" +"\n" +">>> a = (1, 2, 3, 4)\n" +">>> del a[0]\n" "Traceback (most recent call last):\n" -" File \"\", line 1, in \n" -"TypeError: 'tuple' object doesn't support item deletion\n" -"]]>" +" File "<stdin>", line 1, in <module>\n" +"TypeError: 'tuple' object doesn't support item deletion\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:91 #, no-c-format -msgid "" -"Above you can see python is giving error when we are trying to delete a " -"value in the tuple." +msgid "Above you can see python is giving error when we are trying to delete a value in the tuple." msgstr "" #. Tag: para -#: datastructure.xml:94 #, no-c-format -msgid "" -"To create a tuple which contains only one value you have to type a trailing " -"comma." +msgid "To create a tuple which contains only one value you have to type a trailing comma." msgstr "" #. Tag: screen -#: datastructure.xml:97 #, no-c-format -msgid "" -">> a = (123)\n" -">>> a\n" +msgid "\n" +"\n" +">>> a = (123)\n" +">>> a\n" "123\n" -">>> type(a)\n" -"\n" -">>> a = (123, ) #Look at the trailing comma\n" -">>> a\n" +">>> type(a)\n" +"<type 'int'>\n" +">>> a = (123, ) #Look at the trailing comma\n" +">>> a\n" "(123,)\n" -">>> type(a)\n" -"\n" -"]]>" +">>> type(a)\n" +"<type 'tuple'>\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:98 #, no-c-format -msgid "" -"Using the buitin function type() you can know the data " -"type of any variable. Remember the len() function we " -"used to find the length of any sequence ?" +msgid "Using the buitin function type() you can know the data type of any variable. Remember the len() function we used to find the length of any sequence ?" msgstr "" #. Tag: screen -#: datastructure.xml:101 #, no-c-format -msgid "" -">> type(len)\n" -"\n" -"]]>" +msgid "\n" +"\n" +">>> type(len)\n" +"<type 'bulletin_function_or_method'>\n" +"\n" +"" msgstr "" #. Tag: title -#: datastructure.xml:105 #, no-c-format msgid "Sets" msgstr "" #. Tag: para -#: datastructure.xml:106 #, no-c-format -msgid "" -"Sets are another type of data structure with no duplicate items. We can also " -"mathematical set operations on sets." +msgid "Sets are another type of data structure with no duplicate items. We can also mathematical set operations on sets." msgstr "" #. Tag: screen -#: datastructure.xml:109 #, no-c-format -msgid "" -">> a = set('abcthabcjwethddda')\n" -">>> a\n" -"set(['a', 'c', 'b', 'e', 'd', 'h', 'j', 't', 'w'])\n" -"]]>" +msgid "\n" +"\n" +">>> a = set('abcthabcjwethddda')\n" +">>> a\n" +"set(['a', 'c', 'b', 'e', 'd', 'h', 'j', 't', 'w'])\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:110 #, no-c-format msgid "And some examples of the set operations" msgstr "" #. Tag: screen -#: datastructure.xml:113 #, no-c-format -msgid "" -">> a = set('abracadabra')\n" -">>> b = set('alacazam')\n" -">>> a # unique letters in a\n" -"set(['a', 'r', 'b', 'c', 'd'])\n" -">>> a - b # letters in a but not in b\n" -"set(['r', 'd', 'b'])\n" -">>> a | b # letters in either a or b\n" -"set(['a', 'c', 'r', 'd', 'b', 'm', 'z', 'l'])\n" -">>> a & b # letters in both a and b\n" -"set(['a', 'c'])\n" -">>> a ^ b # letters in a or b but not both\n" -"set(['r', 'd', 'b', 'm', 'z', 'l'])\n" -"]]>" +msgid "\n" +"\n" +">>> a = set('abracadabra')\n" +">>> b = set('alacazam')\n" +">>> a # unique letters in a\n" +"set(['a', 'r', 'b', 'c', 'd'])\n" +">>> a - b # letters in a but not in b\n" +"set(['r', 'd', 'b'])\n" +">>> a | b # letters in either a or b\n" +"set(['a', 'c', 'r', 'd', 'b', 'm', 'z', 'l'])\n" +">>> a & b # letters in both a and b\n" +"set(['a', 'c'])\n" +">>> a ^ b # letters in a or b but not both\n" +"set(['r', 'd', 'b', 'm', 'z', 'l'])\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:114 #, no-c-format msgid "To add or pop values from a set" msgstr "" #. Tag: screen -#: datastructure.xml:117 #, no-c-format -msgid "" -">> a\n" -"set(['a', 'c', 'b', 'e', 'd', 'h', 'j', 'q', 't', 'w'])\n" -">>> a.add('p')\n" -">>> a\n" -"set(['a', 'c', 'b', 'e', 'd', 'h', 'j', 'q', 'p', 't', 'w'])\n" -"]]>" +msgid "\n" +"\n" +">>> a\n" +"set(['a', 'c', 'b', 'e', 'd', 'h', 'j', 'q', 't', 'w'])\n" +">>> a.add('p')\n" +">>> a\n" +"set(['a', 'c', 'b', 'e', 'd', 'h', 'j', 'q', 'p', 't', 'w'])\n" +"\n" +"" msgstr "" #. Tag: title -#: datastructure.xml:121 #, no-c-format msgid "Dictionaries" msgstr "" #. Tag: para -#: datastructure.xml:122 #, no-c-format -msgid "" -"Dictionaries are unordered set of key: value pairs " -"where keys are unique. We declare dictionaries using {} braces. We use " -"dictionaries to store data for any particular key and then retrieve them." +msgid "Dictionaries are unordered set of key: value pairs where keys are unique. We declare dictionaries using {} braces. We use dictionaries to store data for any particular key and then retrieve them." msgstr "" #. Tag: screen -#: datastructure.xml:125 #, no-c-format -msgid "" -">> data = {'kushal':'Fedora', 'kart_':'Debian', 'Jace':'Mac'}\n" -">>> data\n" -"{'kushal': 'Fedora', 'Jace': 'Mac', 'kart_': 'Debian'}\n" -">>> data['kart_']\n" -"'Debian'\n" -"]]>" +msgid "\n" +"\n" +">>> data = {'kushal':'Fedora', 'kart_':'Debian', 'Jace':'Mac'}\n" +">>> data\n" +"{'kushal': 'Fedora', 'Jace': 'Mac', 'kart_': 'Debian'}\n" +">>> data['kart_']\n" +"'Debian'\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:126 #, no-c-format msgid "We can add more data to it by simply" msgstr "" #. Tag: screen -#: datastructure.xml:129 #, no-c-format -msgid "" -">> data['parthan'] = 'Ubuntu'\n" -">>> data\n" -"{'kushal': 'Fedora', 'Jace': 'Mac', 'kart_': 'Debian', 'parthan': 'Ubuntu'}\n" -"]]>" +msgid "\n" +"\n" +">>> data['parthan'] = 'Ubuntu'\n" +">>> data\n" +"{'kushal': 'Fedora', 'Jace': 'Mac', 'kart_': 'Debian', 'parthan': 'Ubuntu'}\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:130 #, no-c-format msgid "To delete any particular key:value pair" msgstr "" #. Tag: screen -#: datastructure.xml:133 #, no-c-format -msgid "" -">> del data['kushal']\n" -">>> data\n" -"{'Jace': 'Mac', 'kart_': 'Debian', 'parthan': 'Ubuntu'\n" -"]]>" +msgid "\n" +"\n" +">>> del data['kushal']\n" +">>> data\n" +"{'Jace': 'Mac', 'kart_': 'Debian', 'parthan': 'Ubuntu'\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:134 #, no-c-format -msgid "" -"To check if any key is there in the dictionary or not " -"you can use has_key() or in keyword." +msgid "To check if any key is there in the dictionary or not you can use has_key() or in keyword." msgstr "" #. Tag: screen -#: datastructure.xml:137 #, no-c-format -msgid "" -">> data.has_key('Soumya')\n" +msgid "\n" +"\n" +">>> data.has_key('Soumya')\n" "False\n" -">>> 'Soumya' in data\n" +">>> 'Soumya' in data\n" "False\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:138 #, no-c-format -msgid "" -"You must remember that no mutable object can be a key, " -"that means you can not use a list as a key." +msgid "You must remember that no mutable object can be a key, that means you can not use a list as a key." msgstr "" #. Tag: para -#: datastructure.xml:141 #, no-c-format -msgid "" -"dict() can create dictionaries from tuples of " -"key,value pair." +msgid "dict() can create dictionaries from tuples of key,value pair." msgstr "" #. Tag: screen -#: datastructure.xml:144 #, no-c-format -msgid "" -">> dict((('Indian','Delhi'),('Bangladesh','Dhaka')))\n" -"{'Indian': 'Delhi', 'Bangladesh': 'Dhaka'}\n" -"]]>" +msgid "\n" +"\n" +">>> dict((('Indian','Delhi'),('Bangladesh','Dhaka')))\n" +"{'Indian': 'Delhi', 'Bangladesh': 'Dhaka'}\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:145 #, no-c-format -msgid "" -"If you want to loop through a dict use iteritems() " -"method." +msgid "If you want to loop through a dict use iteritems() method." msgstr "" #. Tag: screen -#: datastructure.xml:148 #, no-c-format -msgid "" -">> data\n" -"{'Kushal': 'Fedora', 'Jace': 'Mac', 'kart_': 'Debian', 'parthan': 'Ubuntu'}\n" -">>> for x, y in data.iteritems():\n" -"... print \"%s uses %s\" % (x, y)\n" +msgid "\n" +"\n" +">>> data\n" +"{'Kushal': 'Fedora', 'Jace': 'Mac', 'kart_': 'Debian', 'parthan': 'Ubuntu'}\n" +">>> for x, y in data.iteritems():\n" +"... print "%s uses %s" % (x, y)\n" "...\n" "Kushal uses Fedora\n" "Jace uses Mac\n" "kart_ uses Debian\n" "parthan uses Ubuntu\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:149 #, no-c-format -msgid "" -"If you want to loop through a list (or any sequence) and get iteration " -"number at the same time you have to use enumerate()." +msgid "If you want to loop through a list (or any sequence) and get iteration number at the same time you have to use enumerate()." msgstr "" #. Tag: screen -#: datastructure.xml:152 #, no-c-format -msgid "" -">> for i, j in enumerate(['a', 'b', 'c']):\n" +msgid "\n" +"\n" +">>> for i, j in enumerate(['a', 'b', 'c']):\n" "... print i, j\n" "...\n" "0 a\n" "1 b\n" "2 c\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:153 #, no-c-format -msgid "" -"You may also need to iterate through two sequences same time, for that use " -"zip() function." +msgid "You may also need to iterate through two sequences same time, for that use zip() function." msgstr "" #. Tag: screen -#: datastructure.xml:156 #, no-c-format -msgid "" -">> a = ['Pradeepto', 'Kushal']\n" -">>> b = ['OpenSUSE', 'Fedora']\n" -">>> for x, y in zip(a, b):\n" -"... print \"%s uses %s\" % (x, y)\n" +msgid "\n" +"\n" +">>> a = ['Pradeepto', 'Kushal']\n" +">>> b = ['OpenSUSE', 'Fedora']\n" +">>> for x, y in zip(a, b):\n" +"... print "%s uses %s" % (x, y)\n" "...\n" "Pradeepto uses OpenSUSE\n" "Kushal uses Fedora\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: datastructure.xml:160 #, no-c-format msgid "students.py" msgstr "" #. Tag: para -#: datastructure.xml:161 #, no-c-format -msgid "" -"In this example , you have to take number of students as input , then ask " -"marks for three subjects as 'Physics', 'Maths', 'History', if the total " -"number for any student is less 120 then print he failed, or else say passed." +msgid "In this example , you have to take number of students as input , then ask marks for three subjects as 'Physics', 'Maths', 'History', if the total number for any student is less 120 then print he failed, or else say passed." msgstr "" #. Tag: screen -#: datastructure.xml:164 #, no-c-format -msgid "" -"" +" print "%s passed :)" % y\n" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:165 datastructure.xml:177 #, no-c-format msgid "The output" msgstr "" #. Tag: screen -#: datastructure.xml:168 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: datastructure.xml:172 #, no-c-format msgid "matrixmul.py" msgstr "" #. Tag: para -#: datastructure.xml:173 #, no-c-format -msgid "" -"In this example we will multiply two matrix's. First we will take input the " -"number of rows/columns in the matrix (here we assume we are using n x n " -"matrix). Then values of the matrix's." +msgid "In this example we will multiply two matrix's. First we will take input the number of rows/columns in the matrix (here we assume we are using n x n matrix). Then values of the matrix's." msgstr "" #. Tag: screen -#: datastructure.xml:176 #, no-c-format -msgid "" -"" +" print "%5d" % y,\n" +" print ""\n" +"print "-" * 10 * n\n" +"\n" +"" msgstr "" #. Tag: screen -#: datastructure.xml:180 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: datastructure.xml:181 #, no-c-format -msgid "" -"Here we have used list comprehensions couple of times. [int(x) for " -"x in raw_input(\"\").split(\" \")] here first it takes the input " -"as string by raw_input(), then split the result by \" " -"\", then for each value create one int. We are also using [a[i][j] " -"* b[j][i] for j in range(0,n)] to get the resultant row in a " -"single line." +msgid "Here we have used list comprehensions couple of times. [int(x) for x in raw_input("").split(" ")] here first it takes the input as string by raw_input(), then split the result by " ", then for each value create one int. We are also using [a[i][j] * b[j][i] for j in range(0,n)] to get the resultant row in a single line." msgstr "" + diff --git a/pot/file.pot b/pot/file.pot index cf9f37c..e077433 100644 --- a/pot/file.pot +++ b/pot/file.pot @@ -1,415 +1,409 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: file.xml:6 #, no-c-format msgid "File handling" msgstr "" #. Tag: para -#: file.xml:7 #, no-c-format -msgid "" -"A file is some information or data which stays in the computer storage " -"devices. You already know about different kinds of file , like your music " -"files, video files, text files. Python gives you easy ways to manipulate " -"these files. Generally we divide files in two categories, text file and " -"binary file. Text files are simple text where as the binary files contain " -"binary data which is only readable by computer." +msgid "A file is some information or data which stays in the computer storage devices. You already know about different kinds of file , like your music files, video files, text files. Python gives you easy ways to manipulate these files. Generally we divide files in two categories, text file and binary file. Text files are simple text where as the binary files contain binary data which is only readable by computer." msgstr "" #. Tag: title -#: file.xml:11 #, no-c-format msgid "File opening" msgstr "" #. Tag: para -#: file.xml:12 #, no-c-format -msgid "" -"To open a file we use open() function. It requires two " -"arguments, first the file path or file name, second which mode it should " -"open. Modes are like" +msgid "To open a file we use open() function. It requires two arguments, first the file path or file name, second which mode it should open. Modes are like" msgstr "" #. Tag: member -#: file.xml:16 #, no-c-format -msgid "" -"\"r\" -> open read only, you can read the file but can not edit / delete " -"anything inside" +msgid ""r" -> open read only, you can read the file but can not edit / delete anything inside" msgstr "" #. Tag: member -#: file.xml:17 #, no-c-format -msgid "" -"\"w\" -> open with write power, means if the file exists then delete all " -"content and open it to write" +msgid ""w" -> open with write power, means if the file exists then delete all content and open it to write" msgstr "" #. Tag: member -#: file.xml:18 #, no-c-format -msgid "\"a\" -> open in append mode" +msgid ""a" -> open in append mode" msgstr "" #. Tag: para -#: file.xml:20 #, no-c-format -msgid "" -"The default mode is read only, ie if you do not provide any mode it will " -"open the file as read only. Let us open a file" +msgid "The default mode is read only, ie if you do not provide any mode it will open the file as read only. Let us open a file" msgstr "" #. Tag: screen -#: file.xml:23 #, no-c-format -msgid "" -">> f = open(\"love.txt\")\n" -">>> f\n" -"\n" -"]]>" +msgid "\n" +"\n" +">>> f = open("love.txt")\n" +">>> f\n" +"<open file 'love.txt', mode 'r' at 0xb7f2d968>\n" +"\n" +"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Closing a file" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After opening a file one should always close the opened file. We use method close() for this." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> f = open("love.txt")\n" +">>> f\n" +"<open file 'love.txt', mode 'r' at 0xb7f2d968>\n" +">>> f.close()\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Important" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Always make sure you *explicitly* close each open file, once its job is done and you have no reason to keep it open. Because" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is an upper limit to the number of files a program can open. If you exceed that limit, there is no reliable way of recovery, so the program could crash." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each open file consumes some main-memory for the data-structures associated with it, like file descriptor/handle or file locks etc. So you could essentially end-up wasting lots of memory if you have more files open that are not useful or usable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Open files always stand a chance of corruption and data loss." msgstr "" #. Tag: title -#: file.xml:27 #, no-c-format msgid "Reading a file" msgstr "" #. Tag: para -#: file.xml:28 #, no-c-format -msgid "" -"To read the whole file at once use the read() method." +msgid "To read the whole file at once use the read() method." msgstr "" #. Tag: screen -#: file.xml:31 #, no-c-format -msgid "" -">> f = open(\"sample.txt\")\n" -">>> f.read()\n" -"'I love Python\\nPradeepto loves KDE\\nSankarshan loves Openoffice\\n'\n" -"]]>" +msgid "\n" +"\n" +">>> f = open("sample.txt")\n" +">>> f.read()\n" +"'I love Python\n" +"Pradeepto loves KDE\n" +"Sankarshan loves Openoffice\n" +"'\n" +"\n" +"" msgstr "" #. Tag: para -#: file.xml:32 #, no-c-format -msgid "" -"If you call read() again it will return empty string as it already read the " -"whole file. readline() can help you to read one line each time from the file." +msgid "If you call read() again it will return empty string as it already read the whole file. readline() can help you to read one line each time from the file." msgstr "" #. Tag: screen -#: file.xml:35 #, no-c-format -msgid "" -">> f = open(\"sample.txt\")\n" -">>> f.readline()\n" -"'I love Python\\n'\n" -">>> f.readline()\n" -"'Pradeepto loves KDE\\n'\n" -"]]>" +msgid "\n" +"\n" +">>> f = open("sample.txt")\n" +">>> f.readline()\n" +"'I love Python\n" +"'\n" +">>> f.readline()\n" +"'Pradeepto loves KDE\n" +"'\n" +"\n" +"" msgstr "" #. Tag: para -#: file.xml:36 #, no-c-format -msgid "" -"To read all the all the lines in a list we use readlines() method." +msgid "To read all the all the lines in a list we use readlines() method." msgstr "" #. Tag: screen -#: file.xml:39 #, no-c-format -msgid "" -">> f = open(\"sample.txt\")\n" -">>> f.readlines()\n" -"['I love Python\\n', 'Pradeepto loves KDE\\n', 'Sankarshan loves Openoffice" -"\\n']\n" -"]]>" +msgid "\n" +"\n" +">>> f = open("sample.txt")\n" +">>> f.readlines()\n" +"['I love Python\n" +"', 'Pradeepto loves KDE\n" +"', 'Sankarshan loves Openoffice\n" +"']\n" +"\n" +"" msgstr "" #. Tag: para -#: file.xml:40 #, no-c-format msgid "You can even loop through the lines in a file object." msgstr "" #. Tag: screen -#: file.xml:43 #, no-c-format -msgid "" -">> f = open(\"sample.txt\")\n" -">>> for x in f:\n" +msgid "\n" +"\n" +">>> f = open("sample.txt")\n" +">>> for x in f:\n" "... print x,\n" "...\n" "I love Python\n" "Pradeepto loves KDE\n" "Sankarshan loves Openoffice\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: file.xml:44 #, no-c-format -msgid "" -"Let us write a program which will take the file name as the input from the " -"user and show the content of the file in the console." +msgid "Let us write a program which will take the file name as the input from the user and show the content of the file in the console." msgstr "" #. Tag: screen -#: file.xml:47 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: file.xml:48 #, no-c-format -msgid "" -"In the last line you can see that we closed the file object with the help of " -"close() method." +msgid "In the last line you can see that we closed the file object with the help of close() method." msgstr "" #. Tag: para -#: file.xml:51 file.xml:82 #, no-c-format msgid "The output" msgstr "" #. Tag: screen -#: file.xml:54 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: file.xml:58 #, no-c-format msgid "Writing in a file" msgstr "" #. Tag: para -#: file.xml:59 #, no-c-format -msgid "" -"Let us open a file then we will write some random text into it by using the " -"write() method." +msgid "Let us open a file then we will write some random text into it by using the write() method." msgstr "" #. Tag: screen -#: file.xml:62 #, no-c-format -msgid "" -">> f = open(\"ircnicks.txt\", 'w')\n" -">>> f.write('powerpork\\n')\n" -">>> f.write('indrag\\n')\n" -">>> f.write('mishti\\n')\n" -">>> f.write('sm|CPU')\n" -">>> f.close()\n" -"]]>" +msgid "\n" +"\n" +">>> f = open("ircnicks.txt", 'w')\n" +">>> f.write('powerpork\n" +"')\n" +">>> f.write('indrag\n" +"')\n" +">>> f.write('mishti\n" +"')\n" +">>> f.write('sm|CPU')\n" +">>> f.close()\n" +"\n" +"" msgstr "" #. Tag: para -#: file.xml:63 #, no-c-format msgid "Now read the file we just created" msgstr "" #. Tag: screen -#: file.xml:66 #, no-c-format -msgid "" -">> f = open('ircnicks.txt')\n" -">>> s = f.read()\n" -">>> print s\n" +msgid "\n" +"\n" +">>> f = open('ircnicks.txt')\n" +">>> s = f.read()\n" +">>> print s\n" "powerpork\n" "indrag\n" "mishti\n" "sm|CPU\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: file.xml:70 #, no-c-format msgid "copyfile.py" msgstr "" #. Tag: para -#: file.xml:71 #, no-c-format msgid "In this example we will copy a given file to another file." msgstr "" #. Tag: screen -#: file.xml:74 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: file.xml:75 #, no-c-format -msgid "" -"You can see we used a new module here sys. " -"sys.argv contains all command line parameters. Remember " -"cp command in shell, after cp we " -"type first the file to be copied and then the new file name." +msgid "You can see we used a new module here sys. sys.argv contains all command line parameters. Remember cp command in shell, after cp we type first the file to be copied and then the new file name." msgstr "" #. Tag: para -#: file.xml:78 #, no-c-format -msgid "" -"The first value in sys.argv is the name of the command " -"itself." +msgid "The first value in sys.argv is the name of the command itself." msgstr "" #. Tag: screen -#: file.xml:81 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: screen -#: file.xml:85 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: file.xml:86 #, no-c-format -msgid "" -"Here we used a new function enumerate(iterableobject), " -"which returns the index number and the value from the iterable object." +msgid "Here we used a new function enumerate(iterableobject), which returns the index number and the value from the iterable object." msgstr "" #. Tag: title -#: file.xml:92 #, no-c-format msgid "Random seeking in a file" msgstr "" #. Tag: para -#: file.xml:93 #, no-c-format -msgid "" -"You can also randomly move around inside a file using seek() method. It takes two arguments , offset and whence. To know more " -"about it let us read what python help tells us" +msgid "You can also randomly move around inside a file using seek() method. It takes two arguments , offset and whence. To know more about it let us read what python help tells us" msgstr "" #. Tag: para -#: file.xml:96 #, no-c-format -msgid "" -"seek(...) seek(offset[, whence]) -> None. Move to new file position. " -"Argument offset is a byte count. Optional argument whence defaults to 0 " -"(offset from start of file, offset should be >= 0); other values are 1 (move " -"relative to current position, positive or negative), and 2 (move relative to " -"end of file, usually negative, although many platforms allow seeking beyond " -"the end of a file). If the file is opened in text mode, only offsets " -"returned by tell() are legal. Use of other offsets causes undefined " -"behavior. Note that not all file objects are speakable." +msgid "seek(...) seek(offset[, whence]) -> None. Move to new file position. Argument offset is a byte count. Optional argument whence defaults to 0 (offset from start of file, offset should be >= 0); other values are 1 (move relative to current position, positive or negative), and 2 (move relative to end of file, usually negative, although many platforms allow seeking beyond the end of a file). If the file is opened in text mode, only offsets returned by tell() are legal. Use of other offsets causes undefined behavior. Note that not all file objects are speakable." msgstr "" #. Tag: para -#: file.xml:108 #, no-c-format msgid "Let us see one example" msgstr "" #. Tag: screen -#: file.xml:111 #, no-c-format -msgid "" -">> f = open('tempfile', 'w')\n" -">>> f.write('0123456789abcdef')\n" -">>> f.close()\n" -">>> f = open('tempfile')\n" -">>> f.tell() #tell us the offset position\n" +msgid "\n" +"\n" +">>> f = open('tempfile', 'w')\n" +">>> f.write('0123456789abcdef')\n" +">>> f.close()\n" +">>> f = open('tempfile')\n" +">>> f.tell() #tell us the offset position\n" "0L\n" -">>> f.seek(5) # Goto 5th byte\n" -">>> f.tell()\n" +">>> f.seek(5) # Goto 5th byte\n" +">>> f.tell()\n" "5L\n" -">>> f.read(1) #Read 1 byte\n" -"'5'\n" -">>> f.seek(-3, 2) # goto 3rd byte from the end\n" -">>> f.read() #Read till the end of the file\n" -"'def'\n" -"]]>" +">>> f.read(1) #Read 1 byte\n" +"'5'\n" +">>> f.seek(-3, 2) # goto 3rd byte from the end\n" +">>> f.read() #Read till the end of the file\n" +"'def'\n" +"\n" +"" msgstr "" + +#. Tag: title +#, no-c-format +msgid "Count spaces, tabs and new lines in a file" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Let us try to write an application which will count the spaces , tabs, and new lines in any given file." +msgstr "" + diff --git a/pot/functions.pot b/pot/functions.pot index 01e600b..74d4e13 100644 --- a/pot/functions.pot +++ b/pot/functions.pot @@ -1,362 +1,293 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: functions.xml:6 #, no-c-format msgid "Functions" msgstr "" #. Tag: para -#: functions.xml:7 #, no-c-format -msgid "" -"Reusing the same code is required many times within a same program. " -"Functions help us to do so. We write the things we have to do repeatedly in " -"a function then call it where ever required. We already saw build in " -"functions like len(), divmod()." +msgid "Reusing the same code is required many times within a same program. Functions help us to do so. We write the things we have to do repeatedly in a function then call it where ever required. We already saw build in functions like len(), divmod()." msgstr "" #. Tag: title -#: functions.xml:11 #, no-c-format msgid "Defining a function" msgstr "" #. Tag: para -#: functions.xml:12 #, no-c-format -msgid "" -"We use def keyword to define a function. general syntax " -"is like" +msgid "We use def keyword to define a function. general syntax is like" msgstr "" #. Tag: screen -#: functions.xml:15 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:16 #, no-c-format -msgid "" -"Let us write a function which will take two integers as input and then " -"return the sum." +msgid "Let us write a function which will take two integers as input and then return the sum." msgstr "" #. Tag: screen -#: functions.xml:19 #, no-c-format -msgid "" -">> def sum(a, b):\n" +msgid "\n" +"\n" +">>> def sum(a, b):\n" "... return a + b\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:20 #, no-c-format -msgid "" -"In the second line with the return keyword, we are " -"sending back the value of a + b to the caller. You must " -"call it like" +msgid "In the second line with the return keyword, we are sending back the value of a + b to the caller. You must call it like" msgstr "" #. Tag: screen -#: functions.xml:23 #, no-c-format -msgid "" -">> res = sum(234234, 34453546464)\n" -">>> res\n" +msgid "\n" +"\n" +">>> res = sum(234234, 34453546464)\n" +">>> res\n" "34453780698L\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:24 #, no-c-format -msgid "" -"Remember the palindrome program we wrote in the last chapter. Let us write a " -"function which will check if a given string is palindrome or not, then " -"return True or False." +msgid "Remember the palindrome program we wrote in the last chapter. Let us write a function which will check if a given string is palindrome or not, then return True or False." msgstr "" #. Tag: screen -#: functions.xml:27 #, no-c-format -msgid "" -"" +" print "Oh no, not a palindrome"\n" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:28 #, no-c-format msgid "Now run the code :)" msgstr "" #. Tag: title -#: functions.xml:34 #, no-c-format msgid "Local and global variables" msgstr "" #. Tag: para -#: functions.xml:35 #, no-c-format -msgid "" -"To understand local and global variables we will go through two examples." +msgid "To understand local and global variables we will go through two examples." msgstr "" #. Tag: screen -#: functions.xml:38 #, no-c-format -msgid "" -"" +"print "After the function call ", a\n" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:39 #, no-c-format msgid "The output" msgstr "" #. Tag: screen -#: functions.xml:40 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:41 #, no-c-format -msgid "" -"First we are assigning 9 to a, " -"then calling change function, inside of that we are assigning 90 to a and printing a. " -"After the function call we are again printing the value of a. When we are writing a = 90 inside the " -"function, it is actually creating a new variable called a, which is only available inside the function and will be destroyed " -"after the function finished. So though the name is same for the variable " -"a but they are different in and out side of the " -"function." +msgid "First we are assigning 9 to a, then calling change function, inside of that we are assigning 90 to a and printing a. After the function call we are again printing the value of a. When we are writing a = 90 inside the function, it is actually creating a new variable called a, which is only available inside the function and will be destroyed after the function finished. So though the name is same for the variable a but they are different in and out side of the function." msgstr "" #. Tag: screen -#: functions.xml:44 #, no-c-format -msgid "" -"" +"print "After the function call ", a\n" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:45 #, no-c-format -msgid "" -"Here by using global keyword we are telling that a is " -"globally defined, so when we are changing a's value inside the function it " -"is actually changing for the a outside of the function " -"also." +msgid "Here by using global keyword we are telling that a is globally defined, so when we are changing a's value inside the function it is actually changing for the a outside of the function also." msgstr "" #. Tag: title -#: functions.xml:51 #, no-c-format msgid "Default argument value" msgstr "" #. Tag: para -#: functions.xml:52 #, no-c-format -msgid "" -"In a function variables may have default argument values, that means if we " -"don't give any value for that particular variable it will assigned " -"automatically." +msgid "In a function variables may have default argument values, that means if we don't give any value for that particular variable it will assigned automatically." msgstr "" #. Tag: screen -#: functions.xml:55 #, no-c-format -msgid "" -">> def test(a , b = -99):\n" -"... if a > b:\n" +msgid "\n" +"\n" +">>> def test(a , b = -99):\n" +"... if a > b:\n" "... return True\n" "... else:\n" "... return False\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:56 #, no-c-format -msgid "" -"In the above example we have written b = -99 in the " -"function parameter list. That means of no value for b " -"is given then b's value is -99. This is a very simple " -"example of default arguments. You can test the code by" +msgid "In the above example we have written b = -99 in the function parameter list. That means of no value for b is given then b's value is -99. This is a very simple example of default arguments. You can test the code by" msgstr "" #. Tag: screen -#: functions.xml:59 #, no-c-format -msgid "" -">> test(12, 23)\n" +msgid "\n" +"\n" +">>> test(12, 23)\n" "False\n" -">>> test(12)\n" +">>> test(12)\n" "True\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: functions.xml:61 #, no-c-format msgid "Important" msgstr "" #. Tag: para -#: functions.xml:62 #, no-c-format -msgid "" -"Remember that you can not have an argument without default argument if you " -"already have one argument with default values before it. Like f(a, " -"b=90, c) is illegal as b is having a default " -"value but after that c is not having any default value." +msgid "Remember that you can not have an argument without default argument if you already have one argument with default values before it. Like f(a, b=90, c) is illegal as b is having a default value but after that c is not having any default value." msgstr "" #. Tag: para -#: functions.xml:66 #, no-c-format -msgid "" -"Also remember that default value is evaluated only once, so if you have any " -"mutable object like list it will make a difference. See the next example" +msgid "Also remember that default value is evaluated only once, so if you have any mutable object like list it will make a difference. See the next example" msgstr "" #. Tag: screen -#: functions.xml:69 #, no-c-format -msgid "" -">> def f(a, data=[]):\n" +msgid "\n" +"\n" +">>> def f(a, data=[]):\n" "... data.append(a)\n" "... return data\n" "...\n" -">>> print f(1)\n" +">>> print f(1)\n" "[1]\n" -">>> print f(2)\n" +">>> print f(2)\n" "[1, 2]\n" -">>> print f(3)\n" +">>> print f(3)\n" "[1, 2, 3]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: functions.xml:73 #, no-c-format msgid "Keyword arguments" msgstr "" #. Tag: screen -#: functions.xml:74 #, no-c-format -msgid "" -">> def func(a, b=5, c=10):\n" -"... print 'a is', a, 'and b is', b, 'and c is', c\n" +msgid "\n" +"\n" +">>> def func(a, b=5, c=10):\n" +"... print 'a is', a, 'and b is', b, 'and c is', c\n" "...\n" -">>> func(12, 24)\n" +">>> func(12, 24)\n" "a is 12 and b is 24 and c is 10\n" -">>> func(12, c = 24)\n" +">>> func(12, c = 24)\n" "a is 12 and b is 5 and c is 24\n" -">>> func(b=12, c = 24, a = -1)\n" +">>> func(b=12, c = 24, a = -1)\n" "a is -1 and b is 12 and c is 24\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: functions.xml:75 #, no-c-format -msgid "" -"In the above example you can see we are calling the function with variable " -"names, like func(12, c = 24), by that we are assigning " -"24 to c and b " -"is getting its default value. Also remember that you can not have without " -"keyword based argument after a keyword based argument. like" +msgid "In the above example you can see we are calling the function with variable names, like func(12, c = 24), by that we are assigning 24 to c and b is getting its default value. Also remember that you can not have without keyword based argument after a keyword based argument. like" msgstr "" #. Tag: screen -#: functions.xml:78 #, no-c-format -msgid "" -">> def func(a, b=13, v):\n" +msgid "\n" +"\n" +">>> def func(a, b=13, v):\n" "... print a, b, v\n" "...\n" -" File \"\", line 1\n" +" File "<stdin>", line 1\n" "SyntaxError: non-default argument follows default argument\n" -"]]>" +"\n" +"" msgstr "" + diff --git a/pot/ifelse.pot b/pot/ifelse.pot index 1aa871b..2c996a9 100644 --- a/pot/ifelse.pot +++ b/pot/ifelse.pot @@ -1,164 +1,140 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: ifelse.xml:6 #, no-c-format msgid "If-else , the control flow" msgstr "" #. Tag: para -#: ifelse.xml:7 #, no-c-format -msgid "" -"While working on real life of problems we have to make decisions. Decisions " -"like which camera to buy or which cricket bat is better. At the time of " -"writing a computer program we do the same. We make the decisions using if-" -"else statements, we change the flow of control in the program by using them." +msgid "While working on real life of problems we have to make decisions. Decisions like which camera to buy or which cricket bat is better. At the time of writing a computer program we do the same. We make the decisions using if-else statements, we change the flow of control in the program by using them." msgstr "" #. Tag: title -#: ifelse.xml:11 #, no-c-format msgid "If statement" msgstr "" #. Tag: para -#: ifelse.xml:12 #, no-c-format msgid "The syntax looks like" msgstr "" #. Tag: screen -#: ifelse.xml:15 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: ifelse.xml:16 #, no-c-format -msgid "" -"If the value of expression is true (anything other than " -"zero), do the what is written below under indentation. Please remember to " -"give proper indentation, all the lines indented will be evaluated on the " -"True value of the expression. One simple example is to take some number as " -"input and check if the number is less than 100 or not." +msgid "If the value of expression is true (anything other than zero), do the what is written below under indentation. Please remember to give proper indentation, all the lines indented will be evaluated on the True value of the expression. One simple example is to take some number as input and check if the number is less than 100 or not." msgstr "" #. Tag: screen -#: ifelse.xml:19 #, no-c-format -msgid "" -"" +"number = int(raw_input("Enter a number: "))\n" +"if number < 100:\n" +" print "The number is less than 100"\n" +"\n" +"" msgstr "" #. Tag: para -#: ifelse.xml:20 #, no-c-format msgid "Then we run it" msgstr "" #. Tag: screen -#: ifelse.xml:23 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: ifelse.xml:27 #, no-c-format msgid "Else statement" msgstr "" #. Tag: para -#: ifelse.xml:28 #, no-c-format -msgid "" -"Now in the above example we want to print \"Greater than\" if the number is " -"greater than 100. For that we have to use the else " -"statement. This works when the ifstatement is not " -"fulfilled." +msgid "Now in the above example we want to print "Greater than" if the number is greater than 100. For that we have to use the else statement. This works when the ifstatement is not fulfilled." msgstr "" #. Tag: screen -#: ifelse.xml:31 #, no-c-format -msgid "" -"" +" print "The number is greater than 100"\n" +"\n" +"" msgstr "" #. Tag: para -#: ifelse.xml:32 #, no-c-format msgid "The output" msgstr "" #. Tag: screen -#: ifelse.xml:35 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: ifelse.xml:36 #, no-c-format msgid "Another very basic example" msgstr "" #. Tag: screen -#: ifelse.xml:39 #, no-c-format -msgid "" -">> x = int(raw_input(\"Please enter an integer: \"))\n" -">>> if x < 0:\n" +msgid "\n" +"\n" +">>> x = int(raw_input("Please enter an integer: "))\n" +">>> if x < 0:\n" "... x = 0\n" -"... print 'Negative changed to zero'\n" +"... print 'Negative changed to zero'\n" "... elif x == 0:\n" -"... print 'Zero'\n" +"... print 'Zero'\n" "... elif x == 1:\n" -"... print 'Single'\n" +"... print 'Single'\n" "... else:\n" -"... print 'More'\n" -"]]>" +"... print 'More'\n" +"\n" +"" msgstr "" + diff --git a/pot/installation.pot b/pot/installation.pot index 0dc1e78..234b42a 100644 --- a/pot/installation.pot +++ b/pot/installation.pot @@ -1,81 +1,68 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: installation.xml:6 #, no-c-format msgid "Installation" msgstr "" #. Tag: para -#: installation.xml:7 #, no-c-format msgid "In this chapter you will learn how to install python" msgstr "" #. Tag: title -#: installation.xml:11 #, no-c-format msgid "On Windows" msgstr "" #. Tag: para -#: installation.xml:12 #, no-c-format -msgid "" -"You have to download the latest Windows(TM) installer from the python site " -"http://python.org/ftp/python/2.5.2/python-2.5.2.msi . Install it just as any " -"other Windows software." +msgid "You have to download the latest Windows(TM) installer from the python site http://python.org/ftp/python/2.5.2/python-2.5.2.msi . Install it just as any other Windows software." msgstr "" #. Tag: title -#: installation.xml:18 #, no-c-format msgid "On GNU/Linux" msgstr "" #. Tag: para -#: installation.xml:19 #, no-c-format -msgid "" -"Generally all GNU/Linux distributions come with Python, so no need to worry " -"about that :) If you don't have it then you can install it by either " -"downloading from the python website or from your distribution's repository." +msgid "Generally all GNU/Linux distributions come with Python, so no need to worry about that :) If you don't have it then you can install it by either downloading from the python website or from your distribution's repository." msgstr "" #. Tag: para -#: installation.xml:23 #, no-c-format msgid "For Fedora" msgstr "" #. Tag: screen -#: installation.xml:27 #, no-c-format -msgid "#yum install python" +msgid "\n" +"#yum install python\n" +"" msgstr "" #. Tag: para -#: installation.xml:28 #, no-c-format msgid "For Debian" msgstr "" #. Tag: screen -#: installation.xml:32 #, no-c-format -msgid "#apt-get install python" +msgid "\n" +"#apt-get install python\n" +"" msgstr "" + diff --git a/pot/looping.pot b/pot/looping.pot index 11d9124..24e6dff 100644 --- a/pot/looping.pot +++ b/pot/looping.pot @@ -1,75 +1,59 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: looping.xml:6 #, no-c-format msgid "Looping" msgstr "" #. Tag: para -#: looping.xml:7 #, no-c-format -msgid "" -"In the examples we used before , sometimes it was required to do the same " -"work couple of times. We use a counter to check how many times the code " -"needs to be executed. This technique is known as looping. First we are going " -"to look into while statement for looping." +msgid "In the examples we used before , sometimes it was required to do the same work couple of times. We use a counter to check how many times the code needs to be executed. This technique is known as looping. First we are going to look into while statement for looping." msgstr "" #. Tag: title -#: looping.xml:12 #, no-c-format msgid "While loop" msgstr "" #. Tag: para -#: looping.xml:13 #, no-c-format msgid "The syntax for while statement is like" msgstr "" #. Tag: screen -#: looping.xml:16 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:17 #, no-c-format -msgid "" -"The code we want to reuse must be indented properly under the while " -"statement. They will be executed if the condition is " -"true. Again like in if-else statement any non zero " -"value is true. Let us write a simple code to print numbers 0 to 10" +msgid "The code we want to reuse must be indented properly under the while statement. They will be executed if the condition is true. Again like in if-else statement any non zero value is true. Let us write a simple code to print numbers 0 to 10" msgstr "" #. Tag: screen -#: looping.xml:20 #, no-c-format -msgid "" -">> n = 0\n" -">>> while n < 11:\n" +msgid "\n" +"\n" +">>> n = 0\n" +">>> while n < 11:\n" "... print n\n" "... n += 1\n" "...\n" @@ -84,60 +68,47 @@ msgid "" "8\n" "9\n" "10\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:21 #, no-c-format -msgid "" -"In the first line we are setting n = 0, then in the " -"while statement the condition is n 11 , " -"that means what ever line indented below that will execute until n becomes " -"same or greater than 11. Inside the loop we are just printing the value of n " -"and then increasing it by one." +msgid "In the first line we are setting n = 0, then in the while statement the condition is n < 11 , that means what ever line indented below that will execute until n becomes same or greater than 11. Inside the loop we are just printing the value of n and then increasing it by one." msgstr "" #. Tag: title -#: looping.xml:27 #, no-c-format msgid "Fibonacci Series" msgstr "" #. Tag: para -#: looping.xml:28 #, no-c-format -msgid "" -"Let us try to solve Fibonacci series. In this series we " -"get the next number by adding the previous two numbers. So the series looks " -"like 1,1,2,3,5,8,13 ......." +msgid "Let us try to solve Fibonacci series. In this series we get the next number by adding the previous two numbers. So the series looks like 1,1,2,3,5,8,13 ......." msgstr "" #. Tag: screen -#: looping.xml:31 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:32 looping.xml:43 looping.xml:54 looping.xml:72 looping.xml:91 -#: looping.xml:95 looping.xml:99 looping.xml:149 #, no-c-format msgid "The output" msgstr "" #. Tag: screen -#: looping.xml:35 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:36 #, no-c-format -msgid "" -"In the first line of the code we are initializing a and " -"b, then looping while b's value is less than 100. " -"Inside the loop first we are printing the value of b " -"and then in the next line putting the value of b to " -"a and a + b to b in the same line." +msgid "In the first line of the code we are initializing a and b, then looping while b's value is less than 100. Inside the loop first we are printing the value of b and then in the next line putting the value of b to a and a + b to b in the same line." msgstr "" #. Tag: para -#: looping.xml:39 #, no-c-format -msgid "" -"If you put a trailing comma in the print statement , " -"then it will print in the same line" +msgid "If you put a trailing comma in the print statement , then it will print in the same line" msgstr "" #. Tag: screen -#: looping.xml:42 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: screen -#: looping.xml:46 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: looping.xml:49 #, no-c-format msgid "Power Series" msgstr "" #. Tag: para -#: looping.xml:50 #, no-c-format -msgid "" -"Let us write a program to evaluate the power series. The series looks like " -"e**x =1+x+x**2/2! +x**3/3! +....+ x**n/n! where " +msgid "Let us write a program to evaluate the power series. The series looks like e**x =1+x+x**2/2! +x**3/3! +....+ x**n/n! where 0 < x < 1" msgstr "" #. Tag: screen -#: looping.xml:53 #, no-c-format -msgid "" -"" +"print "No of Times= %d and Sum= %f" % (n, sum)\n" +"\n" +"" msgstr "" #. Tag: screen -#: looping.xml:55 #, no-c-format -msgid "" -"" +"" msgstr "" #. Tag: para -#: looping.xml:56 #, no-c-format -msgid "" -"In this program we introduced a new keyword called break. What break does is stop the innermost loop. In this example we " -"are using break under the if " -"statement" +msgid "In this program we introduced a new keyword called break. What break does is stop the innermost loop. In this example we are using break under the if statement" msgstr "" #. Tag: screen -#: looping.xml:59 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:60 #, no-c-format -msgid "" -"This means if the value of term is less than " -"0.0001 then get out of the loop." +msgid "This means if the value of term is less than 0.0001 then get out of the loop." msgstr "" #. Tag: title -#: looping.xml:67 #, no-c-format msgid "Multiplication Table" msgstr "" #. Tag: para -#: looping.xml:68 #, no-c-format -msgid "" -"In this example we are going to print the multiplication table up to 10." +msgid "In this example we are going to print the multiplication table up to 10." msgstr "" #. Tag: screen -#: looping.xml:71 #, no-c-format -msgid "" -"" +"print "-" * 50\n" +"\n" +"" msgstr "" #. Tag: screen -#: looping.xml:73 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:74 #, no-c-format -msgid "" -"Here we used one while loop inside another loop, this is known as nested " -"looping. You can also see one interesting statement here" +msgid "Here we used one while loop inside another loop, this is known as nested looping. You can also see one interesting statement here" msgstr "" #. Tag: screen -#: looping.xml:76 #, no-c-format -msgid "" -"" +msgid "\n" +"\n" +"print "-" * 50\n" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:77 #, no-c-format -msgid "" -"In a print statement if we multiply the string with an " -"integer n , the string will be printed nmany times. Some examples" +msgid "In a print statement if we multiply the string with an integer n , the string will be printed nmany times. Some examples" msgstr "" #. Tag: screen -#: looping.xml:81 #, no-c-format -msgid "" -">> print \"*\" * 10\n" +msgid "\n" +"\n" +">>> print "*" * 10\n" "**********\n" -">>> print \"#\" * 20\n" +">>> print "#" * 20\n" "####################\n" -">>> print \"--\" * 20\n" +">>> print "--" * 20\n" "----------------------------------------\n" -">>> print \"-\" * 40\n" +">>> print "-" * 40\n" "----------------------------------------\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: looping.xml:85 #, no-c-format msgid "Some printing * examples" msgstr "" #. Tag: para -#: looping.xml:86 #, no-c-format -msgid "" -"Here are some examples which you can find very often in college lab reports" +msgid "Here are some examples which you can find very often in college lab reports" msgstr "" #. Tag: para -#: looping.xml:89 #, no-c-format msgid "Design 1" msgstr "" #. Tag: screen -#: looping.xml:90 #, no-c-format -msgid "" -"= 0:\n" -" x = \"*\" * n\n" +"while n >= 0:\n" +" x = "*" * n\n" " print x\n" " n -= 1\n" -"]]>" +"\n" +"" msgstr "" #. Tag: screen -#: looping.xml:92 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:93 #, no-c-format msgid "Design 2" msgstr "" #. Tag: screen -#: looping.xml:94 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: screen -#: looping.xml:96 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:97 #, no-c-format msgid "Design 3" msgstr "" #. Tag: screen -#: looping.xml:98 #, no-c-format -msgid "" -"= 0:\n" -" x = \"*\" * n\n" -" y = \" \" * (row - n)\n" +"while n >= 0:\n" +" x = "*" * n\n" +" y = " " * (row - n)\n" " print y + x\n" " n -= 1\n" -"]]>" +"\n" +"" msgstr "" #. Tag: screen -#: looping.xml:100 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: looping.xml:104 #, no-c-format msgid "Lists" msgstr "" #. Tag: para -#: looping.xml:105 #, no-c-format -msgid "" -"We are going to learn a data structure called list before we go ahead to " -"learn more on looping. Lists an be written as a list of comma-separated " -"values (items) between square brackets." +msgid "We are going to learn a data structure called list before we go ahead to learn more on looping. Lists an be written as a list of comma-separated values (items) between square brackets." msgstr "" #. Tag: screen -#: looping.xml:108 #, no-c-format -msgid "" -">> a = [ 1 , 342, 2233423, 'India', 'Fedora']\n" -">>> a\n" -"[1, 342, 2233423, 'India', 'Fedora']\n" -"]]>" +msgid "\n" +"\n" +">>> a = [ 1 , 342, 2233423, 'India', 'Fedora']\n" +">>> a\n" +"[1, 342, 2233423, 'India', 'Fedora']\n" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:109 #, no-c-format -msgid "" -"Lists can keep any other data inside it. It works as a sequence too, that " -"means" +msgid "Lists can keep any other data inside it. It works as a sequence too, that means" msgstr "" #. Tag: screen -#: looping.xml:110 #, no-c-format -msgid "" -">> a[0]\n" +msgid "\n" +"\n" +">>> a[0]\n" "1\n" -">>> a[4]\n" -"'Fedora'\n" -"]]>" +">>> a[4]\n" +"'Fedora'\n" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:111 #, no-c-format msgid "You can even slice it into different pieces, examples are given below" msgstr "" #. Tag: screen -#: looping.xml:112 #, no-c-format -msgid "" -">> a[4]\n" -"'Fedora'\n" -">>> a[-1]\n" -"'Fedora'\n" -">>> a[-2]\n" -"'India'\n" -">>> a[0:-1]\n" -"[1, 342, 2233423, 'India']\n" -">>> a[2:-2]\n" +msgid "\n" +"\n" +">>> a[4]\n" +"'Fedora'\n" +">>> a[-1]\n" +"'Fedora'\n" +">>> a[-2]\n" +"'India'\n" +">>> a[0:-1]\n" +"[1, 342, 2233423, 'India']\n" +">>> a[2:-2]\n" "[2233423]\n" -">>> a[:-2]\n" +">>> a[:-2]\n" "[1, 342, 2233423]\n" -">>> a[0::2]\n" -"[1, 2233423, 'Fedora']\n" -"]]>" +">>> a[0::2]\n" +"[1, 2233423, 'Fedora']\n" +"" msgstr "" #. Tag: para -#: looping.xml:113 #, no-c-format -msgid "" -"In the last example we used two :(s) , the last value inside the third " -"brackets indicates step. s[i:j:k] means slice of " -"s from i to j " -"with step k." +msgid "In the last example we used two :(s) , the last value inside the third brackets indicates step. s[i:j:k] means slice of s from i to j with step k." msgstr "" #. Tag: para -#: looping.xml:114 #, no-c-format msgid "To check if any value exists within the list or not you can do" msgstr "" #. Tag: screen -#: looping.xml:115 #, no-c-format -msgid "" -">> a = ['Fedora', 'is', 'cool']\n" -">>> 'cool' in a\n" +msgid "\n" +"\n" +">>> a = ['Fedora', 'is', 'cool']\n" +">>> 'cool' in a\n" "True\n" -">>> 'Linux' in a\n" +">>> 'Linux' in a\n" "False\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:116 #, no-c-format -msgid "" -"That means we can use the above statement as if clause " -"expression. The built-in function len() can tell the " -"length of a list." +msgid "That means we can use the above statement as if clause expression. The built-in function len() can tell the length of a list." msgstr "" #. Tag: screen -#: looping.xml:117 #, no-c-format -msgid "" -">> len(a)\n" +msgid "\n" +"\n" +">>> len(a)\n" "3\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: looping.xml:120 #, no-c-format msgid "For loop" msgstr "" #. Tag: para -#: looping.xml:121 #, no-c-format -msgid "" -"There is another to loop by using for statement. In " -"python the for statement is different from the way it " -"works in C. Here for statement iterates over the items " -"of any sequence (a list or a string). Example given below" +msgid "There is another to loop by using for statement. In python the for statement is different from the way it works in C. Here for statement iterates over the items of any sequence (a list or a string). Example given below" msgstr "" #. Tag: screen -#: looping.xml:124 #, no-c-format -msgid "" -">> a = ['Fedora', 'is', 'powerfull']\n" -">>> for x in a:\n" +msgid "\n" +"\n" +">>> a = ['Fedora', 'is', 'powerfull']\n" +">>> for x in a:\n" "... print x,\n" "...\n" "Fedora is powerfull\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:125 #, no-c-format msgid "We can also do things like" msgstr "" #. Tag: screen -#: looping.xml:128 #, no-c-format -msgid "" -">>> a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" -">>> for x in a[::2]:\n" +msgid "\n" +">>> a = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n" +">>> for x in a[::2]:\n" "... print x\n" "...\n" "1\n" "3\n" "5\n" "7\n" -"9" +"9\n" +"" msgstr "" #. Tag: title -#: looping.xml:132 #, no-c-format msgid "range() function" msgstr "" #. Tag: para -#: looping.xml:133 #, no-c-format msgid "range() is a buitin function. From the help document" msgstr "" #. Tag: screen -#: looping.xml:136 #, no-c-format -msgid "" -" list of integers\n" +" range([start,] stop[, step]) -> list of integers\n" " Return a list containing an arithmetic progression of integers.\n" " range(i, j) returns [i, i+1, i+2, ..., j-1]; start (!) defaults to 0.\n" " When step is given, it specifies the increment (or decrement).\n" " For example, range(4) returns [0, 1, 2, 3]. The end point is omitted!\n" " These are exactly the valid indices for a list of 4 elements.\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:137 #, no-c-format -msgid "" -"Now if you want to see this help message on your system type help" -"(range) in the python interpreter. help(s) " -"will return help message on the object s. Examples of " -"range function" +msgid "Now if you want to see this help message on your system type help(range) in the python interpreter. help(s) will return help message on the object s. Examples of range function" msgstr "" #. Tag: screen -#: looping.xml:140 #, no-c-format -msgid "" -">> range(1,5)\n" +msgid "\n" +"\n" +">>> range(1,5)\n" "[1, 2, 3, 4]\n" -">>> range(1,15,3)\n" +">>> range(1,15,3)\n" "[1, 4, 7, 10, 13]\n" -">>> range(10)\n" +">>> range(10)\n" "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: looping.xml:144 #, no-c-format msgid "Continue statement" msgstr "" #. Tag: para -#: looping.xml:145 #, no-c-format -msgid "" -"Just like break we have another statement, " -"continue, which skips the execution of the code after " -"itself and goes back to the start of the loop. That means it will help you " -"to skip a part of the loop. In the below example we will ask the user to " -"input an integer, if the input is negative then we will ask again, if " -"positive then we will square the number. To get out of the infinite loop " -"user must input 0." +msgid "Just like break we have another statement, continue, which skips the execution of the code after itself and goes back to the start of the loop. That means it will help you to skip a part of the loop. In the below example we will ask the user to input an integer, if the input is negative then we will ask again, if positive then we will square the number. To get out of the infinite loop user must input 0." msgstr "" #. Tag: screen -#: looping.xml:148 #, no-c-format -msgid "" -"" +" print "Square is ", n ** 2\n" +"print "Goodbye"\n" +"\n" +"" msgstr "" #. Tag: screen -#: looping.xml:152 #, no-c-format -msgid "" +msgid "\n" "[kd@kdlappy book]$ ./continue.py\n" "Please enter an Integer: 34\n" "Square is 1156\n" @@ -761,33 +649,28 @@ msgid "" "Square is 16\n" "Please enter an Integer: -9\n" "Please enter an Integer: 0\n" -"Goodbye" +"Goodbye\n" +"" msgstr "" #. Tag: title -#: looping.xml:157 #, no-c-format msgid "Else loop" msgstr "" #. Tag: para -#: looping.xml:158 #, no-c-format -msgid "" -"We can have an optional else statement after any loop. " -"It will be executed after the loop unless a break " -"statement stopped the loop." +msgid "We can have an optional else statement after any loop. It will be executed after the loop unless a break statement stopped the loop." msgstr "" #. Tag: screen -#: looping.xml:161 #, no-c-format -msgid "" -">> for i in range(0,5):\n" +msgid "\n" +"\n" +">>> for i in range(0,5):\n" "... print i\n" "... else:\n" -"... print \"Bye bye\"\n" +"... print "Bye bye"\n" "...\n" "0\n" "1\n" @@ -795,13 +678,51 @@ msgid "" "3\n" "4\n" "Bye bye\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: looping.xml:162 #, no-c-format -msgid "" -"We will see more example of break and " -"continue later in the book." +msgid "We will see more example of break and continue later in the book." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Game of sticks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This is a very simple game of sticks. There are 21 sticks, first the user picks number of sticks between 1-4, then the computer picks sticks(1-4). Who ever will pick the last stick will loose. Can you find out the case when the user will win ?" msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +"#!/usr/bin/env python\n" +"\n" +"sticks = 21\n" +"\n" +"print "There are 21 sticks, you can take 1-4 number of sticks at a time."\n" +"print "Whoever will take the last stick will loose"\n" +"\n" +"while True:\n" +" print "Sticks left: " , sticks\n" +" sticks_taken = int(raw_input("Take sticks(1-4):"))\n" +" if sticks == 1:\n" +" print "You took the last stick, you loose"\n" +" break\n" +" if sticks_taken >=5 or sticks_taken <=0:\n" +" print "Wrong choice"\n" +" continue\n" +" print "Computer took: " , (5 - sticks_taken) , "\n" +"\n" +""\n" +" sticks -= 5\n" +"\n" +"\n" +"" +msgstr "" + diff --git a/pot/modules.pot b/pot/modules.pot new file mode 100644 index 0000000..6a03b69 --- /dev/null +++ b/pot/modules.pot @@ -0,0 +1,263 @@ +# +# AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Modules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In this chapter we are going to learn about Python modules." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Introduction" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Still now when ever we wrote code in the python interpreter, after we came out of it, the code was lost. But in when one writes a larger program, people breaks their codes into different files and reuse then as required. In python we do this by modules. Modules are nothing files with Python definitions and statements. The module name is same as the file name without the .py extension." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can find the name of the module by accessing the __name__ variable. It is a global variable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now we are going to see how modules work. Create a file called greetings.py. Content of the file is given bellow." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +"#Bars module\n" +"\n" +"def starbar(num):\n" +" print '*' * num\n" +"\n" +"def hashbar(num):\n" +" print '#' * num\n" +"\n" +"def simplebar(num):\n" +" print '-' * num\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now we are going to start the python interpreter and import our module." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> import bars\n" +">>>\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This will import the module bars. We have to use the module name to access functions inside the module." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> bars.hashbar(10)\n" +"##########\n" +">>> bars.simplebar(10)\n" +"----------\n" +">>> bars.starbar(10)\n" +"**********\n" +"\n" +"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Importing modules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are different ways to import modules. We already saw one way to do this. You can even import selected functions from modules. To do so:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> from bars import simplebar, starbar\n" +">>> simplebar(20)\n" +"--------------------\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Or you can import all functions or variables from a module directly into the current namespace by using *" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> from bars import *\n" +">>> hashbar(20)\n" +"####################\n" +"\n" +"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Default modules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now your Python installation comes with different modules installed, you can use them as required and install new modules for any other special purposes. In the following few examples we are going to see many examples on the same." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> help()\n" +"\n" +"Welcome to Python 2.6! This is the online help utility.\n" +"\n" +"If this is your first time using Python, you should definitely check out\n" +"the tutorial on the Internet at http://docs.python.org/tutorial/.\n" +"\n" +"Enter the name of any module, keyword, or topic to get help on writing\n" +"Python programs and using Python modules. To quit this help utility and\n" +"return to the interpreter, just type "quit".\n" +"\n" +"To get a list of available modules, keywords, or topics, type "modules",\n" +""keywords", or "topics". Each module also comes with a one-line summary\n" +"of what it does; to list the modules whose summaries contain a given word\n" +"such as "spam", type "modules spam".\n" +"\n" +"help> modules\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The above example shows how to get the list of all installed modules in your system. I am not pasting them here as it is a big list in my system :)" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Module os" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "os module provides operating system dependent functionality. You can import it using the following import statement." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> import os\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "getuid() function returns the current process's effective user's id." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> os.getuid()\n" +"500\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "getpid() returns the current process's id. getppid() returns the parent process's id." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> os.getpid()\n" +"16150\n" +">>> os.getppid()\n" +"14847\n" +"\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "uname() returns different information identifying the operating system, in Linux it returns details you can get from the uname command. The returned object is a tuple, (sysname, nodename, release, version, machine)" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"\n" +">>> os.uname()\n" +"('Linux', 'd80', '2.6.34.7-56.fc13.i686.PAE', '#1 SMP Wed Sep 15 03:27:15 UTC 2010', 'i686')\n" +"\n" +"\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "getcwd()returns the current working directory. chdir(path) changes the current working directory to path. In the example we first see the current directory which is my home directory and change the current directory to /tmp and then again checking the current directory." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +">>> os.getcwd()\n" +"'/home/kdas'\n" +">>> os.chdir('/tmp')\n" +">>> os.getcwd()\n" +"'/tmp'\n" +"\n" +"" +msgstr "" + diff --git a/pot/operatorsexpressions.pot b/pot/operatorsexpressions.pot index 97186a8..8533afc 100644 --- a/pot/operatorsexpressions.pot +++ b/pot/operatorsexpressions.pot @@ -1,420 +1,357 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: operatorsexpressions.xml:6 #, no-c-format msgid "Operators and expressions" msgstr "" #. Tag: para -#: operatorsexpressions.xml:7 #, no-c-format -msgid "" -"In python most of the lines you will write will be expressions. Expressions " -"are made of operators and operands. An expression is like 2 + 3 ." +msgid "In python most of the lines you will write will be expressions. Expressions are made of operators and operands. An expression is like 2 + 3 ." msgstr "" #. Tag: title -#: operatorsexpressions.xml:11 #, no-c-format msgid "Operators" msgstr "" #. Tag: para -#: operatorsexpressions.xml:12 #, no-c-format -msgid "" -"Operators are the symbols which tells the python interpreter to do some " -"mathematical or logical operation. Few basic examples of mathematical " -"operators are given below:" +msgid "Operators are the symbols which tells the python interpreter to do some mathematical or logical operation. Few basic examples of mathematical operators are given below:" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:15 #, no-c-format -msgid "" -">> 2 + 3\n" +msgid "\n" +"\n" +">>> 2 + 3\n" "5\n" -">>> 23 - 3\n" +">>> 23 - 3\n" "20\n" -">>> 22.0 / 12\n" +">>> 22.0 / 12\n" "1.8333333333333333\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:16 #, no-c-format -msgid "" -"To get floating result you need to the division using any of operand as " -"floating number. To do modulo operation use % operator" +msgid "To get floating result you need to the division using any of operand as floating number. To do modulo operation use % operator" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:19 #, no-c-format -msgid "" -">> 14 % 3\n" +msgid "\n" +"\n" +">>> 14 % 3\n" "2\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: operatorsexpressions.xml:22 #, no-c-format msgid "Example of integer arithmetic" msgstr "" #. Tag: para -#: operatorsexpressions.xml:23 #, no-c-format msgid "The code" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:26 #, no-c-format -msgid "" -"" +"print "Months = %d Days = %d" % (months, days)\n" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:27 operatorsexpressions.xml:82 -#: operatorsexpressions.xml:97 operatorsexpressions.xml:121 -#: operatorsexpressions.xml:144 #, no-c-format msgid "The output" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:30 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:31 #, no-c-format -msgid "" -"In the first line I am taking the input of days, then getting the months and " -"days and at last printing them. You can do it in a easy way" +msgid "In the first line I am taking the input of days, then getting the months and days and at last printing them. You can do it in a easy way" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:34 #, no-c-format -msgid "" -"" +"days = int(raw_input("Enter days: "))\n" +"print "Months = %d Days = %d" % (divmod(days, 30))\n" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:35 #, no-c-format -msgid "" -"The divmod(num1, num2) function returns two values , first is the division " -"of num1 and num2 and in second the modulo of num1 and num2." +msgid "The divmod(num1, num2) function returns two values , first is the division of num1 and num2 and in second the modulo of num1 and num2." msgstr "" #. Tag: title -#: operatorsexpressions.xml:40 operatorsexpressions.xml:44 #, no-c-format msgid "Relational Operators" msgstr "" #. Tag: para -#: operatorsexpressions.xml:41 #, no-c-format msgid "You can use the following operators as relational operators" msgstr "" #. Tag: segtitle -#: operatorsexpressions.xml:46 #, no-c-format msgid "Operator" msgstr "" #. Tag: segtitle -#: operatorsexpressions.xml:47 #, no-c-format msgid "Meaning" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:48 #, no-c-format -msgid "" +msgid "<" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:48 #, no-c-format msgid "Is less than" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:49 #, no-c-format -msgid "" +msgid "<=" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:49 #, no-c-format msgid "Is less than or equal to" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:50 #, no-c-format -msgid "]]>" +msgid ">" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:50 #, no-c-format msgid "Is greater than" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:51 #, no-c-format -msgid "=]]>" +msgid ">=" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:51 #, no-c-format msgid "Is greater than or equal to" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:52 #, no-c-format -msgid "" +msgid "==" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:52 #, no-c-format msgid "Is equal to" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:53 #, no-c-format -msgid "" +msgid "!=" msgstr "" #. Tag: seg -#: operatorsexpressions.xml:53 #, no-c-format msgid "Is not equal to" msgstr "" #. Tag: para -#: operatorsexpressions.xml:55 #, no-c-format msgid "Some examples" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:58 #, no-c-format -msgid "" -">> 1 < 2\n" +msgid "\n" +"\n" +">>> 1 < 2\n" "True\n" -">>> 3 > 34\n" +">>> 3 > 34\n" "False\n" -">>> 23 == 45\n" +">>> 23 == 45\n" "False\n" -">>> 34 != 323\n" +">>> 34 != 323\n" "True\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:59 #, no-c-format msgid "// operator gives the floor division result" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:62 #, no-c-format -msgid "" -">> 4.0 // 3\n" +msgid "\n" +"\n" +">>> 4.0 // 3\n" "1.0\n" -">>> 4.0 / 3\n" +">>> 4.0 / 3\n" "1.3333333333333333\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: operatorsexpressions.xml:65 #, no-c-format msgid "Logical Operators" msgstr "" #. Tag: para -#: operatorsexpressions.xml:66 #, no-c-format -msgid "" -"To do logical AND , OR we use and , or keywords. x and y returns False if x is False else it " -"returns evaluation of y. If x is " -"True, it returns True." +msgid "To do logical AND , OR we use and , or keywords. x and y returns False if x is False else it returns evaluation of y. If x is True, it returns True." msgstr "" #. Tag: screen -#: operatorsexpressions.xml:69 #, no-c-format -msgid "" -">> 1 and 4\n" +msgid "\n" +"\n" +">>> 1 and 4\n" "4\n" -">>> 1 or 4\n" +">>> 1 or 4\n" "1\n" -">>> -1 or 4\n" +">>> -1 or 4\n" "-1\n" -">>> 0 or 4\n" +">>> 0 or 4\n" "4\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: operatorsexpressions.xml:73 #, no-c-format msgid "Shorthand Operator" msgstr "" #. Tag: para -#: operatorsexpressions.xml:74 #, no-c-format -msgid "" -"x op = expression is the syntax for shorthand " -"operators. It will be evaluated like x = x op expression , Few examples are" +msgid "x op = expression is the syntax for shorthand operators. It will be evaluated like x = x op expression , Few examples are" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:77 #, no-c-format -msgid "" -">> a = 12\n" -">>> a += 13\n" -">>> a\n" +msgid "\n" +"\n" +">>> a = 12\n" +">>> a += 13\n" +">>> a\n" "25\n" -">>> a /= 3\n" -">>> a\n" +">>> a /= 3\n" +">>> a\n" "8\n" -">>> a += (26* 32)\n" -">>> a\n" +">>> a += (26* 32)\n" +">>> a\n" "840\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:78 #, no-c-format msgid "shorthand.py example" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:81 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:85 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: operatorsexpressions.xml:88 #, no-c-format msgid "Expressions" msgstr "" #. Tag: para -#: operatorsexpressions.xml:89 #, no-c-format -msgid "" -"Generally while writing expressions we put spaces before and after every " -"operator so that the code becomes clearer to read, like" +msgid "Generally while writing expressions we put spaces before and after every operator so that the code becomes clearer to read, like" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:92 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:93 #, no-c-format msgid "One example code used to show expressions" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:96 #, no-c-format -msgid "" -"" +"print "X = ", x\n" +"print "Y = ", y\n" +"print "Z = ", z\n" +"\n" +"" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:100 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:101 #, no-c-format -msgid "" -"At first x is being calculated. The steps are like this" +msgid "At first x is being calculated. The steps are like this" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:104 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:105 #, no-c-format -msgid "" -"Now for y and z we have " -"parentheses, so the expressions evaluated in different way. Do the " -"calculation yourself to check them." +msgid "Now for y and z we have parentheses, so the expressions evaluated in different way. Do the calculation yourself to check them." msgstr "" #. Tag: title -#: operatorsexpressions.xml:110 #, no-c-format msgid "Type Conversions" msgstr "" #. Tag: para -#: operatorsexpressions.xml:111 #, no-c-format msgid "We have to do the type conversions manually. Like" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:113 #, no-c-format -msgid "" -" float value\n" -"int(string) -> integer value\n" -"str(integer) or str(float) -> string representation \n" -">>> a = 8.126768\n" -">>> str(a)\n" -"'8.126768'\n" -"]]>" +msgid "\n" +"\n" +"float(string) -> float value\n" +"int(string) -> integer value\n" +"str(integer) or str(float) -> string representation \n" +">>> a = 8.126768\n" +">>> str(a)\n" +"'8.126768'\n" +"\n" +"" msgstr "" #. Tag: title -#: operatorsexpressions.xml:116 #, no-c-format msgid "evaluateequ.py" msgstr "" #. Tag: para -#: operatorsexpressions.xml:117 #, no-c-format -msgid "" -"This is a program to evaluate 1/x+1/(x+1)+1/(x+2)+ ... +1/n series upto n, " -"in our case x = 1 and n =10" +msgid "This is a program to evaluate 1/x+1/(x+1)+1/(x+2)+ ... +1/n series upto n, in our case x = 1 and n =10" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:120 #, no-c-format -msgid "" -"" +" print "%2d %6.4f" % (i , sum)\n" +"\n" +"" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:124 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: operatorsexpressions.xml:126 #, no-c-format -msgid "" -"In the line sum += 1.0 / i what is actually happening " -"is sum = sum + 1.0 / i." +msgid "In the line sum += 1.0 / i what is actually happening is sum = sum + 1.0 / i." msgstr "" #. Tag: title -#: operatorsexpressions.xml:131 #, no-c-format msgid "quadraticequation.py" msgstr "" #. Tag: para -#: operatorsexpressions.xml:132 #, no-c-format msgid "This is a program to evaluate the quadratic equation" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:135 #, no-c-format -msgid "" -"" +"print "Root 1 = ", root1\n" +"print "Root 2 = ", root2\n" +"\n" +"" msgstr "" #. Tag: title -#: operatorsexpressions.xml:139 #, no-c-format msgid "salesmansalary.py" msgstr "" #. Tag: para -#: operatorsexpressions.xml:140 #, no-c-format -msgid "" -"In this example we are going to calculate the salary of a camera salesman. " -"His basic salary is 1500, for every camera he will sell he will get 200 and " -"the commission on the month's sale is 2 %. The input will be number of " -"cameras sold and total price of the cameras." +msgid "In this example we are going to calculate the salary of a camera salesman. His basic salary is 1500, for every camera he will sell he will get 200 and the commission on the month's sale is 2 %. The input will be number of cameras sold and total price of the cameras." msgstr "" #. Tag: screen -#: operatorsexpressions.xml:143 #, no-c-format -msgid "" -"" +"print "Bonus = %6.2f" % bonus\n" +"print "Commision = %6.2f" % commision\n" +"print "Gross salary = %6.2f" % ( basic_salary + bonus + commision)\n" +"\n" +"" msgstr "" #. Tag: screen -#: operatorsexpressions.xml:147 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" + diff --git a/pot/strings.pot b/pot/strings.pot index 746a645..4d987a5 100644 --- a/pot/strings.pot +++ b/pot/strings.pot @@ -1,430 +1,373 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: strings.xml:6 #, no-c-format msgid "Strings" msgstr "" #. Tag: para -#: strings.xml:7 #, no-c-format -msgid "" -"Strings are nothing but simple text. In python we declare strings in between " -"\"\" or '' or ''' ''' or \"\"\" \"\"\". The examples below will help you to " -"understand sting in a better way." +msgid "Strings are nothing but simple text. In python we declare strings in between "" or '' or ''' ''' or """ """. The examples below will help you to understand sting in a better way." msgstr "" #. Tag: screen -#: strings.xml:10 #, no-c-format -msgid "" -">> s = \"I am Indian\"\n" -">>> s\n" -"'I am Indian'\n" -">>> s = 'I am Indian'\n" -">>> s = \"Here is a line \\\n" -"... splitted in two lines\"\n" -">>> s\n" -"'Here is a line splitted in two lines'\n" -">>> s = \"Here is a line \\n splitted in two lines\"\n" -">>> s\n" -"'Here is a line \\n splitted in two lines'\n" -">>> print s\n" +msgid "\n" +"\n" +">>> s = "I am Indian"\n" +">>> s\n" +"'I am Indian'\n" +">>> s = 'I am Indian'\n" +">>> s = "Here is a line \\\n" +"... splitted in two lines"\n" +">>> s\n" +"'Here is a line splitted in two lines'\n" +">>> s = "Here is a line \n" +" splitted in two lines"\n" +">>> s\n" +"'Here is a line \n" +" splitted in two lines'\n" +">>> print s\n" "Here is a line\n" -" splitted in two lines \n" -"]]>" +" splitted in two lines \n" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:11 #, no-c-format -msgid "" -"Now if you want to multiline strings you have to use triple single/double " -"quotes." +msgid "Now if you want to multiline strings you have to use triple single/double quotes." msgstr "" #. Tag: screen -#: strings.xml:14 #, no-c-format -msgid "" -">> s = \"\"\" This is a\n" +msgid "\n" +"\n" +">>> s = """ This is a\n" "... multiline string, so you can\n" -"... write many lines\"\"\"\n" -">>> print s\n" +"... write many lines"""\n" +">>> print s\n" " This is a\n" "multiline string, so you can\n" "write many lines\n" -"]]>" +"\n" +"" msgstr "" #. Tag: title -#: strings.xml:16 #, no-c-format msgid "Different methods available for Strings" msgstr "" #. Tag: para -#: strings.xml:17 #, no-c-format -msgid "" -"Every string object is having couple of buildin methods available, we " -"already saw some of them like s.split(\" \")." +msgid "Every string object is having couple of buildin methods available, we already saw some of them like s.split(" ")." msgstr "" #. Tag: screen -#: strings.xml:20 #, no-c-format -msgid "" -">> s = \"kushal das\"\n" -">>> s.title()\n" -"'Kushal Das' \n" -"]]>" +msgid "\n" +"\n" +">>> s = "kushal das"\n" +">>> s.title()\n" +"'Kushal Das' \n" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:21 #, no-c-format -msgid "" -"title() method returns a titlecased version of the " -"string, words start with uppercase characters, all remaining cased " -"characters are lowercase." +msgid "title() method returns a titlecased version of the string, words start with uppercase characters, all remaining cased characters are lowercase." msgstr "" #. Tag: screen -#: strings.xml:24 #, no-c-format -msgid "" -">> z = s.upper()\n" -">>> z\n" -"'KUSHAL DAS'\n" -">>> z.lower()\n" -"'kushal das'\n" -"]]>" +msgid "\n" +"\n" +">>> z = s.upper()\n" +">>> z\n" +"'KUSHAL DAS'\n" +">>> z.lower()\n" +"'kushal das'\n" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:25 #, no-c-format -msgid "" -"upper() returns a total uppercase version whereas " -"lower() returns a lower case version of the string." +msgid "upper() returns a total uppercase version whereas lower() returns a lower case version of the string." msgstr "" #. Tag: screen -#: strings.xml:28 #, no-c-format -msgid "" -">> s = \"I am A pRoGraMMer\"\n" -">> s.swapcase()\n" -"'i AM a PrOgRAmmER'\n" -"]]>" +msgid "\n" +"\n" +">>> s = "I am A pRoGraMMer"\n" +">> s.swapcase()\n" +"'i AM a PrOgRAmmER'\n" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:29 #, no-c-format msgid "swapcase() returns the string with case swapped :)" msgstr "" #. Tag: screen -#: strings.xml:32 #, no-c-format -msgid "" -">> s = \"jdwb 2323bjb\"\n" -">>> s.isalnum()\n" +msgid "\n" +"\n" +">>> s = "jdwb 2323bjb"\n" +">>> s.isalnum()\n" "False\n" -">>> s = \"jdwb2323bjb\"\n" -">>> s.isalnum()\n" +">>> s = "jdwb2323bjb"\n" +">>> s.isalnum()\n" "True\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:33 #, no-c-format -msgid "" -"Because of the space in the first line isalnum() " -"returned False , it checks for all charecters are alpha " -"numeric or not." +msgid "Because of the space in the first line isalnum() returned False , it checks for all charecters are alpha numeric or not." msgstr "" #. Tag: screen -#: strings.xml:36 #, no-c-format -msgid "" -">> s = \"SankarshanSir\"\n" -">>> s.isalpha()\n" +msgid "\n" +"\n" +">>> s = "SankarshanSir"\n" +">>> s.isalpha()\n" "True\n" -">>> s = \"Sankarshan Sir\"\n" -">>> s.isalpha()\n" +">>> s = "Sankarshan Sir"\n" +">>> s.isalpha()\n" "False\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:37 #, no-c-format msgid "isalpha() checkes for only alphabets." msgstr "" #. Tag: screen -#: strings.xml:40 #, no-c-format -msgid "" -">> s = \"1234\"\n" -">>> s.isdigit() #To check if all the characters are digits or not\n" +msgid "\n" +"\n" +">>> s = "1234"\n" +">>> s.isdigit() #To check if all the characters are digits or not\n" "True\n" -">>> s = \"Fedora9 is coming\"\n" -">>> s.islower() # To check if all chracters are lower case or not\n" +">>> s = "Fedora9 is coming"\n" +">>> s.islower() # To check if all chracters are lower case or not\n" "False\n" -">>> s = \"Fedora9 Is Coming\" \n" -">>> s.istitle() # To check if it is a title or not\n" +">>> s = "Fedora9 Is Coming" \n" +">>> s.istitle() # To check if it is a title or not\n" "True\n" -">>> s = \"INDIA\"\n" -">>> s.isupper() # To check if characters are in upper case or not\n" +">>> s = "INDIA"\n" +">>> s.isupper() # To check if characters are in upper case or not\n" "True\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:41 #, no-c-format -msgid "" -"To split any string we have split(). It takes a string " -"as an argument , depending on that it will split the main string and returns " -"a list containing splitted strings." +msgid "To split any string we have split(). It takes a string as an argument , depending on that it will split the main string and returns a list containing splitted strings." msgstr "" #. Tag: screen -#: strings.xml:44 #, no-c-format -msgid "" -">> s = \"We all love Python\"\n" -">>> s.split(\" \")\n" -"['We', 'all', 'love', 'Python']\n" -">>> x = \"Nishant:is:waiting\"\n" -">>> x.split(':')\n" -"['Nishant', 'is', 'waiting']\n" -"]]>" +msgid "\n" +"\n" +">>> s = "We all love Python"\n" +">>> s.split(" ")\n" +"['We', 'all', 'love', 'Python']\n" +">>> x = "Nishant:is:waiting"\n" +">>> x.split(':')\n" +"['Nishant', 'is', 'waiting']\n" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:45 #, no-c-format -msgid "" -"The opposite method for split() is join(). It takes a list contains strings as input and join them." +msgid "The opposite method for split() is join(). It takes a list contains strings as input and join them." msgstr "" #. Tag: screen -#: strings.xml:48 #, no-c-format -msgid "" -">> \"-\".join(\"GNU/Linux is great\".split(\" \"))\n" -"'GNU/Linux-is-great'\n" -"]]>" +msgid "\n" +"\n" +">>> "-".join("GNU/Linux is great".split(" "))\n" +"'GNU/Linux-is-great'\n" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:49 #, no-c-format -msgid "" -"In the above example first we are splitting the string \"GNU/Linux is great" -"\" based on the white space, then joining them with \"-\"." +msgid "In the above example first we are splitting the string "GNU/Linux is great" based on the white space, then joining them with "-"." msgstr "" #. Tag: title -#: strings.xml:55 #, no-c-format msgid "String the strings" msgstr "" #. Tag: para -#: strings.xml:56 #, no-c-format -msgid "" -"Strings do have few methods to do striping. The simplest one is " -"strip(chars). If you provide the chars argument then it " -"will strip any combination of them. By default it strips only whitespace or " -"newline characters." +msgid "Strings do have few methods to do striping. The simplest one is strip(chars). If you provide the chars argument then it will strip any combination of them. By default it strips only whitespace or newline characters." msgstr "" #. Tag: screen -#: strings.xml:59 #, no-c-format -msgid "" -">> s = \" abc\\n \"\n" -">>> s.strip()\n" -"'abc'\n" -"]]>" +msgid "\n" +"\n" +">>> s = " abc\n" +" "\n" +">>> s.strip()\n" +"'abc'\n" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:60 #, no-c-format -msgid "" -"You can particularly strip from the left hand or right hand side also using " -"lstrip(chars) or rstrip(chars)." +msgid "You can particularly strip from the left hand or right hand side also using lstrip(chars) or rstrip(chars)." msgstr "" #. Tag: screen -#: strings.xml:63 #, no-c-format -msgid "" -">> s = \"www.foss.in\"\n" -">>> s.lstrip(\"cwsd.\")\n" -"'foss.in'\n" -">>> s.rstrip(\"cnwdi.\")\n" -"'www.foss'\n" -"]]>" +msgid "\n" +"\n" +">>> s = "www.foss.in"\n" +">>> s.lstrip("cwsd.")\n" +"'foss.in'\n" +">>> s.rstrip("cnwdi.")\n" +"'www.foss'\n" +"\n" +"" msgstr "" #. Tag: title -#: strings.xml:67 #, no-c-format msgid "Finding text" msgstr "" #. Tag: para -#: strings.xml:68 #, no-c-format -msgid "" -"Stings have some methods which will help you in finding text/substring in a " -"string. Examples are given below:" +msgid "Stings have some methods which will help you in finding text/substring in a string. Examples are given below:" msgstr "" #. Tag: screen -#: strings.xml:71 #, no-c-format -msgid "" -">> s.find(\"for\")\n" +msgid "\n" +"\n" +">>> s.find("for")\n" "7\n" -">>> s.find(\"fora\")\n" +">>> s.find("fora")\n" "-1\n" -">>> s.startswith(\"fa\") #To check if the string startswith fa or not\n" +">>> s.startswith("fa") #To check if the string startswith fa or not\n" "True\n" -">>> s.endswith(\"reason\") #\n" +">>> s.endswith("reason") #\n" "True\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:72 #, no-c-format -msgid "" -"find() helps to find the first occurrence of the " -"substring given, if not found it returns -1." +msgid "find() helps to find the first occurrence of the substring given, if not found it returns -1." msgstr "" #. Tag: title -#: strings.xml:79 #, no-c-format msgid "Palindrome checking" msgstr "" #. Tag: para -#: strings.xml:80 #, no-c-format -msgid "" -"Palindrome are the kind of strings which are same from left or right " -"whichever way you read them. Example \"madam\". In this example we will take " -"the word as input from the user and say if it is palindrome or not." +msgid "Palindrome are the kind of strings which are same from left or right whichever way you read them. Example "madam". In this example we will take the word as input from the user and say if it is palindrome or not." msgstr "" #. Tag: screen -#: strings.xml:83 #, no-c-format -msgid "" -"" +" print "The string is not a palindrome"\n" +"\n" +"" msgstr "" #. Tag: para -#: strings.xml:84 strings.xml:95 #, no-c-format msgid "The output" msgstr "" #. Tag: screen -#: strings.xml:87 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: strings.xml:90 #, no-c-format msgid "Number of words" msgstr "" #. Tag: para -#: strings.xml:91 #, no-c-format msgid "In this example we will count the number of words in a given line" msgstr "" #. Tag: screen -#: strings.xml:94 #, no-c-format -msgid "" -"" +"s = raw_input("Enter a line: ")\n" +"print "The number of words in the line are %d" % (len(s.split(" ")))\n" +"\n" +"" msgstr "" #. Tag: screen -#: strings.xml:96 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" + diff --git a/pot/thebeginning.pot b/pot/thebeginning.pot index aec9822..c8ee103 100644 --- a/pot/thebeginning.pot +++ b/pot/thebeginning.pot @@ -1,235 +1,182 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: thebeginning.xml:6 #, no-c-format msgid "The Beginning" msgstr "" #. Tag: para -#: thebeginning.xml:7 #, no-c-format -msgid "" -"So we are going to look at our first code. As python is an interpreted " -"language , you can directly write the code into the python interpreter or " -"write in a file and then run the file. First we are going to do that using " -"the interpreter, to start type python in the command prompt (shell or " -"terminal)." +msgid "So we are going to look at our first code. As python is an interpreted language , you can directly write the code into the python interpreter or write in a file and then run the file. First we are going to do that using the interpreter, to start type python in the command prompt (shell or terminal)." msgstr "" #. Tag: screen -#: thebeginning.xml:10 #, no-c-format -msgid "" +msgid "\n" "[kd@kdlappy ~]$ python\n" "Python 2.5.1 (r251:54863, Oct 30 2007, 13:54:11)\n" "[GCC 4.1.2 20070925 (Red Hat 4.1.2-33)] on linux2\n" -"Type \"help\", \"copyright\", \"credits\" or \"license\" for more " -"information. \n" -">>>" +"Type "help", "copyright", "credits" or "license" for more information. \n" +">>> \n" +"\n" +"" msgstr "" #. Tag: para -#: thebeginning.xml:11 #, no-c-format -msgid "" -"In our first code we are going to print \"Hello World!\" , so do it as below," +msgid "In our first code we are going to print "Hello World!" , so do it as below," msgstr "" #. Tag: screen -#: thebeginning.xml:14 #, no-c-format -msgid "" -">>> print \"Hello World!\"\n" -"Hello World!" +msgid "\n" +">>> print "Hello World!"\n" +"Hello World!\n" +"" msgstr "" #. Tag: title -#: thebeginning.xml:17 #, no-c-format msgid "helloworld.py" msgstr "" #. Tag: para -#: thebeginning.xml:18 #, no-c-format -msgid "" -"Now as a serious programmer you may want to write the above code into a " -"source file. We will create a helloworld.py. Use any text editor you like to " -"create the file. I used vi, you can even use GUI based tools like Kate, " -"gedit too." +msgid "Now as a serious programmer you may want to write the above code into a source file. We will create a helloworld.py. Use any text editor you like to create the file. I used vi, you can even use GUI based tools like Kate, gedit too." msgstr "" #. Tag: screen -#: thebeginning.xml:21 #, no-c-format -msgid "" +msgid "\n" "#!/usr/bin/env python\n" -"print \"Hello World!\"" +"print "Hello World!"\n" +"" msgstr "" #. Tag: para -#: thebeginning.xml:22 #, no-c-format -msgid "" -"To run the code first you have to make the file executable, in GNU/Linux you " -"can do that by giving the command in a shell or terminal" +msgid "To run the code first you have to make the file executable, in GNU/Linux you can do that by giving the command in a shell or terminal" msgstr "" #. Tag: screen -#: thebeginning.xml:25 #, no-c-format -msgid "$ chmod +x helloworld.py" +msgid "\n" +"$ chmod +x helloworld.py\n" +"" msgstr "" #. Tag: para -#: thebeginning.xml:26 #, no-c-format msgid "Then" msgstr "" #. Tag: screen -#: thebeginning.xml:29 #, no-c-format -msgid "" +msgid "\n" "$ ./helloworld.py \n" -"Hello World!" +"Hello World!\n" +"" msgstr "" #. Tag: para -#: thebeginning.xml:30 #, no-c-format -msgid "" -"On the first line you can #! , we call it sha-bang. " -"Using this we are telling that use python interpreter to run this code. In " -"the next line we are printing a text message. In python we call all the line " -"of texts as strings." +msgid "On the first line you can #! , we call it sha-bang. Using this we are telling that use python interpreter to run this code. In the next line we are printing a text message. In python we call all the line of texts as strings." msgstr "" #. Tag: title -#: thebeginning.xml:37 #, no-c-format msgid "Whitespaces and indentation" msgstr "" #. Tag: para -#: thebeginning.xml:38 #, no-c-format -msgid "" -"In Python whitespace is an important thing. We divide different identifiers " -"using spaces.Whitespace in the beginning of the line is known as " -"indentation, but if you give wrong indentation it will throw an error. " -"Examples are given below:" +msgid "In Python whitespace is an important thing. We divide different identifiers using spaces.Whitespace in the beginning of the line is known as indentation, but if you give wrong indentation it will throw an error. Examples are given below:" msgstr "" #. Tag: screen -#: thebeginning.xml:41 #, no-c-format -msgid "" -">> a = 12\n" -">>> a = 12\n" -" File \"\", line 1\n" +msgid "\n" +"\n" +">>> a = 12\n" +">>> a = 12\n" +" File "<stdin>", line 1\n" " a = 12\n" " ^\n" -" IndentationError: unexpected indent]]>" +" IndentationError: unexpected indent\n" +"" msgstr "" #. Tag: title -#: thebeginning.xml:43 #, no-c-format msgid "Warning" msgstr "" #. Tag: para -#: thebeginning.xml:44 #, no-c-format -msgid "" -"There is an extra space in the beginning of the second line which is causing " -"the error, so always look for the proper indentation." +msgid "There is an extra space in the beginning of the second line which is causing the error, so always look for the proper indentation." msgstr "" #. Tag: para -#: thebeginning.xml:47 #, no-c-format -msgid "" -"You can even get into this indentation errors if you mix up tabs and spaces. " -"Like if you use spaces and only use spaces for indentation, don't use tabs " -"in that case. For you it may look same, but the code will give you error if " -"you try to run it." +msgid "You can even get into this indentation errors if you mix up tabs and spaces. Like if you use spaces and only use spaces for indentation, don't use tabs in that case. For you it may look same, but the code will give you error if you try to run it." msgstr "" #. Tag: title -#: thebeginning.xml:54 #, no-c-format msgid "Comments" msgstr "" #. Tag: para -#: thebeginning.xml:55 #, no-c-format -msgid "" -"Comments are some piece of English text which explains what this code does, " -"we write comments in the code so that is easier for others to understand. A " -"comment line starts with # , everything after that is " -"ignored as comment, that means they don't effect on the program." +msgid "Comments are some piece of English text which explains what this code does, we write comments in the code so that is easier for others to understand. A comment line starts with # , everything after that is ignored as comment, that means they don't effect on the program." msgstr "" #. Tag: screen -#: thebeginning.xml:58 #, no-c-format -msgid "" -">> #this is a comment\n" -">>> #the next line will add two numbers\n" -">>> a = 12 + 34\n" -">>> print c #this is a comment too :)]]>" +msgid "\n" +"\n" +">>> #this is a comment\n" +">>> #the next line will add two numbers\n" +">>> a = 12 + 34\n" +">>> print c #this is a comment too :)\n" +"" msgstr "" #. Tag: title -#: thebeginning.xml:62 #, no-c-format msgid "Modules" msgstr "" #. Tag: para -#: thebeginning.xml:63 #, no-c-format -msgid "" -"Modules are python files which contain different function definitions , " -"variables which we can reuse, it should always end with a .py extension.. " -"Python itself is having a vast module library with the default installation. " -"We are going to use some of them. To use a module you have to import it " -"first." +msgid "Modules are python files which contain different function definitions , variables which we can reuse, it should always end with a .py extension.. Python itself is having a vast module library with the default installation. We are going to use some of them. To use a module you have to import it first." msgstr "" #. Tag: screen -#: thebeginning.xml:66 #, no-c-format -msgid "" -">> import math\n" -">>> print math.e\n" +msgid "\n" +"\n" +">>> import math\n" +">>> print math.e\n" "2.71828182846\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: thebeginning.xml:67 #, no-c-format msgid "We are going to learn more about modules on the Modules chapter." msgstr "" + diff --git a/pot/variablesanddatatypes.pot b/pot/variablesanddatatypes.pot index cc88127..faf1f9c 100644 --- a/pot/variablesanddatatypes.pot +++ b/pot/variablesanddatatypes.pot @@ -1,75 +1,59 @@ -# SOME DESCRIPTIVE TITLE. -# FIRST AUTHOR , YEAR. +# +# AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: http://bugs.kde.org\n" -"POT-Creation-Date: 2008-12-24 15:13+0000\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2010-09-27T11:50:13\n" +"PO-Revision-Date: 2010-09-27T11:50:13\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" "MIME-Version: 1.0\n" -"Content-Type: application/x-xml2pot; charset=UTF-8\n" +"Content-Type: application/x-publican; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. Tag: title -#: variablesanddatatypes.xml:6 #, no-c-format msgid "Variables and Datatypes" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:7 #, no-c-format -msgid "" -"Every programming language is having own grammar rules just like the other " -"languages we speak." +msgid "Every programming language is having own grammar rules just like the other languages we speak." msgstr "" #. Tag: title -#: variablesanddatatypes.xml:11 #, no-c-format msgid "Keywords and Identifiers" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:12 #, no-c-format -msgid "" -"Python codes can be divided into identifiers. Identifiers (also referred to " -"as names) are described by the following lexical definitions:" +msgid "Python codes can be divided into identifiers. Identifiers (also referred to as names) are described by the following lexical definitions:" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:15 #, no-c-format -msgid "" -"" +"lowercase ::= "a"..."z" \n" +"uppercase ::= "A"..."Z" \n" +"digit ::= "0"..."9"\n" +"\n" +"" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:16 #, no-c-format -msgid "" -"This means _abcd is a valid identifier where as " -"1sd is not. The following identifiers are used as " -"reserved words, or keywords of the language, and cannot be used as ordinary " -"identifiers. They must be spelled exactly as written here:" +msgid "This means _abcd is a valid identifier where as 1sd is not. The following identifiers are used as reserved words, or keywords of the language, and cannot be used as ordinary identifiers. They must be spelled exactly as written here:" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:19 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:20 #, no-c-format -msgid "" -"In Python we don't specify what kind of data we are going to put in a " -"variable. So you can directly write abc = 1 and abc will become an integer " -"datatype. If you write abc = 1.0 abc will become of floating type. Here is a " -"small program to add two given numbers" +msgid "In Python we don't specify what kind of data we are going to put in a variable. So you can directly write abc = 1 and abc will become an integer datatype. If you write abc = 1.0 abc will become of floating type. Here is a small program to add two given numbers" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:23 #, no-c-format -msgid "" -">> a = 13 \n" -">>> b = 23\n" -">>> a + b \n" +msgid "\n" +"\n" +">>> a = 13 \n" +">>> b = 23\n" +">>> a + b \n" "36\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:24 #, no-c-format -msgid "" -"From the above example you can understand that to declare a variable in " -"python , what you need is just to type the name and the value. Python can " -"also manipulate strings They can be enclosed in single quotes or double " -"quotes like" +msgid "From the above example you can understand that to declare a variable in python , what you need is just to type the name and the value. Python can also manipulate strings They can be enclosed in single quotes or double quotes like" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:27 #, no-c-format -msgid "" -">> 'India'\n" -"'India' \n" -">>> 'India\\'s best' \n" -"\"India's best\" \n" -">>> \"Hello World!\" \n" -"'Hello World!'\n" -"]]>" +msgid "\n" +"\n" +">>> 'India'\n" +"'India' \n" +">>> 'India\\'s best' \n" +""India's best" \n" +">>> "Hello World!" \n" +"'Hello World!'\n" +"\n" +"" msgstr "" #. Tag: title -#: variablesanddatatypes.xml:31 #, no-c-format msgid "Reading input from the Keyboard" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:32 #, no-c-format -msgid "" -"Generally the real life python codes do not need to read input from the " -"keyboard. In python we use raw_input function to do input. " -"raw_input(\"String to show\") , this will return a " -"string as output. Let us write a program to read a number from the keyboard " -"and check if it is less than 100 or not. Name of the program is testhundred." -"py" +msgid "Generally the real life python codes do not need to read input from the keyboard. In python we use raw_input function to do input. raw_input("String to show") , this will return a string as output. Let us write a program to read a number from the keyboard and check if it is less than 100 or not. Name of the program is testhundred.py" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:35 #, no-c-format -msgid "" -"" +" print "Your number is greater than 100" \n" +"\n" +"" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:36 variablesanddatatypes.xml:44 -#: variablesanddatatypes.xml:60 variablesanddatatypes.xml:71 #, no-c-format msgid "The output" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:39 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:40 #, no-c-format msgid "In the next program we are going to calculate investments." msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:43 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:47 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: variablesanddatatypes.xml:50 #, no-c-format msgid "Some Examples" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:51 #, no-c-format msgid "Some examples of variables and datatypes:" msgstr "" #. Tag: title -#: variablesanddatatypes.xml:55 #, no-c-format msgid "Average of N numbers" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:56 #, no-c-format msgid "In the next program we will do an average of N numbers." msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:59 #, no-c-format -msgid "" -"" +"print "N = %d , Sum = %f" % (N, sum)\n" +"print "Average = %f" % average\n" +"\n" +"" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:63 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: variablesanddatatypes.xml:66 #, no-c-format msgid "Temperature conversion" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:67 #, no-c-format -msgid "" -"In this program we will convert the given temperature to Celsius from " -"Fahrenheit by using the formula C=(F-32)/1.8" +msgid "In this program we will convert the given temperature to Celsius from Fahrenheit by using the formula C=(F-32)/1.8" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:70 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:74 #, no-c-format -msgid "" -"" +"\n" +"" msgstr "" #. Tag: title -#: variablesanddatatypes.xml:80 #, no-c-format msgid "Multiple assignments in a single line" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:81 #, no-c-format msgid "You can even assign values to multiple variables in a single line, like" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:84 #, no-c-format -msgid "" -">> a , b = 45, 54\n" -">>> a\n" +msgid "\n" +"\n" +">>> a , b = 45, 54\n" +">>> a\n" "45\n" -">>> b\n" +">>> b\n" "54\n" -"]]>" +"\n" +"" msgstr "" #. Tag: para -#: variablesanddatatypes.xml:85 #, no-c-format msgid "Using this swapping two numbers becomes very easy" msgstr "" #. Tag: screen -#: variablesanddatatypes.xml:88 #, no-c-format -msgid "" -">> a, b = b , a\n" -">>> a\n" +msgid "\n" +"\n" +">>> a, b = b , a\n" +">>> a\n" "54\n" -">>> b\n" +">>> b\n" "45\n" -"]]>" +"\n" +"" msgstr "" +