How to suppress PyX warning messages when using Scapy to generate a PDF of a packet?












0















I am generating a PDF of a packet using Scapy's pdfdump method:



from scapy.layers.inet import ICMP, IP

packet = IP(dst="192.168.111.1") / ICMP()
packet.pdfdump("report.pdf")


When this code is executred, there are lots of messages printed out from the PyX library.



PyX executes tex with args ['--output-directory', '/tmp/pyx1ojf7_d9'] located at /usr/bin/tex
PyX filelocator found 10pt.lfs by method internal
PyX executes kpsewhich with args ['--format', 'vf', 'cmss10'] located at /usr/bin/kpsewhich
PyX filelocator failed to find cmss10 of type ('vf',) and extensions {'', '.vf'}
PyX executes kpsewhich with args ['--format', 'tfm', 'cmss10'] located at /usr/bin/kpsewhich
PyX filelocator found cmss10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmss10.tfm
PyX executes kpsewhich with args ['--format', 'vf', 'cmtt10'] located at /usr/bin/kpsewhich
PyX filelocator failed to find cmtt10 of type ('vf',) and extensions {'', '.vf'}
PyX executes kpsewhich with args ['--format', 'tfm', 'cmtt10'] located at /usr/bin/kpsewhich
PyX filelocator found cmtt10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmtt10.tfm
PyX executes kpsewhich with args ['--format', 'map', 'pdftex.map'] located at /usr/bin/kpsewhich
PyX filelocator found pdftex.map by method kpsewhich at /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map
PyX executes kpsewhich with args ['--format', 'type1 fonts', 'cmss10.pfb'] located at /usr/bin/kpsewhich
PyX filelocator found cmss10.pfb by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb
PyX executes kpsewhich with args ['--format', 'afm', 'cmss10'] located at /usr/bin/kpsewhich
PyX filelocator found cmss10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmss10.afm
PyX executes kpsewhich with args ['--format', 'type1 fonts', 'cmtt10.pfb'] located at /usr/bin/kpsewhich
PyX filelocator found cmtt10.pfb by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb
PyX executes kpsewhich with args ['--format', 'afm', 'cmtt10'] located at /usr/bin/kpsewhich
PyX filelocator found cmtt10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmtt10.afm


Is there a way to disable or suppress these messages so they are not printed out? The PyX manual doesn't have much on how to tune the verbosity of these messages.










share|improve this question





























    0















    I am generating a PDF of a packet using Scapy's pdfdump method:



    from scapy.layers.inet import ICMP, IP

    packet = IP(dst="192.168.111.1") / ICMP()
    packet.pdfdump("report.pdf")


    When this code is executred, there are lots of messages printed out from the PyX library.



    PyX executes tex with args ['--output-directory', '/tmp/pyx1ojf7_d9'] located at /usr/bin/tex
    PyX filelocator found 10pt.lfs by method internal
    PyX executes kpsewhich with args ['--format', 'vf', 'cmss10'] located at /usr/bin/kpsewhich
    PyX filelocator failed to find cmss10 of type ('vf',) and extensions {'', '.vf'}
    PyX executes kpsewhich with args ['--format', 'tfm', 'cmss10'] located at /usr/bin/kpsewhich
    PyX filelocator found cmss10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmss10.tfm
    PyX executes kpsewhich with args ['--format', 'vf', 'cmtt10'] located at /usr/bin/kpsewhich
    PyX filelocator failed to find cmtt10 of type ('vf',) and extensions {'', '.vf'}
    PyX executes kpsewhich with args ['--format', 'tfm', 'cmtt10'] located at /usr/bin/kpsewhich
    PyX filelocator found cmtt10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmtt10.tfm
    PyX executes kpsewhich with args ['--format', 'map', 'pdftex.map'] located at /usr/bin/kpsewhich
    PyX filelocator found pdftex.map by method kpsewhich at /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map
    PyX executes kpsewhich with args ['--format', 'type1 fonts', 'cmss10.pfb'] located at /usr/bin/kpsewhich
    PyX filelocator found cmss10.pfb by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb
    PyX executes kpsewhich with args ['--format', 'afm', 'cmss10'] located at /usr/bin/kpsewhich
    PyX filelocator found cmss10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmss10.afm
    PyX executes kpsewhich with args ['--format', 'type1 fonts', 'cmtt10.pfb'] located at /usr/bin/kpsewhich
    PyX filelocator found cmtt10.pfb by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb
    PyX executes kpsewhich with args ['--format', 'afm', 'cmtt10'] located at /usr/bin/kpsewhich
    PyX filelocator found cmtt10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmtt10.afm


    Is there a way to disable or suppress these messages so they are not printed out? The PyX manual doesn't have much on how to tune the verbosity of these messages.










    share|improve this question



























      0












      0








      0








      I am generating a PDF of a packet using Scapy's pdfdump method:



      from scapy.layers.inet import ICMP, IP

      packet = IP(dst="192.168.111.1") / ICMP()
      packet.pdfdump("report.pdf")


      When this code is executred, there are lots of messages printed out from the PyX library.



      PyX executes tex with args ['--output-directory', '/tmp/pyx1ojf7_d9'] located at /usr/bin/tex
      PyX filelocator found 10pt.lfs by method internal
      PyX executes kpsewhich with args ['--format', 'vf', 'cmss10'] located at /usr/bin/kpsewhich
      PyX filelocator failed to find cmss10 of type ('vf',) and extensions {'', '.vf'}
      PyX executes kpsewhich with args ['--format', 'tfm', 'cmss10'] located at /usr/bin/kpsewhich
      PyX filelocator found cmss10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmss10.tfm
      PyX executes kpsewhich with args ['--format', 'vf', 'cmtt10'] located at /usr/bin/kpsewhich
      PyX filelocator failed to find cmtt10 of type ('vf',) and extensions {'', '.vf'}
      PyX executes kpsewhich with args ['--format', 'tfm', 'cmtt10'] located at /usr/bin/kpsewhich
      PyX filelocator found cmtt10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmtt10.tfm
      PyX executes kpsewhich with args ['--format', 'map', 'pdftex.map'] located at /usr/bin/kpsewhich
      PyX filelocator found pdftex.map by method kpsewhich at /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map
      PyX executes kpsewhich with args ['--format', 'type1 fonts', 'cmss10.pfb'] located at /usr/bin/kpsewhich
      PyX filelocator found cmss10.pfb by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb
      PyX executes kpsewhich with args ['--format', 'afm', 'cmss10'] located at /usr/bin/kpsewhich
      PyX filelocator found cmss10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmss10.afm
      PyX executes kpsewhich with args ['--format', 'type1 fonts', 'cmtt10.pfb'] located at /usr/bin/kpsewhich
      PyX filelocator found cmtt10.pfb by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb
      PyX executes kpsewhich with args ['--format', 'afm', 'cmtt10'] located at /usr/bin/kpsewhich
      PyX filelocator found cmtt10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmtt10.afm


      Is there a way to disable or suppress these messages so they are not printed out? The PyX manual doesn't have much on how to tune the verbosity of these messages.










      share|improve this question
















      I am generating a PDF of a packet using Scapy's pdfdump method:



      from scapy.layers.inet import ICMP, IP

      packet = IP(dst="192.168.111.1") / ICMP()
      packet.pdfdump("report.pdf")


      When this code is executred, there are lots of messages printed out from the PyX library.



      PyX executes tex with args ['--output-directory', '/tmp/pyx1ojf7_d9'] located at /usr/bin/tex
      PyX filelocator found 10pt.lfs by method internal
      PyX executes kpsewhich with args ['--format', 'vf', 'cmss10'] located at /usr/bin/kpsewhich
      PyX filelocator failed to find cmss10 of type ('vf',) and extensions {'', '.vf'}
      PyX executes kpsewhich with args ['--format', 'tfm', 'cmss10'] located at /usr/bin/kpsewhich
      PyX filelocator found cmss10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmss10.tfm
      PyX executes kpsewhich with args ['--format', 'vf', 'cmtt10'] located at /usr/bin/kpsewhich
      PyX filelocator failed to find cmtt10 of type ('vf',) and extensions {'', '.vf'}
      PyX executes kpsewhich with args ['--format', 'tfm', 'cmtt10'] located at /usr/bin/kpsewhich
      PyX filelocator found cmtt10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/tfm/public/cm/cmtt10.tfm
      PyX executes kpsewhich with args ['--format', 'map', 'pdftex.map'] located at /usr/bin/kpsewhich
      PyX filelocator found pdftex.map by method kpsewhich at /var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map
      PyX executes kpsewhich with args ['--format', 'type1 fonts', 'cmss10.pfb'] located at /usr/bin/kpsewhich
      PyX filelocator found cmss10.pfb by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb
      PyX executes kpsewhich with args ['--format', 'afm', 'cmss10'] located at /usr/bin/kpsewhich
      PyX filelocator found cmss10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmss10.afm
      PyX executes kpsewhich with args ['--format', 'type1 fonts', 'cmtt10.pfb'] located at /usr/bin/kpsewhich
      PyX filelocator found cmtt10.pfb by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb
      PyX executes kpsewhich with args ['--format', 'afm', 'cmtt10'] located at /usr/bin/kpsewhich
      PyX filelocator found cmtt10 by method kpsewhich at /usr/share/texlive/texmf-dist/fonts/afm/public/amsfonts/cm/cmtt10.afm


      Is there a way to disable or suppress these messages so they are not printed out? The PyX manual doesn't have much on how to tune the verbosity of these messages.







      python python-3.x pdf scapy pyx






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 15 '18 at 20:01







      jfleach

















      asked Nov 15 '18 at 18:55









      jfleachjfleach

      1821215




      1821215
























          1 Answer
          1






          active

          oldest

          votes


















          1














          This output is created using the standard python logging framework at the logging level logging.INFO. Such logging output is silenced by default, as the default is logging.WARNING (IIRC). Anyway, just adjust your logging level to prevent the notice from bugging you. Also, you may have a look at the pyxinfo call, which is the solution provided by PyX to enable this output. (Maybe this is called somewhere by the library you're using, and you want to disable that.) Note, that this behavior of PyX is also documented at http://pyx.sourceforge.net/manual/text.html#debugging






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53326185%2fhow-to-suppress-pyx-warning-messages-when-using-scapy-to-generate-a-pdf-of-a-pac%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            This output is created using the standard python logging framework at the logging level logging.INFO. Such logging output is silenced by default, as the default is logging.WARNING (IIRC). Anyway, just adjust your logging level to prevent the notice from bugging you. Also, you may have a look at the pyxinfo call, which is the solution provided by PyX to enable this output. (Maybe this is called somewhere by the library you're using, and you want to disable that.) Note, that this behavior of PyX is also documented at http://pyx.sourceforge.net/manual/text.html#debugging






            share|improve this answer




























              1














              This output is created using the standard python logging framework at the logging level logging.INFO. Such logging output is silenced by default, as the default is logging.WARNING (IIRC). Anyway, just adjust your logging level to prevent the notice from bugging you. Also, you may have a look at the pyxinfo call, which is the solution provided by PyX to enable this output. (Maybe this is called somewhere by the library you're using, and you want to disable that.) Note, that this behavior of PyX is also documented at http://pyx.sourceforge.net/manual/text.html#debugging






              share|improve this answer


























                1












                1








                1







                This output is created using the standard python logging framework at the logging level logging.INFO. Such logging output is silenced by default, as the default is logging.WARNING (IIRC). Anyway, just adjust your logging level to prevent the notice from bugging you. Also, you may have a look at the pyxinfo call, which is the solution provided by PyX to enable this output. (Maybe this is called somewhere by the library you're using, and you want to disable that.) Note, that this behavior of PyX is also documented at http://pyx.sourceforge.net/manual/text.html#debugging






                share|improve this answer













                This output is created using the standard python logging framework at the logging level logging.INFO. Such logging output is silenced by default, as the default is logging.WARNING (IIRC). Anyway, just adjust your logging level to prevent the notice from bugging you. Also, you may have a look at the pyxinfo call, which is the solution provided by PyX to enable this output. (Maybe this is called somewhere by the library you're using, and you want to disable that.) Note, that this behavior of PyX is also documented at http://pyx.sourceforge.net/manual/text.html#debugging







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 16 '18 at 8:29









                wobstawobsta

                45135




                45135
































                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53326185%2fhow-to-suppress-pyx-warning-messages-when-using-scapy-to-generate-a-pdf-of-a-pac%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Xamarin.iOS Cant Deploy on Iphone

                    Glorious Revolution

                    Dulmage-Mendelsohn matrix decomposition in Python