Hi,
I'm writing an LDAP plugin for my TG2 application. In this I wrote a small
class based decorator with args to set up a connection and call the necessary
functionality but I'm having problems with it. Here's my code:
class getConnection(object):
def __init__(self, settings, credentials)
Hi,
Using pkg_resources, I can iterate through the plugins in an entrypoint and
note down the plugin classes and all using
"pkg_resources.iter_entry_points(ENTRYPOINT)"
Now, when the plugin is loaded, I want to know it's entrypoint name as I have
to load a bunch of settings identified by the
Hi all,
Is it possible to call functions using getattr. I have written a simple script
with functions that call either SSL, TLS or plain functionality.
something like:
def func():
...
def funcSSL():
...
def funcTLS():
...
Now, based on my args I would like to call either one of them. I
Hi,
I was looking at the thread functionality of IMAP4rev1 servers with the
threading extension. Here is my output with debug=8 :
02:23.02 > GDJB3 UID THREAD references UTF-8 (SEEN)
02:23.02 < * THREAD (3)(2)(4)(1)
02:23.02 matched r'\* (?P[A-Z-]+)( (?P.*))?' => ('THREAD', '
(3)(2)
Hi,
I am taking a string as an input from the user and it should only contain the
chars:L , M or R
I tried the folllowing in kodos but they are still not perfect:
[^A-K,^N-Q,^S-Z,^0-9]
[L][M][R]
[LRM]?L?[LRM]? etc but they do not exactly meet what I need.
For eg: LRLRLRLRLM is ok but LRLRLRNL
Hi,
I'm using decos for the first time.I want to check the input and then call a
function in a class.
I'm pasting the code:
def check_input_sanity(self,rover_input):
'''Check the input from client'''
def _check(fn):
def _inner(rover_input):
if
ro
Hi,
I'm trying to create a rectangle when the user presses or releases the
mouse over a cairo object.I'm using the eventBox to capture the mouse
events.
Now the problem is the shapes is beng drawn when I call it from the
expose_event event handler and nothing happens when I call the same
from t
Hi,
I am designing a simple image cropper which simply takes an image and use PIL
to do the cropping.Now in order to do the cropping I simply draw a rectangle on
the image by dragging the mouse over the image.I then use button press and
button release events to find the mouse postition and send
Hi ,
I am trying to attach a cairo object into a vbox.I can pack a textbox with the
following code:
entry = gtk.Entry()
entry.set_max_length(50)
entry.connect("activate", self.enter_callback, entry)
entry.set_text("hello")
entry.insert_text(" world", len(entry.get_text()))
Hi,
I am using a gtk.filechooser dialog to open and save files.How do I add a
filter so that only images are filtered ?I did something like this:
def get_save_filename(self):
filename = None
chooser = gtk.FileChooserDialog("Save File...", self.window,
Hi,
I am writing a small script that changes my pidgin status to away when I lock
my screen.I'm using the DBUS API for pidgin and gnome-screensaver.Here's the
code:
#!/usr/bin/env python
import dbus, gobject
from dbus.mainloop.glib import DBusGMainLoop
dbus.mainloop.glib.DBusGMainLoop(set_as_
hello all,
I'm using the urllib module to fetch pages from the web.The returned response
is in the structure of a dictionary .For eg:
{"":"","label": [
]
,"torrents": [
["F0666BDCCBFD01A52535759C044485E2E1CCE3C3",136,"AAA",1250164864,651,646185088,606208,0,0,0,-1,"",0,0,0,0,33564,7,342884352],
[
Hello all,
I wrote a simple python script to send mail via smtp to my gmail acc.I can run
it as python /home/phil/Desktop/smtp.py but when I add the same to my crontab as
* * * * * /usr/bin/python2.5 /home/phil/Desktop/smtp.py
,it doesn't run.I checked the process by using top comman
Hello all,
I'm using the urllib module to fetch pages from the web.The returned response
is in the structure of a dictionary .For eg:
{"":"","label": [
]
,"torrents": [
["F0666BDCCBFD01A52535759C044485E2E1CCE3C3",136,"AAA",1250164864,651,646185088,606208,0,0,0,-1,"",0,0,0,0,33564,7,342884352],
[
I'm using tls lite to send mail using gmail's smtp.This is what I've done:
from tlslite.api import *
import tlslite.integration.SMTP_TLS
connection= tlslite.integration.SMTP_TLS.SMTP_TLS('smtp.gmail.com',587)
connection.set_debuglevel(1)
msg = "Subject:Testing \n Hello"
connection.starttls('[EMAIL
15 matches
Mail list logo