anonymous
  • anonymous
Python help: Hey mates, I was trying to write a script to copy a bunch of data of the form "column\tcolumn" from one file to another one of the form "{column,column},", but my program keeps crashing saying it can't open the file. I know the code isn't precisely clean or good, but I just coded it up fast, so I am sorry for that. Any tips on where am I going wrong? http://codepad.org/ycm5eEkB
Computer Science
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
chestercat
  • chestercat
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
str user_input = raw_input("USER ENTRY") opener(user_input) if user_input == true: "USER STATEMENT"
anonymous
  • anonymous
Thanks for the answer. I cleaned up a bit: http://codepad.org/72CFZJQ6 but the program can't open the file for read. It was working before, and all I modified was the dFile.write() method call inside CopyToTxt(), because of a different string pattern. I don't really get it. :-(
anonymous
  • anonymous
Do you need to reinvent this wheel for a programming class? If not, just use sed and be done with it.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
Sed is Linux-based command, I am using a Windows-based system, as my data is stored on the University's lab. But hey, thanks for the tip, will look into code that's similar to sed but written in Python.
anonymous
  • anonymous
Hope the message I sent helps... :)
anonymous
  • anonymous
A text file is a text file... How do you get anything done without sed or awk or grep or ... ? But for those of you who like to handicap yourself for no good reason: http://gnuwin32.sourceforge.net/packages/sed.htm http://gnuwin32.sourceforge.net/packages/gawk.htm http://wingrep.com I guess you have never used a real operating system before. I was happy with my 3600 baud modem back when I was in school. The T1 is so much better, I will never go back. The best thing I ever did was get mad one day and reformat every computer I owned to get rid of everything Microsoft. That was over ten years ago. But that's just me, I guess. Anyway, and any help would be appreciated here: How do you hotlink on this site?
anonymous
  • anonymous
wow, automatic linking, I like it... and best of luck with your project

Looking for something else?

Not the answer you are looking for? Search for more explanations.