Python
Jump to navigation
Jump to search
Truxton supports Python 3.8 via the Truxton.pyd library.
You must use the "import" directive to load this.
Got to the C:\Program Files\Truxton\SDK folder and start Python.
import truxton
When you import truxton you will get all of the predefined constants for file type, data type, locations,
messages, entities, relations, events, media, objects, url methods, and urls.
You can see them all by issuing a dir command.
>>> dir(truxton)
This will allow your Python code to use the same constant names as C, C++ and C# code.
>>> print(truxton.Type_JPEG)
203
>>> print(truxton.DATA_TYPE_BIG_ENDIAN_uint64_t)
39
>>> print(truxton.LOCATION_TYPE_EXIF)
9
>>> print(truxton.MESSAGE_TYPE_MIME)
1
>>> print(truxton.ENTITY_TYPE_MAC_ADDRESS)
4
>>> print(truxton.RELATION_PASSWORD)
11
>>> print(truxton.EVENT_TYPE_FACEBOOK_LOGON)
21
>>> print(truxton.MEDIA_TYPE_HARD_DISK_IMAGE)
3
>>> print(truxton.OBJECT_TYPE_ENTITY)
7
>>> print(truxton.URL_METHOD_TYPE_GET)
7
>>> print(truxton.URL_TYPE_OPERA)
10
Once you have this working, you can start playing with Truxton.
import truxton
def main():
t = truxton.create()
print(t.version())
if __name__ == "__main__":
main()
Classes
Truxton exposes several classes to Python.