Bitcoin Forum
May 14, 2024, 05:31:17 AM *
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 108 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?
The Bitcoin software, network, and concept is called "Bitcoin" with a capitalized "B". Bitcoin currency units are called "bitcoins" with a lowercase "b" -- this is often abbreviated BTC.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715664677
Hero Member
*
Offline Offline

Posts: 1715664677

View Profile Personal Message (Offline)

Ignore
1715664677
Reply with quote  #2

1715664677
Report to moderator
1715664677
Hero Member
*
Offline Offline

Posts: 1715664677

View Profile Personal Message (Offline)

Ignore
1715664677
Reply with quote  #2

1715664677
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
*
Offline Offline

Activity: 2296
Merit: 5942


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!