I am just begining in python and pys60 and I'm not a programmer, so excuse the quality of the code, it's still WIP so some of it is not used gui etc. I hope you get the idea and it may prove useful to someone as a concept. I tried making a sis of this, but so far it doesnt run and shows no error (installed to same drive etc.), but the script does run thought the shell.
I don't have bluetooth and I don't have the nokia suite installed but I want to send files to the C drive of the phone. I set up an ftp server on my pc using "quick'n easy ftp" in my case.
The script gets the URL for the folder I want to copy to the phone if anything has changed it since it last got the URL itdownloads the whole folder to the phones python folder.
At the moment it loops forever, eventually my plan was to have it run in the background. So when I save my .py files on my pc they are uploaded to the python folder so I can run them from the shell "run script"
I'm sure someone could write this better or use the concept to do something more useful
from appuifw import *
#exitcode not tested
running = 1
running = 0
timer = e32.Ao_timer()
app.title = u"FTP GETTER"
app.screen = 'full'
oldftplist = "" #blank list so always download
url = "ftp://a:email@example.com/"
#ftp list from server
ftplist = urllib.urlopen(url).read()
if ftplist != oldftplist :
filedest = "c:\\data\\python\\"
# split the output of the ftp list into many strings seperated by whitespaces
eachfile = ftplist.split()
# go thorugh each string and find all that contain a "." use these as filenames
for x in eachfile:
if x.find(".") != -1 :
print "Downloading "+x+" to "+ filedest
oldftplist = ftplist
timer.after(1) #sleep for 1 seconds