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

Have convert_time return the result instead of printing it #43

Open
bbelderbos opened this issue Jan 17, 2023 · 1 comment
Open

Have convert_time return the result instead of printing it #43

bbelderbos opened this issue Jan 17, 2023 · 1 comment
Assignees

Comments

@bbelderbos
Copy link
Collaborator

https://github.com/PyBites-Open-Source/pybites-tools/blob/main/pybites_tools/worldclock.py

I think we should have convert_time return the result so we can use it in another module, then move the print to the if name == main block. I am hitting this issue where I want to use the function in another script (from pybites_tools.worldclock import convert_time)

@bbelderbos
Copy link
Collaborator Author

I ended up using this:

    output = []
    for zone in timezones:
        ...
        ...

        output.append((zone, formatted_time))

    return output

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

2 participants