[Tutor] best Python Web-Development Applications framework.

2017-05-07 Thread Jojo Mwebaze
Dear All, I am trying to figure out the best Python Web-Development Applications framework. I trying to get started with building Web-Based Applications. Kindly give advise which one is the best for a novice user Cheers, Johnson ___ Tutor maillist -

[Tutor] pypy - CFG!

2011-06-03 Thread Jojo Mwebaze
Hi There, Anyone used pypy to create control flow graphs? I would like to request for any example. Regards Johnson ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Is it possible to tell, from which class an method was inherited from

2011-01-19 Thread Jojo Mwebaze
Thanks guys for the responses, inspect.classify_class_attrs(klass) does the magic Regards On Wed, Jan 19, 2011 at 3:58 PM, Peter Otten <__pete...@web.de> wrote: > Jojo Mwebaze wrote: > > > Is it possible to tell, from which class an method was inherited from. > &g

[Tutor] Is it possible to tell, from which class an method was inherited from

2011-01-19 Thread Jojo Mwebaze
Is it possible to tell, from which class an method was inherited from. take an example below class A: def foo(): pass class B(A): def boo(A): pass class C(B): def coo() pass class D(C): def doo() pass >>> dir (D) ['__doc__', '__module__', 'boo', 'coo', 'doo', 'foo

Re: [Tutor] making onthefly attributes persistent

2010-12-13 Thread Jojo Mwebaze
On Mon, Dec 13, 2010 at 8:44 PM, Alan Gauld wrote: > > "Jojo Mwebaze" wrote > > Assuming i have a class bank as below . >> >> class bank(object): >> def __init__(self, bal=0): >> self.bal = bal >> def deposit(self, amount): >>

[Tutor] making onthefly attributes persistent

2010-12-13 Thread Jojo Mwebaze
Hey Tutor Assuming i have a class bank as below . class bank(object): def __init__(self, bal=0): self.bal = bal def deposit(self, amount): self.bal+=amount print self.bal I define a method debit - which i add to the class onthefly def debit(self, amt): self.bal-=am

[Tutor] compare two souce files

2010-10-28 Thread Jojo Mwebaze
Hello Tutor I would like to compare two souce code files but ignoring doc strings, comments and space (and perharps in future statement by statement comparision) e.g class Foo def foo(): # prints my name return 'my name' class Boo def boo(): print 'my name' Want to check i

[Tutor] wrap methods for logging purposes

2010-10-07 Thread Jojo Mwebaze
I used a the recipe (http://aspn.activestate.com/ASPN/Coo.../Recipe/198078) used to wrap methods for logging purposes. logging classes. But it does seem to work well with classes inherit form other classes - i get recursion errors! H

Re: [Tutor] __import__()

2010-09-30 Thread Jojo Mwebaze
On Thu, Sep 23, 2010 at 5:26 PM, Pete wrote: > Hiya, > > still working on my plugin architecture. I figured out how to import > modules of which I don't know the name yet at compile time, > by using __import__() instead of import. > > So that works fine when I want to have the equivalent of > > i

Re: [Tutor] super.__init__() arguments

2010-09-27 Thread Jojo Mwebaze
Thanks Guys! Works perfect cheers On Mon, Sep 27, 2010 at 1:01 PM, Wayne Werner wrote: > In addition it only works for new style classes. > > -wayne > > On 9/27/10, Lie Ryan wrote: > > On 09/27/10 09:45, Jojo Mwebaze wrote: > >> Hey Tutor, > >> >

Re: [Tutor] super.__init__() arguments

2010-09-27 Thread Jojo Mwebaze
Thanks Guys! Works perfect cheers On Mon, Sep 27, 2010 at 1:01 PM, Wayne Werner wrote: > In addition it only works for new style classes. > > -wayne > > On 9/27/10, Lie Ryan wrote: > > On 09/27/10 09:45, Jojo Mwebaze wrote: > >> Hey Tutor, > >> >

[Tutor] super.__init__() arguments

2010-09-26 Thread Jojo Mwebaze
Hey Tutor, Seems a small issue but this has been playing for a while now, what am i doing wrong here? Take an Example Class Point: def __init__(self, x=0, y=0): self.x = x self.y = y Class Circle(Point): def __init__(self, radius=0, x=0, y=0): super().__init__(x, y)

Re: [Tutor] intercepting and recored I/O function calls

2010-09-21 Thread Jojo Mwebaze
6:47 PM, Alan Gauld wrote: > "Jojo Mwebaze" wrote > > My applogies to begin with, it seems i didnt state my problem clearly for >> this particular case - perharps I/O was not the best way to describe my >> problem. >> > > Hmmm, perhaps not! :-) >

Re: [Tutor] intercepting and recored I/O function calls

2010-09-17 Thread Jojo Mwebaze
Thanks Martin, for the detailed break down, it actually helped me solve one of my other problems.. My applogies to begin with, it seems i didnt state my problem clearly for this particular case - perharps I/O was not the best way to describe my problem. We have a system fully developed in python

Re: [Tutor] intercepting and recored I/O function calls

2010-09-16 Thread Jojo Mwebaze
On Wed, Sep 15, 2010 at 11:37 PM, Alan Gauld wrote: > > "Jojo Mwebaze" wrote > > > I would like to intercept and record I/O function calls to a file.. (later >> to a database) with probably the names of the files that have been >> created, >> accesse

[Tutor] intercepting and recored I/O function calls

2010-09-15 Thread Jojo Mwebaze
Hello Tutor I would like to intercept and record I/O function calls to a file.. (later to a database) with probably the names of the files that have been created, accessed / deleted in my program. I have not done something like this before.. Some Guidance is highly appreciated Johnson __

[Tutor] os.fork | queue

2010-04-01 Thread Jojo Mwebaze
I am trying to implement parallel processing with os.fork.. However i want to collect results from each process.. I thought i could use Queues, but i cant seem to get it work. Threading, can not work for me, because of the way some functions have been written - Below is a copy of what i had writte

Re: [Tutor] parsing pyc files

2010-03-23 Thread Jojo Mwebaze
made to the classes and probably store this information as part of the data. cheers Jojo On Tue, Mar 23, 2010 at 10:27 AM, Alan Gauld wrote: > > "Jojo Mwebaze" wrote > > > How is possible to trace the all method calls, object instantiations, >> variables used

[Tutor] parsing pyc files

2010-03-22 Thread Jojo Mwebaze
Hello Tutor I have two problems, any help will be highly appreciated. How is possible to trace the all method calls, object instantiations, variables used in running an experiment dynamically, without putting print - or log statements in my code? - some sort of provenance! I would like to crea

Re: [Tutor] List comprehension possible with condition statements?

2010-03-03 Thread Jojo Mwebaze
Thanks to everyone, nice ideas! cheers On Wed, Mar 3, 2010 at 10:02 AM, Christian Witts wrote: > Jojo Mwebaze wrote: > >> Hi There, >> >> i would like to implement the following in lists >> >> assuming >> >> x = 3 >> y = 4 >> z = None

[Tutor] List comprehension possible with condition statements?

2010-03-03 Thread Jojo Mwebaze
Hi There, i would like to implement the following in lists assuming x = 3 y = 4 z = None i want to create a dynamic list such that mylist = [ x , y, z ] , if z in not None if z is None then mylist = [x,y] Anyhelp! cheers Jojo ___ Tutor maillis

Re: [Tutor] generating coordinates between two pairs

2010-02-22 Thread Jojo Mwebaze
sorry guys, i found a solution, ignore the post cheers Johnson On Mon, Feb 22, 2010 at 4:57 PM, Jojo Mwebaze wrote: > Hello There, > > I got two pairs of coordinates say (4,5) and (7,9) from these two pairs i > would like to generate two lists > > [4, 4, 4, 4, 4,5, 5, 5

[Tutor] generating coordinates between two pairs

2010-02-22 Thread Jojo Mwebaze
Hello There, I got two pairs of coordinates say (4,5) and (7,9) from these two pairs i would like to generate two lists [4, 4, 4, 4, 4,5, 5, 5, 5, 5,6, 6, 6, 6, 6,7, 7, 7, 7, 7] and [5, 6, 7, 8, 9,5, 6, 7, 8, 9,5, 6, 7, 8, 9, 5, 6, 7, 8, 9] i am actually generating all co

Re: [Tutor] urllib

2009-12-07 Thread Jojo Mwebaze
thanks, Senthil On Mon, Dec 7, 2009 at 11:10 AM, Senthil Kumaran wrote: > On Mon, Dec 07, 2009 at 08:38:24AM +0100, Jojo Mwebaze wrote: > > I need help on something very small... > > > > i am using urllib to write a query and what i want returned is > 'FHI=128%2C12

[Tutor] urllib

2009-12-06 Thread Jojo Mwebaze
hello Tutor, I need help on something very small... i am using urllib to write a query and what i want returned is 'FHI=128%2C128&FLO=1%2C1' i have tried the statement below and i have failed to get the above.. x1,y1,x2,y2 = 1,1,128,128 query = urllib.urlencode({'FHI':'x2,y2,', 'FLO':'x1,y1'})

[Tutor] strings and replace

2009-09-16 Thread Jojo Mwebaze
Hello There Again Might be a silly question but it has played me for the last two days! I have a string 'mystring' (pasted below), what i want to do is to change the values of of NAXIS1 (=1024) and NAXIS2 (=2048) to some other values! say NAXIS1 = 999 and NAXIS2 = 888. These old values that i

Re: [Tutor] how to read and transmit/send only section of the image (sub-image)

2009-09-06 Thread Jojo Mwebaze
thanks a lot . cheers Johnson On Sun, Sep 6, 2009 at 4:23 PM, Kent Johnson wrote: > On Sat, Sep 5, 2009 at 10:52 AM, Jojo Mwebaze > wrote: > > oooh that will be helpful, kindly point me to how i can begin with > getting > > a sub-image that has the same width as the &g

Re: [Tutor] how to read and transmit/send only section of the image (sub-image)

2009-09-05 Thread Jojo Mwebaze
oooh that will be helpful, kindly point me to how i can begin with getting a sub-image that has the same width as the original. That will be my starting point. Regards Johnson On Fri, Sep 4, 2009 at 3:56 PM, Kent Johnson wrote: > On Thu, Sep 3, 2009 at 6:01 PM, Jojo Mwebaze >

Re: [Tutor] how to read and transmit/send only section of the image (sub-image)

2009-09-03 Thread Jojo Mwebaze
size, and sending only the data read (like wayne had suggested) Do you think this possible? Johnson On Thu, Sep 3, 2009 at 5:06 PM, Kent Johnson wrote: > On Thu, Sep 3, 2009 at 9:05 AM, Jojo Mwebaze > wrote: > > Hello Tutor > > > > I am writing Class to provide d

[Tutor] how to read and transmit/send only section of the image (sub-image)

2009-09-03 Thread Jojo Mwebaze
Hello Tutor I am writing Class to provide data transfer between the server and client processes based on simple HTTP GET/POST operations. However my interest is a sub-image (section of a full image). i am requesting help on how to read and transmit/send only section of the image (sub-image). i als

Re: [Tutor] Program Slicing / Trace

2009-06-18 Thread Jojo Mwebaze
, 2009 at 10:37 AM, Jojo Mwebaze wrote: > >> Hi Tutor >> >> The problem i have is to see which statements modify my data at execution >> time without referring to the code. Referring to the code is difficult esp >> because of branching. You can never tell before hand

[Tutor] Program Slicing / Trace

2009-06-18 Thread Jojo Mwebaze
Hi Tutor The problem i have is to see which statements modify my data at execution time without referring to the code. Referring to the code is difficult esp because of branching. You can never tell before hand which branch execution will follow. e.g in the example below, statements 1, 2, 5,7 and

[Tutor] Newton–Raphson's method

2009-02-16 Thread Jojo Mwebaze
Hello There Any body who has implemented Newton–Raphson's method for nonlinear systems of equations in python. Consider the case where we want to solve simultaneously f(x,y) = 0 g(x,y) = 0 Please assist with the code. Regards Jojo. ___ Tutor maillis

Re: [Tutor] Classes and Databases

2008-11-14 Thread Jojo Mwebaze
. Plus you need to write a basic version control > system on top of > the database anyway. > > I really think I must be missing something about your requirements? > > Alan G > > On Thu, Nov 13, 2008 at 7:18 PM, Alan Gauld <[EMAIL PROTECTED]>wrote: > >> &

Re: [Tutor] Classes and Databases

2008-11-13 Thread Jojo Mwebaze
Thanks Allan... we have used CVS for the base system.. but for users provided functions, we think for having them persistent in the database.. Cheers Johnson On Thu, Nov 13, 2008 at 7:18 PM, Alan Gauld <[EMAIL PROTECTED]>wrote: > > "Jojo Mwebaze" <[EMAIL PROTECTED]>

[Tutor] Classes and Databases

2008-11-13 Thread Jojo Mwebaze
Hello There, I would like store python classes in a database and then execute these classes from the database? Scientists do always want apply their own algorithms at the same time we want to keep this information. (knowing which class is responsible for which data) Because we have very many such