Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Embedding Python In Your C++ Application

, 22 May 2006
Wrapper classes to embed the Python interpreter in Standard C++ code
py_embed_res.zip
article_res
pyembed
README
test
README
gui_demo
Screenshot.png
README
def simple():
    print "I am so simple !"

def multiply(a,b):
    "Multipies the other way round!"
    c = 0
    for i in range(0, a):
        c = c + b
    return c

def echo(s):
    "talk back!"
    return s

def names_as_list():
    return ['Sam', 'Annie', 'Jake'];

def names_as_tuple():
    return ('Sam', 'Annie', 'Jake');

def config():
    return {"user" : "joe", "id" : 345, "password" : "XcjjdJJ",
            "email" : ("joe@someserver.com", "joe@someotherserver.com") }

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License

Share

About the Author

No Biography provided

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 23 May 2006
Article Copyright 2006 by AnOldGreenHorn
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid