trace cmd line args

Discussion in 'Python' started by rusi, Dec 9, 2010.

  1. rusi

    rusi Guest

    I am unable to get trace to not trace system modules.

    I tried:
    $ python -m trace --listfuncs tt.py --ignore-module 'bdb' > tracefile
    $ python -m trace --listfuncs --ignore-dir /usr/lib/python2.6 tt.py >
    tracefile
    and many other combinations

    But anyhow my tracefile contains lines like this:


    filename: /usr/lib/python2.6/bdb.py, modulename: bdb, funcname:
    <module>
    filename: /usr/lib/python2.6/bdb.py, modulename: bdb, funcname: Bdb
    filename: /usr/lib/python2.6/bdb.py, modulename: bdb, funcname:
    BdbQuit
    filename: /usr/lib/python2.6/bdb.py, modulename: bdb, funcname:
    Breakpoint
    filename: /usr/lib/python2.6/bdb.py, modulename: bdb, funcname: Tdb
    filename: /usr/lib/python2.6/cmd.py, modulename: cmd, funcname:
    <module>
    filename: /usr/lib/python2.6/cmd.py, modulename: cmd, funcname: Cmd
    filename: /usr/lib/python2.6/collections.py, modulename: collections,
    funcname: <genexpr>
    filename: /usr/lib/python2.6/collections.py, modulename: collections,
    funcname: namedtuple
    filename: /usr/lib/python2.6/dis.py, modulename: dis, funcname:
    <module>
    filename: /usr/lib/python2.6/inspect.py, modulename: inspect,
    funcname: <module>
    filename: /usr/lib/python2.6/inspect.py, modulename: inspect,
    funcname: BlockFinder
    filename: /usr/lib/python2.6/inspect.py, modulename: inspect,
    funcname: EndOfBlock
    filename: /usr/lib/python2.6/opcode.py, modulename: opcode, funcname:
    <module>
    filename: /usr/lib/python2.6/opcode.py, modulename: opcode, funcname:
    def_op
    filename: /usr/lib/python2.6/opcode.py, modulename: opcode, funcname:
    jabs_op
    filename: /usr/lib/python2.6/opcode.py, modulename: opcode, funcname:
    jrel_op
    filename: /usr/lib/python2.6/opcode.py, modulename: opcode, funcname:
    name_op
    filename: /usr/lib/python2.6/pdb.py, modulename: pdb, funcname:
    <module>
    filename: /usr/lib/python2.6/pdb.py, modulename: pdb, funcname: Pdb
    filename: /usr/lib/python2.6/pdb.py, modulename: pdb, funcname:
    Restart
    filename: /usr/lib/python2.6/pprint.py, modulename: pprint, funcname:
    <module>
     
    rusi, Dec 9, 2010
    #1
    1. Advertising

  2. rusi

    Terry Reedy Guest

    On 12/9/2010 1:10 AM, rusi wrote:
    > I am unable to get trace to not trace system modules.


    Try it with 3.2b1, just released. Multiple bugs were fixed in trace.
    Some fixes might also be in recent 2.7.1 and 3.1.3. Not sure.

    --
    Terry Jan Reedy
     
    Terry Reedy, Dec 9, 2010
    #2
    1. Advertising

  3. rusi

    rusi Guest

    On Dec 9, 1:39 pm, Terry Reedy <> wrote:
    > On 12/9/2010 1:10 AM, rusi wrote:
    >
    > > I am unable to get trace to not trace system modules.

    >
    > Try it with 3.2b1, just released. Multiple bugs were fixed in trace.
    > Some fixes might also be in recent 2.7.1 and 3.1.3. Not sure.
    >
    > --
    > Terry Jan Reedy


    I am doing this to port a 2.x app to 3 which is giving me a hell of a
    time! :-;
     
    rusi, Dec 9, 2010
    #3
  4. rusi

    Terry Reedy Guest

    On 12/9/2010 7:12 AM, rusi wrote:
    > On Dec 9, 1:39 pm, Terry Reedy<> wrote:
    >> On 12/9/2010 1:10 AM, rusi wrote:
    >>
    >>> I am unable to get trace to not trace system modules.

    >>
    >> Try it with 3.2b1, just released. Multiple bugs were fixed in trace.
    >> Some fixes might also be in recent 2.7.1 and 3.1.3. Not sure.
    >>
    >> --
    >> Terry Jan Reedy

    >
    > I am doing this to port a 2.x app to 3 which is giving me a hell of a
    > time! :-;


    I would get it to run on 2.7 first, with out getting any
    DeprecationWarnings when they are turned on. They are off by default and
    I am not sure how to turn on but presume the warnings module doc says how.

    --
    Terry Jan Reedy
     
    Terry Reedy, Dec 9, 2010
    #4
  5. rusi

    rusi Guest

    On Dec 9, 9:03 pm, Terry Reedy <> wrote:
    > On 12/9/2010 7:12 AM, rusi wrote:
    >
    > > On Dec 9, 1:39 pm, Terry Reedy<>  wrote:
    > >> On 12/9/2010 1:10 AM, rusi wrote:

    >
    > >>> I am unable to get trace to not trace system modules.

    >
    > >> Try it with 3.2b1, just released. Multiple bugs were fixed in trace.
    > >> Some fixes might also be in recent 2.7.1 and 3.1.3. Not sure.

    >
    > >> --
    > >> Terry Jan Reedy

    >
    > > I am doing this to port a 2.x app to 3 which is giving me a hell of a
    > > time! :-;

    >
    > I would get it to run on 2.7 first, with out getting any
    > DeprecationWarnings when they are turned on. They are off by default and
    > I am not sure how to turn on but presume the warnings module doc says how..
    >
    > --
    > Terry Jan Reedy


    This is a bit of a headache...
    Am on debian unstable but no 2.7 in the repos so I'll have to compile
    it...
    Ok can do that but first I'd like to check that this trace 'bug' has
    been cleared
    Where do I look?
     
    rusi, Dec 9, 2010
    #5
  6. rusi

    rusi Guest

    On Dec 9, 10:37 pm, rusi <> wrote:
    > On Dec 9, 9:03 pm, Terry Reedy <> wrote:
    >
    >
    >
    > > On 12/9/2010 7:12 AM, rusi wrote:

    >
    > > > On Dec 9, 1:39 pm, Terry Reedy<>  wrote:
    > > >> On 12/9/2010 1:10 AM, rusi wrote:

    >
    > > >>> I am unable to get trace to not trace system modules.

    >
    > > >> Try it with 3.2b1, just released. Multiple bugs were fixed in trace.
    > > >> Some fixes might also be in recent 2.7.1 and 3.1.3. Not sure.

    >
    > > >> --
    > > >> Terry Jan Reedy

    >
    > > > I am doing this to port a 2.x app to 3 which is giving me a hell of a
    > > > time! :-;

    >
    > > I would get it to run on 2.7 first, with out getting any
    > > DeprecationWarnings when they are turned on. They are off by default and
    > > I am not sure how to turn on but presume the warnings module doc says how.

    >
    > > --
    > > Terry Jan Reedy

    >
    > This is a bit of a headache...
    > Am on debian unstable but no 2.7 in the repos so I'll have to compile
    > it...
    > Ok can do that but first I'd like to check that this trace 'bug' has
    > been cleared
    > Where do I look?


    Ok Ive got 2.7 from 'experimental' without any (apparent) glitches
     
    rusi, Dec 9, 2010
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paulo da Silva

    Parsing cmd line args problem

    Paulo da Silva, Apr 10, 2004, in forum: Python
    Replies:
    2
    Views:
    414
    Matt Gerrans
    Apr 10, 2004
  2. Achim Domma (Procoders)

    read input for cmd.Cmd from file

    Achim Domma (Procoders), Jun 3, 2005, in forum: Python
    Replies:
    2
    Views:
    8,111
    Peter Otten
    Jun 3, 2005
  3. r
    Replies:
    2
    Views:
    271
    Gabriel Genellina
    Aug 13, 2008
  4. rusi

    trace cmd line args in 2.7

    rusi, Dec 10, 2010, in forum: Python
    Replies:
    1
    Views:
    225
  5. Prabh
    Replies:
    2
    Views:
    172
    Bob Walton
    Jun 21, 2004
Loading...

Share This Page