Larry,
  Thanks for your suggestions. My web application works with current apache configuration. After I wrap it up with pyexe, the server part (main_sps.exe) is working, but python cgi part are not working. If I login via IE, the erro msg is:
""" Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. .... """

This may be caused by the first line in my python cgi scripts:  #! c:/python24/python.exe since there is no where to find the python.exe after py2exe.
 
Here is what I did:
1. I put the setup.py in c:/xbop_sinopec/bin/SERIAL_PORT and "python setup.py py2exe" from there
2. The following is my setup.py. I am trying to use scripts = [.....] to get my pythong CGI work but got the above error. 
 
Any ideas?
 
Ouyang

#################################################

from distutils.core import setup
import py2exe
import sys

from distutils.filelist import findall
import os
import matplotlib
excludes = ["pywin", "pywin.debugger", "pywin.debugger.dbgcon",
            "pywin.dialogs", " pywin.dialogs.list",'_gtkagg', '_tkagg'] #, "win32com.client"]

includes=['aifc','anydbm','asynchat','asyncore','atexit','audiodev','base64','BaseHTTPServer','Bastion','bdb',
'binhex','bisect','bsddb','bsddb.*','calendar','cgi','CGIHTTPServer','cgitb','chunk','cmd',
'code','codecs','codeop','colorsys','commands','compileall','compiler','compiler.*','ConfigParser','Cookie',
'cookielib','copy','copy_reg','csv','curses','curses.*','dbhash','decimal','difflib','dircache',
'dis','distutils','distutils.*','doctest','DocXMLRPCServer','dumbdbm','dummy_thread','dummy_threading','email','email.*',
'encodings','encodings.*','filecmp','fileinput','fnmatch','formatter','fpformat','ftplib','getopt','getpass',
'gettext','glob','gopherlib','gzip','heapq','hmac','hotshot','hotshot.*','htmlentitydefs','htmllib',
'HTMLParser','httplib','idlelib','idlelib.*','ihooks','imaplib','imghdr','imputil','inspect','keyword',
'linecache','locale','logging','logging.*','macpath','macurl2path',
'mailbox','mailcap','markupbase','mhlib','mimetools','mimetypes','MimeWriter','mimify','modulefinder','multifile',
'mutex','netrc','new','nntplib','ntpath','nturl2path','opcode','optparse','os','os2emxpath',
'pdb','pickle','pickletools','pipes','pkgutil','platform','popen2','poplib','posixfile','posixpath',
'pprint','profile','pstats','pty','pyclbr','pydoc','py_compile','Queue','quopri','random',
're','reconvert','regex_syntax','regsub','repr','rexec','rfc822','rlcompleter','robotparser','sched',
'sets','sgmllib','shelve','shlex','shutil','SimpleHTTPServer','SimpleXMLRPCServer','site',
'smtpd','smtplib','sndhdr','socket','SocketServer','sre','sre_compile','sre_constants','sre_parse',
'stat','statcache','statvfs','string','StringIO','stringold','stringprep','subprocess','sunau','sunaudio',
'symbol','symtable','tabnanny','tarfile','telnetlib','tempfile','textwrap','this',
'threading','timeit','toaiff','token','tokenize','trace','traceback','tty','types','tzparse',
'unittest','urllib','urllib2','urlparse','user','UserDict','UserList','UserString','uu','warnings',
'wave','weakref','webbrowser','whichdb','whrandom','xdrlib','xml','xml.*','xmllib','xmlrpclib',
'zipfile','_LWPCookieJar','_MozillaCookieJar','_strptime','_threading_local','__future__']

packages=['mx','pyExcelerator','ctypes','serial','matplotlib','numpy','pytz']

options = {
    "ascii": 1, # to make a smaller executable, don't include the encodings
    "compressed": 0, # compress the library archive
    "skip_archive": 1,
    "excludes": excludes, # COM stuff we don't want
    'dll_excludes': ['libgdk-win32-2.0-0.dll','libgobject-2.0-0.dll','libgdk_pixbuf-2.0-0.dll','wxmsw26uh_vc.dll','python22.dll','tk83.dll','tcl83.dll'],
    "includes": includes,
    "packages": packages,
    "dist_dir": "Python24",
    }

setup(
      name='xbop',
      version='1.0',
      description='wisco point monitoring',
 
    console=['main_sps.py'],
    options = {"py2exe": options},
    scripts = ['c:\\xbop_sinopec\\scripts\\wisco\\mAcquisition.py', 'c:\\xbop_sinopec\\scripts\\wisco\\mAcq_system.py', 'c:\\xbop_sinopec\\scripts\\wisco\\mPoint_check.py', 'c:\\xbop_sinopec\\scripts\\wisco\\mRpt_data_record_query.py', 'c:\\xbop_sinopec\\scripts\\wisco\\mRpt_dia_plan_query.py', 'c:\\xbop_sinopec\\scripts\\wisco\\mRpt_fault_overhaul_query.py', 'c:\\xbop_sinopec\\bop-cgi\\xbop.py' ],
    data_files=[matplotlib.get_py2exe_datafiles()],
    )
################################################

 
 
 
 
 
 
 
 
On 8/7/07, Larry Bates <larry.bates@websafe.com > wrote:
zhihua ouyang wrote:
> Hi,
>    I have tried to use py2exe to wrap my web application associated with
> my python application server for end users but failed.
> I want to use py2exe and INNO SETUP to wrap everything so that a user
> does not have to install python.
> My code is organized as follows:
>    # __init__.py in every subdirectory for python codes
>    # matplotlib, pyExcerator,numpy etc are used in the application
>    c:/gdas
>                bin/serial_port/main_sps.py   #script to start the
> application server
>                bin/serial_port/*.py               #be imported by
> main_sps.py
>                bin/*.py                               #many other modules
>                db/*.py                                #more py files for
> the application code
>
>                htdocs/                                # for web pages
>                htdocs/jslib/*.js                     # javascript libs
>                htdocs/xxxx/*.html                 # html web pages
>                htdocs/graphics/*.jpg            # images for web pages
>                scripts/                                # python files
> (first line #!c:/python24/python.exe)
>                scripts/xxxx/*.py                   # associated with the
> html pages.
>                .....
>    The python applicatin server start from
> c:/gdas/bin/serial_port/main_sps.py with multithreading. A user can
> login the system via the html page in c:/gdas/htdocs/xxxx/*.html.
>     I really appreciate your suggestions. A py2exe setup example would
> be very helpful. Thanks a lot.
>
> Ouyang
>
>

What isn't working?  There are examples here:

http://www.py2exe.org/index.cgi/Tutorial
http://wiki.python.org/moin/Py2Exe

-Larry




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>   http://get.splunk.com/
_______________________________________________
Py2exe-users mailing list
Py2exe-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/py2exe-users