Python scripts in TextPipe?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Post Reply
DFH
Posts: 733
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Python scripts in TextPipe?

Post by 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?

David

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

Re: Python scripts in TextPipe?

Post by 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
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

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

Re: Python scripts in TextPipe?

Post by DFH » Mon Apr 24, 2017 9:37 pm

The help was not updated! It still says,
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). TextPipe will display an error message if the language you specified is not installed. You can download the Microsoft VBScript and JScript engines and reference documentation from the Microsoft web site at http://msdn.microsoft.com/scripting/default.htm
David

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

Re: Python scripts in TextPipe?

Post by DataMystic Support » Mon Apr 24, 2017 10:17 pm

Thanks - updated.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests