Bitcoin Forum
May 03, 2024, 12:16:54 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 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?
1714695414
Hero Member
*
Offline Offline

Posts: 1714695414

View Profile Personal Message (Offline)

Ignore
1714695414
Reply with quote  #2

1714695414
Report to moderator
1714695414
Hero Member
*
Offline Offline

Posts: 1714695414

View Profile Personal Message (Offline)

Ignore
1714695414
Reply with quote  #2

1714695414
Report to moderator
If you want to be a moderator, report many posts with accuracy. You will be noticed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714695414
Hero Member
*
Offline Offline

Posts: 1714695414

View Profile Personal Message (Offline)

Ignore
1714695414
Reply with quote  #2

1714695414
Report to moderator
1714695414
Hero Member
*
Offline Offline

Posts: 1714695414

View Profile Personal Message (Offline)

Ignore
1714695414
Reply with quote  #2

1714695414
Report to moderator
1714695414
Hero Member
*
Offline Offline

Posts: 1714695414

View Profile Personal Message (Offline)

Ignore
1714695414
Reply with quote  #2

1714695414
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: 5916


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!