Re: The best, friendly and easy use Python Editor.

2013-01-24 Thread Kayode Odeyemi
Simply use Netbeans On Thu, Jan 24, 2013 at 10:09 PM, llanitedave llanited...@veawb.coopwrote: On Thursday, January 24, 2013 7:54:55 AM UTC-8, rusi wrote: [I personally use emacs. It would be sadistic to make that into a recommendation] Lol! That's just too true. It's also true for

Re: Implementing Python-OAuth2

2011-10-11 Thread Kayode Odeyemi
On Thu, Oct 6, 2011 at 5:15 PM, Jeff Gaynor jgay...@ncsa.illinois.eduwrote: On 10/06/2011 08:34 AM, Kayode Odeyemi wrote: Hello friends, I'm working on a pretty large application that I will like to use oauth2 on as an authentication and authorization mechanism. I understand fairly

Re: unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto

2011-10-08 Thread Kayode Odeyemi
On Sat, Oct 8, 2011 at 12:50 AM, Terry Reedy tjre...@udel.edu wrote: That latter function probably want integers code in range(256). Yes! Non-unicode. The source reads: def _encrypt(self, m): # compute m**d (mod n) return pow(m, self.e, self.n) From the source, it is provided

Re: unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto

2011-10-08 Thread Kayode Odeyemi
On Sat, Oct 8, 2011 at 10:37 AM, Peter Otten __pete...@web.de wrote: Kayode Odeyemi wrote: On Sat, Oct 8, 2011 at 12:50 AM, Terry Reedy tjre...@udel.edu wrote: That latter function probably want integers code in range(256). Yes! Non-unicode. The source reads: def _encrypt(self

unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto

2011-10-07 Thread Kayode Odeyemi
Hello everyone, I'm writing a fairly large app which uses Oauth (python-oauth2). I am trying to generate a public/private key pair on user supplied parameters (whitespaced-delimited strings basically). When trying to encrypt the key, I'm getting the unsupported operand type(s) for pow():

Re: unsupported operand type(s) for pow(): 'unicode', 'long', 'long': Pycrypto

2011-10-07 Thread Kayode Odeyemi
On Fri, Oct 7, 2011 at 7:23 PM, Ian Kelly ian.g.ke...@gmail.com wrote: On Fri, Oct 7, 2011 at 11:16 AM, Kayode Odeyemi drey...@gmail.com wrote: Hello everyone, I'm writing a fairly large app which uses Oauth (python-oauth2). I am trying to generate a public/private key pair on user

Implementing Python-OAuth2

2011-10-06 Thread Kayode Odeyemi
Hello friends, I'm working on a pretty large application that I will like to use oauth2 on as an authentication and authorization mechanism. I understand fairly the technology and I have written my own implementation before I stumbled on python-oauth2. I need advise on leveraging python-oauth2

Why are my queues empty even though there are items in it?

2011-09-20 Thread Kayode Odeyemi
Hello friends, I'm writing some Python app that makes use of the multiprocessing and Queue api to perform transaction jobs. My problem is that, the queue always report empty even though I can confirm that there are items in it. Below is the code I'm working with: import multiprocessing from

Re: Dynamically Cause A Function To Return

2011-09-20 Thread Kayode Odeyemi
On Tue, Sep 20, 2011 at 12:13 AM, Jordan Evans mindwalkern...@gmail.comwrote: I want dynamically place the 'return' statement in a function via user input or achieve the same through some other means. If some other means, the user must be able initiate this at runtime during a raw_input().

Re: Dynamically Cause A Function To Return

2011-09-20 Thread Kayode Odeyemi
On Tue, Sep 20, 2011 at 12:13 AM, Jordan Evans mindwalkern...@gmail.comwrote: I want dynamically place the 'return' statement in a function via user input or achieve the same through some other means. If some other means, the user must be able initiate this at runtime during a raw_input().

Re: Why are my queues empty even though there are items in it?

2011-09-20 Thread Kayode Odeyemi
On Tue, Sep 20, 2011 at 7:42 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 20/09/2011 19:13, Kayode Odeyemi wrote: def transaction_queue(queue, item, timeout, block=False): queue = multiprocessing.Queue() This line creates a new empty queue, hiding the one which was passed

Getting a list value from key/value pair

2011-09-18 Thread Kayode Odeyemi
Hi all, If I have a list with key/value pair, how do I get the value of the key? I'm working with this code snippet: items = {'fees':[('status','pending'), ('timeout',60)], 'hostel':[('status', 'pending'), ('timeout','120')]} print [items[i] for i in items.keys()] [[('status', 'pending'),

Re: Getting a list value from key/value pair

2011-09-18 Thread Kayode Odeyemi
On Sun, Sep 18, 2011 at 11:22 AM, Vincent Vande Vyvre vincent.vandevy...@swing.be wrote: ** Le 18/09/11 11:39, Kayode Odeyemi a écrit : items = {'fees':[('status','pending'), ('timeout',60)], 'hostel':[('status', 'pending'), ('timeout','120')]} Like that: # -*- coding: utf-8

Re: Getting a list value from key/value pair

2011-09-18 Thread Kayode Odeyemi
On Sun, Sep 18, 2011 at 11:25 AM, Vincent Vande Vyvre vincent.vandevy...@swing.be wrote: ** Le 18/09/11 11:39, Kayode Odeyemi a écrit : Hi all, If I have a list with key/value pair, how do I get the value of the key? I'm working with this code snippet: items = {'fees':[('status

Re: Getting a list value from key/value pair

2011-09-18 Thread Kayode Odeyemi
On Sun, Sep 18, 2011 at 11:22 AM, Vincent Vande Vyvre vincent.vandevy...@swing.be wrote: ** Le 18/09/11 11:39, Kayode Odeyemi a écrit : items = {'fees':[('status','pending'), ('timeout',60)], 'hostel':[('status', 'pending'), ('timeout','120')]} Like that: # -*- coding: utf-8

Re: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Kayode Odeyemi
On Tue, Sep 13, 2011 at 5:46 PM, Prasad, Ramit ramit.pra...@jpmorgan.comwrote: You should be passed super the current class you want the super class of, not the type of the super class. So it should be: super(*B*, self).log('system') # Notice that it passed class B ** ** Ugh,

Re: Invoke a superclass method from a subclass constructor

2011-09-13 Thread Kayode Odeyemi
On Tue, Sep 13, 2011 at 8:31 PM, Dave Angel da...@ieee.org wrote: I suspect you're just confused by things the interactive session is printing out, which are not part of the language, and work a bit differently. You are right. This is where I missed it. The command interface requires a print

Invoke a superclass method from a subclass constructor

2011-09-11 Thread Kayode Odeyemi
Hello friends, An instance of my subclass doesn't invoke its superclass method, except when it is referenced directly. Here is what I mean: class A(object): ... def log(self, module): ... return str('logged') ... class B(A): ... def __init__(self, module): ...

Re: Invoke a superclass method from a subclass constructor

2011-09-11 Thread Kayode Odeyemi
On Sun, Sep 11, 2011 at 11:41 AM, Thomas Jollans t...@jollybox.de wrote: On 11/09/11 10:18, Kayode Odeyemi wrote: Hello friends, An instance of my subclass doesn't invoke its superclass method, except when it is referenced directly. Here is what I mean: class A(object

test if a subclass inherits a superclass method

2011-09-10 Thread Kayode Odeyemi
Hello, I'm testing Python's class abstractness and inheritance. Since interface doesn't exist, I will like to test how to have access to a superclass method from a subclass without necessary invoking or overriding the superclass method in its subclass. class Equipment(object): ... def

Re: test if a subclass inherits a superclass method

2011-09-10 Thread Kayode Odeyemi
On Sat, Sep 10, 2011 at 12:58 PM, Kayode Odeyemi drey...@gmail.com wrote: Hello, I'm testing Python's class abstractness and inheritance. Since interface doesn't exist, I will like to test how to have access to a superclass method from a subclass without necessary invoking or overriding

Re: How to structure packages

2011-09-09 Thread Kayode Odeyemi
You might want to have a look at this: http://www.ccs.neu.edu/home/matthias/htdc.html On Fri, Sep 9, 2011 at 2:37 AM, Chris Angelico ros...@gmail.com wrote: On Fri, Sep 9, 2011 at 10:45 AM, Nobody nob...@nowhere.com wrote: The Java compiler also acts as a make program. If it doesn't find a

Python marks an instance of my class undefined

2011-09-06 Thread Kayode Odeyemi
Is there anything I need to do to create an instance of a class? I have this simple code(The class is in a package core.fleet): class Fleet(object): def __init__(self): no-arg constructor def fleet_file_upload(self, filename, type=None): if type == 'user':

Re: Python marks an instance of my class undefined

2011-09-06 Thread Kayode Odeyemi
I was able to get this solved by calling class like this: from core.fleet import Fleet f = Fleet() Thanks to a thread from the list titled TypeError: 'module' object is not callable On Tue, Sep 6, 2011 at 2:02 PM, Kayode Odeyemi drey...@gmail.com wrote: Is there anything I need to do

Re: Python marks an instance of my class undefined

2011-09-06 Thread Kayode Odeyemi
On Tue, Sep 6, 2011 at 3:18 PM, Laszlo Nagy gand...@shopzeus.com wrote: On 2011-09-06 15:42, Kayode Odeyemi wrote: I was able to get this solved by calling class like this: from core.fleet import Fleet f = Fleet() Thanks to a thread from the list titled TypeError: 'module' object

Re: Mastering Python... Best Resources?

2011-08-26 Thread Kayode Odeyemi
On Fri, Aug 26, 2011 at 2:28 PM, Chris Angelico ros...@gmail.com wrote: On Fri, Aug 26, 2011 at 10:58 PM, Travis Parks jehugalea...@gmail.com wrote: I haven't gotten to the point where I can truly use the language features to my full advantage. I haven't seen enough tricks to be