howto? "def create_dir"
Dennis Lee Bieber
wlfraed at ix.netcom.com
Mon Dec 2 20:00:04 EST 2002
Michael fed this fish to the penguins on Monday 02 December 2002 11:25
am:
>
> class remote_copy(self,...):
What is "self" doing on the class definition line? Shouldn't it be on
each method line?
> def command_rcp...
> dest_dir = /some/where
I presume "/some/where" should be a string...
self.dest_dir = "/some/where"
>
> def name_resolve(...):
> part_name1 = foo
> part_name2 = bar
>
I'll also assume foo & bar are strings, though they could be the
arguments to the method.
self.part_name1 = "foo"
self.part_name2 = "bar"
> def create_dir(...):
> new_dir = dest_dir + "/" + "part_name1"
>
Odd, NOW you put quotes around what /is/ supposed to be a variable
self.new_dir = self.dest_dir + "/" + self.part_name1
#now you need the command to create a remote directory
#in whatever means you access across...
# os.mkdir(self.new_dir)
#for example
--
> ============================================================== <
> wlfraed at ix.netcom.com | Wulfraed Dennis Lee Bieber KD6MOG <
> wulfraed at dm.net | Bestiaria Support Staff <
> ============================================================== <
> Bestiaria Home Page: http://www.beastie.dm.net/ <
> Home Page: http://www.dm.net/~wulfraed/ <
More information about the Python-list
mailing list