Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: IndexError: list assignment index out of range
Post: RE: IndexError: list assignment index out of range

Sorry for the lack of information: context.securities looks like this: PRINT [Equity(24 [AAPL]), Equity(16841 [AMZN])]returns = [] for s in context.securities: returns.append([]) print(returns)See...
ted_chou12 General Coding Help 4 46,871 Jan-03-2018, 07:31 AM
    Thread: IndexError: list assignment index out of range
Post: IndexError: list assignment index out of range

I am trying to create a multiple dimension array with predefined index: returns = [] for s in context.securities: returns[s] = [] print(returns)but the above code returns Quote:Ind...
ted_chou12 General Coding Help 4 46,871 Jan-03-2018, 05:14 AM
    Thread: Encoding issue for the console output
Post: RE: Encoding issue for the console output

Thanks, I found out that python3 does not have this unicode issue... changed to python3
ted_chou12 General Coding Help 4 3,472 Sep-08-2017, 09:11 AM
    Thread: Encoding issue for the console output
Post: RE: Encoding issue for the console output

Thank you so much! But I am using Mac OS default terminal... I believe that it is able to display UTF-8 properly: Quote:電子郵件DLP.zip (外国人・帰国子女向け)日本で働くためのビジネス基礎研修様.pdf (送付用)【ご参考情報】メール流量確認結果_20170317...
ted_chou12 General Coding Help 4 3,472 Sep-08-2017, 07:08 AM
    Thread: Encoding issue for the console output
Post: Encoding issue for the console output

import sys reload(sys) sys.setdefaultencoding('utf8') import pyodbc driver = '{ODBC Driver 13 for SQL Server}' cnxn = pyodbc.connect('DRIVER='+driver+';SERVER='+server+';DATABASE='+database+';UID='+...
ted_chou12 General Coding Help 4 3,472 Sep-08-2017, 01:54 AM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020