Python Forum
Avoid third party functions to wrote my python code into system debug-log?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Avoid third party functions to wrote my python code into system debug-log?
#2
If anything means for you guys: I have already tried to redirect print which i want to hide from stdout to file or string buffer, but it seems nothing works. Solution form here doesn't work.
https://stackoverflow.com/a/1218951/9157441

For example:
from cStringIO import StringIO # Python3 use: from io import StringIO
import sys
def startStream(myUrl):
    old_stdout = sys.stdout
    sys.stdout = mystdout = StringIO()
    from SomeFolder.SomeApp.SomeFile import PlayStream
    PlayStream(myUrl)
    
An again in system debug-log:
Output:
15:26:57.0339 { } /usr/lib/python2.7/site-packages/twisted/python/util.py:815 untilConcludes 2022-04-09 15:26:57+0200 [-] playing [b]4097:0:0:0:0:0:0:0:0:0:http%3a//blahblah.net%3a80/a/movie?action=stream&id=0005&hash=qwertzuiop:Eaux Profondes[/b] 15:26:57.0371 [ ] service/servicemp3.cpp:195 create_gstreamer_sinks [eServiceFactoryMP3] **** dvb_audiosink created *** 15:26:57.0389 [ ] service/servicemp3.cpp:204 create_gstreamer_sinks [eServiceFactoryMP3] **** dvb_videosink created *** 15:26:57.0404 [ ] service/servicemp3.cpp:213 create_gstreamer_sinks [eServiceFactoryMP3] **** dvb_subsink created *** 15:26:57.0404 [ ] service/servicemp3.cpp:233 play [eServiceFactoryMP3] ****new play service total services played is 1**** 15:26:57.0408 [ ] service/servicemp3.cpp:725 eServiceMP3 [eServiceMP3] playbin uri=[b]http://blahblah.com:80/a/movie?action=stream&id=0005&hash=qwertzuiop[/b] 15:26:57.0453 [ ] service/servicemp3.cpp:959 start [eServiceMP3] *** starting pipeline ****
Reply


Messages In This Thread
RE: Avoid third party functions to wrote my python code into system debug-log? - by mark - Apr-09-2022, 01:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Running 3rd party libs on Steam Deck (Arch Linux) with restricted access metulburr 0 1,990 Jan-07-2023, 10:41 PM
Last Post: metulburr
  pycharm debug help mg24 1 1,127 Nov-18-2022, 05:38 AM
Last Post: deanhystad
  Python debug suddenly got bad ben1122 3 1,187 Sep-03-2022, 06:20 AM
Last Post: ben1122
  How to use a function from third party library? rrowhe4d 2 1,941 Aug-31-2021, 04:30 PM
Last Post: Larz60+
Bug Help Debug please jamesaarr 12 4,028 Jul-28-2021, 11:20 PM
Last Post: Pedroski55
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,876 Jan-11-2021, 06:30 PM
Last Post: ykumar34
  Did interpreter 'compile' all import modules(from thrid-party) jamesyuan 10 4,562 Oct-19-2020, 10:49 AM
Last Post: jamesyuan
  Error in Int object is not subscript-able. How to debug this ? yanDvator 1 2,281 Aug-03-2020, 02:28 PM
Last Post: Larz60+
  installing third-party modules shabux 5 3,586 Apr-13-2020, 12:41 AM
Last Post: Larz60+
  How to avoid open and save a url every time I run code davidm 4 2,741 Mar-03-2020, 10:37 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020