import sys
import pandas as pd
operator = input()
# Read CSV file into a pandas DataFrame
df = pd.read_csv('NameSymbol.csv')
def find_name_by_symbol(operator):
# Find the row where the 'Symbol' column matches the 'operator' argument
row = df.loc[df['Symbols'] == operator]
# If no row was found, return None
if row.empty:
return None
# Return the value in the 'Names' column of the row
return row['Name'].iloc[0]
# Example usage
name = find_name_by_symbol(operator)
if name:
sys.exit(name)
else:
print(f"No name found for {operator}")
{
"Name": "1Sec History",
"CreationDate": "2023-5-8",
"Commands": [
{
"Command": "prompt",
"Target": "What coin would you like to record data for?@bitcoin",
"Value": "operator",
"Description": ""
},
{
"Command": "echo",
"Target": "Running name check on ${operator}",
"Value": "",
"Description": ""
},
{
"Command": "XRunAndWait",
"Target": "/home/user/Desktop/coin_targetcheck/bin/python3",
"Value": "/coin_targetcheck/targetcheck.py ${name}",
"Description": ""
},
{
"Command": "open",
"Target": "https://coinmarketcap.com/currencies/${name}/",
"Value": "",
"Description": ""
},
{
"Command": "waitForPageToLoad",
"Target": "",
"Value": "",
"Description": ""
},
How do I get python output into UI Vision. I saw a post where someone used ${a} as an anwser var but Im not sure if thats really what was going on and everytime I get a code 2 and everytime I test it, it works but will exit