Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

Outline

Python 2/3 extension example

This is a extended python2/3 compatible version of physacco's hello world example. The original work was done by physacco in gist.

Build

You can use the convenient script...

$ ./build.sh

Or run the command by yourself

$ pythonX.Y setup.py build

Run

$ cd build/lib...-X.Y
$ pythonX.Y
>>> import hello
>>> hello.hello_world()
Hello, world!
>>> hello.handle_int(1234)
1234
>>> hello.handle_python2_str('あ')
b'\xe3\x81\x82'

References

Morty Proxy This is a proxified and sanitized view of the page, visit original site.