Python Forum
How to pass variable as an argument to be used in a function?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to pass variable as an argument to be used in a function?
#9
(i) one option is to have script running in background that checks the database regularly (e.g. every x seconds)
(ii) another option is to have a trigger in the DB that would do what you want (inc. call external command) and being triggered when new row inserted in given table
(iii) some combination of (i) and (ii)

check https://stackoverflow.com/a/670697/4046632
Even if not using MySQL same will apply for other DBs
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: How to pass variable as an argument to be used in a function? - by buran - Jan-16-2020, 01:37 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  not able to call the variable inside the if/elif function mareeswaran 3 535 Feb-09-2025, 04:27 PM
Last Post: mareeswaran
  Variable for the value element in the index function?? Learner1 8 2,872 Jan-20-2024, 09:20 PM
Last Post: Learner1
  mutable argument in function definition akbarza 1 1,186 Dec-15-2023, 02:00 PM
Last Post: deanhystad
  Variable is not defined error when trying to use my custom function code fnafgamer239 4 1,568 Nov-23-2023, 02:53 PM
Last Post: rob101
  Printing the variable from defined function jws 7 7,215 Sep-03-2023, 03:22 PM
Last Post: deanhystad
  Function parameter not writing to variable Karp 5 2,099 Aug-07-2023, 05:58 PM
Last Post: Karp
  How to pass encrypted pass to pyodbc script tester_V 0 1,720 Jul-27-2023, 12:40 AM
Last Post: tester_V
Information How to take url in telegram bot user input and put it as an argument in a function? askfriends 0 2,315 Dec-25-2022, 03:00 PM
Last Post: askfriends
  i want to use type= as a function/method keyword argument Skaperen 9 3,584 Nov-06-2022, 04:28 AM
Last Post: Skaperen
  Retrieve variable from function labgoggles 2 1,782 Jul-01-2022, 07:23 PM
Last Post: labgoggles

Forum Jump:

User Panel Messages

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