Closed ristono closed 6 years ago
hat is because in Python 3, they have replaced the print statement with the print function.
The syntax is now more or less the same as before, but it requires parens:
From the "what's new in python 3" docs:
Old: print "The answer is", 2*2
New: print("The answer is", 2*2)
Old: print x, # Trailing comma suppresses newline
New: print(x, end=" ") # Appends a space instead of a newline
Old: print # Prints a newline
New: print() # You must call the function!
Old: print >>sys.stderr, "fatal error"
New: print("fatal error", file=sys.stderr)
Old: print (x, y) # prints repr((x, y))
New: print((x, y)) # Not the same as print(x, y)!
This error wants parentheses around the print statement. print ('Mode {0} is not recognized'.format(args.mode))
thanks, how about this
File "C:\Users\Ariez\Desktop\crypto-arbitrage-master\engines\triangular_arbitrage.py", line 19 print strftime('%Y%m%d%H%M%S') + ' starting Triangular Arbitrage Engine...' ^ SyntaxError: invalid syntax
Old: print # Prints a newline New: print() # You must call the function!
Sorry this is written in Python 2 syntax. Quite a few people used Python 3 and asked me about the same issue. I am updating the readme to explicitly mention this.
C:\Users\Ariez\Desktop\crypto-arbitrage-master>python main.py -m triangular File "main.py", line 25 print 'Mode {0} is not recognized'.format(args.mode) ^ SyntaxError: invalid syntax
What is wrong?