Python Forum
Make bash call my own Python modules
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make bash call my own Python modules
#10
(Apr-19-2019, 09:39 PM)Pedroski55 Wrote: I tried putting the functions in a list and also in a dictionary:

pyFiles = [makeHTMLCBs(), makeDropdownboxes(), makeHTMLtable(), makeHTML_RBs(), readLinesmakeTBs(), makeThankyouPHP()]
pyFiles = {'0': makeHTMLCBs(), '1': makeDropdownboxes(), '2': makeHTMLtable(), '3': makeHTML_RBs(), '4': readLinesmakeTBs(), '5': makeThankyouPHP()}
Either way, at runtime, Python immediately wants to execute the first function in the list or dictionary. I don't get a chance to choose say, myString = pyFiles[3]

Python documentation: How do I use strings to call functions/methods?
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Messages In This Thread
RE: Make bash call my own Python modules - by perfringo - Apr-22-2019, 02:52 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems passing arguments containing spaces to bash script and then on to python kaustin 6 651 Apr-03-2024, 08:26 PM
Last Post: deanhystad
  How to see the date of installation of python modules. newbieAuggie2019 4 1,793 Mar-31-2023, 12:40 PM
Last Post: newbieAuggie2019
  Python modules for accessing the configuration of relevant paths Imago 1 1,478 May-07-2022, 07:28 PM
Last Post: Larz60+
  Call a bash script from within a Python programme Pedroski55 6 2,577 Dec-06-2021, 01:53 PM
Last Post: DeaD_EyE
  Showing and saving the output of a python file run through bash Rim 3 2,613 Oct-06-2021, 10:48 AM
Last Post: gerpark
  Python modules to extract data from a graph? bigmit37 5 22,784 Apr-09-2021, 02:15 PM
Last Post: TysonL
  Where to add own python modules in WinPython? HinterhaeltigesSchlaengelchen 1 2,357 Jan-21-2021, 07:45 PM
Last Post: snippsat
  Including modules in Python using sys.path.append JoeDainton123 1 3,034 Aug-24-2020, 04:51 AM
Last Post: millpond
  How to kill a bash script running as root from a python script? jc_lafleur 4 6,117 Jun-26-2020, 10:50 PM
Last Post: jc_lafleur
  how to get PID's of linux commands executed through python modules? Manikandan_PS 4 3,155 Mar-12-2020, 07:16 AM
Last Post: Manikandan_PS

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020