Re: python list index - an easy question

2016-12-18 Thread Michael Torrie
On 12/18/2016 09: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 understa

Re: learning and experimenting python.

2016-12-30 Thread Michael Torrie
On 12/30/2016 12:08 PM, [email protected] wrote: > LAN you are right. I am agree with you that it's easy to recognise. > > But look > $ for normal user > # for special user/root > % for other shell For python > And so on... > Why? > Why their developer selected that? > Is there any spec

Re: learning and experimenting python.

2016-12-30 Thread Michael Torrie
On 12/30/2016 06:46 PM, eryk sun wrote: > On Fri, Dec 30, 2016 at 7:49 PM, Michael Torrie wrote: >> >> Is there a special reason bourne shell uses $ and #? > > To me, "$" is for the [$]tandard shell prompt, and "#" noticeably > distinguishes root

Re: learning and experimenting python.

2016-12-30 Thread Michael Torrie
On 12/30/2016 04:26 PM, [email protected] wrote: > That's not the answer. > If you don't have answer, please don't answer like this, because that will > confuse others also. I don't believe anyone will be confused. Clearly there's no answer that you understand, or one that would satisfy you

Re: learning and experimenting python.

2016-12-30 Thread Michael Torrie
On 12/30/2016 07:05 PM, Wildman via Python-list wrote: > On Fri, 30 Dec 2016 23:39:43 +, Erik wrote: > >> On 30/12/16 23:34, [email protected] wrote: >>> You are also confusing me. >>> But there mustbe some reason. >>> What happens if your student questions you like this.? >>> And may be

Re: Cleaning up conditionals

2016-12-30 Thread Michael Torrie
On 12/30/2016 05:26 PM, Deborah Swanson wrote: > I'm still wondering if these 4 lines can be collapsed to one or two > lines. If the logic is clearly expressed in the if blocks that you have, I don't see why collapsing an if block into one or two lines would even be desirable. Making a clever one

Re: Choosing a Python IDE. what is your Pythonish recommendation? I do not know what to choose.

2017-01-02 Thread Michael Torrie
On 01/02/2017 04:38 AM, Antonio Caminero Garcia wrote: > The problem with Vim is the learning curve, so I know the very basic > stuff, but obviously not enough for coding and I do not have time to > learn it, it is a pity because there are awesome plugins that turns > Vim into a lightweight powerfu

Re: Clickable hyperlinks

2017-01-03 Thread Michael Torrie
On 01/03/2017 04:32 PM, Deborah Swanson wrote: > The GUI consoles I have are in Pycharm, the IDLE that comes with > Anaconda, and Spyder. PyCharm and IDLE both ask for internet access when > I open them, so they're capable of opening links, but whether that means > their output space is capable of

Re: Clickable hyperlinks

2017-01-03 Thread Michael Torrie
On 01/03/2017 08:28 PM, Deborah Swanson wrote: > I think you're making this too complicated. I meant a console in a GUI > application. Ahh. Well, a "console in a GUI application" is whatever you make it[1]. There's no single "GUI console" hence my confusion and the confusion expressed by the other

Re: Clickable hyperlinks

2017-01-03 Thread Michael Torrie
On 01/03/2017 08:46 PM, Deborah Swanson wrote: > Actually it is, or at least it doesn't happen in all email readers. > Mine, for instance, never breaks up threads. Mine doesn't either, which illustrates the issue. This message, for example appears under a long thread that started out life as "men

Re: Clickable hyperlinks

2017-01-04 Thread Michael Torrie
On 01/04/2017 03:58 PM, Deborah Swanson wrote: > Thank you, thank you! Finally, at least one person on this list knows > about something (anything) in the python world that is internet aware. > It's also occurred to me that Beautifulsoup downloads data from a url, > so that code must have access to

Re: Clickable hyperlinks

2017-01-04 Thread Michael Torrie
On 01/04/2017 09:19 PM, Deborah Swanson wrote: > Or, take a look at import's code and figure out how it opens a url in a > browser. I imagine it's the 'webbrowser' module you mention. If it tries > several methods, just pick one that will work for you. webbrowser is part of the python standard lib

Re: Python for WEB-page !?

2017-01-05 Thread Michael Torrie
On 01/05/2017 04:53 PM, Victor Porton wrote: > Ionut Predoiu wrote: > >> I am a beginner in programming language. >> I want to know what version of Python I must to learn to use, beside of >> basic language, because I want to integrate in my site 1 page in which >> users to can made calculus based

Re: Python for WEB-page !?

2017-01-05 Thread Michael Torrie
On 01/05/2017 05:57 AM, Ionut Predoiu wrote: > Good afternoon, > > I am a beginner in programming language. I want to know what version > of Python I must to learn to use, beside of basic language, because I > want to integrate in my site 1 page in which users to can made > calculus based on my fo

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
On 01/03/2017 04:32 PM, Deborah Swanson wrote: > The GUI consoles I have are in Pycharm, the IDLE that comes with > Anaconda, and Spyder. PyCharm and IDLE both ask for internet access when > I open them, so they're capable of opening links, but whether that means > their output space is capable of

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
On 01/03/2017 08:46 PM, Deborah Swanson wrote: > Actually it is, or at least it doesn't happen in all email readers. > Mine, for instance, never breaks up threads. Mine doesn't either, which illustrates the issue. This message, for example appears under a long thread that started out life as "me

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
On 01/03/2017 08:28 PM, Deborah Swanson wrote: > I think you're making this too complicated. I meant a console in a GUI > application. Ahh. Well, a "console in a GUI application" is whatever you make it[1]. There's no single "GUI console" hence my confusion and the confusion expressed by the oth

Re: Clickable hyperlinks

2017-01-06 Thread Michael Torrie
On 01/04/2017 03:58 PM, Deborah Swanson wrote: > Thank you, thank you! Finally, at least one person on this list knows > about something (anything) in the python world that is internet aware. > It's also occurred to me that Beautifulsoup downloads data from a url, > so that code must have access to

Re: Python for WEB-page !?

2017-01-06 Thread Michael Torrie
On 01/05/2017 05:57 AM, Ionut Predoiu wrote: > Good afternoon, > > I am a beginner in programming language. I want to know what version > of Python I must to learn to use, beside of basic language, because I > want to integrate in my site 1 page in which users to can made > calculus based on my for

Re: Python for WEB-page !?

2017-01-06 Thread Michael Torrie
On 01/05/2017 04:53 PM, Victor Porton wrote: > Ionut Predoiu wrote: > >> I am a beginner in programming language. >> I want to know what version of Python I must to learn to use, beside of >> basic language, because I want to integrate in my site 1 page in which >> users to can made calculus based

Re: Using sudo with pip3?

2017-01-07 Thread Michael Torrie
On 01/07/2017 11:39 AM, Clint Moyer wrote: > All Linux operating systems come with Python installed, with more > recent systems such as Arch defaulting /usr/bin/python to Python3, > since Python2 discontinued some 7-9 years ago. Poor choice of words, in my opinion. Python 2 has not received new

Re: Clickable hyperlinks

2017-01-09 Thread Michael Torrie
On 01/09/2017 06:00 AM, Deborah Swanson wrote: > Rhodri James wrote, on January 09, 2017 4:28 AM >> >> Nope. PyCharm outputs text to the console that the console >> chooses to >> interpret as a link and makes clickable. As Stephen pointed >> out right >> back at the beginning of this thread,

Re: Clickable hyperlinks

2017-01-09 Thread Michael Torrie
On 01/09/2017 10:27 AM, Michael Torrie wrote: >> You can use tkinter (code >> in a program) to make clickable links in the console, > > Unless you're talking about an implementation of a console or terminal > emulator in tkinter, this is incorrect. Tkinter does not d

Re: Clickable hyperlinks

2017-01-09 Thread Michael Torrie
On 01/09/2017 06:02 PM, Deborah Swanson wrote: > Fair enough. I only suggested that they could have started their own > thread, but mainly just to point out that they would have been off-topic > if they did. I didn't demand that they do so, I just wanted them to > think about it. I don't see how i

Re: Using namedtuples field names for column indices in a list of lists

2017-01-12 Thread Michael Torrie
On 01/12/2017 02:26 AM, Deborah Swanson wrote: > It's true, I've only been on this list a few weeks, although I've seen > and been on the receiving end of the kind of "help" that feels more like > being sneered at than help. Not on this list, but on Linux and similar > lists. There does seem to be

Problem while building Python 3.6 from source.

2017-01-13 Thread Michael S
Hello, I am new to this mailing-list and I really don't know whether this mail should belong to python-dev. Please tell me, if so. Unfortunately, I have got the following problem: I wanted to build and install Python 3.6 from source but did not succeed. To clarify my situation, I got as an operat

Re: Can not run the Python software

2017-01-13 Thread Michael Torrie
On 01/13/2017 06:34 PM, Bernard via Python-list wrote: > Hi, > > Just downloaded Python 3.6.0 2016-12-23 and PyCharm. Tried to run the "Hello > World" program and got the following message: > "Process finished with exit code 1073741515 (0xC135)" > I am using Windows 8.1 on an HP ENVY Touchs

Re: Can not run the Python software

2017-01-13 Thread Michael Torrie
On 01/13/2017 08:32 PM, Joseph L. Casale wrote: >> Just downloaded Python 3.6.0 2016-12-23 and PyCharm. Tried to run the "Hello >> World" program and got the following message: >> "Process finished with exit code 1073741515 (0xC135)" >> I am using Windows 8.1 on an HP ENVY Touchsmart Notebook

Re: Problem while building Python 3.6 from source.

2017-01-15 Thread Michael S
Sat, Jan 14, 2017 at 5:00 AM, Michael S wrote: >> Hello, >> I am new to this mailing-list and I really don't know whether this >> mail should belong to python-dev. Please tell me, if so. > > Hi and welcome! This kind of thing is best on this list initially. > >> Unfo

Re: Python 3.6 Installation

2017-01-17 Thread Michael Torrie
On 01/17/2017 03:31 PM, Terry Reedy wrote: > On 1/17/2017 1:23 PM, Earl Izydore wrote: >> I having problems installing Python 3.6. I was using Python 2.7 >> successfully. >> >> Today, I installed python-3.6.0.exe. > > Which binary? from where? > >> At the end of the installation I got a message

Re: Python 3.6 Installation

2017-01-17 Thread Michael Torrie
On 01/17/2017 07:12 PM, Steven D'Aprano wrote: > On Wednesday 18 January 2017 12:30, Michael Torrie wrote: > >> Yes googling error messages is a good idea. However the SO link seems to >> describe this problem as a missing DLL, probably the VS 2015 runtime >> redistr

Re: Python 3.6 Installation

2017-01-18 Thread Michael Torrie
On 01/18/2017 10:59 AM, eryk sun wrote: > On Wed, Jan 18, 2017 at 6:23 AM, Terry Reedy wrote: >> Not everyone has run Windows update since the current runtime was released. > > Python's installer tries (and sometimes fails) to install the > KB2999226 update, which installs an old version of the U

Re: python corrupted double-linked list error

2017-01-19 Thread Michael Torrie
On 01/19/2017 05:53 PM, Xristos Xristoou wrote: > > > how to understand that ?solution ? Well the problem is likely in the gdal or/and qgis modules. You'll probably want to talk to the qgis folks about this problem. It's not a bug in Python itself. If you can reproduce the problem with a minim

Re: How coding in Python is bad for you

2017-01-23 Thread Michael Torrie
On 01/23/2017 10:34 AM, Chris Angelico wrote: > I would respond point-by-point if I thought the author had a clue. Yeah a pretty bizarre, flame-bait blog post. Glad I use an ad-blocker as a matter of course. I'm uncertain as to why Mark chose to post that particular little gem to the list. It's

Re: Is it possible to get the Physical memory address of a variable in python?

2017-01-23 Thread Michael Torrie
On 01/23/2017 10:49 AM, Sourabh Kalal wrote: > how we can access the value from using id.. > like x=10 > id(x) > 3235346364 > > how i can read value 10 using id 3235346364 Many objects in python such as numbers like 10 or strings are immutable; they can never be altered once called into existance

Re: Is shutil.get_terminal_size useless?

2017-01-28 Thread Michael Torrie
On 01/28/2017 04:00 AM, Steve D'Aprano wrote: >> $ COLUMNS=123 python3 test_gts.py | cat >> shutil: os.terminal_size(columns=123, lines=999) >> os: os.terminal_size(columns=72, lines=48) Interesting. On my machine with Python 3.4, calling os.get_terminal_size() and piping the output results in the

Re: Is shutil.get_terminal_size useless?

2017-01-28 Thread Michael Torrie
On 01/28/2017 09:03 AM, Michael Torrie wrote: > On 01/28/2017 04:00 AM, Steve D'Aprano wrote: >>> $ COLUMNS=123 python3 test_gts.py | cat >>> shutil: os.terminal_size(columns=123, lines=999) >>> os: os.terminal_size(columns=72, lines=48) > > Interestin

Re: Is shutil.get_terminal_size useless?

2017-01-28 Thread Michael Torrie
On 01/28/2017 09:15 AM, Steve D'Aprano wrote: > Then get_terminal_size() should raise, unless you explicitly ask for a > default size. Which it does if you call it on the standard out file handle, which is the default, and for most applications, the most useful. -- https://mail.python.org/mailm

Re: Is shutil.get_terminal_size useless?

2017-01-28 Thread Michael Torrie
On 01/28/2017 09:15 AM, Steve D'Aprano wrote: > Then explain why os.get_terminal_size() returns the correct answer. Basically you were asking two different questions there. shutil.get_terminal_size always asks the question of size of the terminal that the standard output file handle is connected t

Re: What are your opinions on .NET Core vs Python?

2017-01-30 Thread Michael Torrie
On 01/30/2017 11:44 AM, Juan C. wrote: > On Sun, Jan 29, 2017 at 1:06 AM, Juan C. wrote: >> >> As you guys might know, .NET Core is up and running, promising a >> "cross-platform, unified, fast, lightweight, modern and open source >> experience" (source: .NET Core official site). What do you guy

Re: What are your opinions on .NET Core vs Python?

2017-01-30 Thread Michael Torrie
On 01/30/2017 06:18 PM, Joseph L. Casale wrote: > Which sounds pretty good to me, they are both high performance, mature > and rich languages. Sure it's a matter of personal preference and need. I happen to find the expressivity and flexibility of Python (warts and all) to be rather liberating co

Re: What are your opinions on .NET Core vs Python?

2017-01-30 Thread Michael Torrie
On 01/30/2017 06:52 PM, Nathan Ernst wrote: > self vs this, and you might start a language holy war. Actually no, you misread his point. He was speaking of C#, not Python. In C#, the only word you can use is "this." He was saying that you can use the explicit self paradigm in C#. Simply prefix ea

Re: What are your opinions on .NET Core vs Python?

2017-01-31 Thread Michael Torrie
On 01/30/2017 10:31 PM, Gregory Ewing wrote: > Michael Torrie wrote: >> He was saying that you can >> use the explicit self paradigm in C#. Simply prefix each member variable >> with "this." > > One can do that in one's own code, but it doesn't

Re: sorting a list of dicts by a computed field

2017-01-31 Thread Michael Torrie
On 01/31/2017 01:26 PM, Larry Martell wrote: > I have a list of dicts and one item of the dict is a date in m/d/Y > format. I want to sort by that. I tried this: > > sorted(data['trends'], key=lambda k: > datetime.strptime(k['date_time'],'%m/%d/%Y')) > > But that fails with: > > Exception Type:

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread Michael Torrie
On 02/01/2017 01:51 PM, Νίκος Βέργος wrote: > as well as input() for both user & pass combo but iam not getting in chrome > the basic pop-up HTTP auth window. > > Any idea why? What you're describing is not something you can do with an interactive Python script. HTTP-level authentication is req

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Michael Torrie
On 02/01/2017 01:03 PM, Wildman via Python-list wrote: > > It is the proper way. This page helps explain it. > > http://askubuntu.com/questions/784068/what-is-gi-repository-in-python > >> ... and doesn't it need an internet connection? > > No. However the gi module provides access to GTK+3, a

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Michael Torrie
On 02/01/2017 02:29 PM, Chris Green wrote: > OK, thank you, what a strange way to do it. Why is it strange? Essentially, python bindings for any GObject-based library are now fully automatic via this gi module. No longer do we need custom bindings for each component of a glib-based library. Thi

Re: best way to ensure './' is at beginning of sys.path?

2017-02-03 Thread Michael Torrie
On 02/03/2017 12:07 PM, Wildman via Python-list wrote: > Sorry, I forgot something important. If you use > /etc/rc.local, the execute bit must be set. I don't think this is what Neal Becker was asking about. He's talking about the Python module search path (sys.path) not the operating system PAT

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Michael Felt
On 04-Feb-17 02:07, Cameron Simpson wrote: On 03Feb2017 17:21, Wildman wrote: On Sat, 04 Feb 2017 09:25:42 +1100, Cameron Simpson wrote: Also, what you describe with rc.local wouldn't work anyway, even if it had ben what was asked. Of course, you are correct. I don't know where my head w

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Michael Torrie
On 02/04/2017 08:19 AM, Wildman via Python-list wrote: > No, I do not know. You might try your question in > a linux specific group. Personally I don't understand > the danger in having the dot in the path. The './' > only means the current directory. DOS and Windows > has searched the current

Re: best way to ensure './' is at beginning of sys.path?

2017-02-04 Thread Michael Torrie
On 02/04/2017 12:20 PM, Lew Pitcher wrote: > It doesn't take root access to write a file to /tmp > In fact, /tmp is specifically set up to allow /any/ user to create /any/ file > or directory in it. > > Witness: > > > guest@bitsie:~$ chmod a+x /tmp/dothis > > Hey! I've even made the file exe

Re: issues when buidling python3.* on centos 7

2018-03-26 Thread Michael Torrie
On 03/25/2018 10:15 AM, joseph pareti wrote: > The following may give a clue because of inconsistent python versions: > > [joepareti54@xxx ~]$ python -V > Python 3.5.2 :: Anaconda 4.3.0 (64-bit) What does 'which python' return? As Joseph said, hopefully you didn't overwrite /usr/bin/python with

Re: Pep8 for long pattern

2018-03-27 Thread Michael Torrie
On 03/27/2018 08:17 AM, Ganesh Pal wrote: > Hello Python friends, > > How do I split the below regex , so that it fits within the character > limit of 79 words > > > pattern = [ > r'(?P([0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+:[0-9a-fA-F]+::HEAD))', > > r'(?P(owner:\s+[0-9a-fA-F]+:

Re: String Formatting with new .format()

2018-03-27 Thread Michael Torrie
On 03/26/2018 09:37 AM, Ganesh Pal wrote: > Hi Team, > > Just a quick suggestion, on string formatting with .format() which of the > below is better , given both give the same result . No they don't. Look more closely at the output. attempts = 1 msg2 = "Hello" print "Retry attempt

Re: Calling Matlab (2016a) function from Python(3.6)

2018-03-29 Thread Michael Torrie
On 03/28/2018 11:24 PM, Rishika Sen wrote: > I tried these options too as suggested by Paul... > h.Execute ("run('H:\\rishika\\MATLAB\\filewrite.m')") > '??? Error using run (line 41)\nH:\\rishika\\MATLAB\\filewrite.m not > found.\n\n' Crazy question, but you're sure of that path? h.E

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-31 Thread Michael Torrie
On 03/31/2018 08:58 AM, Etienne Robillard wrote: > I was just wondering, could the fact that the Python community is > willing to discontinue using and developing Python 2 softwares, does > that mean we are stopping to support standard computers and laptops > as well? I've tried several times bu

Re: Python Developer Survey: Python 3 usage overtakes Python 2 usage

2018-03-31 Thread Michael Torrie
On Mar 31, 2018 09:58, "Etienne Robillard" wrote: Le 2018-03-31 à 11:40, Michael Torrie a écrit : > On 03/31/2018 08:58 AM, Etienne Robillard wrote: > >> I was just wondering, could the fact that the Python community is >> willing to discontinue using and develop

Re: Cant uninstall, modify or repair python

2018-04-21 Thread Michael Torrie
On 04/21/2018 11:43 AM, [email protected] wrote: > I currently have python version 3.6.1 32 bit version on my laptop and when i > try to repair, it gives an error saying "The installer has encountered an > unexpected error installing this package. This may indicate a problem with > this package.

Re: best parallelisation strategy on python

2018-04-21 Thread Michael Torrie
On 04/18/2018 07:16 PM, simona bellavista wrote: > I have a code fortran 90 that is parallelised with MPI. I would like to > traslate it in python, but I am not sure on the parallelisation strategy and > libraries. I work on clusters, with each node with 5GB memory and 12 > processors or 24 proc

Poor corporate communication culture - was Re: syntax oddities

2018-05-20 Thread Michael Torrie
On 05/18/2018 06:25 AM, Paul Moore wrote: > There are two completely independent cultures here. In "Corporate" > cultures like where I work (where IT and business functions interact a > lot, and business users typically use tools like Outlook) top-posting > is common, conventional, and frankly, eff

Re: Usenet Gateway

2018-05-24 Thread Michael Torrie
On 05/23/2018 12:03 PM, Grant Edwards wrote: > Yes. NNTP and NNTP clients were designed from the ground up to deal > with ongoing discussions shared by large groups of people posting lots > of messages, and they're _very_ good at. > > Email was designed for one person sending one message to anoth

Re: Usenet Gateway

2018-05-24 Thread Michael Torrie
Comparing to IMAP and Thunderbird: On 05/23/2018 04:39 PM, Chris Green wrote: > Well from other comments here it seems I'm not alone but anyway:- > > Proper threading etc. is built in check. > > It's automatically archived and one can search back through > threads for old postings,

Re: Usenet Gateway

2018-05-24 Thread Michael Torrie
On 05/24/2018 07:10 AM, Chris Green wrote: > A *thread* yes, but not a whole list. I.e. if you read this using > mail/IMAP you can mark a thread read but you can't mark *all* Python > list messages read in one go can you? With tin/Usenet I look at > the list of new subjects in the Python group

Re: Usenet Gateway

2018-05-24 Thread Michael Torrie
On 05/24/2018 07:01 AM, Steven D'Aprano wrote: > On Thu, 24 May 2018 05:44:26 -0600, Michael Torrie wrote: > >> I agree web forums really suck for any kind of multi-user conversation. > > Oh good. Because the Python core-devs are talking about moving to > Github's

Re: Usenet Gateway

2018-05-24 Thread Michael Torrie
On 05/24/2018 08:20 AM, Grant Edwards wrote: > But you had to jump through hoops with procmail and server/client side > filtering to get there. True, but it takes maybe 30 seconds for each new list I sign up for, and then it's out of sight, out of mind. I already do a ton of filtering on my inbox

Re: Sorting NaNs

2018-06-07 Thread Michael Lamparski
g/mailman/listinfo/python-list > In any case, it's verifiably not true for CPython. > >>> def birthday(b): > ... rand = random.random > ... xs = [rand() for _ in range(2**b)] > ... return len(xs) - len(set(xs)) > ... > >>> birthday(24) > 0 >

Re: Posting warning message

2018-06-12 Thread Michael Torrie
On 06/12/2018 08:48 AM, T Berger wrote: > I deleted them a number of time, then got a bar across the page indicating > that a post had been deleted. It's nuts that you can't edit your own post. This "forum" is actually a mailing list mirrored to Usenet, so whatever you post gets instantly emailed

Re: Python list vs google group

2018-06-15 Thread Michael Torrie
On 06/15/2018 09:28 AM, T Berger wrote: > I'm suspecting that posting to python google groups (this site) gets > more responses than mailing to the python list. Am I correct? Also, > contrary to what I read on the python list information sheet, what > shows up in this forum does not match what come

Re: syntax difference

2018-06-20 Thread Michael Torrie
On 06/20/2018 05:53 AM, [email protected] wrote: > I suggest that such features just make life a little simpler. (And > make writing an efficient interpreter a little bit easier.) And I posit that most efficient interpreters don't use switch/case at all, but rather jump tables. -- https://mail.p

Re: syntax difference

2018-06-20 Thread Michael Torrie
On 06/20/2018 03:35 AM, [email protected] wrote: > Pointers are merely an extra level of indirection; they can be made to fit. I'm hard pressed to think of any way in which pointers could fit into Python given the way python variables work and given the virtual machien architecture and abstractio

Did zip ever used to fail with 0 arguments?

2018-06-22 Thread Michael Lamparski
e? But I can hardly even begin to guess how, because Python is more or less the only dynamically-typed language I use!) --- Michael -- https://mail.python.org/mailman/listinfo/python-list

Re: I lost nearly all my modules installing 3.7

2018-07-02 Thread Michael Torrie
On 06/30/2018 11:10 AM, Elliott Roper wrote: > I should have mentioned that none of this went wrong in 3.6. All I'm after > are packages I can install with pip3. I really don't need to go down all the > twisty passages installing Fortran That's because there were likely binary packages available

Re: Multi-threading with a simple timer?

2018-07-03 Thread Michael Vilain
Won't this code send a signal *regardless* of the user input to the process within 15 seconds. I don't see how it's tied to terminal input. From what I can tell, you need to create your own version of input with a timeout option. This doesn't do that. -- Michael Vilain 6

Re: Multi-threading with a simple timer?

2018-07-03 Thread Michael Vilain
The way I've done the "input with timeout" requirement the OP requested is dependent on the operating system. The current implementation of the input function doesn't offer that feature. https://docs.python.org/3/library/functions.html#input In another language, I used low-levelsystem calls to

Re: about main()

2018-07-05 Thread Michael Torrie
On 07/05/2018 11:47 AM, Calvin Spealman wrote: > That wasn't me, but I do agree with the sentiment in that its often silly > to focus on them at the wrong time and without constraints that warrant > that focus. Premature optimization is the root of all evil, the saying goes. I see this kind of th

Re: Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

2018-07-11 Thread Michael Torrie
On 07/11/2018 08:09 AM, jkn wrote: > So I am looking for confirmation of this, and/or whether there is any way of > running a Tkinter application in 'console' mode, running a main loop and> > both outputting data and accepting, and acting on, key presses. So far as I know, no this isn't possible,

Re: PyCharm

2018-07-20 Thread Michael Vilain
I'm running PyCharm Edu (to go through their great tutorial). It's version is 2018.1.3, which I got from the web site. Unless you mistyped the version, this is the current release and yours is very old. -- Michael Vilain 650-322-6755 > On 20-Jul-2018, at 8:11 PM 🌙, no@none.

Re: PyCharm

2018-07-23 Thread Michael Vilain
I used the pycharm edu version from here: https://www.jetbrains.com/pycharm-edu/download/download-thanks.html?platform=mac input works fine on it. YMMV. > On 20-Jul-2018, at 9:15 PM 🌙, [email protected] wrote: > > On Fri, 20 Jul 2018 20:56:41 -0700, Michael Vilain > wrote: >

Re: Python shuts down when I try to run a module

2018-07-23 Thread Michael Torrie
On 07/23/2018 01:00 AM, Lyra wrote: > Hello, > I’ve just started to learn Python coding, and downloaded version 3.7.0 from > the website.  I’ve written 5 or 6 small programs and saved them, but whenever > I try to run them, Python doesn’t work right.  The user answers the first > question and pr

Re: Anyone using cloud based monitoring/logging services with Python logging module?

2018-07-26 Thread Michael Vilain
ng real money. Go with an on-prem solution rather than something that's cloud based. Those can be configured and deployed painlessly. -- Michael Vilain 650-322-6755 > On 26-Jul-2018, at 10:05 AM 🌞, Malcolm Greene wrote: > > Looking for feedback on anyone who's using a

Re: How to decide (and know) which Python GTK version to use?

2018-07-30 Thread Michael Torrie
On 07/30/2018 11:04 AM, Akkana Peck wrote: > Yes, this is the future, since it lets you use both GTK3 and Python3. Unfortunately the automatically-generated bindings, while fast and complete, are not quite as pythonic as the old PyGTK bindings were. The abstraction layer pygobject provides leaks

Re: Connection refused when tryign to run bottle/flask web framweworks

2018-08-21 Thread Michael Torrie
On 08/20/2018 06:07 AM, Νίκος wrote: > Iam trying to access the bottle web framework running on my VPS as > > http://superhost.gr:8080/hello > > i get connection refused > The weird thing is that in my vps command line my hello app is in state of > listening > > [root@superhost public_html]# p

Re: Hi I'm trying to get live data from stock using python , is it possible?

2018-09-04 Thread Michael Torrie
On 09/04/2018 10:21 AM, [email protected] wrote: > Hi , > for example: > I want to know if AAPL is more than value 300 and if it does I want it to > send to me mail with gmail :) . thanks for the help.. > Yes it's definitely possible! Hop on Google and do some searches; you're bound to find

Re: Hi I'm trying to get live data from stock using python , is it

2018-09-05 Thread Michael Torrie
On 09/04/2018 10:21 AM, [email protected] wrote: > Hi , > for example: > I want to know if AAPL is more than value 300 and if it does I want it to send to me mail with gmail :) . thanks for the help.. > Yes it's definitely possible! Hop on Google and do some searches; you're bound to find so

fsxNet Usenet gateway problem again

2018-09-06 Thread Michael Torrie
On 09/05/2018 02:30 PM, Chris Angelico wrote: > I don't think this was spamming the list with the same question; a > glitch somewhere in a netnews server appears to be re-posting some old > posts. I wonder why this bbs gateway in New Zealand keeps doing this. Seems like someone contacts the postm

Re: python 3.7 - I try to close the thread without closing the GUI is it possible?

2018-09-15 Thread Michael Torrie
Here's a small PyQt example of using Qt's asynchronous facilities: http://zetcode.com/pyqt/qnetworkaccessmanager/ That should get the original poster started. -- https://mail.python.org/mailman/listinfo/python-list

Re: python 3.7 - I try to close the thread without closing the GUI is it possible?

2018-09-15 Thread Michael Torrie
On 09/15/2018 01:23 AM, Albert-Jan Roskam wrote: > > I try to close the thread without closing the GUI is it possible? > > > Qthread seems to be worth investigating: > https://medium.com/@webmamoffice/getting-started-gui-s-with-python-pyqt-qthread-class-1b796203c18c Or better yet, investigate Q

Re: python3.7 problem with validation - it doesnt work

2018-09-21 Thread Michael Torrie
On 09/19/2018 06:12 AM, [email protected] wrote: > python3.7 problem with validation - it doesn't work. I don't know what "validation" means, but MRAB has told you why it wasn't working. My question to you is why do you need that inner function anyway? An inner function is normally used to d

Re: Multiple problems with Python 3.7 under Windows 7 Home Premium

2018-09-21 Thread Michael Torrie
On 09/21/2018 07:22 AM, Spencer Graves wrote: > PYTHON - M PIP INSTALL PYAUDIO > > >   "python -m pip install pyaudio" stopped with 'error: Microsoft > visual C++14.0 is required.  Get it with "Microsoft Visual C++ Build > Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools";

Re: Explicit vararg values

2018-09-22 Thread Michael Torrie
On 09/16/2018 04:39 PM, Buck Evan wrote: > The syntax I'm proposing is: >f(**kwargs={'a': 1, 'b': 2}) > > as a synonym of f(a=1, b=2) when an appropriate dictionary is already on > hand. But if the kwargs dict already exists you can already unpack it: f(**kwargs) or f(**{'a': 1, 'b': 2}) So

Re: How to change '\\' to '\'

2018-10-02 Thread Michael Torrie
On 10/02/2018 12:48 AM, Ethan Furman wrote: > Even for two-person, private email discussions I prefer the interleaved > replies -- in a week when I have to remind myself what was discussed it > is much easier to comprehend. Absolutely. I've been saved from embarrassment countless times because w

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-03 Thread Michael Torrie
On 10/03/2018 09:26 AM, Musatov wrote: > I don't even know where to begin! (I'm reading the Dummies book) If you have no experience in computer programming, it's going to be a steep learning curve. But your first step is to learn Python and how to write programs in it. That book and others will h

Use Software Collections for RH - was Re: python not working on RHEL6

2018-10-03 Thread Michael Torrie
On 10/02/2018 07:59 AM, [email protected] wrote: > I guess from the little knowledge I have I should have executed > altinstall instead of install. Anyone know how to resolve this? Actually you probably should not have used a tarball at all. For some time now, Red Hat has offered more recen

Re: Use Software Collections for RH - was Re: python not working on RHEL6

2018-10-03 Thread Michael Torrie
On 10/03/2018 10:17 AM, Michael Torrie wrote: > On 10/02/2018 07:59 AM, [email protected] wrote: >> I guess from the little knowledge I have I should have executed >> altinstall instead of install. Anyone know how to resolve this? > > Actually you probably should not h

Re: Accessing clipboard through software built on Python

2018-10-27 Thread Michael Torrie
Couple of questions: On 10/27/2018 07:17 AM, Musatov wrote: > I am wondering if Python could be used to write a program that allows: > > 1. Highlight some text > 2. Ctl+HOTKEY1 stores the string of text somewhere as COPIEDTEXT1 This text comes from where? Another application? > 3. Highlight ano

Re: Overwhelmed by the Simplicity of Python. Any Recommendation?

2018-11-07 Thread Michael Torrie
On 11/07/2018 01:31 PM, MRAB wrote: > On 2018-11-07 09:20, Thomas Jollans wrote: >> I'll just take this opportunity to point out (for those that don't know) >> that Visual Studio Code (an open source cross-platform programmer's text >> editor of the same calibre as Sublime or Atom, not an IDE) has

Re: Learning Python (or Haskell) makes you a worse programmer

2016-03-28 Thread Michael Torrie
On 03/28/2016 06:44 PM, Steven D'Aprano wrote: > http://lukeplant.me.uk/blog/posts/why-learning-haskell-python-makes-you-a-worse-programmer/ I have the same problem as the writer. Working in Python makes me really dislike working in any other language! -- https://mail.python.org/mailman/listinf

Re: repeat items in a list

2016-03-30 Thread Michael Selik
I prefer itertools.chain.from_iterable to the sum trick. >>> from itertools import chain >>> lst = list('abc') >>> list(chain.from_iterable([s]*3 for s in lst)) ['a', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'] On Tue, Mar 29, 2016 at 5:28 PM Vito De Tullio wrote: > Random832 wrote: > > > How do

Re: Suggestion: make sequence and map interfaces more similar

2016-04-01 Thread Michael Selik
> On Mar 31, 2016, at 10:02 AM, Marko Rauhamaa wrote: > > However, weirdly, dicts have get but lists don't. Read PEP 463 for discussion on this topic. https://www.python.org/dev/peps/pep-0463/ -- https://mail.python.org/mailman/listinfo/python-list

Re: The next major Python version will be Python 8

2016-04-01 Thread Michael Selik
It suddenly occurred to me that if Microsoft announced it's Ubuntu-in-Windows feature today, no one would believe it. On Thu, Mar 31, 2016 at 11:55 PM Steven D'Aprano wrote: > On Fri, 1 Apr 2016 11:13 am, Chris Angelico wrote: > > > Now's the time to get in with the ideas. My proposal is that Py

<    4   5   6   7   8   9   10   11   12   13   >