srcanamdw/codescanner/pyinstaller/support/rthooks/win32comgenpy.py
author noe\swadi
Thu, 18 Feb 2010 12:29:02 +0530
changeset 1 22878952f6e2
permissions -rw-r--r--
Committing the CodeScanner Core tool This component has been moved from the StaticAnaApps package. BUG : 5889 (http://developer.symbian.org/webbugs/show_bug.cgi?id=5889).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     1
# Copyright (C) 2005, Giovanni Bajo
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     2
# Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     3
#
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     4
# This program is free software; you can redistribute it and/or
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     5
# modify it under the terms of the GNU General Public License
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     6
# as published by the Free Software Foundation; either version 2
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     7
# of the License, or (at your option) any later version.
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     8
#
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
     9
# In addition to the permissions in the GNU General Public License, the
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    10
# authors give you unlimited permission to link or embed the compiled
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    11
# version of this file into combinations with other programs, and to
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    12
# distribute those combinations without any restriction coming from the
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    13
# use of this file. (The General Public License restrictions do apply in
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    14
# other respects; for example, they cover modification of the file, and
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    15
# distribution when not linked into a combine executable.)
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    16
#
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    17
# This program is distributed in the hope that it will be useful,
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    20
# GNU General Public License for more details.
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    21
#
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    22
# You should have received a copy of the GNU General Public License
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    23
# along with this program; if not, write to the Free Software
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    24
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    25
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    26
import os, sys
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    27
supportdir = os.path.join(sys.path[0], 'support')
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    28
genpydir = os.path.join(supportdir, 'gen_py')
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    29
initmod = os.path.join(genpydir, '__init__.py')
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    30
if not os.path.exists(genpydir):
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    31
    os.makedirs(genpydir)
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    32
if not os.path.exists(initmod):
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    33
    open(initmod, 'w')
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    34
import win32com
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    35
win32com.__gen_path__ = genpydir
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    36
win32com.__path__.insert(0, supportdir)
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    37
# for older Pythons
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    38
import copy_reg
22878952f6e2 Committing the CodeScanner Core tool
noe\swadi
parents:
diff changeset
    39