12-20-2012, 03:09 AM | #1 |
eBook DIYer
Posts: 111
Karma: 10
Join Date: Oct 2012
Location: Europe
Device: K4, KF HD 8.9, Readium
|
Upgrade calibre to Python 3 ?
One item in my do list is to learn Python, one goal being to use Python to customize calibre. From the doc: "calibre is not compatible with Python 3 and requires at least Python 2.7".
I am looking for a book on Python for programming beginners and so far, everything I found is based on 3.X. Obviously, Learning Python represents a significative effort for me. So ... Are there any plans to port calibre to Python 3? If yes, when is it expected? I can wait. If no, at least in the short term. What book (or other material) on Python 2.7 for programming beginners do you recommend me? Thanks |
12-20-2012, 03:13 AM | #2 |
creator of calibre
Posts: 43,843
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
There are no plans to port calibre to python 3. Just google a bit there are far more books on python 2.x than on python 3.x. I've never actually read any python books (I learned python by programming in python) so I cant recommend any. But a good place to start is: http://docs.python.org/2/tutorial/
And see: http://wiki.python.org/moin/BeginnersGuide/Programmers |
Advert | |
|
12-20-2012, 03:43 AM | #3 |
eBook DIYer
Posts: 111
Karma: 10
Join Date: Oct 2012
Location: Europe
Device: K4, KF HD 8.9, Readium
|
Thanks for your advice Kovid.
|
12-20-2012, 05:58 AM | #4 |
Comparer of the Ephemeris
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
|
I found 'Learning Python' by Mark Lutz to be an excellent introduction to the language.
G |
12-23-2012, 09:32 AM | #5 |
Guru
Posts: 776
Karma: 2751519
Join Date: Jul 2010
Location: UK
Device: PW2, Nexus7
|
I found the Python.org tutorial, that Kovid mentioned, very useful and also Dive Into Python, which can be found at http://www.diveintopython.net/.
For help with Python usage in calibre the Development sub-forum is very helpful. A great start for writing your own calibre plugin can be found at: http://manual.calibre-ebook.com/creating_plugins.html Last edited by Agama; 12-23-2012 at 09:35 AM. |
Advert | |
|
12-24-2012, 09:05 PM | #6 |
Junior Member
Posts: 4
Karma: 10
Join Date: May 2011
Device: Kindle 3
|
For the very first steps in python the interactive tutorial at http://code.he.net/ is quite nice.
As always when learning programming the best way is to do some actual programming. Set yourself a simple goal what you would like to program and then code it. Your code will probably suck a lot (especially if you have no knowledge about algorithm design, data structures and such) but if you have a good book you should find a lot of your beginning mistakes and be able to correct them. Also the difference between Python 2 and 3 is not that big at all. There are some quite big internal changes that makes porting code not trivial, but if you can program Python 3 you also can in Python 2 and vice versa. You might have to look up some API functions that are different, but you'll have to do that all the time even when using only version 2. What I really really think is important for any beginner to programming (as opposed to someone who can program and just wants to learn a new language) is to read about algorithm design and data structures because that are very important things in every program. I cannot suggest you a good book because I learned most about that at university and in Java and deepened my understanding with the great "The Art of Computer Programming" by Donald Knuth, but that is a bit too heavy for a beginner IMO. |
12-25-2012, 08:49 PM | #7 |
Enthusiast
Posts: 45
Karma: 480620
Join Date: Aug 2012
Location: Idaho, USA
Device: Nook Tablet
|
Thanks for posting the links here. I am learning python also. Trying to keep the brain cells active.
|
01-26-2013, 10:13 AM | #8 |
Junior Member
Posts: 1
Karma: 50
Join Date: Jan 2013
Device: Kindle
|
Best way to learn Python (personal experience):
learnpythonthehardway.org - Zed is a genius and if you want to learn programming you should start there. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre - Python 2.7 or 3.x ? | pramodxyle | Development | 2 | 03-14-2012 02:43 AM |
Python 2.5 and Calibre | FizzyWater | Calibre | 1 | 03-27-2009 02:15 AM |
Having some trouble with Calibre 0.4.109(python upgrade) | ould | Calibre | 13 | 12-04-2008 03:28 PM |
upgrade failed - but not python-lxml fault | alexxxm | Calibre | 7 | 10-06-2008 09:36 AM |
Calibre and Python: do they get along? | zander_nyrond | Calibre | 7 | 07-20-2008 06:54 PM |