Python modules don't seem to be able to print() #350

Closed
opened 2026-10-05 04:14:53 +02:00 by adam · 3 comments
Owner

I'm very new to this codebase, so if this issue is clearly due to me then I apologize.

However, I can't seem to trigger any output to stdout or stderr with print() inside a simple python module. I can use PutModule to see some my output, so I'm certain the print statements are being called. I have tried starting znc with both --foreground and --debug independently, but I never see the output of my print statements. Can anyone else reproduce this?

I'm very new to this codebase, so if this issue is clearly due to me then I apologize. However, I can't seem to trigger any output to stdout or stderr with print() inside a simple python module. I can use PutModule to see some my output, so I'm certain the print statements are being called. I have tried starting znc with both `--foreground` and `--debug` independently, but I never see the output of my print statements. Can anyone else reproduce this? <!-- github-sync-id:36774459 -->
adam closed this issue 2026-10-05 04:14:53 +02:00
Author
Owner
import znc

class ptest(znc.Module):
    description = "A test module"

    def OnModCommand(self, cmd):
        print('hi')
[2014-06-30 21:39:28.082439] (qwe/default) CLI -> ZNC [PRIVMSG *ptest :lol]
hi

Btw, --debug implies --foreground, so --debug should be enough.

``` import znc class ptest(znc.Module): description = "A test module" def OnModCommand(self, cmd): print('hi') ``` ``` [2014-06-30 21:39:28.082439] (qwe/default) CLI -> ZNC [PRIVMSG *ptest :lol] hi ``` Btw, `--debug` implies `--foreground`, so `--debug` should be enough. <!-- github-comment-id:47584054 -->
Author
Owner

Thanks @DarthGandalf , this is clearly my issue. Do you know if you're running 1.4 or HEAD code?

Thanks @DarthGandalf , this is clearly my issue. Do you know if you're running 1.4 or HEAD code? <!-- github-comment-id:47607978 -->
Author
Owner

It works on both...

It works on both... <!-- github-comment-id:47716506 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#350