How to generate 2KHz sound signal using pc soundcard continuously in python

I have to ask. Are you attempting to make a SODAR?

When I read https://wiki.python.org/moin/Audio/ I came away that this will be platform dependent so you should add tags for not only python but what OS and such you are targetting.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.