recurse folder,installing python file in private folder etc
hello again all... (sorry if my english bad)
i wanna ask some question :
1. how to recurse every folder on a drive and search file in every folder of it
2. how to install pyd to private folder on s60 3rd? i've made sis that will install files to c:\sys\lib or c:\resource. i've made 3 sis, unsigned, self sign and developer sign. If i install using unsigned and self signed, phone tell me capabilities not bla bla (i am forget the error). Then i signed it using developer certificate which i get from symbian free but the phone still tell me error unable to install. why? is it if we want to install some file to private folder we need more high access certificate or am i wrong in making sis?
3. i wanna make such message application that can replace smiley :-) to emoticon :) if we open new sms we got and contain smiley or we create one,how to make it in python?
thanx for the replies... :) (sorry..sorry for my english)
Re: recurse folder,installing python file in private folder etc
I only answer to question 1.
Here is an example:
[code]import os
def find(dir, what):
print dir
for name in os.listdir(dir):
path = os.path.join(dir, name)
if name == what:
return path
if os.path.isdir(path):
r = find(path, what)
if r is not None:
return r
print find('c:\\', 'ntldr')[/code]
It will search for file/dir 'ntldr' on drive C:\ and return a full path or None if the file cannot be found. It will be slow because it prints out the path it is currently examining.
Re: recurse folder,installing python file in private folder etc
[QUOTE=0odevilzo0;344686]...2. how to install pyd to private folder on s60 3rd? i've made sis that will install files to c:\sys\lib or c:\resource. i've made 3 sis, unsigned, self sign and developer sign. If i install using unsigned and self signed, phone tell me capabilities not bla bla (i am forget the error). Then i signed it using developer certificate which i get from symbian free but the phone still tell me error unable to install. why? is it if we want to install some file to private folder we need more high access certificate or am i wrong in making sis?...[/QUOTE]
no, if you're installing files to your own application's private folder, you don't need any special capability.
If phone is showing "Unable to install", the best you can do is posting your .pkg file here.If it was some capability issue, the error message would be more specific (and not only the generic "Unable to install")
best regards
Re: recurse folder,installing python file in private folder etc
[QUOTE=0odevilzo0;344686]hello again all... (sorry if my english bad)
2. how to install pyd to private folder on s60 3rd? i've made sis that will install files to c:\sys\lib or c:\resource. i've made 3 sis, unsigned, self sign and developer sign. If i install using unsigned and self signed, phone tell me capabilities not bla bla (i am forget the error). Then i signed it using developer certificate which i get from symbian free but the phone still tell me error unable to install. why? is it if we want to install some file to private folder we need more high access certificate or am i wrong in making sis?
thanx for the replies... :) (sorry..sorry for my english)[/QUOTE]
Hello OodevilzoO and welcome to this Python DiBo :)
On 2rd S60 phone you can install pyd files on the python path usually !:\system\libs but on 3rd it is mandatory installing pyd like exe file on !\sys\bin !!!
There are only two ways for installing pyd :
Using selfsigned sis file with a pyd file with restricted capabilities (only 5 :
Or using unsigned sis file with a pyd file with more capabilities ( 13 ) but before installing on your 3rd device YOU MUST sign the sis file with you dev cert !!! After that you can install the pyd file contained in the signed sis file.
So you can install both files but never in sys\lib (I don't think that this one exist by default :confused: and never in resource ! You must ALWAYS with 3rd phone installing the pyd in !:\SYS\BIN
Now I think it's clearer for you ? ;)
BR
Cyke64