Discussion Board

Results 1 to 1 of 1
  1. #1
    Regular Contributor
    Join Date
    Sep 2009

    Help creating python wrapper for c/c++ program


    I'm trying to write a python wrapper for the camera module (S60 Platform: Camera Example). I'm following the steps given in the documentation here.

    It says, I am required to download (and extract) the file PythonForS60_1_4_0RC1_SDK_3rdEd_GCCE_selfsigned.zip found on the SourceForge page. Is there a version 1.4.5 of this file? The SourceForge page does not have any file with the letters 'RC1' anywhere. Will PythonForS60_1_4_5_SDK_3rdEd.zip work in its place, or do they have completely different functions?

    Is that guide the right one, or is there a more recent version of the guide/tutorial?

    Since I'm more familiar with Carbide when it comes to dealing with C/C++ programs, I tried following the steps and modified them for carbide.
    I used the script to make the stub, and copied the pythonwrapper.cpp in the example to the pythonwrapper.cpp in the project. I also copied the .mmp file and .pkg file as given in the example. However, I cannot run the code on the emulator.
    I built it in the debug mode and the code built without any errors. However, in the emulator, if I go to the python interactive console and type in 'import test', it says that the module cannot be found. I checked in the epoch32/wiscw/c/resource directory, but could not find it.

    Have I missed out on some step?

    My .mmp file is :
    TARGET _test.pyd
    TARGETPATH \system\libs

    SYSTEMINCLUDE \epoc32\include \epoc32\include\variant
    SYSTEMINCLUDE \epoc32\include
    SYSTEMINCLUDE \epoc32\include\libc
    SYSTEMINCLUDE \epoc32\include\python

    USERINCLUDE . ..\inc

    LIBRARY hal.lib
    LIBRARY euser.lib
    LIBRARY python222.lib
    LIBRARY estlib.lib

    CAPABILITY ReadUserData WriteUserData UserEnvironment LocalServices NetworkServices


    SOURCEPATH ..\src
    SOURCE PythonWrappers.cpp
    and my .pkg file is

    #{"test"},(0xE4211998),1,0,0, TYPE=SA



    [0x101F7961], 0, 0, 0, {"S60ProductID"}

    "$(EPOCROOT)\epoc32\release\$(PLATFORM)\$(TARGET)\_test.pyd" -"!:\sys\bin\_test.pyd"
    Have I missed out on something?
    Last edited by kedarm; 2010-01-02 at 05:57.

Similar Threads

  1. How to install python to S60 Emulator?
    By xiximato in forum Symbian
    Replies: 14
    Last Post: 2009-03-10, 12:13
  2. Replies: 3
    Last Post: 2009-02-14, 13:37
  3. Problem in build with S60 1FP
    By Manuelito_ in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2007-09-18, 12:08
  4. Is there any ProgressBar wrapper for python?
    By papit01 in forum Symbian
    Replies: 0
    Last Post: 2006-03-11, 19:29
  5. 'Program closed: python'. When does this show up?
    By bercobeute in forum Symbian
    Replies: 4
    Last Post: 2006-01-02, 21:12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts