I'm currently working on a package that supposedly takes the output of a function in a Python script, and adds it to the PDF. For example, one function may scrape data from a website automatically, so that the PDF can be automatically updated and uploaded to a server without human intervention.
I did stumble across this package on CTAN, but it seems to be way outdated, and instead of finding output from a script it embeds the code in the .tex file. The usage would be as follows:
\documentclass[11pt]{article}
\usepackage{pythonin}
\begin{document}
\pyin{scripts/script.py}{function}{arg1,type}{arg2,type} %...
\end{document}
As you can see, the \pyin{} command should have optional arguments with the type supplied. For example, the actual code may be \pyin{scripts/scrape_data.py}{scrape_data}{http://tex.stackexchange.com/questions/ask,str}.
How could I, if possible, recieve output from a Python file with Python code such as:
import pythonin
def scrape_data(url):
pythonin(some_result)
yet again, I have no idea how I would go about writing up the actual code for both the pythonin module and the pythonin.sty package. Any ideas would be appreciated, since I'm kind of out of my depth here.
Many thanks!

pythoninthat will run a Python function with the arguments you specify? – darthbith Oct 27 '14 at 19:24pdflatexa little more, I think. – HarryCBurn Oct 27 '14 at 20:01pdflatexspecific there, the pipe symbol for input scripting comes fromweb2cso applies to latex or tex or xetex etc as well as pdftex – David Carlisle Oct 27 '14 at 20:05\input{}just a way of getting text from the command prompt? – HarryCBurn Oct 27 '14 at 20:12\input{chap1.tex}to input a file with the tex code of chapter 1 etc, but current tex implemntations if shell scripting is allowed (--shell-escapecommand line) accept a "pseudo filename syntax" where the "filename" is allowed to begin with the|pipe and instead of a file the argument is passed to the commandline and any output is used as the input data. – David Carlisle Oct 27 '14 at 20:34input{|. – user202729 Sep 12 '21 at 04:47