Re: Leap year

2014-09-27 Thread Steven D'Aprano
Seymore4Head wrote: > Still practicing. Since this is listed as a Pseudocode, I assume this > is a good way to explain something. That means I can also assume my > logic is fading with age. > http://en.wikipedia.org/wiki/Leap_year#Algorithm > > Me trying to look at the algorithm, it would lead

please suggest me best way to learn REST API call with CLI

2014-09-27 Thread Unix SA
Hello, I am intermediate to python and i am familier with OOP, but sometime i lost some where looking at OOP in class and objects :( I am looking at https://github.com/pulp/pulp .. basically it uses okaara to generate CLI and calls API. so for example if i run "pulp-admin -u admin -p admi

Re: Storage Cost Calculation

2014-09-27 Thread Ian Kelly
On Sat, Sep 27, 2014 at 8:47 PM, Steven D'Aprano wrote: > http://www.theregister.co.uk/Print/2011/11/30/bbc_micro_model_b_30th_anniversary/ > > At the time, the BBC Micro memory was (I think) expandable: the Model B > could be upgraded to 128K of memory, double what Bill Gates allegedly said > was

Re: Storage Cost Calculation

2014-09-27 Thread Steven D'Aprano
Chris Angelico wrote: > On Sun, Sep 28, 2014 at 12:47 PM, Steven D'Aprano > wrote: [...] >> But no, you can't put the £100 difference down to the price of the RAM >> even if RAM were the only difference between the two model Micros. >> There's not enough information to tell how much of that £100

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 12:47 PM, Steven D'Aprano wrote: > Chris Angelico wrote: > >> The RAM was presumably the only difference between the two models, so >> as long as Model A cost at least £100 (which seems likely; a bit of >> quick Googling suggests that it may have been of the order of £400),

Re: Storage Cost Calculation

2014-09-27 Thread Steven D'Aprano
Chris Angelico wrote: > The RAM was presumably the only difference between the two models, so > as long as Model A cost at least £100 (which seems likely; a bit of > quick Googling suggests that it may have been of the order of £400), a > £100 difference can plausibly be called the price of the RA

Re: Python unittesting method call issue

2014-09-27 Thread Steven D'Aprano
Milson Munakami wrote: > I am trying to set the precondition for the test first prior to test other > test cases. But as you can see in my code the precondition print command > is not fired! Can you explain the cause and solution how to fire the code > with in that method i.e. SetPreConditionFirew

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 11:14 AM, Steven D'Aprano wrote: > MRAB wrote: > >> In 1981 the BBC Micro was released. There were 2 versions, model A with >> 16K and model B was 32K. The price difference was £100, so that's £100 >> for 16K of RAM. > > That doesn't follow. The model A might have been £1 (

Re: Storage Cost Calculation

2014-09-27 Thread Steven D'Aprano
MRAB wrote: > In 1981 the BBC Micro was released. There were 2 versions, model A with > 16K and model B was 32K. The price difference was £100, so that's £100 > for 16K of RAM. That doesn't follow. The model A might have been £1 (in which case you could get 16K for £1) or it might have been £1000

Re: Question about uninstallation.

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 11:07 AM, Gregory Johannes-Kinsbourg wrote: > Anyway, I’ve basically ended up installing both Python 2 & 3 (I’m on OS X > 10.10 btw) and first of all was curious to know if they will clash with each > when being used in terminal and how do i safely remove 3 (figure i’ll l

Question about uninstallation.

2014-09-27 Thread Gregory Johannes-Kinsbourg
Hello, This whole world of Python language is completely new to me (never programmed before in my life) - anyway sort of besides the point. Anyway, I’ve sort of been learning ‘all over the place’, that is to say that ill read something do it and then find out i should have done something else

Re: Python unittesting method call issue

2014-09-27 Thread Ian Kelly
On Sat, Sep 27, 2014 at 5:25 PM, Milson Munakami wrote: > I am trying to set the precondition for the test first prior to test other > test cases. But as you can see in my code the precondition print command is > not fired! Can you explain the cause and solution how to fire the code with > in t

Re: Python unittesting method call issue

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 9:25 AM, Milson Munakami wrote: > I am trying to set the precondition for the test first prior to test other > test cases. But as you can see in my code the precondition print command is > not fired! Can you explain the cause and solution how to fire the code with > in t

Python unittesting method call issue

2014-09-27 Thread Milson Munakami
I am trying to set the precondition for the test first prior to test other test cases. But as you can see in my code the precondition print command is not fired! Can you explain the cause and solution how to fire the code with in that method i.e. SetPreConditionFirewall() with setup variable sel

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 3:21 AM, Ian Kelly wrote: >> If you set your sights a bit lower, Google might be able to help. They >> pretty much have their own copy of the World Wide Web, indexed and >> cached. I've no idea how many dollars they annually spend on hard >> drives, but probably it uses SI

Re: Storage Cost Calculation

2014-09-27 Thread Ian Kelly
On Sat, Sep 27, 2014 at 11:12 AM, Chris Angelico wrote: > On Sun, Sep 28, 2014 at 3:01 AM, Seymore4Head > wrote: >> As a side note, it would be handy to compare HD cost to CD cost. >> I am still trying to get my own personal copy of the Internet. > > If you set your sights a bit lower, Google mig

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sun, Sep 28, 2014 at 3:01 AM, Seymore4Head wrote: > As a side note, it would be handy to compare HD cost to CD cost. > I am still trying to get my own personal copy of the Internet. If you set your sights a bit lower, Google might be able to help. They pretty much have their own copy of the Wo

Re: Storage Cost Calculation

2014-09-27 Thread Seymore4Head
On Fri, 26 Sep 2014 11:53:32 -0700, Abohfu venant zinkeng wrote: > > QUESTION > > - > > Could someone help me with a design and a python program to >implement that design to solve the above problem? As a side note, it would be handy to compare HD cost to CD cost. I am still trying to get m

Re: Storage Cost Calculation

2014-09-27 Thread MRAB
On 2014-09-27 15:30, Ian Kelly wrote: On Fri, Sep 26, 2014 at 12:53 PM, Abohfu venant zinkeng wrote: This site was written by a person (in 2009) who had considered this amazing trend. He collected a lot of data about hard drive capacity and price. The formula he extrapolated by using the data h

Re: Storage Cost Calculation

2014-09-27 Thread Ian Kelly
On Fri, Sep 26, 2014 at 12:53 PM, Abohfu venant zinkeng wrote: > This site was written by a person (in 2009) who had considered this amazing > trend. He collected a lot of data about hard drive capacity and price. The > formula he extrapolated by using the data he found is > > cost per gigabyte =

Re: Understanding co_lnotab

2014-09-27 Thread Skip Montanaro
On Sat, Sep 27, 2014 at 7:08 AM, Ned Batchelder wrote: > Just out of curiosity, what are you writing, it sounds interesting! :) Ned would say that. I think he has an unusual fondness for static code analysis tools. :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding co_lnotab

2014-09-27 Thread Ned Batchelder
On 9/26/14 7:13 AM, Shiyao Ma wrote: > When reading the notes on co_lnotab > > I totally got lost at this > line:https://hg.python.org/cpython/file/fd0c02c3df31/Objects/lnotab_notes.txt#l31 > > It says,"In case #b, there's no way to know > from looking at the table later how many were written."

Re: Storage Cost Calculation

2014-09-27 Thread Larry Martell
On Sat, Sep 27, 2014 at 7:18 AM, Chris Angelico wrote: > On Sat, Sep 27, 2014 at 9:14 PM, Skip Montanaro > wrote: > > On Sep 27, 2014 1:06 AM, "Chris Angelico" wrote: > >> > > > >> We are not going to do your homework for you. > > > > Perhaps it was a take home test... What then? :-) > > Then w

Re: Storage Cost Calculation

2014-09-27 Thread Larry Martell
On Sat, Sep 27, 2014 at 7:18 AM, Chris Angelico wrote: > On Sat, Sep 27, 2014 at 9:14 PM, Skip Montanaro > wrote: > > On Sep 27, 2014 1:06 AM, "Chris Angelico" wrote: > >> > > > >> We are not going to do your homework for you. > > > > Perhaps it was a take home test... What then? :-) > > Then w

Re: Storage Cost Calculation

2014-09-27 Thread Chris Angelico
On Sat, Sep 27, 2014 at 9:14 PM, Skip Montanaro wrote: > On Sep 27, 2014 1:06 AM, "Chris Angelico" wrote: >> > >> We are not going to do your homework for you. > > Perhaps it was a take home test... What then? :-) Then we are not going to do his take home test for you. I feel like I'm using a H

Re: Storage Cost Calculation

2014-09-27 Thread Skip Montanaro
On Sep 27, 2014 1:06 AM, "Chris Angelico" wrote: > > We are not going to do your homework for you. Perhaps it was a take home test... What then? :-) Skip -- https://mail.python.org/mailman/listinfo/python-list

ANN: python-ldap 2.4.17

2014-09-27 Thread Michael Ströder
Find a new release of python-ldap: http://pypi.python.org/pypi/python-ldap/2.4.17 python-ldap provides an object-oriented API to access LDAP directory servers from Python programs. It mainly wraps the OpenLDAP 2.x libs for that purpose. Additionally it contains modules for other LDAP-related st

Re:Leap year

2014-09-27 Thread Dave Angel
Seymore4Head Wrote in message: > Still practicing. Since this is listed as a Pseudocode, I assume this > is a good way to explain something. That means I can also assume my > logic is fading with age. > http://en.wikipedia.org/wiki/Leap_year#Algorithm > > > I didn't have any problem when I di

Re: tkinter and gtk problem

2014-09-27 Thread dieter
Paula Estrella writes: > Hello, we are working on ubuntu 12.04 LTS; we use gtk to take screenshots > and we added a simple interface to select a file using tkFileDialog but it > doesn't work; is it possible that tkinter and gtk are incompatible? a test > script to open a file with tkFileDialog wo