Re: mkdir

2006-07-18 Thread westymatt
thanks a ton -- http://mail.python.org/mailman/listinfo/python-list

Re: mkdir

2006-07-18 Thread Simon Brunning
On 18 Jul 2006 05:45:48 -0700, westymatt <[EMAIL PROTECTED]> wrote: > I have been looking around for a while, but I haven't seen many > examples of os.mkdir() > Anybody have any experience with it, is a since deprecated function? Example here - - but it reall

mkdir

2006-07-18 Thread westymatt
I have been looking around for a while, but I haven't seen many examples of os.mkdir() Anybody have any experience with it, is a since deprecated function? -- http://mail.python.org/mailman/listinfo/python-list

Re: noobie mkdir problem/question

2006-03-25 Thread Larry Bates
Except for the fact that I don't have any idea where "given" variable comes from. This works perfectly for me. It writes data into /xrefs/given.log perfectly. In the future you should cut/paste your code so we can see enough to help better. Here is my code with a few changes. import os import s

Re: noobie mkdir problem/question

2006-03-25 Thread [EMAIL PROTECTED]
First, what version of python are you using? 2.4.2 (and some previous versions) use file() instead of open(), although open may still work. also, if your code in the previous post is still using: outputFname = given + '.log' outputFile = open(os.path.join(xrefs,outputFname), 'w') I hope you have

Re: noobie mkdir problem/question

2006-03-25 Thread ProvoWallis
I understand that but I'm still puzzled. Is this the reason why I can't write files to this directory? The xrefs directory is created the way I expect it would be using mkdir but I can't seem to write to it. I thought that my results would be written to the xrefs directory here but

Re: noobie mkdir problem/question

2006-03-25 Thread [EMAIL PROTECTED]
if (os.path.isdir(xrefs) == 0): os.mkdir(xrefs) os.path.isdir(stuff) returns True or False -- http://mail.python.org/mailman/listinfo/python-list

noobie mkdir problem/question

2006-03-25 Thread ProvoWallis
Hi, I'm trying to write a script that will create a new directory and then write the results to this newly created directory but it doesn't seem to work for me and I don't know why. I'm hoping someone can see my mistake or at least point me in the right direction. I start like this capturing the

Re: Question regarding mkdir of ftputil

2006-02-13 Thread s99999999s2003
Problem solved. Used try and except method -- http://mail.python.org/mailman/listinfo/python-list

Question regarding mkdir of ftputil

2006-02-13 Thread s99999999s2003
hi i am currently using the FTP wrapper from http://cheeseshop.python.org/pypi/ftputil/2.0.3 The documentation states "In the current implementation, this doesn't construct "intermediate" directories which don't already exist". i would like to make directories at the remote server whenever the path

Re: batch mkdir using a file list

2005-09-23 Thread DataSmash
Awesome! That worked! Much thanks to Peter and all of you who took the time to answer my question. R.D. -- http://mail.python.org/mailman/listinfo/python-list

Re: batch mkdir using a file list

2005-09-23 Thread Peter Otten
DataSmash wrote: > I am using bash shell on windows and I'm getting the error: > TypeError: loop over non-sequence Use open(filename).readlines() instead of open(filename) or switch to a current Python version. > OR...if python can't handle this type of text file, > what do I need to do to remov

Re: batch mkdir using a file list

2005-09-23 Thread DataSmash
OR...if python can't handle this type of text file, what do I need to do to remove the "\n" from the file? -- http://mail.python.org/mailman/listinfo/python-list

Re: batch mkdir using a file list

2005-09-23 Thread DataSmash
I am using bash shell on windows and I'm getting the error: TypeError: loop over non-sequence Is there any way around not messing with the text file. I want to batch generate the text lists as well. Thanks! -- http://mail.python.org/mailman/listinfo/python-list

Re: batch mkdir using a file list

2005-09-23 Thread [EMAIL PROTECTED]
Jeremy Jones wrote: > DataSmash wrote: > > >Hello, > >I think I've tried everything now and can't figure out how to do it. > >I want to read in a text list from the current directory, > >and for each line in the list, make a system directory for that name. > > > >My text file would look something

Re: batch mkdir using a file list

2005-09-23 Thread Jeremy Jones
DataSmash wrote: >Hello, >I think I've tried everything now and can't figure out how to do it. >I want to read in a text list from the current directory, >and for each line in the list, make a system directory for that name. > >My text file would look something like this: >1144 >1145 >1146 >1147 >

Re: batch mkdir using a file list

2005-09-23 Thread Fredrik Lundh
DataSmash <[EMAIL PROTECTED]> wrote > I think I've tried everything now and can't figure out how to do it. > I want to read in a text list from the current directory, > and for each line in the list, make a system directory for that name. > > My text file would look something like this: > 1144 > 1

batch mkdir using a file list

2005-09-23 Thread DataSmash
Hello, I think I've tried everything now and can't figure out how to do it. I want to read in a text list from the current directory, and for each line in the list, make a system directory for that name. My text file would look something like this: 1144 1145 1146 1147 I simply want to create thes

Re: Noobie Question: Using strings and paths in mkdir (os.mkdir("/test/"a))

2005-04-22 Thread Simon Brunning
On 4/22/05, Roman Neuhauser <[EMAIL PROTECTED]> wrote: > > import os > > a = 'books' > > os.chdir( '/test') > > os.mkdir("/test/"a) > > > > the last line does not seem to work. os.mkdir(a) makes the directory > > books, but i want this directory as a subdirectory of test. > http://docs.python.

Re: Noobie Question: Using strings and paths in mkdir (os.mkdir("/test/"a))

2005-04-22 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-04-22 00:13:05 -0700: > Hello! > > I can't seem to get paths and variables working together: > > import os > a = 'books' > os.chdir( '/test') > os.mkdir("/test/"a) > > the last line does not seem to work. os.mkdir(a) makes the directory > books, but i want this direct

Noobie Question: Using strings and paths in mkdir (os.mkdir("/test/"a))

2005-04-22 Thread Shaun
Hello! I can't seem to get paths and variables working together: import os a = 'books' os.chdir( '/test') os.mkdir("/test/"a) the last line does not seem to work. os.mkdir(a) makes the directory books, but i want this directory as a subdirectory of test. I also tried: os.mkdir("/test/",a), and