Skip to content
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

pytago local cli run error #22

Open
ethan-well opened this issue Jan 12, 2023 · 3 comments
Open

pytago local cli run error #22

ethan-well opened this issue Jan 12, 2023 · 3 comments

Comments

@ethan-well
Copy link

ethan-well commented Jan 12, 2023

Describe the bug
When I use pytago on window 10 to translate hello.py to main.go. the result of main.go is unexpted, what‘s wrong when I do this?

  • System: window 10

  • Python version: 3.10.0

  • Python source code: hello.py:

# For best results, keep your code inside functions
def main():
  print("Hello world!")

if __name__ == '__main__':
  main()
  • comand excuted: pytago -o main.go hello.py

  • result got: main.go

// # command-line-arguments
// C:\Users\ADMINI~1\AppData\Local\Temp\tmp257ukgv_.go:11:177: syntax error: unexpected <, expecting expression
// C:\Users\ADMINI~1\AppData\Local\Temp\tmp257ukgv_.go:11:192: more than one character in rune literal
// warning: -s is deprecated as it is always enabled
  • result expected:
package main

import "fmt"

func main() {
	fmt.Println("Hello world!")
}
@johngebbie
Copy link

On Linux I get:

// # command-line-arguments
// /tmp/tmpz3l0lnvh.go:11:177: syntax error: unexpected <, expected expression
// /tmp/tmpz3l0lnvh.go:11:192: more than one character in rune literal
// warning: -s is deprecated as it is always enabled

@johngebbie
Copy link

I think it's to do with gofumpt as gofumpt -s prints warning: -s is deprecated as it is always enabled.

@yingshaoxo
Copy link
Contributor

yingshaoxo commented Apr 24, 2023

Same error here.

And I'm using Ubuntu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants