[C++-sig] new idea for pyste

Roman Yakovenko roman.yakovenko at actimize.com
Mon Aug 9 07:19:44 CEST 2004


Hi. I am working with pyste for an year. 
It is very good tool for small projects. One thing that confuse me is passing 
arguments to pyste. I need to write an other script, that will run\configure pyste.
( I working on windows so an other script is batch file ). I prefer an other way.

To export object called environment, that will have all necessary pyste configuration stuffs.
For example:

class environment(object):
    def __init__(self):
        self.__gccxml_path = 'gccxml.exe' #gccxml.exe should be in PATH
        self.__include_pathes = []
        self.__module_name = None
        ...

    def __get_gccxml_path( self ):
        return self.__gccxml_path
    def __set_gccxml_path( self, gccxml_path ):
        self.__gccxml_path = gccxml_path
    gccxml_path = property( __get_gccxml_path, __set_gccxml_path )

    ...
        

I think that moving this direction is good for a few reasons. One of them is
- it will cancel pyste files as special purpose files. Those files will be 
regular python scripts. Also I think that this will simplifier pyste.

Example: ( pseudo code )
	
env = environment()
env.gccxml_path = r'c:\gccxml\gccxml.exe'
env.include_path = [ r'c:\boost_cvs', r'c:\whatever' ]
env.use_namespace = 'py'
env.debug = False
env.working_directory = r'r'c:\development\repository_api\py_api'

SetModuleName( 'PyRepository' )

for header_file in directory( r'c:\development\repository_api' ):
	AllFromHeader( header_file )
	
GenerateMain( 'PyRepository.cpp' )


What do you think about this? I would like to contribute pathces.

Roman



More information about the Cplusplus-sig mailing list