Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/bash python
- ### See Scratchflow 01_05 (2:49 PM)
- import csv
- import sys
- import time
- from time import sleep
- import os.path
- def show_available():
- with open('/Users/King/iFiles/Watchlist.csv', 'r') as csv_file:
- TickerID = int(0)
- Available_Tickers= {}
- Ticker = ''
- Filetype = int()
- csv_reader = csv.reader(csv_file)
- for row in csv_reader:
- TickerID += 1
- Ticker = str(row[0])
- T_ID_String = '['+str(TickerID)+']'
- SymbolDictionary = {T_ID_String:Ticker}
- Available_Tickers = SymbolDictionary
- for k,v in dict.items(Available_Tickers):
- print(k,v)
- def symbol_dict():
- get_Symbol = input('Please enter TickerID [number] of the chosen symbol: ')
- with open('/Users/King/iFiles/Watchlist.csv', 'r') as csv_file:
- ID = int(get_Symbol)
- ID_List = []
- Symbol = ''
- TickerID = int(0)
- Available_Tickers= {}
- Ticker = ''
- Filetype = int()
- csv_reader = csv.reader(csv_file)
- for row in csv_reader:
- TickerID += 1
- ID_List.append(TickerID)
- Ticker = str(row[0])
- T_ID_String = '['+str(TickerID)+']'
- SymbolDictionary = {TickerID:Ticker}
- Available_Tickers = SymbolDictionary
- Symbol = Ticker
- for k,v in dict.items(Available_Tickers):
- if ID == k:
- print('$',v)
- if __name__ == "__main__":
- main()
Add Comment
Please, Sign In to add comment