Relative Content

Tag Archive for pythoncsv

cmp() function in filecmp fails in linux environment

I have a test case which runs in both Windows and Linux environment. Textcase compares actual and generated csv file. Testcase passes if both files are equal otherwise fails. Testcase fails only in linux and passes in Windows.

GDG for Python programming

We are migrating everything from Shell Scripting with C-Programming into Python. However, the job scripts are using GDG for renaming and keep files generations for the input files that are being sent via SFTP (i.e. SFTP file comes as “file_<client_name>_.csv” and gdg renames it as “<job_name>.csv.0001″, then <job_name>.csv.0002″, <job_name>.csv.0003″, <job_name>.csv.0004″, <job_name>.csv.0005″ …. from there when <job_name>.csv.0006″ is generated, <job_name>.csv.0001” is deleted, and so on):

df.to_csv in Python stops saving file after some time in a continuous for loop but the for loop is working fine?

The title. I am iterating through a very large csv file using Selenium and I want to append the results to a different csv file and I am using df.to_csv to do so. It works fine for some time but once I start to do something else and leave my Python program in the background, the csv file stops saving. The for loop keeps running though and I am assuming it is doing its job. When I go back to the python code, and just hover for a second or two, the csv file starts saving again.