Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Python (http://www.programmingforums.org/forum43.html)
-   -   My ex g/f has prying eyes, and likes to read my chat logs, So.... (http://www.programmingforums.org/showthread.php?t=4611)

SaturN Jun 26th, 2005 8:18 AM

My ex g/f has prying eyes, and likes to read my chat logs, So....
 
hehe, my girlfriend is obsessed, and likes to read all my msn chat logs, and it's hard to find the time to delete them without her watching.. So I thought i would let something else do my dirty work, and stop her watching me, so they all get removed in double click time!!!
Ain't sure if this would help anyone else, I think it's just me with the physco!!!
:

import os
path = "WHERE YOUR CHAT LOGS ARE STORED END WITH \\"
rem = []
for file in os.listdir(path):
        if file.endswith(".xml"): #My chat logs are xml files, if your's are different 
                                                                          #change the ending ending here
                try:
                        rem = []
                        rem.append(path)
                        rem.append(file)
                        rem = "".join(rem)
                        os.remove(rem)
                except:
                        IOError


hope some one is in need for it as much as me!!! LOL

stevengs Jun 26th, 2005 9:20 AM

Quote:

Originally Posted by SaturN
...just me with the physco!!!...

do you have something to hide from your fizz-co ( haha )? Busy chatting up other fizz-cos online with yours peeking over you shoulder?

I am the fizz-co in my relationship.. so send this file to my wife ;)

tempest Jun 26th, 2005 9:37 AM

Why is your ex-gf able to get to your computer to see your chat logs?

Ooble Jun 26th, 2005 10:00 AM

Why not just not save the logs?

Cerulean Jun 26th, 2005 11:19 AM

I'm curious as to your method of string concatenation. What inspired the concatenation via a list?
The best way to concatenate string representations of paths is via os.path.join. The function is kind enough to decide whether or not it needs to add a slash in the joined string, so os.path.join("/home/foo", "file.txt") and os.path.join("/home/foo/", "file.txt") both give you "/home/foo/file.txt".

SaturN Jun 26th, 2005 11:51 AM

Hmm, i've never seen that before!! Thanks for that, :$ :(


All times are GMT -5. The time now is 6:29 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC