Pygolang Home Pygolang

    Pygolang FAQ

    • Last Update:2020-05-25
    • Version:001
    • Language:en


    Q: Which Go version is recommended?
    A: Pygolang does not depend on Go as it implements its runtime by itself.

    Q: How to install?
    A: pip install pygolang

    Q: How to run a simple Hello World?
    A: As Pygolang is just a Python library a "hello world" example is just print("hello world"). However below is "hello world" example that says "hello" and "world"  from two goroutines similarly to

    from golang import go
    from golang import time
    def say(s):
        for i in range(5):
            time.sleep(100 * time.millisecond)
    def main():
        go(say, "world")
    if __name__ == '__main__':