-
Notifications
You must be signed in to change notification settings - Fork 455
[Feature Request] Python3 support #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
refs #55 Signed-off-by: Eric Wang <[email protected]>
I don't think that using
I can help develop this feature if you agree with this idea. @skygragon |
I think |
Yep, I was considering using shabang at first but finally decided not to go right now due to following considerations:
So finally for the time being I chose the easier way (also the right way I think) to make things work. Hope this tradeoff makes a bit sense to your guys. |
yes, there is no need to put shebang at the first line of files generated by leetcode-cli, because we are not telling leetcode's interpreter which python version we are using. leetcode-cli decides python version by peeking at the
|
@ShiHan9 the config way sounds like a doable solution while it might involve further user activities (not a one-time effort) to manually take care of python3 stuff by themselves. It would be better if we could make the this more transparent to user experience and do the magic behind the curtain. To achieve this we have to persistent the python3 flag somewhere. The config is one option while it affects global scope. The generated source file is a better one due to its natural file level scope. One feasible way is encode the python3 flag into the filename as below, just as what we did for question id and slug, e.g.
The |
@skygragon the filename way sounds like a workaround. thanks for reply. i still consider config way being better :). |
Signed-off-by: Eric Wang <[email protected]>
for shebang line, I think |
Signed-off-by: Eric Wang <[email protected]>
refs #55 #65 Signed-off-by: Eric Wang <[email protected]>
Now latest version is using embedded meta within file content, instead of file name. |
* move plugins' specific data into separate dirs. * now leetcode/lintcode have different cache Signed-off-by: Eric Wang <[email protected]> * Bump to 2.5.3 Signed-off-by: Eric Wang <[email protected]> * fixes skygragon#130: create home dir if necessary Signed-off-by: Eric Wang <[email protected]> * [refactor] extract into file utils Signed-off-by: Eric Wang <[email protected]> * Embed meta in comment instead of filename. refs skygragon#55 skygragon#65 Signed-off-by: Eric Wang <[email protected]> * Update dev dependecies. Signed-off-by: Eric Wang <[email protected]> * Update dependencies. Signed-off-by: Eric Wang <[email protected]> * Bump to 2.5.4 Signed-off-by: Eric Wang <[email protected]> * fixes skygragon#112: use "--" as comment in sql file Signed-off-by: Eric Wang <[email protected]> * [refactor] simplify template format. Signed-off-by: Eric Wang <[email protected]> * refs skygragon#121: support customized filename. Signed-off-by: Eric Wang <[email protected]> * [refactor] use file utils. Signed-off-by: Eric Wang <[email protected]> * fixes typo in filename. Signed-off-by: Eric Wang <[email protected]> * [pkg] add pkg config. Signed-off-by: Eric Wang <[email protected]> * [plugin] enable/disable wont touch plugins js. Signed-off-by: Eric Wang <[email protected]> * fixes plugin init order issue. Signed-off-by: Eric Wang <[email protected]> * [plugin] always enable builtin plugin by default. Signed-off-by: Eric Wang <[email protected]> * [pkg] add script for linux/macos * refs skygragon#133 Signed-off-by: Eric Wang <[email protected]> * fixes format in `list` Signed-off-by: Eric Wang <[email protected]> * fixes UT issues on windows. Signed-off-by: Eric Wang <[email protected]> * [travis] enable more platforms Signed-off-by: Eric Wang <[email protected]> * [pkg] refactor script for linux Signed-off-by: Eric Wang <[email protected]> * [pkg] add script for windows Signed-off-by: Eric Wang <[email protected]> * exit with error code if necessary Signed-off-by: Eric Wang <[email protected]> * [pkg] bail out if error occurs Signed-off-by: Eric Wang <[email protected]> * [pkg] build from travis Signed-off-by: Eric Wang <[email protected]> * Bump to 2.6.0 Signed-off-by: Eric Wang <[email protected]> * [pages] update docs. Signed-off-by: Eric Wang <[email protected]> * expose more code to plugins. * leetcode.cn/lintcode could reuse this. Signed-off-by: Eric Wang <[email protected]> * remove sprintf-js Signed-off-by: Eric Wang <[email protected]> * fixes UT bug. Signed-off-by: Eric Wang <[email protected]> * refs skygragon#134: remove whitespace on windows. Signed-off-by: Eric Wang <[email protected]> * Bump to 2.6.1 Signed-off-by: Eric Wang <[email protected]>
* fix: can't sign in by cookie on leetcode-cn site * Used const instead of let
Due to there's some syntax different between python2 and python3, I think we should have lang
python3
.The text was updated successfully, but these errors were encountered: