Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 12-20-2012, 03:09 AM   #1
abeonis
eBook DIYer
abeonis began at the beginning.
 
abeonis's Avatar
 
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
abeonis is offline   Reply With Quote
Old 12-20-2012, 03:13 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,753
Karma: 4998511
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
kovidgoyal is online now   Reply With Quote
Old 12-20-2012, 03:43 AM   #3
abeonis
eBook DIYer
abeonis began at the beginning.
 
abeonis's Avatar
 
Posts: 111
Karma: 10
Join Date: Oct 2012
Location: Europe
Device: K4, KF HD 8.9, Readium
Thanks for your advice Kovid.
abeonis is offline   Reply With Quote
Old 12-20-2012, 05:58 AM   #4
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,497
Karma: 424627
Join Date: Mar 2009
Device: iPad
I found 'Learning Python' by Mark Lutz to be an excellent introduction to the language.

G
GRiker is offline   Reply With Quote
Old 12-23-2012, 09:32 AM   #5
Agama
Guru
Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.Agama ought to be getting tired of karma fortunes by now.
 
Agama's Avatar
 
Posts: 640
Karma: 436517
Join Date: Jul 2010
Location: UK
Device: PRS-300, PW2
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.
Agama is offline   Reply With Quote
Old 12-24-2012, 09:05 PM   #6
j0s3f
Junior Member
j0s3f began at the beginning.
 
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.
j0s3f is offline   Reply With Quote
Old 12-25-2012, 08:49 PM   #7
weltonsfancy
Enthusiast
weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.weltonsfancy ought to be getting tired of karma fortunes by now.
 
weltonsfancy's Avatar
 
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.
weltonsfancy is offline   Reply With Quote
Old 01-26-2013, 10:13 AM   #8
lukask
Junior Member
lukask is on a distinguished road
 
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.
lukask is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 11:28 AM.


MobileRead.com is a privately owned, operated and funded community.