Creating a directory structure and modifying files automatically in Python

2012-04-30 Thread deltaquattro
Hi, I would like to automate the following task under Linux. I need to create a set of directories such as 075 095 100 125 The directory names may be read from a text file foobar, which also contains a number corresponding to each dir, like this: 075 1.818 095 2.181 100 2.579 125 3.019 In

Create directories and modify files with Python

2012-04-30 Thread deltaquattro
Hi, I would like to automate some simple tasks I'm doing by hand. Given a text file foobar.fo: 073 1.819 085 2.132 100 2.456 115 2.789 I need to create the directories 073, 085, 100, 115, and copy in each directory a modified version of the text file input.in: . . . foo = 1.5 ! edit this

Re: Create directories and modify files with Python

2012-05-01 Thread deltaquattro
Il giorno martedì 1 maggio 2012 01:57:12 UTC+2, Irmen de Jong ha scritto: Hi, 0 I would like to automate some simple tasks I'm doing by hand. Given a text file foobar.fo: [...] At first, I tried to write a bash script to do this. However, when and if the script will work, I'll

Re: Create directories and modify files with Python

2012-05-03 Thread deltaquattro
I'm leaving the thread because I cannot read any posts, apart from Irmen's. Anyway, I would like to publicly thank all who contributed, in particular rurpy who solved my problem (and kindly sent me a personal email, so that I could see his/her post :) Best Regards Sergio Rossi --