Bitcoin Forum
May 02, 2024, 04:43:04 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I create a config/table/array that is accessible by Bash and Python?  (Read 106 times)
selenanur (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile WWW
October 07, 2020, 06:25:05 AM
 #1

I would like to construct a config file that is accessible by both a Bash script and a Python script.
https://rb.gy/rgdmwz

For example:

"Item1" 64 "Blue" "B1UE"
"Item2" 45 "Red" "R3D"
"Item3" 95 "Green" "GR33N"
What can I do to easily import to both Bash and Python? Was thinking maybe to create it in JSON format, does anyone have any recommendations?
"Your bitcoin is secured in a way that is physically impossible for others to access, no matter for what reason, no matter how good the excuse, no matter a majority of miners, no matter what." -- Greg Maxwell
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714668184
Hero Member
*
Offline Offline

Posts: 1714668184

View Profile Personal Message (Offline)

Ignore
1714668184
Reply with quote  #2

1714668184
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
October 07, 2020, 04:14:57 PM
 #2

What exactly are you trying to do? You can import an api to the command line via "import os" in python and then do os.system("your command here")?

Eg
Code:
import os
os.system("echo 'hello world!'")
bitmover
Legendary
*
Online Online

Activity: 2296
Merit: 5914


bitcoindata.science


View Profile WWW
October 07, 2020, 09:44:03 PM
 #3

I would like to construct a config file that is accessible by both a Bash script and a Python script.
https://rb.gy/rgdmwz

For example:

"Item1" 64 "Blue" "B1UE"
"Item2" 45 "Red" "R3D"
"Item3" 95 "Green" "GR33N"
What can I do to easily import to both Bash and Python? Was thinking maybe to create it in JSON format, does anyone have any recommendations?

Maybe you are in the wrong forum?
https://stackoverflow.com/

I believe some people can help you here with some coding, but usually this is a place to discuss bitcoin related coding. In Stackoverflow you will find better help.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!