It seems like that python was already installed in your computer. Please check .
On 11 January 2016 at 14:45, Sean Melville wrote:
> I don't believe it's xp, it's a new laptop
>
>
>
>> On 11 Jan 2016, at 20:33, Cameron Simpson wrote:
>>
>>> On 11Jan2016 19:17, Sean Melville wrote:
>>> I've down
Create a class called BankAccount
Create a constructor that takes in an integer and assigns this to a `balance`
property.
Create a method called `deposit` that takes in cash deposit amount and updates
the balance accordingly.
Create a method called `withdraw` that takes in cash withdrawal amount
On 12/01/16 07:13, Cameron Simpson wrote:
On 11Jan2016 23:55, Erik wrote:
Is it complaining about that, or is it because the 'for' loop body
might be executed zero times?
The former. Almost any loop _might_ be executed zero times. Compilers
and linters etc should only complain if they can pro
On Friday, January 8, 2016 at 6:16:49 PM UTC+1, geral...@gmail.com wrote:
> On Friday, 8 January 2016 17:38:11 UTC+1, acushl...@gmail.com wrote:
> > On Wednesday, 30 December 2015 19:21:32 UTC+1, Won Chang wrote:
> > > i have these task which i believe i have done well to some level
> > >
> > >
I can't download Python and I need it for class. Any suggestions?
Ingram Jansen
Banner ID: 830742998
--
https://mail.python.org/mailman/listinfo/python-list
Rick Johnson :
> they have these new inventions now called "blogs", maybe you should
> sign up for one?
"Sign up for a blog?" What does that mean?
Is it like creating a computer program or starting a company: you sign
up for one?
Anyway, why not use Usenet what it is meant for: discussions.
M
On 1/11/2016 8:09 PM, Chris Angelico wrote:
On Tue, Jan 12, 2016 at 11:55 AM, Bernardo Sulzbach
wrote:
On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico wrote:
Next IDLE feature request: Can you make it so that, across all
platforms, it magically installs PostgreSQL and psycopg2? That would
s
On Tue, Jan 12, 2016 at 7:30 PM, Marko Rauhamaa wrote:
> Rick Johnson :
>
>> they have these new inventions now called "blogs", maybe you should
>> sign up for one?
>
> "Sign up for a blog?" What does that mean?
>
> Is it like creating a computer program or starting a company: you sign
> up for on
Hi Folks,
I am trying to do the following.
I have a moderately complex python module/application X, whose source code i
have access to.
I run X with the following command
python x.py ...
Internally, x.py callls y.py, which in turn calls z.py, etc etc
x.py ---> y.py ---> z.py ---> u.py --
Apologies for self-replying
On 12/01/16 08:24, Erik wrote:
On 12/01/16 07:13, Cameron Simpson wrote:
The former. Almost any loop _might_ be executed zero times. Compilers
and linters etc should only complain if they can prove the loop is
always executed zero times.
I was just raising the
poss
On Tue, Jan 12, 2016 at 7:27 PM, Terry Reedy wrote:
> On 1/11/2016 8:09 PM, Chris Angelico wrote:
>>
>> On Tue, Jan 12, 2016 at 11:55 AM, Bernardo Sulzbach
>> wrote:
>>>
>>> On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico
>>> wrote:
Next IDLE feature request: Can you make it so t
ifeanyioprah--- via Python-list wrote:
> Create a class called BankAccount
> Create a constructor that takes in an integer and assigns this to a
`balance` property.
> Create a method called `deposit` that takes in cash deposit amount and
updates the balance accordingly.
> Create a method called
I can successfully parse my URLs. However, I'd like to modify a part
then reassemble them. However, like tuples, the parts appear to be
unmodifiable
>>> URL = 'http://foo/path1/path2/?fragment=foo'
>>> import urlparse
>>> u = urlparse.urlparse(URL)
>>> u
ParseResult(scheme='http', ne
Tim Chase wrote:
> I can successfully parse my URLs. However, I'd like to modify a part
> then reassemble them. However, like tuples, the parts appear to be
> unmodifiable
>
> >>> URL = 'http://foo/path1/path2/?fragment=foo'
> >>> import urlparse
> >>> u = urlparse.urlparse(URL)
> >>> u
On Mon, Jan 11, 2016 at 8:30 PM, Jansen, Ingram L <
ijan...@broncos.uncfsu.edu> wrote:
>
> I can't download Python and I need it for class. Any suggestions?
>
> drop the class? ;)
But more seriously, what OS, what version of Python, what did you try, what
happened?
>
> Ingram Jansen
> Banner ID
On 12.01.2016 10:53, eGenix Team: M.-A. Lemburg wrote:
> [This announcement is in German since it targets a local user group
> meeting in Düsseldorf, Germany]
>
>
>
> ANKÜNDIGUNG
>
> Python Meeting Düs
[This announcement is in German since it targets a local user group
meeting in Düsseldorf, Germany]
ANKÜNDIGUNG
Python Meeting Düsseldorf
http://pyddf.de/
Ein Treffen
On 2016-01-12 13:46, Peter Otten wrote:
> Tim Chase wrote:
> > >>> u = urlparse.urlsplit(URL)
> > >>> lst = list(u) # can't manipulate the tuple directly
> > >>> lst[3] = "bar=baz" # 3 = query-string index
> > >>> urlparse.urlunsplit(lst)
> > 'http://foo/path1/path2/?bar=baz'
> >
> > It
You're still struggling with this question because you didn't take your time to
read the previous comments here , the solution to this and other question has
being posted long ago before new year here , just read previous comments.
Remember don't use print , instead use return .
--
https://ma
On 2016-01-10, Peter Otten <__pete...@web.de> wrote:
class Derived(Base):
> ... def _init(self, x):
> ... super()._init(x)
> ... print("do something else with", x)
> ...
Derived(42)
> do something with 42
> do something else with 42
><__main__.Derived object at 0x7f8e
Someone else posting as "me" wrote:
> On 2016-01-10, Peter Otten <__pete...@web.de> wrote:
> class Derived(Base):
>> ... def _init(self, x):
>> ... super()._init(x)
>> ... print("do something else with", x)
>> ...
> Derived(42)
>> do something with 42
>> do something el
On Tue, Jan 12, 2016 at 9:12 AM, me wrote:
> On 2016-01-10, Peter Otten <__pete...@web.de> wrote:
> class Derived(Base):
> > ... def _init(self, x):
> > ... super()._init(x)
> > ... print("do something else with", x)
> > ...
> Derived(42)
> > do something with 42
> >
On 11 January 2016 at 20:16, Cameron Simpson wrote:
> On 11Jan2016 07:19, rusi wrote:
>>
>> On Monday, January 11, 2016 at 6:32:14 PM UTC+5:30, navneet bhatele wrote:
>>>
>>> I have been trying to install the "python-3.5.1-amd64-webinstall " many
>>> times and the Set up failed is shown up with
On Mon, Jan 11, 2016 at 6:04 PM, Skip Montanaro
wrote:
> Sorry, I should have been explicit. prob_dates (the actual argument of the
> call) is a set. As far as I know pylint does no type inference, so pylint
> can't tell if the LHS and RHS of the |= operator are appropriate, nor can
> it tell if i
On 12.01.2016 03:48, Cem Karan wrote:
Jumping in late, but...
If you want something that 'just works', you can use HeapDict:
http://stutzbachenterprises.com/
I've used it in the past, and it works quite well. I haven't tested its
asymptotic performance though, so you might want to check int
On Tue, Jan 12, 2016 at 9:15 AM, Oscar Benjamin
wrote:
>
> I thought this was suppose to have been fixed in 3.5.1 though so the installer
> should now warn that it won't work on XP.
The CRT update also requires service pack 1 on Windows 7 and service
pack 2 on Vista. 3.5.1's installer was updated
Hi all,
Seemingly simple problem:
There is a case in my code where I know a dictionary has only one item in it. I
want to get the value of that item, whatever the key is.
In Python2 I'd write:
>>> d = {"Wilf's Cafe": 1}
>>> d.values()[0]
1
and that'd be an end to it.
In Python 3:
>>> d = {"
Hi all
a little OS/windows specific, I'm afraid:
In Windows, there exists a part-supported 'outlook protocol' to obtain and use
email references within Outlook as URL. You have to go through various
shenanagins to enable this and to get Outlook to give you access to the URLs -
see for instan
> Hi all,
>
> Seemingly simple problem:
>
> There is a case in my code where I know a dictionary has only one item in it.
> I want to get the value of that item, whatever the key is.
>
> In Python2 I'd write:
>
> >>> d = {"Wilf's Cafe": 1}
> >>> d.values()[0]
> 1
The equivalent in Python 3 is
On Wed, Jan 13, 2016 at 3:50 AM, Nick Mellor wrote:
> There is a case in my code where I know a dictionary has only one item in it.
> I want to get the value of that item, whatever the key is.
>
> In Python2 I'd write:
>
d = {"Wilf's Cafe": 1}
d.values()[0]
> 1
>
> and that'd be an end
On Wed, Jan 13, 2016 at 3:51 AM, jkn wrote:
> I happy to carve some code without using urllib, but I am not clear what I
> actually need to do to 'open' such a URL using this protocol. FWIW I can paste
> this URL into Windows Explorer and I get the referenced email popping up ;-)
>
What happens i
On 1/12/2016 11:50 AM, Nick Mellor wrote:
Hi all,
Seemingly simple problem:
There is a case in my code where I know a dictionary has only one item in it. I
want to get the value of that item, whatever the key is.
In Python2 I'd write:
d = {"Wilf's Cafe": 1}
d.values()[0]
1
and that'd be a
Intentions aside, next(iter(...)) seems the most pythonic you can get
about this anyway.
Just in case you happen not to need the dictionary anymore,
d.popitem()[1] does the trick.
--
https://mail.python.org/mailman/listinfo/python-list
Hi Chris
On Tuesday, January 12, 2016 at 5:11:18 PM UTC, Chris Angelico wrote:
> On Wed, Jan 13, 2016 at 3:51 AM, jkn wrote:
> > I happy to carve some code without using urllib, but I am not clear what I
> > actually need to do to 'open' such a URL using this protocol. FWIW I can
> > paste
> > t
Nick Mellor wrote:
> Hi all,
>
> Seemingly simple problem:
>
> There is a case in my code where I know a dictionary has only one item in
> it. I want to get the value of that item, whatever the key is.
>
> In Python2 I'd write:
>
d = {"Wilf's Cafe": 1}
d.values()[0]
> 1
>
> and that
On Tue, Jan 12, 2016 at 10:12 AM, Terry Reedy wrote:
> Using the values views at intended (as an iterable):
>
dv = d.values()
next(iter(dv))
> 1
Good coding practice also dictates that whenever next is called, the
potential StopIteration exception must be caught unless it is clearly
int
On Tue, Jan 12, 2016 at 11:10 AM, Chris Angelico wrote:
> On Wed, Jan 13, 2016 at 3:51 AM, jkn wrote:
>> I happy to carve some code without using urllib, but I am not clear what I
>> actually need to do to 'open' such a URL using this protocol. FWIW I can
>> paste
>> this URL into Windows Explor
I created an issue for the pylint folks:
https://github.com/PyCQA/pylint/issues/774
Skip
--
https://mail.python.org/mailman/listinfo/python-list
Nick Mellor writes:
> Hi all,
>
> Seemingly simple problem:
>
> There is a case in my code where I know a dictionary has only one item
> in it. I want to get the value of that item, whatever the key is.
>
> In Python2 I'd write:
>
d = {"Wilf's Cafe": 1}
d.values()[0]
> 1
>
> and that'd b
On Wed, Jan 13, 2016 at 4:37 AM, eryk sun wrote:
> On Tue, Jan 12, 2016 at 11:10 AM, Chris Angelico wrote:
>> On Wed, Jan 13, 2016 at 3:51 AM, jkn wrote:
>>> I happy to carve some code without using urllib, but I am not clear what I
>>> actually need to do to 'open' such a URL using this protoco
Am 12.01.16 um 18:52 schrieb Chris Angelico:
On Wed, Jan 13, 2016 at 4:37 AM, eryk sun wrote:
start is a shell command. It also has a quirk that the first quoted
argument is the window title. Here's the correct call:
subprocess.check_call('start "title" "%s"' % url, shell=True)
Is that
Ian Kelly wrote:
> On Tue, Jan 12, 2016 at 10:12 AM, Terry Reedy wrote:
>> Using the values views at intended (as an iterable):
>>
> dv = d.values()
> next(iter(dv))
>> 1
>
> Good coding practice also dictates that whenever next is called, the
> potential StopIteration exception must be
On 2016-01-12, Bernardo Sulzbach wrote:
> On Mon, Jan 11, 2016 at 10:14 PM, Chris Angelico wrote:
>>
>> Next IDLE feature request: Can you make it so that, across all
>> platforms, it magically installs PostgreSQL and psycopg2? That would
>> solve so many of my students' problems...
>>
>
> Wouldn
On Tue, Jan 12, 2016 at 3:32 PM, Peter Otten <__pete...@web.de> wrote:
>
> If there is exactly one item you can unpack:
>
d = {"Wilf's Cafe": 1}
k, = d.values()
k
> 1
>
I personally don't like that trailing comma, it just looks wrong
there. But this is very neat.
--
Bernardo Sulzb
Bernardo Sulzbach wrote:
> On Tue, Jan 12, 2016 at 3:32 PM, Peter Otten <__pete...@web.de> wrote:
>>
>> If there is exactly one item you can unpack:
>>
> d = {"Wilf's Cafe": 1}
> k, = d.values()
> k
>> 1
>>
>
> I personally don't like that trailing comma, it just looks wrong
> there.
On Tue, Jan 12, 2016 at 11:52 AM, Chris Angelico wrote:
> Is that properly escaped to handle any arbitrary URL? I doubt it.
subprocess doesn't know how to quote a command line for the Windows
shell, which doesn't follow the rules used by subprocess.list2cmdline.
To make matters worse, one often h
I saw it in another answer. next(iter(d)) is still the winner.
This resembles a list just too much, making the coder's intent harder
to understand. This is **very** subjective, of course.
--
https://mail.python.org/mailman/listinfo/python-list
Jussi Piitulainen :
> But the most readable thing might be to have a function that extracts
> the sole value by whatever means:
>
>>>> def sole(d): [o] = d.values() ; return o
>...
>>>> sole(shoe)
>3.141592653589793
In the same vein:
>>> def sole(d):
... for o in d.value
Marko Rauhamaa writes:
> Jussi Piitulainen:
>
>> But the most readable thing might be to have a function that extracts
>> the sole value by whatever means:
>>
>>>>> def sole(d): [o] = d.values() ; return o
>>...
>>>>> sole(shoe)
>>3.141592653589793
>
> In the same vein:
>
>>>>
Hi,
I modify a test suite, and simplified to the below content.
I am interested in function:
test_bad_covariance_type()
I think that it tests for wrong type input, i.e.
'badcovariance_type'
will generate error, which is expected. Thus, it passes test.
When a correct type, such as 'diag', is giv
Chris Angelico wrote:
So start simplistic, and then look
into it like this: "Hey, see how you're doing this five times? There
HAS to be a better way!" (With acknowledgement to Raymond Hettinger.)
That gave me visions of a little animated cartoon of
Raymond popping up in the corner of the screen
On Tue, Jan 12, 2016 at 7:01 PM, Gregory Ewing
wrote:
> Chris Angelico wrote:
>>
>> So start simplistic, and then look
>> into it like this: "Hey, see how you're doing this five times? There
>> HAS to be a better way!" (With acknowledgement to Raymond Hettinger.)
>
>
> That gave me visions of a li
On Mon, Jan 11, 2016 at 5:53 PM, Bernardo Sulzbach
wrote:
> I have never gone "seriously OO" with Python though. I never wrote
> from scratch an application with more than 10 classes as far as I can
> remember. However, I would suppose that the interpreter can handle
> thousands of user-defined cl
Terry Reedy at 2016/1/12 UTC+8 3:56:03PM wrote:
> Revamping IDLE to 1. use ttk widgets and 2. become a modern single
> window app with multiple panes, including a tabbed editor pane, is a
> goal for 2016.
That will be great, I'm looking forward to it.
By the way, when I was playing around with
On Tuesday, January 12, 2016 at 3:36:13 PM UTC-5, Robert wrote:
> Hi,
>
> I modify a test suite, and simplified to the below content.
> I am interested in function:
> test_bad_covariance_type()
>
> I think that it tests for wrong type input, i.e.
> 'badcovariance_type'
> will generate error, whi
On Wed, 13 Jan 2016 03:50 am, Nick Mellor wrote:
> Hi all,
>
> Seemingly simple problem:
>
> There is a case in my code where I know a dictionary has only one item in
> it. I want to get the value of that item, whatever the key is.
[snip examples]
> None of this feels like the "one, and prefer
wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
> IDLE ?
> I need less than 10 seconds to make it crash.
Unwittingly or intentionally?
> The interesting aspect is not only to show that it crashes,
> the very interesting point is to explain why it is crashing.
Can you tell us (in a separate subj
On Wed, 13 Jan 2016 06:12 am, Bernardo Sulzbach wrote:
> I saw it in another answer. next(iter(d)) is still the winner.
Except that doesn't return the *value*, it returns the *key*.
py> d = {'key': 'value'}
py> next(iter(d))
'key'
To get the value:
py> next(iter(d.values()))
'value'
> This r
On Wed, 13 Jan 2016 11:18 am, Ian Kelly wrote:
> On Mon, Jan 11, 2016 at 5:53 PM, Bernardo Sulzbach
> wrote:
>> I have never gone "seriously OO" with Python though. I never wrote
>> from scratch an application with more than 10 classes as far as I can
>> remember. However, I would suppose that th
On Wed, Jan 13, 2016 at 12:27 PM, wrote:
> wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
>> IDLE ?
>> I need less than 10 seconds to make it crash.
>
> Unwittingly or intentionally?
>
>> The interesting aspect is not only to show that it crashes,
>> the very interesting point is to explain why
Hi All
I have written a small web app using cgi for testing for changes to data from a
python script that does a lot of database updating depending on certain
conditions
form = cgi.FieldStorage()
cRefNo = form.getvalue('refno')
cElectSupp = form.getvalue('electsupp')
print('Electrical Sup
On Wed, Jan 13, 2016 at 12:52 PM, wrote:
> If i change the value from origin to origin energy and save - the value
> updated to the database is correct but when the page is re displayed it only
> shows origin in the text field - as if it ignores everything after the space.
>
> How do I make it d
On Wed, 13 Jan 2016 12:27 pm, jf...@ms4.hinet.net wrote:
> wxjm...@gmail.com at 2016/1/月12 4:29:08PM wrote:
>> IDLE ?
>> I need less than 10 seconds to make it crash.
>
> Unwittingly or intentionally?
>
>> The interesting aspect is not only to show that it crashes,
>> the very interesting point
On Wednesday, January 13, 2016 at 9:52:17 AM UTC+8, tdsp...@gmail.com wrote:
> Hi All
>
> I have written a small web app using cgi for testing for changes to data from
> a python script that does a lot of database updating depending on certain
> conditions
>
> form = cgi.FieldStorage()
> cRefN
On Sunday, January 10, 2016 at 1:00:13 PM UTC+5:30, Arshpreet Singh wrote:
> Hello Friends, I am quite new to OOP(object oriented Programming), I did some
> projects with python which includes Data-Analysis, Flask Web Development and
> some simple scripts.
>
> I have only one question which is
On Wednesday 13 January 2016 14:36, Rustom Mody wrote:
> 1. Python the LANGUAGE, is rather even-handed in paradigm choice: Choose
> OO, imperative, functional or whatever style pleases/suits you
> 2. Python LIBRARIES however need to make committing choices. Users of
> those then need to align wit
On Wednesday, January 13, 2016 at 10:57:23 AM UTC+5:30, Steven D'Aprano wrote:
> On Wednesday 13 January 2016 14:36, Rustom Mody wrote:
>
> > 1. Python the LANGUAGE, is rather even-handed in paradigm choice: Choose
> > OO, imperative, functional or whatever style pleases/suits you
> > 2. Python LI
Quote:
With the end of support for Python 2 on the horizon (in 2020),
many package developers have made their packages compatible
with both Python 2 and Python 3 by using constructs such as:
if sys.version_info[0] == 2:
# Python 2 code
else:
# P
68 matches
Mail list logo