Re: Python and the need for speed

2017-04-09 Thread Rick Johnson
On Sunday, April 9, 2017 at 7:21:21 PM UTC-5, Gregory Ewing wrote: > My take on the idea of making Python less dynamic in order > to improve speed is that you'll end up with a language > that, while it may superficially resemble Python, doesn't > really feel like Python. Boo is an example of that.

Re: Python and the need for speed

2017-04-09 Thread Rick Johnson
On Saturday, April 8, 2017 at 7:20:35 PM UTC-5, [email protected] wrote: > I've an idea that > http://www.mos6581.org/python_need_for_speed is a week late > for April Fool's but just in case I'm sure that some of you > may wish to comment. Might be a bit too late to dub this "April fools", but ne

Re: Swiss Ephemeris

2017-04-09 Thread Rick Johnson
On Sunday, April 9, 2017 at 8:52:44 PM UTC-5, Deborah Swanson wrote: > PS. I've been using medical astrology to look ahead at my > medical condition for years in advance. And being off by a > day or so doesn't matter that much when you're looking at > trends over the course of years and decades. I

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Monday, April 10, 2017 at 4:43:52 AM UTC-5, bartc wrote: > On 10/04/2017 03:40, Rick Johnson wrote: > > On Sunday, April 9, 2017 at 1:34:39 PM UTC-5, bartc wrote: > > > > I have my own interpreted language which I call > > > 'dynamic', but compared with P

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Monday, April 10, 2017 at 7:25:48 AM UTC-5, Mikhail V wrote: > Still I miss some old school features in Python, e.g. > "goto" statement would be very useful in some cases. Are you serious? > I know it is considered bad style to use goto, but in some > cases it is just most natural thing to us

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Monday, April 10, 2017 at 5:48:30 PM UTC-5, Erik wrote: > On 10/04/17 03:23, Chris Angelico wrote: > > Okay, I have a pretty thick skin, but this is getting a > > bit obnoxious. Can you PLEASE post something that isn't > > just insulting me? Thanks. > > Are you suggesting he should post somethi

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Tuesday, April 11, 2017 at 4:56:27 AM UTC-5, Brecht Machiels wrote: > On 2017-04-11 08:19:31 +, Steven D'Aprano said: > > > On Sun, 09 Apr 2017 19:05:35 +1000, Chris Angelico wrote: [...] > > The Python ecosystem is actually quite healthy, if you > > need to speed up code there are lots of

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Tuesday, April 11, 2017 at 9:56:45 AM UTC-5, Steve D'Aprano wrote: > On Tue, 11 Apr 2017 07:56 pm, Brecht Machiels wrote: > > On 2017-04-11 08:19:31 +, Steven D'Aprano said: > > > > I understand that high performance was never a goal in > > CPython development (and Python language design!),

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Tuesday, April 11, 2017 at 10:31:16 AM UTC-5, bartc wrote: > On 11/04/2017 15:56, Steve D'Aprano wrote: > > > The truth is, all of us in this discussion -- including me > > -- are "random, ignorant commentators". I don't believe > > that any of us are experts at writing compilers. Bart is > > a

Re: Swiss Ephemeris

2017-04-11 Thread Rick Johnson
On Monday, April 10, 2017 at 12:56:47 AM UTC-5, Deborah Swanson wrote: > Fully recognizing that most of what you wrote was tongue- > in-cheek, I just want to say that regardless of the wonders > of modern medicine, it's a pity they learn so little about > successful medicines other than their own.

Re: read in a list in a file to list

2017-04-11 Thread Rick Johnson
these methods. Here is a sample of me playing... ## START INTERACTIVE SESSION (Python2.x) ## >>> myStr = 'Rick is awesome!' >>> type(myStr) >>> len(myStr) 16 >>> dir(myStr) ['__add__', '__class__'

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Tuesday, April 11, 2017 at 7:10:00 PM UTC-5, Mikhail V wrote: > On 12 April 2017 at 00:02, Rick Johnson wrote: > > On Monday, April 10, 2017 at 7:25:48 AM UTC-5, Mikhail V wrote: > > > Still I miss some old school features in Python, e.g. > > > "goto" s

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Tuesday, April 11, 2017 at 7:28:46 PM UTC-5, Nathan Ernst wrote: > > [...] > > Writing performant Python code is possible, but like > writing performant code in any other language, you need to > be aware of what's happening. This means paying attention > to things that may cause memory allocatio

Re: Python and the need for speed

2017-04-11 Thread Rick Johnson
On Tuesday, April 11, 2017 at 7:44:49 PM UTC-5, Nathan Ernst wrote: > goto is a misunderstood and much misaligned creature. It is > a very useful feature, but like nearly any programming > construct can be abused. Constructs like 'break', > 'continue' or 'next' in languages like Python or C/C++ ar

Re: Python and the need for speed

2017-04-14 Thread Rick Johnson
On Wednesday, April 12, 2017 at 1:48:57 AM UTC-5, Steven D'Aprano wrote: > On Tue, 11 Apr 2017 21:10:56 -0700, Rick Johnson wrote: > > > high level languages like Python should make it difficult, > > if not impossible, to write sub- optimal code (at least in > >

Re: Python and the need for speed

2017-04-14 Thread Rick Johnson
On Wednesday, April 12, 2017 at 4:30:16 AM UTC-5, alister wrote: > On Tue, 11 Apr 2017 16:31:16 -0700, Rick Johnson wrote: > > On Tuesday, April 11, 2017 at 9:56:45 AM UTC-5, Steve D'Aprano wrote: > >> On Tue, 11 Apr 2017 07:56 pm, Brecht Machiels wrote: > >> > O

Re: Python and the need for speed

2017-04-14 Thread Rick Johnson
On Wednesday, April 12, 2017 at 4:34:00 AM UTC-5, Brecht Machiels wrote: > On 2017-04-11 14:56:33 +, Steve D'Aprano said: > > On Tue, 11 Apr 2017 07:56 pm, Brecht Machiels wrote: > [...] > However, we don't really know how Python's performance is > affecting its popularity. It would be good to

Re: Python and the need for speed

2017-04-14 Thread Rick Johnson
On Wednesday, April 12, 2017 at 4:57:10 AM UTC-5, [email protected] wrote: > On Wednesday, 12 April 2017 07:48:57 UTC+1, Steven D'Aprano wrote: > > On Tue, 11 Apr 2017 21:10:56 -0700, Rick Johnson wrote: > > > > > > high level languages like Python should

Re: Python and the need for speed

2017-04-14 Thread Rick Johnson
On Wednesday, April 12, 2017 at 8:44:30 AM UTC-5, [email protected] wrote: > On Wednesday, 12 April 2017 12:56:32 UTC+1, Jussi Piitulainen wrote: > > bartc writes: > > > > > > These are straightforward language enhancements. > > > > FYI, the question is not how to optimize the code but how > > to

Re: Python and the need for speed

2017-04-14 Thread Rick Johnson
On Thursday, April 13, 2017 at 1:32:29 AM UTC-5, Gregory Ewing wrote: > Jussi Piitulainen wrote: > > Traceback (most recent call last): > > File "/dev/fd/63", line 37, in > > SanityClauseException: code is blatantly sub-optimal > > > > As far as I know, no language does that. Because reasons? >

Re: Python and the need for speed

2017-04-14 Thread Rick Johnson
On Thursday, April 13, 2017 at 1:32:28 AM UTC-5, Steven D'Aprano wrote: > On Wed, 12 Apr 2017 14:38:52 +0100, Ben Bacarisse wrote: > > Steve D'Aprano writes: > >> On Wed, 12 Apr 2017 03:39 am, Paul Rubin wrote: > > [...] Indeed, and this is a very common phenomenon: > features which "ordinary" prog

Re: Swiss Ephemeris

2017-04-14 Thread Rick Johnson
On Thursday, April 13, 2017 at 7:39:38 AM UTC-5, Rustom Mody wrote: > Quote from Peter Landin, one of the precursors of modern > functional programming: Most papers in computer science > describe how their author learned what someone else already > knew [And this dates from 60s/70s] Applies beyo

Re: Calling dunder methods manually

2017-04-15 Thread Rick Johnson
On Thursday, April 13, 2017 at 2:01:41 AM UTC-5, Serhiy Storchaka wrote: > > __init__ is perhaps the most called dunder method. It is > often called from the __init__ method of subclasses. Yes, that would be one of the exceptions to the rule, but not because the rule is unsound, but because Python

Re: Python and the need for speed

2017-04-15 Thread Rick Johnson
On Saturday, April 15, 2017 at 7:17:55 AM UTC-5, bartc wrote: > On 15/04/2017 03:35, Rick Johnson wrote: > > On Wednesday, April 12, 2017 at 8:44:30 AM UTC-5, [email protected] wrote: > > > At a minimum, every language should offer > > the following four loop-forms

Re: Teaching the "range" function in Python 3

2017-06-29 Thread Rick Johnson
On Thursday, June 29, 2017 at 4:01:07 PM UTC-5, Irv Kalb wrote: > > [...] > > But Python 3's version of the range function has been > turned into a generator. Again, I understand why this > happened, and I agree that this is a good change. The > problem is, how can I explain this concept to stude

Re: Converting sentences to vector form

2017-06-29 Thread Rick Johnson
On Tuesday, June 27, 2017 at 6:15:31 AM UTC-5, Bhaskar Dhariyal wrote: > You can't train a model on words. https://youtu.be/dSIKBliboIo?t=52 -- https://mail.python.org/mailman/listinfo/python-list

Re: Can we please dump google groups completely?

2017-07-01 Thread Rick Johnson
On Saturday, July 1, 2017 at 4:19:47 PM UTC-5, [email protected] wrote: > Yes I know it's daft that it's where I'm posting from, but > I'm still banned from using the main mailing list. Why are you banned from Python-list? What did you do? And is that why you have moved to the "Bream" nym? > I'v

Re: Teaching the "range" function in Python 3

2017-07-02 Thread Rick Johnson
On Thursday, June 29, 2017 at 9:58:23 PM UTC-5, Chris Angelico wrote: > On Fri, Jun 30, 2017 at 12:33 PM, Rick Johnson > > A better *FIRST* example would be something like this: > > > > def add(x, y): > > return x + y > > > > When teaching a stu

Re: Teaching the "range" function in Python 3

2017-07-02 Thread Rick Johnson
On Saturday, July 1, 2017 at 12:48:39 AM UTC-5, Christian Gollwitzer wrote: > Am 30.06.17 um 04:33 schrieb Rick Johnson: > > And to further drive home the point, you can manually > > insert a list literal to prove this: > > > > >>> range(10) &g

Re: get value from list using widget

2017-07-06 Thread Rick Johnson
On Wednesday, July 5, 2017 at 4:15:34 PM UTC-5, Terry Reedy wrote: > On 7/5/2017 12:34 PM, [email protected] wrote: > > > I would like know dow can I select and get the value from > > a list of values uisng widgets. > > One way is to learn tkinter and then learn to use the > Listbox wid

Re: Test 0 and false since false is 0

2017-07-06 Thread Rick Johnson
On Thursday, July 6, 2017 at 9:29:29 PM UTC-5, Sayth Renshaw wrote: > I was trying to solve a problem and cannot determine how to filter 0's but > not false. > > Given a list like this > ["a",0,0,"b",None,"c","d",0,1,False,0,1,0,3,[],0,1,9,0,0,{},0,0,9] > > I want to be able to return this list

Re: Test 0 and false since false is 0

2017-07-06 Thread Rick Johnson
On Thursday, July 6, 2017 at 10:00:36 PM UTC-5, Sayth Renshaw wrote: > Is there an "is not" method that's not != so I can check is not false. Maybe. Or maybe /not/. :-P" One way to find out would be to fire up your python interpretor, and do some interactive testing. Here, allow me to cinge my ey

Re: Test 0 and false since false is 0

2017-07-06 Thread Rick Johnson
On Thursday, July 6, 2017 at 9:57:43 PM UTC-5, Skip Montanaro wrote: > I was trying to solve a problem and cannot determine how to filter 0's but > not false. > > > I'm typing on my phone so can't paste a session [...] I have not tried any for myself, but there are a few Python installations avail

Re: Check Python version from inside script? Run Pythons script in v2 compatibility mode?

2017-07-07 Thread Rick Johnson
On Friday, July 7, 2017 at 2:54:04 AM UTC-5, Steve D'Aprano wrote: > [...] That's now not only backwards compatible, but it is > forward compatible: if Python changes in the future to > bring reduce back into the built-in functions, your code > will automatically keep working. If python starts goi

Re: Grapheme clusters, a.k.a.real characters

2017-07-15 Thread Rick Johnson
On Friday, July 14, 2017 at 2:40:43 AM UTC-5, Chris Angelico wrote: [...] > IMO the Python str type is adequate as a core data type. What we may > need, though, is additional utility functions, eg: > > * unicodedata.grapheme_clusters(str) - split str into a sequence of > grapheme clusters > * pang

Re: Grapheme clusters, a.k.a.real characters

2017-07-15 Thread Rick Johnson
On Friday, July 14, 2017 at 2:40:43 AM UTC-5, Chris Angelico wrote: > [...] > What is the length of a string? How often do you actually > care about the number of grapheme clusters - and not, for > example, about the pixel width? (To columnate text, for > instance, you need to know about its width

Re: Grapheme clusters, a.k.a.real characters

2017-07-15 Thread Rick Johnson
On Friday, July 14, 2017 at 12:43:50 PM UTC-5, Steve D'Aprano wrote: > Before you answer, does your answer apply to Arabic and > Thai as well as Western European languages? I find it interesting that those who bellyache the loudest about the "inclusivity of regional charator encodings" never dabbl

Re: Grapheme clusters, a.k.a.real characters

2017-07-15 Thread Rick Johnson
On Saturday, July 15, 2017 at 7:29:14 PM UTC-5, Chris Angelico wrote: > [...] Also, that doesn't deal with > U+200B or U+180E, which have well-defined widths *smaller* than > typical Latin letters. (200B is a zero-width space. Is it a > character?) Of *COURSE* it's a character. Would you also con

Re: Grapheme clusters, a.k.a.real characters

2017-07-15 Thread Rick Johnson
On Saturday, July 15, 2017 at 7:55:46 PM UTC-5, Steve D'Aprano wrote: > On Sun, 16 Jul 2017 12:31 am, Rick Johnson wrote: > > > I never hear Chinese or eastern Europeans > > bellyaching > > Do you speak much to Chinese and Eastern Europeans who > don't speak

Re: Grapheme clusters, a.k.a.real characters

2017-07-15 Thread Rick Johnson
On Saturday, July 15, 2017 at 8:54:40 PM UTC-5, MRAB wrote: > You need to be careful about the terminology. You are correct. I admit I was a little loose with my terms there. > Is linefeed a character? Since LineFeed is the same as NewLine, then yes, IMO, linefeed is a character. > You might c

Re: Grapheme clusters, a.k.a.real characters

2017-07-15 Thread Rick Johnson
On Saturday, July 15, 2017 at 9:33:49 PM UTC-5, Ben Finney wrote: > MRAB writes: [...] > > Is linefeed a character? You might call it a "control > > character", but it's not really a _character_, it's > > control/format _code_. > > And yet the ASCII and Unicode standard says code point 0x0A

Re: "Edit with IDLE" doesn't work any more ?

2017-07-15 Thread Rick Johnson
On Friday, April 28, 2017 at 8:23:43 AM UTC-5, Peter Otten wrote: > Stefan Ram wrote: > > > Peter Otten <[email protected]> writes: > >>one of the modules in Python's standard library IDLE will try to run with > >>your module rather than the one it actually needs. Common candidates are > >>code.py

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rick Johnson
On Sunday, July 16, 2017 at 2:55:57 AM UTC-5, Marko Rauhamaa wrote: > Mikhail V : > > On Sat, 15 Jul 2017 05:50 pm, Marko Rauhamaa wrote: > > > > > > Random access to code points is as uninteresting as > > > random access to UTF-8 bytes. I might want random access > > > to the "Grapheme clusters, a

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rick Johnson
On Sunday, July 16, 2017 at 10:41:02 AM UTC-5, Rustom Mody wrote: > On Sunday, July 16, 2017 at 8:10:41 PM UTC+5:30, Rick Johnson wrote: > > On Sunday, July 16, 2017 at 2:55:57 AM UTC-5, Marko Rauhamaa wrote: > > > Mikhail V : > > > > On Sat, 15 Jul 2017

Re: Grapheme clusters, a.k.a.real characters

2017-07-16 Thread Rick Johnson
On Sunday, July 16, 2017 at 8:28:57 PM UTC-5, Steve D'Aprano wrote: > On Mon, 17 Jul 2017 01:40 am, Rustom Mody wrote: > > > On Sunday, July 16, 2017 at 8:10:41 PM UTC+5:30, Rick Johnson wrote: > [...] > > $ python > > Python 3.6.0 |Anaconda 4.3.1 (64-bit)|

Re: Combining every pair of list items and creating a new list.

2017-07-17 Thread Rick Johnson
On Monday, July 17, 2017 at 3:10:51 PM UTC-5, [email protected] wrote: > Hi, > > I'm having difficulty thinking about how to do this as a Python beginner. > > But I have a list that is represented as: > > [1,2,3,4,5,6,7,8] > > and I would like the following results: > > [1,2] [3,4] [5,6]

Re: Users of namedtuple: do you use the _source attribute?

2017-07-17 Thread Rick Johnson
ne of my code relies on the `_source` attribute. So i really don't care what happens to it. [1] Which i would hope is a rather large group, and not just another "Rick singleton". -- https://mail.python.org/mailman/listinfo/python-list

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 10:07:41 PM UTC-5, Steve D'Aprano wrote: > On Wed, 19 Jul 2017 12:10 am, Rustom Mody wrote: [...] > > Einstein: If you can't explain something to a six-year- > > old, you really don't understand it yourself. > > > > [...] > > Think about it: it simply is nonsense. If

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 10:24:54 PM UTC-5, Steve D'Aprano wrote: > On Wed, 19 Jul 2017 10:08 am, Ben Finney wrote: > > > Gregory Ewing writes: > > > > > The term "emoji" is becoming rather strained these days. > > > The idea of "woman" and "personal computer" being > > > emotions is an inte

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 7:35:13 PM UTC-5, Mikhail V wrote: > ChrisA wrote: > >On Wed, Jul 19, 2017 at 6:05 AM, Mikhail V wrote: > >> On 2017-07-18, Steve D'Aprano wrote: > > > > _Neither system is right or wrong, or better than the > > > > other._ > > > > > > If that is said just "not to hu

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 10:37:18 PM UTC-5, Steve D'Aprano wrote: > On Wed, 19 Jul 2017 10:34 am, Mikhail V wrote: > > > Ok, in this narrow context I can also agree. > > But in slightly wider context that phrase may sound almost like: > > "neither geometrical shape is better than the other as

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Wednesday, July 19, 2017 at 1:57:47 AM UTC-5, Steven D'Aprano wrote: > On Wed, 19 Jul 2017 17:51:49 +1200, Gregory Ewing wrote: > > > Chris Angelico wrote: > >> Once you NFC or NFD normalize both strings, identical strings will > >> generally have identical codepoints... You should then be able

Re: Grapheme clusters, a.k.a.real characters

2017-07-19 Thread Rick Johnson
On Wednesday, July 19, 2017 at 5:29:23 AM UTC-5, Rhodri James wrote: > when Acorn were developing their version of extended ASCII > in the late 80s, they asked three different University > lecturers in Welsh what extra characters they needed, and > got three different answers. And who would have g

Re: Combining every pair of list items and creating a new list.

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 5:19:56 AM UTC-5, Rahul K P wrote: > You can use a simple logic and list comprehension. > > so it will be like this > > lst = [1, 2, 3, 4, 5, 6, 7, 8] > print [lst[i:i+2] for i in range(0,len(lst),2)] No no no. Anybody can write code like that! To wow a professor and

Re: Users of namedtuple: do you use the _source attribute?

2017-07-19 Thread Rick Johnson
On Tuesday, July 18, 2017 at 12:59:36 AM UTC-5, Terry Reedy wrote: > Yes, No. The developers of the class agree that a trailing > underscore convention would have been better. 'source_' > etc. Which, while encroaching on the "this-is-a-reserved-symbol_" convention, would relieve the current "_st

Re: Basic python understanding

2017-07-26 Thread Rick Johnson
On Wednesday, July 26, 2017 at 3:45:35 PM UTC-5, MRAB wrote: > On 2017-07-26 20:04, Stefan Ram wrote: > > [email protected] writes: > > > Hi I am in need some understanding on how to become more > > > knowledgeable while interviewing a candidate that > > > requires Python > > > > The only no

Re: Need some advice please

2017-07-29 Thread Rick Johnson
On Saturday, July 29, 2017 at 4:59:26 AM UTC-5, Steve D'Aprano wrote: > On Sat, 29 Jul 2017 06:34 pm, Kryptxy wrote: > > > Would it get me around legal issues, that is making this > > tool completely legal? > > Do you think we are lawyers? We're not. Even if we were, > we're not lawyers who are ex

Re: Need some advice please

2017-07-30 Thread Rick Johnson
On Saturday, July 29, 2017 at 10:24:20 PM UTC-5, MRAB wrote: > What is the difference between (1) and (4)? Case in point. ;-) -- https://mail.python.org/mailman/listinfo/python-list

Re: Need help to understand not the answer

2017-07-30 Thread Rick Johnson
On Saturday, July 29, 2017 at 2:16:36 PM UTC-5, new_to_c0ding wrote: > Hello all, I have been scratching my head since morning but > could not understand this quiz question. I would appreciate > if someone could help me understand what is it asking me to > do. I dont need the answer but just the ri

Re: Issues with Python

2017-07-30 Thread Rick Johnson
> Hi, I am new to Python and though I have been able to > download the 3.6 version on my laptop , I still have > issues with the syntax. While writing a program to > execute, it will display syntax error with different > shades of color usually green or yellow. Which IDE (aka: fancy text editor) a

Re: first code attempt

2017-08-02 Thread Rick Johnson
On Wednesday, August 2, 2017 at 5:34:18 PM UTC-5, [email protected] wrote: > Hello, > I am using the workbook Computer Coding by Jon Woodcock, > published by DK WORKBOOKS, to try to learn computer coding. > I only get to pages 10 and 11 in Robot Programs when round > robots appear in squares to ma

Re: first code attempt

2017-08-02 Thread Rick Johnson
On Wednesday, August 2, 2017 at 7:22:56 PM UTC-5, boB Stepp wrote: > You might want to consider joining the Python Tutor list > (https://mail.python.org/mailman/listinfo/tutor). This is meant for > newcomers to Python who have a lot of basic questions. I would second that advice. However, i woul

Re: program that search string in text file and do something

2017-08-06 Thread Rick Johnson
Grant Edwards wrote: > Peter Otten <[email protected]> wrote: > > > What we won't do is write a program for you ready to > > present to your teacher. > > Or if we do, it will be subtly sabotaged in a manner that > will make it obvious to an experienced Python programmer > that you didn't write it.

Re: Call a class A method from a class B instance? Do I miss something?

2017-08-17 Thread Rick Johnson
[email protected] wrote: > I study some codes of a tutorial about tkinter > > [snip code] > > My question is that the object which was left by > callit(self.demoenter_callback, tag) is a callit instance, > and the method it calls is a DemoMainWindow's method. How > it is possible? Why would it _

Re: Default .py program and Edit with IDLE problem

2017-08-19 Thread Rick Johnson
On Wednesday, August 16, 2017 at 4:55:17 PM UTC-5, Kevi Aday (Katch22) wrote: > I installed python 3.6.2 for making running and editing > programs. Later on I installed python 2.7 because a program > that I downloaded only works with that. Later I deleted the > program. I then wanted to run a progr

Re: A question on modification of a list via a function invocation

2017-08-19 Thread Rick Johnson
On Wednesday, August 16, 2017 at 4:07:14 PM UTC-5, Mok-Kong Shen wrote: > The above shows that with , i.e. assigning > single values to individual members of alist (with > alist[0]=3 etc.) is "principally" different from assigning > a whole list to alist (with alist=[30,60,90]). The first > operati

Re: Default .py program and Edit with IDLE problem

2017-08-19 Thread Rick Johnson
On Saturday, August 19, 2017 at 5:39:19 AM UTC-5, Chris Angelico wrote: > I'm not sure how "refuse to guess" translates into "wipe it > out and start over". I *never* recommend > uninstall/reinstall as a first measure. It's a stupid idea > unless you actually know that it's going to help. No, what

Re: A question on modification of a list via a function invocation

2017-08-19 Thread Rick Johnson
Steve D'Aprano wrote: > I'm not sure that the VIN defines the vehicle exactly... I > wouldn't want to try driving a VIN without the rest of the > vehicle. The mileage is terrible... Quoting Fredrik Lundh: > well, I guess you can, in theory, value an artificial > number assigned to an object as muc

Re: Default .py program and Edit with IDLE problem

2017-08-19 Thread Rick Johnson
Steve D'Aprano wrote: > Rick Johnson wrote: > > Chris Angelico wrote: > > > I'm not sure how "refuse to guess" translates into "wipe > > > it out and start over". I *never* recommend > > > uninstall/reinstall as a first measure. It

Re: Default .py program and Edit with IDLE problem

2017-08-19 Thread Rick Johnson
alister wrote: > Steve D'Aprano wrote: > > Rick Johnson wrote: [...] > I think to a point I have to agree with rick, Well, alister, i'll take what i can get around here. :-) > windows installers can be flaky and time is money. Indeed. > if something does not wor

Re: Dataframe iterating question : 3 ways of calling a row and column

2017-08-21 Thread Rick Johnson
On Monday, August 21, 2017 at 12:08:54 PM UTC-5, [email protected] wrote: > I wouldn't say I'm a Python noob, but I wouldn't say I'm a Python expert > either. I work in data science and use Pandas Dataframes a lot. My question > is regarding the difference in calling out a specific row, column

Re: python to call or start a fortran a.out

2017-08-22 Thread Rick Johnson
On Monday, August 21, 2017 at 11:31:48 AM UTC-5, Chet Buell wrote: > Need some help with updating python to call or start a > fortran a.out executable The problem I am having is I have > an old Fortran based model that I need to run, in the past > the fortran was triggered through the following py

Re: python list name in subject

2017-08-22 Thread Rick Johnson
Grant Edwards wrote: > Abdur-Rahmaan Janhangeer wrote: > > > > Hi all, i am subscribed to different python lists and > > they put their names in the subject [name] subject hence > > i can at a glance tell which mail belongs to which list. > > A requests to admins to implement if possible > > Pl

Re: python list name in subject

2017-08-22 Thread Rick Johnson
Tim Chase wrote: > Rick Johnson wrote: [...] > Checking mailing list headers...yep, the "forum-of-origin" > type hint is already present in standards-compliant fashion > defined by RFC4021[1]: > > [...] > > Just need a mail client that knows about standar

Re: Reading the documentation

2017-08-25 Thread Rick Johnson
Steve D'Aprano wrote: > Rustom Mody wrote: > > Ian wrote: > >> "Larry Martell" wrote: > >> 9:21 PM Rustom Mody wrote: > > > > Statement 1: Aeroplanes fly. Statement 2: Submarines swim. > > > > Are these two statements equally acceptable? [Inspired > > > > by a talk by Noam Chomsky] > > > There sh

Re: tkinter keypress events are a mess for numpad keys

2017-09-03 Thread Rick Johnson
Irmen de Jong wrote: > Using tkinter in python3, I was trying to intercept > individual keypresses (and releases) of keys on the numeric > keypad. I want to use this as a simple joystick simulation. > While you can bind the event, actually doing > something sensible with it in a cross platform way

Re: meaning of [ ]

2017-09-03 Thread Rick Johnson
Andrej Viktorovich wrote: > I suppose p becomes array of strings but what [] means in this statement? Generally, it's an inline form of writing a loop that returns a list. There are other types as well. https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions -- https://mail.p

Re: Python... feeding an instance as an argument into a new instance.

2017-09-03 Thread Rick Johnson
On Saturday, September 2, 2017 at 7:45:14 PM UTC-5, Steve D'Aprano wrote: > On Sun, 3 Sep 2017 08:34 am, Chris Roberts wrote: > > > Perhaps someone here could help me to get this into > > perspective. Somehow when we start to feed an instance as > > the argument in a new instance. my head explodes

Re: Question: "load"ing a shared object in python

2005-01-27 Thread Rick L. Ratzel
c.so.6') >>> a.call('time'), time.time() (929723914, 929723914.498) I'm guessing that there might be some C++ issues, but maybe it's worth looking into. Rick -- http://mail.python.org/mailman/listinfo/python-list

SFTP

2005-06-03 Thread Kornfeld Rick (sys1rak)
Title: Message Good Morning   I have scoured the internet looking for an Python SFTP API. So far, I have been unable to find a suitable answer. Our needs are pretty basic. FTP & TELNET are being removed from our environment and I need to utilize SFTP for file transfers.   As is probably sai

How to stop subprocesses from copying listening sockets

2008-12-25 Thread Rick van Hattem
this: import time time.sleep(60) And we run the main server and kill it after that (i.e. using netstat to find the PID), we'll see that the new process which does nothing besides wait for 60 second will listen on port 1234 (use netstat to confirm). Anyone has an idea on how to circumvent th

Re: dummy needs help with Python

2008-12-25 Thread Rick van Hattem
On Friday 26 December 2008 03:24:41 [email protected] wrote: > I don't have time to work my way through the online Python tutorial. I've > tried a couple of forums but nobody has answered my questions. There are loads of Python tutorials on the net, some will teach you the basics in 5 minutes, o

Re: How to stop subprocesses from copying listening sockets

2008-12-25 Thread Rick van Hattem
On Friday 26 December 2008 04:05:43 Roy Smith wrote: > In article , > > Rick van Hattem wrote: > > Recently I've started building a program that spawns new processes when > > requested via http, since the http interface doesn't need to be fancy > > I'

<    7   8   9   10   11   12