On 23 Jun, 2007, at 8:27, Shawn Miranda wrote:

Hello,

I'm reposting this just to make the subject heading clearer.  The previous post was my first and I didn't quite realize how it works.

Perhaps someone could tell me why I'm getting a syntax error when I run py2app.  I have used it successfully with some simple scripts including a couple of Tkinter GUI scripts, but I'm fairly new to Python and py2app so it could be something quite simple. The scripts do run when I run them from the command line.  For example:

from Tkinter import Label

widget = Label(None, text = "It works!")

widget.pack()

widget.mainloop()

Thanks, Shawn

I'm currently running Python 2.3 on OS 10.3.9.

What is the error that you're getting? I cannot reproduce this on 10.4.10 with Python 2.5. Including the setup.py file you're using to build the example you included would also be helpfull.

Ronald


Thanks, Ronald, for taking an interest in this.

The error I get is:

SyntaxError: invalid syntax

The terminal shows the script and points to the last brace of widget.pack()

The setup.py file I'm using is:

#!/usr/bin/env python
"""
py2app build script for MyApplication

Usage:
    python setup.py py2app
"""
from distutils.core import setup
setup(
                app=["/Users/shawnmiranda/Desktop/Label.py"],
)


This same setup script works just fine with:

# File: hello1.py

from Tkinter import *

root = Tk()

w = Label(root, text="Hello, world!")
w.pack()

root.mainloop()


Both GUI scripts work just fine from the command line.
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to