Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: python file output to log file
Post: RE: python file output to log file

that was a nice work of my query however i have 2 more doubts on this, 1. will this msg arguments will pass all print output to logzip.py if we add this def(msg) ? 2. In print(msg, file=log_fd)gett...
Rsh General Coding Help 4 3,709 Aug-13-2019, 01:17 PM
    Thread: python file output to log file
Post: python file output to log file

>python logzip.py > /var/cron/logI need to capture of logzip.py output to /var/cron/log. Above shows how to do in linux pmpt. to achive this how to do in python ?
Rsh General Coding Help 4 3,709 Aug-12-2019, 04:15 PM
    Thread: zip file variable prints <zipfile.ZipFile object at 0x7f83fd13bd90> ?
Post: RE: zip file variable prints <zipfile.ZipFile obje...

Finally we got it ! however it prints full path of zip file am looking for zipfile name alone ! do we have any option in zipfile object ? Checking dir: /home/rsh/tibco_logs/emsn1_4222 /home/rsh/tibc...
Rsh General Coding Help 9 4,184 Jun-27-2019, 02:00 PM
    Thread: zip file variable prints <zipfile.ZipFile object at 0x7f83fd13bd90> ?
Post: RE: zip file variable prints <zipfile.ZipFile obje...

Hi Buran, tired print ZipFile.filename as shown below and got this below error zip_file_name = zipfile.ZipFile(n1_4222_log + '/' + log_file_name + ".zip", "w") print ZipFile.zip_file_name ...
Rsh General Coding Help 9 4,184 Jun-27-2019, 12:03 PM
    Thread: zip file variable prints <zipfile.ZipFile object at 0x7f83fd13bd90> ?
Post: RE: zip file variable prints <zipfile.ZipFile obje...

If so, i need zip file need to be printed. what shld code there ? If so, i need zip file name to be printed. what shld code there ?
Rsh General Coding Help 9 4,184 Jun-26-2019, 04:26 PM
    Thread: zip file variable prints <zipfile.ZipFile object at 0x7f83fd13bd90> ?
Post: RE: zip file variable prints <zipfile.ZipFile obje...

import os import zipfile n1_4222_log = '/home/rsh/tibco_logs/emsn1_4222' print('Checking dir: %s' % n1_4222_log) dir_files = os.listdir(n1_4222_log) archive_log = '/home/rsh/tibco_logs/emsn1_4222/a...
Rsh General Coding Help 9 4,184 Jun-26-2019, 02:40 PM
    Thread: zip file variable prints <zipfile.ZipFile object at 0x7f83fd13bd90> ?
Post: zip file variable prints <zipfile.ZipFile object a...

Below are few lines on zip log file python script. Getting output file name as different shown below, zip_file_name = zipfile.ZipFile(server1 + '/' + log_file_name + ".zip", "w") zip_file_na...
Rsh General Coding Help 9 4,184 Jun-24-2019, 05:32 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020