guess - find all image nodes and size them

/ Published in: Python
Save to your folder(s)

Copy this code and paste it in your HTML
  1. nodes =[n for n in g.nodes if n.image >'']
  2. >>> nodes
  3. [v2, v3]
  4. >>> for node in nodes: node.width, node.height = 640, 480
  5. >>>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.