Google Groups Home
Help | Sign in
Trouble building
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
zeo  
View profile
 More options Apr 28, 8:18 pm
From: zeo <zeotr...@phreaker.net>
Date: Mon, 28 Apr 2008 17:18:22 -0700 (PDT)
Local: Mon, Apr 28 2008 8:18 pm
Subject: Trouble building
Hi!
I can't build the following code:

class Foo:
    def __init__(self, val):
        self.val = val

def main():
    f = Foo("success")
    print f.val

if __name__=="__main__":
    main()

NameError: global name 'Foo' is not defined

Have I missed something or do I have to put Foo in Foo.py and import
it?


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matteo Bertini  
View profile
 More options Apr 29, 5:45 am
From: Matteo Bertini <matteo.bert...@gmail.com>
Date: Tue, 29 Apr 2008 02:45:13 -0700 (PDT)
Local: Tues, Apr 29 2008 5:45 am
Subject: Re: Trouble building
On Apr 29, 2:18 am, zeo <zeotr...@phreaker.net> wrote:

It works for me... is your a PyInstaller-only problem or a Python
problem? Can you provide the full traceback?

--
Matteo Bertini


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zeo  
View profile
 More options Apr 29, 8:19 am
From: zeo <zeotr...@phreaker.net>
Date: Tue, 29 Apr 2008 05:19:33 -0700 (PDT)
Local: Tues, Apr 29 2008 8:19 am
Subject: Re: Trouble building

> It works for me... is your a PyInstaller-only problem or a Python
> problem? Can you provide the full traceback?

It's a PyInstaller problem only. I have no problem running the code.
I have only tested on windows so far.

c:\Python25\pyinstaller-1.3>Configure.py
I: computing EXE_dependencies
I: Finding TCL/TK...
I: found TCL/TK version 8.4
I: testing for Zlib...
I: ... Zlib available
I: Testing for ability to set icons, version resources...
I: ... resource update available
I: Testing for Unicode support...
I: ... Unicode available
I: testing for UPX...
I: ...UPX unavailable
I: computing PYZ dependencies...

F:\python\obfuscator>Makespec.py test.py
wrote F:\python\obfuscator\test.spec
now run Build.py to build the executable

F:\python\obfuscator>Build.py test.py
Traceback (most recent call last):
  File "C:\Python25\pyinstaller-1.3\Build.py", line 839, in <module>
    build(sys.argv[1])
  File "C:\Python25\pyinstaller-1.3\Build.py", line 76, in build
    exec open(spec, 'r').read()+'\n'
  File "<string>", line 12, in <module>
  File "<string>", line 8, in main
NameError: global name 'Foo' is not defined


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zeo  
View profile
 More options Apr 29, 8:27 am
From: zeo <zeotr...@phreaker.net>
Date: Tue, 29 Apr 2008 05:27:11 -0700 (PDT)
Local: Tues, Apr 29 2008 8:27 am
Subject: Re: Trouble building
I found the error now ;-)
I should RTFM when I'm not tired.

Thanx for your time.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
michael  
View profile
 More options Jun 22, 12:20 pm
From: michael <mhm...@gmail.com>
Date: Sun, 22 Jun 2008 09:20:19 -0700 (PDT)
Local: Sun, Jun 22 2008 12:20 pm
Subject: Re: Trouble building
I need your help. how did you solve this problem?

On Apr 29, 8:27 pm, zeo <zeotr...@phreaker.net> wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
zeo  
View profile
 More options Jun 23, 6:47 am
From: zeo <zeotr...@phreaker.net>
Date: Mon, 23 Jun 2008 03:47:07 -0700 (PDT)
Local: Mon, Jun 23 2008 6:47 am
Subject: Re: Trouble building
The error was that I ran Build.py on my python source code file and
not on the generated specfile.
http://pyinstaller.hpcf.upr.edu/docs/Manual_v1.1.html

Maybe a specfile check in Build.py would be a nice feature.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google