Re: How can I debug silent failure - print no output

2016-05-28 Thread cs
On 28May2016 03:32, Sayth Renshaw wrote: On Saturday, 28 May 2016 19:44:53 UTC+10, Sayth Renshaw wrote: On Saturday, 28 May 2016 18:02:06 UTC+10, Sayth Renshaw wrote: > So how do i get argparse to read the file arguments correctly? > > Looking at the namespace it all gets pushed into path and

Re: How can I debug silent failure - print no output

2016-05-28 Thread Sayth Renshaw
On Saturday, 28 May 2016 19:44:53 UTC+10, Sayth Renshaw wrote: > On Saturday, 28 May 2016 18:02:06 UTC+10, Sayth Renshaw wrote: > > So how do i get argparse to read the file arguments correctly? > > > > Looking at the namespace it all gets pushed into path and extension remains > > empty. > >

Re: How can I debug silent failure - print no output

2016-05-28 Thread Sayth Renshaw
On Saturday, 28 May 2016 18:02:06 UTC+10, Sayth Renshaw wrote: > So how do i get argparse to read the file arguments correctly? > > Looking at the namespace it all gets pushed into path and extension remains > empty. > > [sayth@localhost pyXML]$ python3 racemeeting.py data/ *.xml > Namespace(ex

Re: How can I debug silent failure - print no output

2016-05-28 Thread Sayth Renshaw
So how do i get argparse to read the file arguments correctly? Looking at the namespace it all gets pushed into path and extension remains empty. [sayth@localhost pyXML]$ python3 racemeeting.py data/ *.xml Namespace(extension='', path=['data/', '*.xml']) This is the section I am running parser

Re: How can I debug silent failure - print no output

2016-05-28 Thread Sayth Renshaw
On Saturday, 28 May 2016 16:35:35 UTC+10, Sayth Renshaw wrote: > > > > > >Ok after printing a few things i have found an error. > > > > > >def GetArgs(): > > >'''parse XML from command line''' > > >parser = argparse.ArgumentParser() > > > > > >parser.add_argument("path", nargs="+") > >

Re: How can I debug silent failure - print no output

2016-05-27 Thread Sayth Renshaw
> > > >Ok after printing a few things i have found an error. > > > >def GetArgs(): > >'''parse XML from command line''' > >parser = argparse.ArgumentParser() > > > >parser.add_argument("path", nargs="+") > >parser.add_argument('-e', '--extension', default='', > >

Re: How can I debug silent failure - print no output

2016-05-27 Thread cs
On 27May2016 21:02, Sayth Renshaw wrote: On Saturday, 28 May 2016 13:06:59 UTC+10, Michael Torrie wrote: Add more print() calls. Offhand I'd say that pq(filename=filename) is returning an empty list so that for loop is not doing anything. Hence your debugging print() calls never happen. Add

Re: How can I debug silent failure - print no output

2016-05-27 Thread Sayth Renshaw
On Saturday, 28 May 2016 13:06:59 UTC+10, Michael Torrie wrote: > Add more print() calls. Offhand I'd say that pq(filename=filename) is > returning an empty list so that for loop is not doing anything. Hence > your debugging print() calls never happen. > > Add sanity print()'s earlier in your p

Re: How can I debug silent failure - print no output

2016-05-27 Thread Jason Friedman
> > def GetArgs(): > '''parse XML from command line''' > parser = argparse.ArgumentParser() > > parser.add_argument("path", nargs="+") > parser.add_argument('-e', '--extension', default='', > help='File extension to filter by.') > args = parser.parse_args

Re: How can I debug silent failure - print no output

2016-05-27 Thread Michael Torrie
On 05/27/2016 08:41 PM, Sayth Renshaw wrote: > This is my terminal and directory structure. Add more print() calls. Offhand I'd say that pq(filename=filename) is returning an empty list so that for loop is not doing anything. Hence your debugging print() calls never happen. Add sanity print()'s