[Pythonmac-SIG] Problem with MacFreeze

Pieter Claerhout Pieter Claerhout" <chill@mediaport.org
Mon, 7 Jun 1999 20:53:39 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0013_01BEB127.D1DE4BC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Hello,

I wrote a little script, using the MacPython IDE. Then I saved it as an
applet. So far, everything was OK. Then I used the script MacFreeze to
generate an application from the script, but it complains about a syntax
error. The strange thing is that I can't find a syntax error...

You can find the script as attachment.

Thanks,

Pieter

[ Pieter Claerhout
  chill@mediaport.org ]

------=_NextPart_000_0013_01BEB127.D1DE4BC0
Content-Type: application/octet-stream;
	name="Files to PDF.py"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="Files to PDF.py"

import sys
import macfs
import os

def main():
=09
	# Globale variabelen
=09
	appName =3D "Files to PDF 1.5"
=09
	fileList =3D ""
=09
	header =3D ""
	header =3D header + "%!PS-Adobe-3.0\r\r"
	header =3D header + "% File Generated by " + appName + "\r"
	header =3D header + "% =A9 1999 Pieter Claerhout\r\r"
	header =3D header + "[ /Title () /Author (Philips) /Subject () =
/Keywords () /DOCINFO pdfmark\r"
	header =3D header + "/prun {/mysave save def dup =3D flush RunFile =
clear cleardictstack mysave restore}\r"
	header =3D header + "def\r\r"
=09
	footer =3D ""
	footer =3D footer + "\r%EOF"
=09
	# Einde globale variabelen


	# Main programma

	for file in sys.argv[1:]:
		if os.path.isdir(file):
			continue
		if file[-3:] =3D=3D ".ps":
			fileList =3D fileList + "(" + file + ") RunFile\r"
			fileList =3D fileList + "(" + file + ") =3D=3D flush\r"

	# Einde main programma
=09
=09
	# Wegschrijven van het outputbestand
=09
	output =3D header + fileList + footer
=09
	fss, ok =3D macfs.StandardPutFile('Save combined file as:', =
'naamloos.ps')
	if ok:
		path =3D fss.as_pathname()
		f =3D open(path, "wb")
		f.write(output)
		f.close()
=09
	# Einde wegschrijven van het outputbestand
=09
if __name__ =3D=3D '__main__':
	main()

------=_NextPart_000_0013_01BEB127.D1DE4BC0--