Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2007

    help for import issue

    Hi, all

    I create a new ***.pyd file and put it into the directory of /epoc/release/winscw/udeb.

    but when I launch the emulator, and run import *** operation, there is a exception: KErrNotSupported.

    could anyone kindly give me any hint.


  2. #2
    Registered User
    Join Date
    Nov 2007

    Re: help for import issue

    btw, my platform is S60_3rd_FP1 + PythonForS60_SDK_3rdEd.

    I just could not find out which part of the whole things are wrong.

    kindly give me some suggestions.

    Best Regards!

  3. #3
    Nokia Developer Champion
    Join Date
    Jun 2007

    Re: help for import issue

    Hello people,

    I'm having a similar issue. I started studying pyS60 extensions and wrote a simple one.

    I generated the pyd.file and put it on the c:/sys/bin folder on the emulador. When I try to load it, I get a KErrNotSupported error.

    I'm using Carbide.vs (MS Visual Studio) and here's the extension code:

    #include "Python.h"
    #include "symbian_python_ext_util.h"
    /* module functions */
    static PyObject *                                 
    message(PyObject *self, PyObject *args)           
        char *fromPython, result[64];
        if (! PyArg_Parse(args, "(s)", &fromPython))  
            return NULL;                              
        else {
            strcpy(result, "Hello, ");                
            strcat(result, fromPython);               
            return Py_BuildValue("s", result);        
    static struct PyMethodDef test_methods[] = {
        {"message", (PyCFunction)message, METH_NOARGS, NULL},  
        {NULL, NULL}                   
    /* module initializer */
    DL_EXPORT(void) inittest(void) 
        Py_InitModule("test", test_methods); 
    Here is the mmp file:

    TARGET                                  test.dll 
    TARGETTYPE                              dll 
    UID                                     0x1000008d 0xebe66aaf 
    SECUREID                                0xebe66aaf 
    VENDORID                                0 
    capability                              NONE 
    SYSTEMINCLUDE                           \epoc32\include\libc 
    SYSTEMINCLUDE                           \epoc32\include\python 
    USERINCLUDE                             ..\src 
    SYSTEMINCLUDE                           \epoc32\include 
    DOCUMENT                                bld.inf 
    DOCUMENT                                testmodule.pkg 
    SOURCEPATH                              ..\src 
    SOURCE                                  testmodule.cpp 
    LIBRARY                                 python222.lib 
    LIBRARY                                 euser.lib 
    Then, after the build I copy the .dll as _test.pyd to the sys/bin folder on the emulador.

    My python script is simply, "import _test", then I get the error.

    Am I missing something ?


  4. #4
    Regular Contributor
    Join Date
    Jan 2004

    Re: help for import issue

    Sounds like the installed Python run-time and the version which you compile against might be different.

    Try Python for Series 60 community edition which builds extensions straight into Python core, without need to have them as separate DLL. This should ease the deployment process a bit.
    Mikko Ohtamaa


  5. #5
    Nokia Developer Champion
    Join Date
    Jun 2007

    Re: help for import issue

    I'm using S60 3rd Ed. FP1 SDK and PyS60 3rd Ed. FP1 SDK

Similar Threads

  1. issue with at+cusd over bluetooth link
    By hbanks in forum General Messaging
    Replies: 2
    Last Post: 2007-09-25, 21:21
  2. RTSP video streaming issue on 6280
    By olivier_irac in forum General Development Questions
    Replies: 0
    Last Post: 2006-12-04, 15:11
  3. Issue with 6265i - APp Install
    By romar_mro in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-10-03, 22:06
  4. Image Scaling/Sizing issue on the N70
    By sameet in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-07-24, 12:03
  5. Security code issue for 6230
    By kababoom in forum General Development Questions
    Replies: 1
    Last Post: 2004-08-19, 05:39

Posting Permissions

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