#[SOLVED] How to display text to the console?

1 messages · Page 1 of 1 (latest)

stoic ridge
#

Hi all

I'm learning Dagger using Python as SDK. I've implemented a very stupid function like the one below

@function
def version(self) -> str:
    """Show the version number"""
    return print("Version 1.0")

Running dagger call version works but didn't show the expected Version 1.0 text. To get it, I'm forced to run dagger call version -v.

Is this how it should works? In other words; how can I force the display of text to the console?

Thanks a lot

daring apex
#

@stoic ridge can you try return "Version 1.0" ?

stoic ridge
#

Damned, so simple. Not tried that syntax. Thanks Solomon and thank you for revolutionizing my daily life as a developer with Docker. I drink, eat and sleep Docker. Docker is a huge technological leap forward; love it so much.

#

[SOLVED] How to display text to the console?

daring apex
#

@stoic ridge let's see if we can make you even happier with Dagger 🙂 Thanks for joining us here