bhanu1225 0 Junior Poster in Training

hi every one.

import os
from reportlab.pdfgen import canvas
from reportlab.lib.units import cm
c = canvas.Canvas("/Users/venkatarampey/preview.pdf")
c.drawString(8*cm, 28*cm,"HELLO PYTHON")
c.showPage()
c.save()
FILE = open("/Users/venkatarampey/preview.pdf","r")

The is the python script for previewing a pdf when run.
Problem here is , i was able 2 generate a pdf on mentioned path
but i was unable to preview on running the program.
Manually we can open a file but not on execution.

we can do it by shellexecute on windows but on MAC what is the alternate.

plz helpme...
Thanks in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.