Re: Can't see numpy etc after upgrading Python on Ubuntu

2016-12-19 Thread Chris Angelico
On Tue, Dec 20, 2016 at 5:19 PM, wrote: > Thanks Chris for replying, but it didn't work. The upgrade happened, but > still python can't see numpy! So it seems to be a path problem. The numpy > (and scipy and matplotlib) files are there, so surely in principle it's a > simple matter of pointing

Re: Can't see numpy etc after upgrading Python on Ubuntu

2016-12-19 Thread ozpeterballard
Thanks Chris for replying, but it didn't work. The upgrade happened, but still python can't see numpy! So it seems to be a path problem. The numpy (and scipy and matplotlib) files are there, so surely in principle it's a simple matter of pointing my python path at them? Any ideas how? (I shoul

Re: Can't see numpy etc after upgrading Python on Ubuntu

2016-12-19 Thread Chris Angelico
On Tue, Dec 20, 2016 at 4:08 PM, wrote: > I use Python on Ubuntu 12.04. Recently I upgraded Python from 2.7.3 to > 2.7.12. I did the upgrade via the source, i.e. download (from > https://www.python.org/downloads/release/python-2712/ ), tar, ./config, sudo > make install. > > After the upgrade,

Can't see numpy etc after upgrading Python on Ubuntu

2016-12-19 Thread ozpeterballard
Hi all. I hope this is the right place. It seems more like a Python problem than an Ubuntu problem. I use Python on Ubuntu 12.04. Recently I upgraded Python from 2.7.3 to 2.7.12. I did the upgrade via the source, i.e. download (from https://www.python.org/downloads/release/python-2712/ ), tar,

Re: python list index - an easy question

2016-12-19 Thread Steve D'Aprano
On Mon, 19 Dec 2016 03:21 am, BartC wrote: > On 18/12/2016 10:59, Paul Götze wrote: >> Hi John, >> >> there is a nice short article by E. W. Dijkstra about why it makes sense >> to start numbering at zero (and exclude the upper given bound) while >> slicing a list. Might give a bit of additional u

Re: Best attack order for groups of numbers trying to destroy each other, given a victory chance for number to number attack.

2016-12-19 Thread skybuck2000
I first explored the possibility of a lookup table to speed up calculations, this possibility would probably give wrong results. I am interested in calculating all possibilities to see which one is truely best, I am also interested in trying to speed up calculations to be able to handle larger

Re: OT - "Soft" ESC key on the new MacBook Pro

2016-12-19 Thread Gregory Ewing
Random832 wrote: Except for the fact that the actual keyboard that Emacs was originally developed for [the Knight Keyboard, and the later Symbolics "Space Cadet" Keyboards] had the control key more or less where it is on modern PC keyboards [slightly further to the right, so easier to reach with

Re: python list index - an easy question

2016-12-19 Thread Gregory Ewing
BartC wrote: But if you needed a table of the frequencies of letters A to Z... An N-based array can simply have bounds of ord('A') to ord('Z') inclusive. That's fine if your language lets you have arrays with arbitrary lower bounds. But if the language only allows a fixed lower bound, and fur

Re: python list index - an easy question

2016-12-19 Thread Ben Bacarisse
Jussi Piitulainen writes: > Ben Bacarisse writes: > >> BartC writes: >> >>> You need to take your C hat off, I think. >> >> It's a computing hat. Indexes are best seen as offsets (i.e. as a >> measured distances from some origin or base). It's a model that grew >> out of machine addressing and

Re: Problem running Python 3.5.2 on school network PC

2016-12-19 Thread Jed Mack
This problem has been solved. Thanks to all of you for your suggestions. Below is a summary I sent to Tim Golden, whose reply led us to the solution in this case. Tim, Thank you for your help - your suggestions led us to the problem. Turns out that another instance of Python *was* installed,

how to run github codes on qpython?

2016-12-19 Thread brostype
hello im Android user and i was learning python programming language from a month ago with qpython and i have a question is it possible to run this github scripts on qpython? https://github.com/rmmh/skybot thnx. -- https://mail.python.org/mailman/listinfo/python-list

Re: python list index - an easy question

2016-12-19 Thread BartC
On 19/12/2016 13:48, Ben Bacarisse wrote: BartC writes: You need to take your C hat off, I think. It's a computing hat. Indexes are best seen as offsets (i.e. as a measured distances from some origin or base). A 1-based or N-based index can still be seen as an offset from element 0, if

Re: just started

2016-12-19 Thread Matt Wheeler
On Mon, 19 Dec 2016 at 13:20 wrote: > thanks! very clarifying. One more question though: after installing > python3.5 I only have pip3 and pip3.5 from the command line. However, I > issued the command > > python3.5 -m pip install matplotlib > > and it all went like a charm. At the end of the inst

Re: Best attack order for groups of numbers trying to destroy each other, given a victory chance for number to number attack.

2016-12-19 Thread skybuck2000
Hmmm now I think the lookup table cannot work... at least not for the dynamic one... where health is subtracted... The ships have a certain health... and not just an alive/dead status... The way they and the enemy attack each other will probably influence the outcome of battle... and for the ne

Re: The right way to 'call' a class attribute inside the same class

2016-12-19 Thread Thomas 'PointedEars' Lahn
Chris Angelico wrote: > On Mon, Dec 19, 2016 at 9:52 AM, Erik wrote: >> 1) Method call: >>"obj.foo(1, 2, 3)" is syntactic sugar for "obj.foo(obj, 1, 2, 3)". > > And the bit you have to be REALLY careful of when working with both > Python and JS is that you have to have "obj.foo(...)" as a si

Re: python list index - an easy question

2016-12-19 Thread Jussi Piitulainen
Ben Bacarisse writes: > BartC writes: > >> You need to take your C hat off, I think. > > It's a computing hat. Indexes are best seen as offsets (i.e. as a > measured distances from some origin or base). It's a model that grew > out of machine addressing and assembler address modes many, many > d

Re: Best attack order for groups of numbers trying to destroy each other, given a victory chance for number to number attack.

2016-12-19 Thread skybuck2000
Hmmm I see that I have made an old mistake of mine ;) 2x2x2x2 is not 8, it's deceptive... it looks like 4x2 = 8 but nope ! :) This is 2x2=4x2=8x2=16. and then the next 4 = 16x2 = 32x2 = 64x2 = 128 x 2=256 so it's roughly 24^4 x 256 = 84934656 -- https://mail.python.org/mailman/listinfo/python

Re: python list index - an easy question

2016-12-19 Thread Ben Bacarisse
BartC writes: > On 19/12/2016 01:10, Ben Bacarisse wrote: >> BartC writes: >> >>> On 18/12/2016 10:59, Paul Götze wrote: there is a nice short article by E. W. Dijkstra about why it makes sense to start numbering at zero (and exclude the upper given bound) while slicing a list. Mi

Re: just started

2016-12-19 Thread metal . suomi
> In theory, "pip3" will install into the default "python3", whichever > that is. However, in practice, it's entirely possible that it installs > into a very different Python from the one you're expecting. The most > reliable form is the latter; whatever command you use to start Python, > add "-m p

Re: OT - "Soft" ESC key on the new MacBook Pro

2016-12-19 Thread Random832
On Sun, Dec 18, 2016, at 17:03, Gregory Ewing wrote: > mm0fmf wrote: > > +1 for knowing where CTRL should be. > > Bonus +1 for having used an ASR33. > > And it's quite remarkable that the designers of the ASR33 > knew exactly where it would need to be for Emacs users > years later! I think Richard

Re: python list index - an easy question

2016-12-19 Thread Ned Batchelder
On Sunday, December 18, 2016 at 11:21:38 AM UTC-5, BartC wrote: > On 18/12/2016 10:59, Paul Götze wrote: > > Hi John, > > > > there is a nice short article by E. W. Dijkstra about why it makes sense > > to start numbering at zero (and exclude the upper given bound) while > > slicing a list. Might g

Re: python list index - an easy question

2016-12-19 Thread BartC
On 19/12/2016 01:10, Ben Bacarisse wrote: BartC writes: On 18/12/2016 10:59, Paul Götze wrote: there is a nice short article by E. W. Dijkstra about why it makes sense to start numbering at zero (and exclude the upper given bound) while slicing a list. Might give a bit of additional understan

Re: Best attack order for groups of numbers trying to destroy each other, given a victory chance for number to number attack.

2016-12-19 Thread skybuck2000
Skybuck wrote: " Also keep in mind that an attack is only valid if the target is still alive, otherwise the attacker would move to the next one. So pre-computing an attack plan/outcome or storing it might not be so usefull for on color, since the other color might already be dead and thus atta

Re: read a table and make a basic plot

2016-12-19 Thread Peter Otten
Peter Otten wrote: > Here's a simple implementation that assumes both input and output file ... are in TAB-delimited text format. -- https://mail.python.org/mailman/listinfo/python-list

Re: read a table and make a basic plot

2016-12-19 Thread Peter Otten
metal.su...@gmail.com wrote: > Hi, I'm learning python and full of extensive tutorials around. Getting a > bit lost and overflowed in my head with tuples, dictionaries, lists, etc > ... etc... Everything great, but I'd like to perform some basic task while > learning the rest. For example, I'm hav