Python scripts in TextPipe?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Posts: 692
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Python scripts in TextPipe?

Postby DFH » Thu Aug 23, 2012 9:52 pm

Can one use Python scripts within the TextPipe scripts filter?

cf. Currently, the two choices offered in the drop-down are VBScript and JScript.

Yet the contextual help lists, "VBScript, JScript, VBA, PerlScript, Python, Lisp, REXX etc."

Moreover, it goes on to say, "The script language to use. Default values are VBScript, JScript and VBA, but you can download and install others (they will not appear in the list - you must enter them manually)."

btw. If VBA is one of the default values, why is it absent from the dropdown selector?

If so, is there a template for the required IO functions for Python?

Are there any examples available?


User avatar
DataMystic Support
Site Admin
Posts: 2178
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Re: Python scripts in TextPipe?

Postby DataMystic Support » Fri Aug 24, 2012 7:02 am

Sorry, VBA is not a default - the help has now been updated.

We're not experts in those other languages, so we don't have any samples available - but we'd be happy to include them if a contribution was available.

Below are the 5 functions that TextPipe requires, with documentation.

Code: Select all

'Called for every line in the file
'EOL contains the end of line characters (Unix, DOS or Mac) that must be
'appended to each line
function processLine(line, EOL)
  processLine = line & EOL
end function

'Called at the start of a processing job -
'perform one-time initialisation here
sub startJob()
  'do nothing
end sub

'Called at the end of a processing job -
'destroy any declared objects here
sub endJob()
  'do nothing
end sub

'Called before each file is opened -
'perform per-file initialisation here
function startFile()
  startFile = ""
end function

'Called before each file is closed -
'flush all pending file output here
function endFile()
  endFile = ""
end function

Simon Carter, - Insulin dose calculator for Type 1 diabetes - 250,000 free software downloads - send huge email attachments

Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Baidu [Spider], Yahoo [Bot] and 1 guest