Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Thanks

The need for Python was to recreate text file and word list manipulation utilities I created at least 4 years ago in C++ and somehow "lost" them. I did not want to re-learn C++ since Python was said to be much easier.

Actually this morning was the first time I ran a "script" on Ubuntu. The "set" options look easier than I remember with C++. Also, the line by line interpretor instead a full compile works well for me with debugging.

I am using "Kate", for now, as my Python editor. It has the text color highlighting and it notified my of a line that was needed: " # -*- coding: utf-8 -*- ".

Right now I am waiting on three used Python books.

Learning Python, Second Edition
Programming Python Programming Python
        [some call it volume 2 of the Learning Python book]
Python Standard Library (Nutshell Handbooks)

The second seemed to be a "learning" the Standard Library type of book. I will need a basic learning book and a book that details what is needed in the Standard Library to get the work done.

All of this is geared to my Dictionary project for LibreOffice.
http://extensions.libreoffice.org/extension-center/american-british-canadian-spelling-hyphen-thesaurus-dictionaries

On 12/30/2011 01:49 PM, Andreas Säger wrote:
Take a lazy weekend and walk through
http://docs.python.org/tutorial/index.html
All you need is a text editor and a shell. A Python capable text editor
provides some window where you can dump debugging output. Linux users who
are familiar with vim or emacs already found their personal IDE for Python.

Regarding the office suite, all you need is a slightly deeper understanding
of the context you are coding in:
http://www.openoffice.org/udk/python/python-bridge.html
1) Macros called from within the office:
ThisComponent=XSCRIPTCONTEXT.getDocument()
2) Contacting a running office on port 2002 from your Python program and
getting all the office objects to start with:
import uno
localContext = uno.getComponentContext()
resolver = localContext.ServiceManager.createInstanceWithContext(
     "com.sun.star.bridge.UnoUrlResolver", localContext
)
ctx =
resolver.resolve("uno:socket,host=localhost,port=2002;urp;StarOffice.ComponentContext"
)
oDesktop=ctx.ServiceManager.createInstanceWithContext("com.sun.star.frame.Desktop",ctx)
oFrame=oDesktop.getCurrentFrame()
oView=0Frame.getController()
ThisComponent=0View.getModel()

http://user.services.openoffice.org/en/forum/viewtopic.php?f=20&t=22431
Forum topic about Macro IDE for Python
http://user.services.openoffice.org/en/forum/viewtopic.php?f=45&t=22904&p=104656
Emacs + Python + Office
http://www.oooforum.org/forum/viewtopic.phtml?t=59534 Cell functions in
Python scripts (called through Basic)
http://www.oooforum.org/forum/viewtopic.phtml?t=59580 Desparately missing
MsgBox in Python
Search anything python related by author DannyB on oooforum.org

--
View this message in context: 
http://nabble.documentfoundation.org/Python-info-for-a-new-learner-tp3613594p3621653.html
Sent from the Users mailing list archive at Nabble.com.



--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.