Python software for USB Wireless WeatherStations

Upload.py -- uploads files to a web site by ftp

This module uploads files to (typically) a website via ftp or sftp. Details of the upload destination are stored in the file weather.ini in your data directory. The only way to set these details is to edit the file. Run Upload.py once to set the default values, which you can then change. Here is what you're likely to find when you edit weather.ini.

[ftp]
secure = False
directory = public_html/weather/data/
password = secret
site = ftp.username.your_isp.co.uk
user = username

These are, I hope, fairly obvious. directory is the name of a directory on the ftp site in which all the uploaded files will be put. This will depend on the structure of your web site and the sort of host you use. Your hosting provider should be able to tell you what site and user details to use. You should have already chosen a password.

The secure option lets you switch from normal ftp to sftp (ftp over ssh). Some hosting providers offer this as a more secure upload mechanism, so you should probably use it if available.


Python software for USB Wireless WeatherStations © Jim Easterbrook.