[Scribus] Python scripting
Tue Oct 24 09:07:28 CEST 2006
I too am starting to learn Python, I use a learning Python document called
Dive Into Python... it's not specifically Scribus or Blender oriented but it teaches well.
it's a zip file called diveintopython-pdf-5.4.zip
One way to learn Python, (It helps me,) is to write in plain english what you want to do, line by line
import sys, or what ever is needed to get an output to the screen and printer.
I want to add 2 numbers
declare variables with amounts
add the amounts
w = b+ a
do other things with the amounts
print results of the equations
Now once you understand what it is you want to do then go and look
for the python commands that give that result for each line of text.
Preceed your original text with # to make it an inoperable comment
Once you understand the python processes and are ok with the command line programming and indentation
then I suggest opening the KDE KDevelop Multilanguage software and go through the the tutorial
where it generates a simple PyQT script
for a text editor in Python, it also does the same thing in most other languages.
((One thing I miss --in most Linux development software there is no way to step through a program
and view the results of each line, I had this in a Pascal IDE a long time ago but it's missing in
Linux and KDE stuff and no, I can't get eric3 IDE to work at all.
You just have to work thru each error message as it comes.))
Print out the python script and go thru it line by line seeing how calls are made to classes and
functions, etc..... this is all new to me also but is helping me understand how python works.
The main thing is to just think up simple programs, type them in and get them working,
start very small and your grasp of it all will automatically expand your learning as you need it.
The people who write those excellent scripts have done so for a long time
so dont compare yourself, just take it one step at a time.
More information about the scribus