There are at least two ways to modify/affect the behaviour of your PyS60 applications:

1) during distribution (i.e. while installing the SIS file) or
2) during runtime.

For the first item you can e.g. demand that your script is only installed on a device which contains a certain version of PyS60 already installed. This can be controlled from the "pkg" file of your application, from the SDK documentation:

A requisite component is one that is required by the component which is being installed. It must be present on the target machine and its major and minor build numbers must be the same as, or greater than, those specified — otherwise installation will fail. Its name does not need to match the name specified, as it is identified by UID. However the name will be displayed to the user if there is a problem, e.g. the component is missing.

A requisite component is specified in the following way;

(UID),Major,Minor,Build-Number,{"Requisite Name1", " Requisite Name2"}

For example;

; Depends on STDLIB being installed
(0x100002c3), 1, 0, 14, {"Standard C Library"}
For PyS60 requisites you could have e.g. the following line in you ".pkg":

; Depends on PyS60 being installed
(0x10201510), 1, 3, 0, {"Python for S60"}
This way you could also forget the problems arising if PyS60 is not installed in your target device. For more information on how to modify the packages produced by "py2sis" search this forum with keyword "py2sis".

(notice that there might be other interesting things in the "pkg"-syntax also, just search your S60 SDK with the term "pkg". Side note: this tip could be actually a feature request for future versions of "py2sis")

The second item, i.e. runtime versioning, contains a number of different possibilities:

1) What PyS60 version are we running? Are we running in an emulator or device? Example in my 6600:

>>> import e32
>>> e32.s60_version_info
(2, 0)
>>> e32.pys60_version
'1.3.0 alpha'
>>> e32.pys60_version_info
(1, 3, 0, 'alpha', 0)
>>> e32.in_emulator()   #in 6600 currently
2) For fetching the actual device model (e.g. are we running in a Nokia 6600?), see e.g. this post: