![]() |
|
Help With python3 compilation error. - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: Python (https://sinister.li/Forum-Python) +--- Thread: Help With python3 compilation error. (/Thread-Help-With-python3-compilation-error) |
Help With python3 compilation error. - Psycho_Coder - 02-20-2014 Hello [username], I worked on a tool http://www.hackcommunity.com/Thread-Resource-Hash-Algorithm-Identifier-v2-0 and tested it with python 2.7 and it worked perfectly. But when I run a the same with python 3.3.1 it shows me the following error :- Code: File "HashIdentifier.py", line 81
res += [items[0]] if ( type(items[0]) is str ) else items[0]
^
TabError: inconsistent use of tabs and spaces in indentationBut I didn't understood what I am supposed to do. It works great with python 2.7 then why this error is occurring. I hope you can help me resolve the error. I am not a very good with python so sorry for a nooby question. UPDATE : Now the code compiles and runs. But Again a problem has arised. raw_input() is not supported in python3 and shows error, and input() is not supported in python 2.7.6 and shows error. WTF ? and Now the question is How to f*ck ? Thank you. Help With python3 compilation error. - Psycho_Coder - 02-20-2014 Hello [username], I worked on a tool http://www.hackcommunity.com/Thread-Resource-Hash-Algorithm-Identifier-v2-0 and tested it with python 2.7 and it worked perfectly. But when I run a the same with python 3.3.1 it shows me the following error :- Code: File "HashIdentifier.py", line 81
res += [items[0]] if ( type(items[0]) is str ) else items[0]
^
TabError: inconsistent use of tabs and spaces in indentationBut I didn't understood what I am supposed to do. It works great with python 2.7 then why this error is occurring. I hope you can help me resolve the error. I am not a very good with python so sorry for a nooby question. UPDATE : Now the code compiles and runs. But Again a problem has arised. raw_input() is not supported in python3 and shows error, and input() is not supported in python 2.7.6 and shows error. WTF ? and Now the question is How to f*ck ? Thank you. RE: Help With python3 compilation error. - Psycho_Coder - 02-20-2014 I solved it. Any mod can close this thread. RE: Help With python3 compilation error. - Psycho_Coder - 02-20-2014 I solved it. Any mod can close this thread. |