Re: passing multiple string to a command line option

2011-10-07 Thread Mahmood Naderan
Tebeka To: comp.lang.pyt...@googlegroups.com Cc: python mailing list ; Miki Tebeka ; Mahmood Naderan Sent: Friday, October 7, 2011 5:41 PM Subject: Re: passing multiple string to a command line option Seems like self.ptype is a type that has __init__ with no arguments (other than self). You

Re: passing multiple string to a command line option

2011-10-07 Thread Miki Tebeka
Seems like self.ptype is a type that has __init__ with no arguments (other than self). You can add "print type(self.ptype)" as first line of "convert" to see what type it is (or place a breakpoint there). -- http://mail.python.org/mailman/listinfo/python-list

Re: passing multiple string to a command line option

2011-10-06 Thread Mahmood Naderan
redecls(self, code):     self.ptype.swig_predecls(code)     def cxx_decl(self, code):     code('${{self.ptype.cxx_type}} ${{self.name}};') // Naderan *Mahmood; - Original Message - From: Miki Tebeka To: comp.lang.pyt...@googlegroups.com Cc: python mailing list ; Mahmood Na

Re: passing multiple string to a command line option

2011-10-06 Thread Miki Tebeka
As far as I see, the problem is not in the command line but in system.cpu[i].workload = process[i] call tree. Without seeing the code of SimObject and params I can't tell much more. -- http://mail.python.org/mailman/listinfo/python-list

Re: passing multiple string to a command line option

2011-10-06 Thread Terry Reedy
On 10/6/2011 11:27 AM, Mahmood Naderan wrote: Dear developers, Suppose I have this list in command line options: ... -b b1,b2,b3 Here is what I wrote: parser = optparse.OptionParser() If you are starting a new project, consider using argparse, which has superceded optparse. # Benchmark opt

passing multiple string to a command line option

2011-10-06 Thread Mahmood Naderan
Dear developers, Suppose I have this list in command line options: ... -b b1,b2,b3 Here is what I wrote: parser = optparse.OptionParser() # Benchmark options parser.add_option("-b", "--benchmark", default="", help="The benchmark to be loaded.") process = [] benchmarks = options.benchmark.split(',