Python Example Code
Overview
-
A very basic Python code sample that will show how to send a fax to the Multitech Fax Finder device using Web Service API .
Prerequisites
- Download and Install Python 3.1 Interpreter at http://www.python.org/download/
- Download the Python sample source code Sendfax-python.zip here
Notes: The Sendfax-python.zip contained two files:
- sendfax.py
- schedule.xml
Modify schedule.xml
Load the schedule.xml file into your favorite editor, find the section below, and modify the fax number to point to your recipient fax number:
<recipient>
...
<fax_number>5138 </fax_number>
</recipient>
Save it.
Modify sendfax.py
High light the sendfax.py -> Right Click -> Edit with IDE to load the sendfax.py source code into your IDLE python GUI. Find the line below, modify the path to match yours.
#!c:\python31\python.exe
Modify the user name and password.
username_and_password = base64.b64encode(b"admin:admin")
Change the IP address of the following line to point to your Fax Finder’s IP address.
conn = HTTPConnection("216.133.69.247",80)
Save and Run it.
Now, if you web into your FaxFinder device and go to Status & Log -> Fax Status, you should be able to see the Fax Finder is sending out a fax.