1. 程式人生 > >Write a grid notes paper generator with Python

Write a grid notes paper generator with Python

  1. Check the tutorial of reportlab package first, get to know how to create a canvas, put something on it and export it to the pdf file
  2. Check how the grid function works
  3. Start to build the basic main python file: create a canvas > generate the grid > export
  4. Use list .append() and while loop function to create the xlist/ylist (pls check out myfunc.py/xylist)
  5. Because you would like to add a major grid in the end, so please make sure the total numbers of both columns and rows you create can be divided by 5, the hint is trying to use the for loop inside the while loop
  6. Write a boolean variable into your fun, so that both major/minor grids can call it
  7. Use xylist to draw a grid
  8. Now you might find out the whole grid doesn’t locate at the middle
  9. Create the align() function to compute the right starting point, then pass the value to xylist[0]
  10. Everything just done, but try to do more! Separate all the setting and canvas Spec from main.py