Ask your own question, for FREE!
Computer Science 8 Online
OpenStudy (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

OpenStudy (anonymous):

str user_input = raw_input("USER ENTRY") opener(user_input) if user_input == true: "USER STATEMENT"

OpenStudy (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. :-(

OpenStudy (anonymous):

Do you need to reinvent this wheel for a programming class? If not, just use sed and be done with it.

OpenStudy (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.

OpenStudy (anonymous):

Hope the message I sent helps... :)

OpenStudy (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?

OpenStudy (anonymous):

wow, automatic linking, I like it... and best of luck with your project

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!