Bug 61163

Summary: importing pygtk modifies constants
Product: [Retired] Red Hat Raw Hide Reporter: Han-Wen Nienhuys <hanwen>
Component: pygtk2Assignee: Matt Wilson <msw>
Status: CLOSED WORKSFORME QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 1.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-03-28 22:44:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 61901    

Description Han-Wen Nienhuys 2002-03-14 17:04:37 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020310

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. run example below.
2. Observe
3. Cry in desparation.
	


Actual Results:  meddo:~/usr/src/meshugge$ cat q.py

import gtk
import buggtk

buggtk.test()
meddo:~/usr/src/meshugge$ cat buggtk.py

GLOBAL_VAR = 0.1

def test():
    print GLOBAL_VAR

meddo:~/usr/src/meshugge$ python2.2 q.py
0.0


Additional info:

meddo:~/usr/src/meshugge$ rpm -q python2
python2-2.2-11
meddo:~/usr/src/meshugge$ rpm -q pygtk2
pygtk2-1.99.8-2

Comment 1 Matt Wilson 2002-04-01 16:16:03 UTC
Sorry - tested this on the same day that you reported, but forgot to add my
comments.

In short, it works for me here:
[msw@sid foo]$ cat test.sh
#!/bin/sh
cat > q.py <<EOF
import gtk
import buggtk

buggtk.test()
EOF
cat > buggtk.py <<EOF
GLOBAL_VAR = 0.1

def test():
    print GLOBAL_VAR
EOF
python2.2 q.py
[msw@sid foo]$ sh ./test.sh
0.1



---
[msw@sid foo]$ rpm -q pygtk2
pygtk2-1.99.8-2
[msw@sid foo]$ rpm -y pygtk2
[msw@sid foo]$ rpm -q python2
python2-2.2-11
[msw@sid foo]$ rpm -y python2
[msw@sid foo]$