Categories:
-
3d 96 articles
-
animations 16 articles
-
architecture 47 articles
-
blender 98 articles
-
bédé 19 articles
-
techdrawing 24 articles
-
freecad 189 articles
-
gaming 1 articles
-
idsampa 8 articles
-
inthepress 8 articles
-
linux 57 articles
-
music 1 articles
-
nativeifc 30 articles
-
opensource 266 articles
-
orange 4 articles
-
photo 16 articles
-
projects 35 articles
-
receitas 176 articles
-
saopaulo 18 articles
-
sketches 163 articles
-
talks 25 articles
-
techdrawing 24 articles
-
textes 7 articles
-
trilhas 3 articles
-
urbanoids 1 articles
-
video 47 articles
-
webdesign 7 articles
-
works 151 articles
Archives:
-
2007 22 articles
-
2008 32 articles
-
2009 66 articles
-
2010 74 articles
-
2011 74 articles
-
2012 47 articles
-
2013 31 articles
-
2014 38 articles
-
2015 28 articles
-
2016 36 articles
-
2017 41 articles
-
2018 46 articles
-
2019 59 articles
-
2020 18 articles
-
2021 20 articles
-
2022 7 articles
-
2023 25 articles
-
2024 14 articles
A very simple email checker (works with imap accounts). Run it by setting it in your crontab to run hourly or something.
A very simple email checker (works with imap accounts). Run it by setting it in your crontab to run hourly or something.
passwords are bz2-encrypted (not very good security, but better than nothing. Anyway debian machines are highly secured ). Place the string generated by bz2.compress("password") instead of "encryptedpassword" below.
#!/usr/bin/pythonimport imaplib, pynotify, bz2check1 = Falsecheck2=Falsei1=imaplib.IMAP4_SSL("imap.myserver.net")i1.login("me@myserver.net",bz2.decompress("encryptedpassword1"))s1 = i1.status("INBOX","(UNSEEN)")n1 = s1[1][0].split()[-1].split(")")[0]i2=imaplib.IMAP4_SSL("imap.gmail.com")i2.login("me@gmail.com",bz2.decompress("encryptedpassword2"))s2 = i2.status("INBOX","(UNSEEN)")n2 = s2[1][0].split()[-1].split(")")[0]if (n1 != "0") or (n2 != "0"): pynotify.init("mail") t = "Unread mail" m = "" if n1 != "0": m += n1 + " messages on myserver/n" # change with a backslash if n2 != "0":
m += n2 + " messages on gmail/n" # change with a backslash n=pynotify.Notification(t,m) n.show()
Read next:
Try asking to the IFcOpenShell developers at http://sourceforge.net/p/ifcopenshell/discussion/:
Try asking to the IFcOpenShell developers at http://sourceforge.net/p/ifcopenshell/discussion/