Thanks for everyone that replied. I really gained a lot from all the
input. Also thanks to Dave and Prasad for explaining why i had errors
trying to run the program. I fully understand the code now and im able to
run it without errors.
___
Tutor maillist
Matthew Ngaha wrote:
[snip]
> @ DAVE.. you said
> sys is a module (presumably you have an import
> somewhere above this line). In the module, there's a list argv.
>
> the import statements are:
>
> import sys
> import os
> import shutil
> import zipfile
>
> so im guessing [sys, os, shutil, zipf
On 10/11/2012 04:48 PM, Matthew Ngaha wrote:
>>
>> Obviously a Monty Python fan as I see 3 methods :)
>>
> lol i dont know what i was looking at.. yes its 3 methods sorry:(
>
>
>>> def __init__(self):
>>> self.zipping_directory = "unzipped-{}".format(filename)
>>>
>> Where did filename appear
>
>
> Obviously a Monty Python fan as I see 3 methods :)
>
lol i dont know what i was looking at.. yes its 3 methods sorry:(
>
>> def __init__(self):
>> self.zipping_directory = "unzipped-{}".format(filename)
>>
>
> Where did filename appear from above?
>
>
>
sorry i didnt write everything.
Matthew Ngaha wrote:
i need help on 2 topics.
1) can someone please tell me what sys is doing, and why its using weird
indexing?
if __name__ == "__main__":
A_Class(*sys.argv[1:4]).A_Class_Method()
sys is doing nothing -- argv in sys holds the command line arguments
passed into python
On 11/10/2012 20:24, Matthew Ngaha wrote:
i need help on 2 topics.
1) can someone please tell me what sys is doing, and why its using weird
indexing?
sys isn't doing anything and the weird indexing is called slicing.
if __name__ == "__main__":
A_Class(*sys.argv[1:4]).A_Class_Method()
On 10/11/2012 03:24 PM, Matthew Ngaha wrote:
> i need help on 2 topics.
>
> 1) can someone please tell me what sys is doing, and why its using weird
> indexing?
>
> if __name__ == "__main__":
> A_Class(*sys.argv[1:4]).A_Class_Method()
sys isn't being indexed. sys is a module (presumably you h
Matthew Ngaha wrote:
> i need help on 2 topics.
>
> 1) can someone please tell me what sys is doing, and why its using weird
> indexing?
>
> if __name__ == "__main__":
> A_Class(*sys.argv[1:4]).A_Class_Method()
>
> is sys able to call methods? if so why does it need indexing if it uses * .
i need help on 2 topics.
1) can someone please tell me what sys is doing, and why its using weird
indexing?
if __name__ == "__main__":
A_Class(*sys.argv[1:4]).A_Class_Method()
is sys able to call methods? if so why does it need indexing if it uses * .
--