Counterglow Forums  

Go Back   Counterglow Forums > General Discussions > Technoglow

Reply
 
Thread Tools Display Modes
Old 24-03-2003, 22:34:07   #1
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Moved --> Geek Forum: Python

All snake-related discussion, go to the inevitable copysnake thread.

I can't seem to do global variables. They either stay constant at the number I set them, or aren't global properly...

I want a value to change depending on user input.

Roughly speaking:
Code:
CAVELIGHT = 0

def Room1()
    go = raw_input("> ")
    if(go == "LIGHT"):
        CAVELIGHT = 1
    if(CAVELIGHT == 1):
         print("blah blah")


def Room2():
    go = raw_input("> ")
    if(CAVELIGHT == 1):
        print("foo")


Room1()
Room2()
I get the "blah blah" fine: the variable holds value, then it resets to 0 before Room2, and I don't get a "foo"

Anyone who didn't understand that can legally shoot me under President Bush's new anti-geek legislation.
Immortal Wombat is offline   Reply With Quote
Old 24-03-2003, 22:36:23   #2
Debaser
Badass Monkey
 
Debaser's Avatar
 
Join Date: May 2002
Location: In a tree.
Debaser is offline   Reply With Quote
Old 24-03-2003, 23:30:34   #3
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
Code:
def Room1():
    global CAVELIGHT
    go = raw_input("> ")
    if(go == "LIGHT"):
        CAVELIGHT = 1
    if(CAVELIGHT == 1):
         print("blah blah")
Alternatively:
Code:
def Room1():
    import __main__
    go = raw_input("> ")
    if(go == "LIGHT"):
        __main__.CAVELIGHT = 1
    if(__main__.CAVELIGHT == 1):
         print("blah blah")
Sean is offline   Reply With Quote
Old 24-03-2003, 23:38:46   #4
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
The second is worse, I think, unless you need to have a local CAVELIGHT and a global CAVELIGHT.
Sean is offline   Reply With Quote
Old 25-03-2003, 01:18:31   #5
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
I always wondered what the global keyword did. The help() description for it is terrible.

Alternatively:

Code:
import string
class Room:
	def __init__(self):
		self.cavelight = False
	def setLight(self):
		go = string.lower( raw_input("> ") )
		if go == "light": self.cavelight = True
		if self.cavelight: print "blah blah"

rooms = []
for i in (0,1):
	rooms.append( Room() )
	rooms[i].setLight()
Only modified to make it work with the rest of the code and actually do what you want.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet

Last edited by Sir Penguin; 25-03-2003 at 01:32:43.
Sir Penguin is offline   Reply With Quote
Old 25-03-2003, 01:42:32   #6
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
You show-off with your instances in lists and then your iteration over them.
Sean is offline   Reply With Quote
Old 25-03-2003, 01:57:12   #7
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
Of course, it would be a stupid way of doing things. A static class member for the cavelight boolean would be better if you wanted the rooms to be able to communicate.

Code:
import string
class Room:
	cavelight = False
	
	def light(self):
		"light all rooms ==> self.light()"
		Room.cavelight = True
	def isLit(self):
		"print some crap if rooms are lit ==> self.isLit()"
		if Room.cavelight: print "blah " * 2

	def move(self): pass
	def get(self): pass
	def foo(self): pass
	# ...

room = Room()
while 1:
	go = string.strip( string.lower( raw_input("> ") ) )
	validMoves = ("light","move","get","foo")
	if go in validMoves: exec "room.%s()" %go
	else: continue
	otherStuff()
Or something.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet

Last edited by Sir Penguin; 25-03-2003 at 02:56:05.
Sir Penguin is offline   Reply With Quote
Old 25-03-2003, 02:14:28   #8
Koshko
...
 
Join Date: Nov 2001
heh
Koshko is offline   Reply With Quote
Old 25-03-2003, 09:55:05   #9
Funkodrom
Die Müfzwerge
 
Funkodrom's Avatar
 
Join Date: Nov 2001
Location: Drowning in a sea of retarded sexuality and bad poetry
The lights are off in the geek forum and you are trying to write some code to switch them on?
__________________
protein: Bryan Adams rocks
Blog - Band Müf Gigs 5th March BerkshireLive Aid
Funkodrom is offline   Reply With Quote
Old 25-03-2003, 19:50:40   #10
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
close. But thanks Sean and SP.

Yes, my way of doing it will be very stupid: slow, clumsy and unadaptable. Maybe if I feel like it once I've finished I'll rewrite it better, but it'll do for now.
Immortal Wombat is offline   Reply With Quote
Old 25-03-2003, 19:57:02   #11
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
I know what you mean. I've re-written the code for a project I'm working on in Python three times already, and I'm ready to do it a fourth time.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 26-03-2003, 18:25:02   #12
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Sean's first example doesn't work. I'm still not getting a "foo" or equivalent in the first example. The CAVELIGHT value doesn't seem to carry across functions

Luckily the second one does. Yay.
Immortal Wombat is offline   Reply With Quote
Old 26-03-2003, 18:46:42   #13
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
You have to get the global CAVELIGHT in the Room2 function as well, I think.
Sean is offline   Reply With Quote
Old 26-03-2003, 19:19:08   #14
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
No, this should work fine:
Code:
CAVELIGHT = 0

def Room1():
    global CAVELIGHT
    go = raw_input("> ")
    if(go == "LIGHT"):
        CAVELIGHT = 1
    if(CAVELIGHT == 1):
         print("blah blah")

def Room2():
    go = raw_input("> ")
    if(CAVELIGHT == 1):
        print("foo")

Room1()
Room2()
Remember that Room2 requires to enter something, even if you just tap Return.
Sean is offline   Reply With Quote
Old 26-03-2003, 19:42:18   #15
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
Works for me.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 26-03-2003, 20:45:09   #16
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Hmmm, yes it does work. How very odd. I'll use that approach then, since I understand that one better.

And to make SP happy, I've defined each object as a class so they can hold their locations and names and stuff.
Immortal Wombat is offline   Reply With Quote
Old 26-03-2003, 20:55:27   #17
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com


If you're working in IDLE, the shell window has a tendency to accrete data over multiple executions of the script, which can lead to dozens upon dozens of bizarre errors which can be fixed just by restarting IDLE. That might be why #1 didn't work the first time?

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 26-03-2003, 21:04:21   #18
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
Quote:
Originally posted by Immortal Wombat
And to make SP happy, I've defined each object as a class so they can hold their locations and names and stuff.
Remember about inheritance and polymorphism! Classes aren’t just really handy namespaces.
Sean is offline   Reply With Quote
Old 27-03-2003, 18:21:12   #19
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
And by "remember" you mean "learn"
Immortal Wombat is offline   Reply With Quote
Old 27-03-2003, 21:11:10   #20
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
Learning is only remembering the future!

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 27-03-2003, 21:23:48   #21
Darkstar
will bitch for beer
 
Darkstar's Avatar
 
Join Date: Nov 2001
Location: Rocket City
No... remembering the future is called precognition.
__________________
> clue++;
> display clue;
-878923403
Darkstar is offline   Reply With Quote
Old 27-03-2003, 21:58:04   #22
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
Not in the future!

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 16-04-2003, 20:14:59   #23
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Well I'm finished.

I also managed to inadvertantly compile one of the earlier versions into a .pyc file, but I can't seem to replicate the process and create me an executable version.
Immortal Wombat is offline   Reply With Quote
Old 16-04-2003, 22:28:13   #24
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
http://www.python.org/cgi-bin/faqw.p...=faq04.108.htp

And post the code here!
Sean is offline   Reply With Quote
Old 16-04-2003, 23:06:38   #25
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
And compile it into a win32 executable and make lots of money off of it!

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 17-04-2003, 01:03:35   #26
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
yay!

Well I'm going to do exactly the opposite of what both of you suggest. No code here, but no money either. So nobody's happy.
Immortal Wombat is offline   Reply With Quote
Old 17-04-2003, 01:21:50   #27
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
oh, we can't upload zips. How annoying.

Ok, file here.

There are currently two ways of winning. A fairly easy way, and a fairly torturous way (though with far fewer extended leaps of logic than the HHGTTG one...).

If you want to attempt the long game, simply avoid the temptation to walk out the main exit when it becomes possible. In future versions, I'll make it possible to choose which version of the game you want to play at the very beginning.
Immortal Wombat is offline   Reply With Quote
Old 17-04-2003, 01:23:20   #28
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Oh crap. Forgot to randomise the door codes.
Immortal Wombat is offline   Reply With Quote
Old 17-04-2003, 01:38:36   #29
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com


SP
Attached Images
 
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 17-04-2003, 13:57:57   #30
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
If you downloaded it with about 15 minutes of my post, then yeah, it was a bit screwed. Every "command not recognised" put you back to the start. It should be ok now
Immortal Wombat is offline   Reply With Quote
Old 17-04-2003, 16:02:09   #31
Scabrous Birdseed
for your usergroup and post count
 
Scabrous Birdseed's Avatar
 
Join Date: Aug 2002
Location: Among the clouds
When I click the link it redirects back to this thread.
__________________
Birdseed's Tunedown
Scabrous Birdseed is offline   Reply With Quote
Old 17-04-2003, 16:08:02   #32
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
You have to muck around with copying and pasting it.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 18-04-2003, 12:57:18   #33
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
I assume one need Python installed to be able to run a *.pyc file?

And I need "Freeze" to make it into a standalone exe?
Immortal Wombat is offline   Reply With Quote
Old 18-04-2003, 13:22:20   #34
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
Yes. Kinda. It’s awkward.

http://www.cwi.nl/ftp/jack/freeze/
Sean is offline   Reply With Quote
Old 18-04-2003, 14:17:00   #35
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Cannot determine your Windows or System directories
Please add them to your PATH if .dlls are not found
The win32api module is not available - modules listed
in the registry will not be found.
opts: []
args: ['GCM.cfg']
Initializing
Traceback (most recent call last):
File "C:\Python22\thing\Builder.py", line 502, in ?
main(opts, args)
File "C:\Python22\thing\Builder.py", line 473, in main
target = makeTarget(cfg, section)
File "C:\Python22\thing\Builder.py", line 416, in makeTarget
return dispatch[cfg.get(section, 'type')](cfg, section, optcnvrts)
File "C:\Python22\thing\Builder.py", line 98, in __init__
Target.__init__(self, cfg, sectnm, cnvrts)
File "C:\Python22\thing\Builder.py", line 34, in __init__
print "Initializing", self.__name__
AttributeError: PYZTarget instance has no attribute '__name__'
Immortal Wombat is offline   Reply With Quote
Old 18-04-2003, 14:55:44   #36
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
Code:
Talk to whom? BUILDER
>>Good morning Mr Builder. You look happy this morning...
>>Well I'm not. I want cake! And stay away from my daughter
[Game ends.]
Code:
Examine what? TABLE
That object isn't here.
It looks to me like a medium-sized, medium-height, medium-practical
a stupid metal ridge all round the top so it abrades your wrists..
.
Sean is offline   Reply With Quote
Old 18-04-2003, 20:29:57   #37
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Dontcha love <strike>beta</strike> alpha testing

-bugs fixed

Last edited by Immortal Wombat; 18-04-2003 at 20:47:19.
Immortal Wombat is offline   Reply With Quote
Old 18-04-2003, 20:45:32   #38
Sean
Rhubarb
 
Sean's Avatar
 
Join Date: Feb 2002
Location: God knows
If I had the code, I could fix the bugs myself. Or at least cheat and just read what happens.
Sean is offline   Reply With Quote
Old 18-04-2003, 20:49:13   #39
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Its not worth the bother to be honest...
Immortal Wombat is offline   Reply With Quote
Old 19-04-2003, 03:23:09   #40
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
Hehe, Python Universe Builder.

py2exe can also be used to convert Python to win32 binary format. I've never used it, so I don't know how it works. The page has links to similar tools.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet

Last edited by Sir Penguin; 19-04-2003 at 03:45:22.
Sir Penguin is offline   Reply With Quote
Old 20-04-2003, 11:47:15   #41
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
I just checked out py2exe. It seems to work well. I mean, aside from the fact that it takes almost 5 megs for it to be able to run a tool that displays 54 card images (the script is 1.07 KB, and the images are < 45 KB; the rest is taken up by the libraries and python dll). Almost 4 MB of that is from the Tkinter, re, and zlib modules and their related libs (yeah, I used the 61KB zlib module to compress 64 KB of images down to 45 KB... it was cool before I knew zlib.pyd was that big), and almost 3 MB of that is from Tkinter and tcl/tk. The python22.dll file, all you need if you're not using any external modules, is less than a meg. It all compressed down to a bit less than 2 MB. The binary for the script is 129 KB with the -O2 flag set, and 188 KB with no optimisation.

http://www.csc.uvic.ca/~nrqm/papyrus...-noversion.zip

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet

Last edited by Sir Penguin; 20-04-2003 at 12:31:35.
Sir Penguin is offline   Reply With Quote
Old 20-04-2003, 12:28:52   #42
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
I beginning to dislike Python as anything more than a private plaything.

Code:
C:\Python22>python programs\GCMsetup.py py2exe 
Traceback (most recent call last):
  File "programs\GCMsetup.py", line 10, in ?
    script="GCM.py"
  File "C:\PYTHON22\distutils\core.py", line 101, in setup
    _setup_distribution = dist = klass(attrs)
  File "C:\PYTHON22\distutils\dist.py", line 130, in __init__
    setattr(self, method_name, getattr(self.metadata, method_name))
AttributeError: DistributionMetadata instance has no attribute 'get___doc__'
Immortal Wombat is offline   Reply With Quote
Old 20-04-2003, 12:37:35   #43
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
It's probably not a language you want to write for-distribution Windows apps in if you know C or something.

Are you sure you got the pathnames right? I have problems when I don't keep everything in the same directory.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 20-04-2003, 12:38:53   #44
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
GCM.py is in the same directory as GCMsetup.py and that is being called properly.
Immortal Wombat is offline   Reply With Quote
Old 20-04-2003, 12:44:22   #45
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
In situations like this, absolute pathnames can be the solution to all your problems. Nobody knows why, and it may not even have anything to do with the error message, but that's the way things are. Of couse, the Python people could have just mucked up and you'll never know. I hate it when they do that.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Old 20-04-2003, 12:46:44   #46
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
Oh, hehe. It's supposed to be scripts="GCM.py", not script="GCM.py". I think. Do you mind posting your GCMsetup.py file? I've just got 3 lines in mine.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet

Last edited by Sir Penguin; 20-04-2003 at 12:51:55.
Sir Penguin is offline   Reply With Quote
Old 20-04-2003, 12:54:23   #47
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
I've tried scripts and script; ["GCM.py"] and "GCM.py"; with an without a trailing comma and every combination of them all.
Immortal Wombat is offline   Reply With Quote
Old 20-04-2003, 13:07:28   #48
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
This is what works for me:
Code:
from distutils.core import setup
import py2exe
setup(name="showimgs",scripts=["showimgs.py"],)
with C:\Python22\Papyrus\images>python setup.py py2exe -O2 -w

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet

Last edited by Sir Penguin; 20-04-2003 at 13:10:47.
Sir Penguin is offline   Reply With Quote
Old 20-04-2003, 13:44:09   #49
Immortal Wombat
carbon-based
 
Immortal Wombat's Avatar
 
Join Date: Dec 2001
Location: kthxbye
Urgh. I can't get the bastard to work. The .py file is here.
If you could attempt to convert it, I would be eternally indebted to you. Otherwise just have fun cheating and reading ahead.

Last edited by Immortal Wombat; 20-04-2003 at 15:37:40.
Immortal Wombat is offline   Reply With Quote
Old 20-04-2003, 14:04:36   #50
Sir Penguin
Wise sprite
 
Sir Penguin's Avatar
 
Join Date: Nov 2001
Location: command.com
It worked fine for me. I put GCM.py and GCMsetup.py in my \Python22 directory, changed scripts=["showimgs.py"] to scripts=["GCM.PY"], and ran python GCMsetup.py py2exe. It produced the proper output: http://www.csc.uvic.ca/~nrqm/GCM.zip

I think it's great that your nearly-1500 lines of code compiled unoptimised into a binary about half the size of my nearly-40 lines of code optimised.

SP
__________________
Whether 'tis nobler in the plane to suffer
The asps and adders of outrageous fortune,
Or to take arms against a sea of bitch-ass motherfuckers
And by opposing fuck them up?

-- Samuel L. Jackson as Hamlet
Sir Penguin is offline   Reply With Quote
Reply
Forum Jump

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 16:09:03.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© Counterglow 2001-2012. All rights reserved.