| Reply | « Previous Thread | Next Thread » |
|
i need to make use of the aosocketnativenew.pyd
how can i import it to my program? when I run the application that import aosocketnativenew, I got an error do I put aosocketnativenew.pyd in some directory? -OR- i need to build a .SIS file? thanks |
| chiuming07 |
| View Public Profile |
| Find all posts by chiuming07 |
|
Which phone do you have? There does not seem to be a version of aosocketnativenew for 3rd Edition phones.
|
|
Hi chiuming07,
Could you please be more accurate with the error code you get. Are you using a 2nd or 3rd edition platform devices? For a 2nd edition device you need to put binaries and python libraries in c:\system\Libs or e:\system\Libs For a 3rd edition device binary modules have to be put in c:\sys\bin\ and python libraries in c:\resource\. Now for 3rd edition platform you can't just import a binary with "import aosocketnativenew" like it used to be with second edition platform. To have the same behavior in both 2nd and 3rd edition platforms, we use now 2 files, the binary file (starting with "_" so here _aosocketnativenew.pyd) and and Python files to launch the binary. Like I mentioned before you put the binary in !:\system\Libs or c:\sys\bin\. Then you create a file which has the name you want for your library so here aosocketnativenew.py and inside you put the content below: Code:
import e32
if e32.s60_version_info>=(3,0):
import imp
_aosocketnativenew= imp.load_dynamic('_aosocketnativenew', 'c:\\sys\\bin\\_aosocketnativenew.pyd')
del imp
else:
import _aosocketnativenew
del e32#remove unnecessary names from namespace
from _aosocketnativenew import *
del _aosocketnativenew
That should solve your problem I think. LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
Quote:
I looked around and could not find a a version of asocketnativenew for 3rd Edition. |
|
Absolutely
![]() If no 3rd edition module, can we have the source somewhere? I could try to port it. LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
Quote:
They provide 2nd and 2nd FP2 source code. Perhaps could you port it to 3rd ? Albert Huang made a new version of aosocketnativenew flushing the device cache but source changes are not available ![]() link : aosocketnativenew in the PDIS 0.10 source tree aosocketnativenew from Albert Huang Cyke64 pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
Has anyone made further progress on the pdis/aosocket port? My feeble attempts at this have been unsuccessful. Is this still an active issue?
|
| Faultsprofit |
| View Public Profile |
| Find all posts by Faultsprofit |
|
Has anybody had luck in this?
|
| federico2929 |
| View Public Profile |
| Find all posts by federico2929 |
|
Don't know if you still need it (or if anybody is watching) but I've made a version for 3rd edition. Note: it is unsigned. You should sign it using the same certificate and capabilities that you used for Python itself.
You can download the SIS file here: http://contextwatcher.lab.telin.nl/C.../Software.aspx |
|
Quote:
![]() It's great news that you have ported the aosocketnativenew.pyd to 3rd But could you publish the source code (if possible !) ?But you forget to announce the nice locationrequestor.pyd which implements the location API on the same page Thanks ![]() Cyke64 pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
Quote:
![]() Sure, I'll put the sources there, may take a little time as the update rate of that site isn't very high. But if you're in a hurry, I put the sources on a temporary location. Please note that these sources are NOT mine, I only made these minimal changes: dllentry.cpp: The E32Dll entry point is obsolete for 3rd edition (EKA2): Code:
#ifndef EKA2
GLDEF_C TInt E32Dll(TDllReason)
{
return KErrNone;
}
#endif
Code:
#ifdef EKA2
// 3rd edition, use _aosocketnativenew for separate python loader
PyObject* module = Py_InitModule(
"_aosocketnativenew", // module name
const_cast<PyMethodDef*>(&apn_methods[0]));
#else
// 2nd edition, no loader
PyObject* module = Py_InitModule(
"aosocketnativenew", // module name
const_cast<PyMethodDef*>(&apn_methods[0]));
#endif
Code:
import e32
if e32.s60_version_info>=(3,0):
import imp
_aosocketnativenew=imp.load_dynamic('_aosocketnativenew', 'c:\\sys\\bin\\_aosocketnativenew.pyd')
else:
import _aosocketnativenew
del e32, imp #remove unnecessary names from namespace
from _aosocketnativenew import *
del _aosocketnativenew
|
|
Hello Mwibbels
![]() Could you please change your profile for receiving email from Forum Nokia ? I can't contact you ![]() We have a problem with the other library : LocationRequestor It would be a great library only if it works But other people try to use it but they can't ![]() Could you please correct the source code ? Thanks Cyke64 Quote:
pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
Hmm. I received this message ok. But I'll change my profile. What seems to be the problem with the sources? (we're actively using this library ...)
Quote:
|
|
I got the aosocket_unsigned.sis file from http://www.iyouit.eu/portal/software/ and signed it, but I still need a version of pdis.sis for 3rd edition.
Apps that use aosocket need pdis, or at least when I run a script that has: Code:
import aosocketnativenew
from aosocket.symbian.bt_device_discoverer import *
Can a PDIS.SIS be built for 3rd edition using ensymble? If so, how? |
| phonegnome |
| View Public Profile |
| Find all posts by phonegnome |
|
The thing is: we only ported aosocket, since we use only a small portion of it that does not require pdis. We did not port pdis and I've got no idea whether or not that would be easy.
Sorry that I can't be of any more help. Martin |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| J2Se Obex Server to receive files | alam.sher | Bluetooth Technology | 22 | 2008-07-17 14:49 |
| GoogleIt | deepika.mangla | General Symbian C++ | 4 | 2007-01-08 02:07 |
| SyExpat + problem + memmove + Carbide Express | pearman | General Symbian C++ | 2 | 2006-10-14 23:21 |
| DemoDMServer SMS problem | kudelasz | OMA DM/DS/CP | 17 | 2006-05-22 10:16 |
| SocketConnection Work on 6600&Emulators BUT NOT IN 6680 | eerant | Mobile Java Networking & Messaging & Security | 4 | 2006-03-11 01:35 |