Re: Bloody rubbish

2021-05-06 Thread Michael Torrie
On 5/5/21 8:58 PM, Joe Pfeiffer wrote: > Mr Flibble writes: > >> Python is slow and significant whitespace is patently absurd. > > Why am I not surprised to learn your "fast" implementation turns out to > be something other than python? And it's bizarre that the OP, since he despises Python so

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-08 Thread Michael Torrie
On 5/8/21 3:28 PM, Mirko via Python-list wrote: > > I apologize for this OT post, especially because it's in reply to an > at least partly troll post, but I just can't resist. Sorry. > > P.S.: *NOT* among the core symptoms of (the high-functioning levels) > of ASS is the inability to learn. Mind

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-08 Thread Michael Torrie
On 5/8/21 6:23 PM, Jason C. McDonald wrote: > Usually, I find when people dump on CoCs, they're just angry at > accountability. I haven't known anyone yet who was a productive > member of Python and opposed to the CoC, at least in principle > and aim. I disagree. Many people are opposed to CoCs f

Re: OT: Autism in discussion groups (was: Re: Proposal: Disconnect comp.lang.python from python-list)

2021-05-09 Thread Michael Torrie
On 5/9/21 11:26 AM, Abdur-Rahmaan Janhangeer wrote: > Out of curiosity, how do people without a Code of Conduct > manage and prevent abuse in between people? I was about > to organise something last year but did not find a better solution > than a code of conduct to ensure smoothness. Well the idea

Re: Python install failing. Install log is available.

2021-05-21 Thread Michael Torrie
On 5/21/21 8:25 AM, Mats Wichmann wrote: > An install for all users will drop it into someplace different - by > default at the top of the drive, so e.g. C:\Python39. I just did an install of 3.9 on Windows 10. There was an option to install the launcher for all users but no option for installing

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 7:34 AM, hw wrote: > Perhaps you can't see how both examples are different because you're > looking at things from a python perspective. Sorry but they aren't all that different. In both cases you're shadowing printf. The difference is that C is a statically-typed, compiled language,

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:24 AM, Chris Angelico wrote: > On Tue, May 25, 2021 at 12:18 AM hw wrote: >> There are more alternatives: Python might create a new variable with >> the same name and forget about the old one. Or it doesn't forget about >> the old one and the old one becomes inaccessible (unless you

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:17 AM, hw wrote: > What does python actually do in the first example? Does it overshadow a > variable or does it change one? If it overshadows a variable, it would > be dubious, if it doesn't, it won't be dubious. Are you referring to this? num = input("Enter a number: ")

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:21 AM, Michael Torrie wrote: > Given your posts thus far, hw, I don't think Python is a good fit for > you. You're better off learning a language that more closely aligns with > the statically-typed languages you already know. That was unnecessarily harsh; my ap

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:37 AM, Chris Angelico wrote: > We're talking about many different things. Indeed. The context of that original question about whether this was shadowing or not seemed to be specifically about the num=input(); num=int(num) example that Cameron Simpson posted. Although hw was not cle

Re: learning python ...

2021-05-24 Thread Michael Torrie
On 5/24/21 8:42 AM, Schachner, Joseph wrote: > OMG that is awful abuse of Python! You have overloaded two Python > keywords by making variables of that name. Nitpick. hw did not overload keywords. Python does not allow keywords to be overloaded. Instead hw overwrote type names. Upon learning th

Re: learning python ...

2021-05-25 Thread Michael Torrie
On 5/24/21 9:53 PM, hw wrote: > That seems like an important distinction. I've always been thinking of > variables that get something assigned to them, not as something that is > being assigned to something. Your thinking is not incorrect. Assignment is how you set a variable to something. Fo

Re: imaplib: is this really so unwieldy?

2021-05-27 Thread Michael Torrie
On 5/27/21 10:42 AM, hw wrote: > What do you do with it when importing it? Do you somehow design your > programs as modules in some way that makes them usable as some kind of > library funktion? Yes, precisely. Typically I break up my python projects into logical modules, which are each kind o

Re: learning python ...

2021-05-28 Thread Michael Torrie
On 5/27/21 12:29 PM, hw wrote: > When the idea is to learn something, it's not exactly helpful to abandon > that idea when encountering the first obstacle or when someone tells you > you don't like it as much as they do ... We've had many new users approach the mailing list over the years. Alway

Re: curses apps on MS Windows?

2021-06-14 Thread Michael Torrie
On 6/13/21 11:44 AM, Grant Edwards wrote: > There's been a surprising amount of discussion lately about using > curses libraries on Windows OS. I'm surprised by this, because I don't > think I've ever even seen a Windows curses application. > > Are there examples of popular curses applications for

How Do I Get A Bug In Multiprocessing Fixed?

2021-06-17 Thread Michael Boom
The below issue is pretty serious and it is preventing me from using a system I wrote on a larger scale. How do I get this bug fixed? Thanks. https://bugs.python.org/issue43329 -- https://mail.python.org/mailman/listinfo/python-list

Re: argparse: delimiter for argparse list arguments

2021-08-03 Thread Michael Torrie
On 8/2/21 1:43 PM, Sven R. Kunze wrote: > Hi everyone, > > maybe, I am missing something here but is it possible to specify a > delimiter for list arguments in argparse: > > https://docs.python.org/3/library/argparse.html > > Usually, '--' is used to separate two lists (cf. git). I've not seen

Re: spyder does not work under root! [linux]

2021-10-11 Thread Michael Torrie
On 10/8/21 4:32 PM, Paulo da Silva wrote: > Às 22:56 de 08/10/21, Paulo da Silva escreveu: >> Hi! >> >> I need to debug a python3 script under root. I tried spyder but it does >> not work. >> >> Running as root without --no-sandbox is not supported. See >> https://crbug.com/638180. >> >> Thanks for

Re: spyder does not work under root! [linux]

2021-10-13 Thread Michael Torrie
On 10/13/21 12:09 PM, Paulo da Silva wrote: > spyder and eric are both python editors/debuggers! Why are they related > with web browsers?! Good point. I was going off of the chromium bug report. My bad. I mistook Spyder for Selenium, which is a web scraping scripting engine that does use a real

Re: Request to advise error for python.

2021-10-15 Thread Michael Torrie
On 10/15/21 5:37 PM, 정성학(대학원생-자동차IT융합전공) via Python-list wrote: > Dear Sir, > > resend request Unfortunately your message is still blank. Attachments such as screenshots are not visible to this list. Whenever you ask questions on the list it is helpful to: - state the operating system you are us

Re: get_axes not present?

2021-11-18 Thread Michael Torrie
On 11/18/21 10:54 AM, Mahmood Naderan via Python-list wrote: > As you can see I put the result of plot() to ax1 and then use some functions, > e.g. set_ylabel(). And what is the result of plot()? Is it a valid object, or is it None? -- https://mail.python.org/mailman/listinfo/python-list

Re: get_axes not present?

2021-11-21 Thread Michael Torrie
On 11/19/21 10:38 AM, Mahmood Naderan wrote: >> And what is the result of plot()?  Is it a valid object, or is it None? > > Well the error happens on the plot() line. I tried to print some information > like this: > > Any thoughts on that? It's not really possible for us to know what is happeni

Re: About get_axes() in Pandas 1.2.3

2021-11-22 Thread Michael Torrie
On 11/22/21 2:03 AM, Mahmood Naderan via Python-list wrote: > Hi > > I asked a question some days ago, but due to the lack of minimal > producing code, the topic got a bit messy. So, I have decided to ask > it in a new topic with a clear minimum code. > import pandas as pd > import csv,sys > impor

Re: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Michael Torrie
On 11/25/21 2:20 AM, Ulli Horlacher wrote: > When I compile my programs with pyinstaller, Windows classifies them as > virus and even deletes them! > > pyinstaller.exe --onefile --noconsole -i fex.ico fextasy.py > 187 INFO: PyInstaller: 4.7 > 187 INFO: Python: 3.10.0 > 218 INFO: Platform: Windows-

Re: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Michael Torrie
On 11/25/21 9:08 AM, Ulli Horlacher wrote: > I cannot submit my executables, because the Windows Virus scannners > deletes them as soon as I compile my program! Add an exclusion rule to your machine. While this is not an option for your end users, this will certainly allow you to work on the probl

Re: pyinstaller wrong classified as Windows virus

2021-11-25 Thread Michael Torrie
On 11/25/21 9:08 AM, Ulli Horlacher wrote: > I cannot submit my executables, because the Windows Virus scannners > deletes them as soon as I compile my program! I forgot to post this link: https://support.microsoft.com/en-us/windows/add-an-exclusion-to-windows-security-811816c0-4dfd-af4a-47e4-c30

Re: Inkscape

2022-01-10 Thread Michael Torrie
On 1/10/22 8:27 AM, Mandy and Michael Wilson via Python-list wrote: > I wonder if you can help me out please. I have recently added an > extension into Inkscape called Axidraw which should enable me to > hatchfill text, unforunately I am unable to use this facility as when I > open

Re: Best way to check if there is internet?

2022-02-07 Thread Michael Torrie
On 2/7/22 12:51, Chris Angelico wrote: > Some day, we'll have people on Mars. They won't have TCP connections - > at least, not unless servers start supporting connection timeouts > measured in minutes or hours - but it wouldn't surprise me if some > sort of caching proxy system is deployed. > > O

Re: PSA: Linux vulnerability

2022-03-09 Thread Michael Torrie
On 3/9/22 13:05, Marco Sulla wrote: > So my laziness pays. I use only LTS distros, and I update only when > there are security updates. > PS: any suggestions for a new LTS distro? My Lubuntu is reaching its > end-of-life. I prefer lightweight debian-like distros. Maybe Debian itself? -- https://

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-10 Thread Michael Torrie
On 3/10/22 06:03, Marco Sulla wrote: > I tried Debian on a VM, but I found it too much basical. A little > example: it does not have the shortcut ctrl+alt+t to open a terminal > that Ubuntu has. I'm quite sure it's simple to add, but I'm starting > to be old and lazy... Debian has the same desktop

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-10 Thread Michael Torrie
On 3/10/22 12:42, Marco Sulla wrote: > PS: Is it just my impression or is there a plebiscite for Debian? A vote? No I don't think so. Not sure what you mean. The reason we're all suggesting Debian is because you specifically said you want a LTS Debian-like distro. Can't get any more Debian-like

Re: Suggestion for Linux Distro (from PSA: Linux vulnerability)

2022-03-11 Thread Michael Torrie
On 3/11/22 11:03, Marco Sulla wrote: > Anyway I think I'll not install Debian, because it's LTS releases are > not long enough for me. I don't know if there's a distro based on > Debian that has a long LTS support, Ubuntu apart. Both Debian stable and Ubuntu LTS state they have a five year support

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 2:31 PM Juan Pablo Romero Méndez < [email protected]> wrote: > Hello, > > In online forums sometimes people complain that they end up having to test > constantly for None, or that a function's argument has a specific type / > shape (which immediately brings the followi

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 2:59 PM Chris Angelico wrote: > On Wed, Aug 10, 2016 at 4:51 AM, Michael Selik > wrote: > > "File-like" is a good example. Rather than go through the frustration of > a > > formal definition for what is file-like, stay productive and

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Selik
On Tue, Aug 9, 2016 at 3:22 PM Juan Pablo Romero Méndez < [email protected]> wrote: > I'm actually looking for ways to minimize run time errors, so that would > include TypeError and AttributeError. > > In your "File-like" example having type information would prevent me from > even passing

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Torrie
On 08/09/2016 02:51 PM, Juan Pablo Romero Méndez wrote: > 2016-08-09 13:18 GMT-07:00 Rob Gaddi : >> It's not a style, it's the absence of one. >> >> def add2list(lst, elem): >> lst.extend([elem, elem]) >> return lst >> >> I did all the type checking I needed to there; none whatsoever. If >

Re: What's the best way to minimize the need of run time checks?

2016-08-09 Thread Michael Selik
On Wed, Aug 10, 2016 at 1:22 AM Juan Pablo Romero Méndez < [email protected]> wrote: > 1) catching exceptions at the point where you care, 2) > preemptively check for certain runtime conditions to avoid exceptions 3) > write as many tests as possible 4) learn to live with runtime errors. >

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Michael Selik
On Tue, Aug 9, 2016 at 9:31 PM Steven D'Aprano wrote: > > http://steve-yegge.blogspot.com.au/2008/05/dynamic-languages-strike-back.html Great link. I enjoyed the video, too. https://www.youtube.com/watch?v=tz-Bb-D6teE Buried deep in the QA section, there's a comment from the audience (I'll par

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Michael Selik
On Wed, Aug 10, 2016 at 1:41 PM Cai Gengyang wrote: > I managed to get this piece of code to work : > > >>> print("This program calculates mpg.") > This program calculates mpg. > >>> milesdriven = input("Enter miles driven:") > Enter miles driven: 50 > >>> milesdriven = float(milesdriven) > >>> g

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Michael Selik
On Wed, Aug 10, 2016, 4:34 PM Juan Pablo Romero Méndez < [email protected]> wrote: > > I've been trying to find (without success so far) an example of a situation > where the dynamic features of a language like Python provides a clear > advantage over languages with more than one type. > On

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Michael Selik
On Wed, Aug 10, 2016, 6:44 PM Juan Pablo Romero Méndez < [email protected]> wrote: > As to why I asked that, there are several reasons: I have a very concrete > need right now to find pragmatic ways to increase code quality, reduce > number of defects, etc. in a Python code base. But also I

Re: Python slang

2016-08-10 Thread Michael Torrie
On 08/10/2016 10:19 AM, Random832 wrote: > On Wed, Aug 10, 2016, at 07:59, Dennis Lee Bieber wrote: >> The use of = also has a long history... FORTRAN (where the comparison >> was .EQ.), BASIC (granted, K&K required assignment to start with the >> keyword LET, so the use of = was mainly a deli

Re: What's the best way to minimize the need of run time checks?

2016-08-10 Thread Michael Torrie
On 08/10/2016 11:29 AM, Michael Selik wrote: > On Tue, Aug 9, 2016 at 9:31 PM Steven D'Aprano > wrote: > >> >> http://steve-yegge.blogspot.com.au/2008/05/dynamic-languages-strike-back.html > > > Great link. I enjoyed the video, too. > https://www.youtu

Re: Python slang

2016-08-10 Thread Michael Torrie
On 08/10/2016 05:57 PM, Michael Torrie wrote: > On 08/10/2016 10:19 AM, Random832 wrote: >> On Wed, Aug 10, 2016, at 07:59, Dennis Lee Bieber wrote: >>> The use of = also has a long history... FORTRAN (where the comparison >>> was .EQ.), BASIC (granted, K&K re

Re: Advice on optimizing a Python data driven rules engine

2016-08-11 Thread Michael Selik
On Thu, Aug 11, 2016 at 10:57 AM Malcolm Greene wrote: > Background: I'm building a rules engine for transforming rows of data > being returned by csv DictReader, eg. each row of data is a dict of column > name to value mappings. My rules are a list of rule objects whose > attributes get referen

Re: Asynchronous programming

2016-08-11 Thread Michael Selik
On Thu, Aug 11, 2016 at 11:01 AM Steven D'Aprano wrote: > That ... looks wrong. You're taking something which looks like a procedure > in the first case (trn.execute), so it probably returns None, and yielding > over it. Even it that's not wrong, and it actually returned something which > you ign

Re: Asynchronous programming

2016-08-11 Thread Michael Selik
On Thu, Aug 11, 2016 at 11:46 AM Michael Selik wrote: > On Thu, Aug 11, 2016 at 11:01 AM Steven D'Aprano < > [email protected]> wrote: > >> That ... looks wrong. You're taking something which looks like a procedure >> in the first case (trn.execu

Re: Print function not working

2016-08-11 Thread Michael Selik
On Thu, Aug 11, 2016 at 1:38 PM MRAB wrote: > On 2016-08-11 18:18, Chris Angelico wrote: > > On Fri, Aug 12, 2016 at 3:03 AM, Atri Mahapatra > > wrote: > >> I have installed IDLE 3.5.1 and wrote the following to check if print > is working. When it runs, I do not see anything is printed: > >> >

Re: What's the best way to minimize the need of run time checks?

2016-08-12 Thread Michael Torrie
On 08/12/2016 05:07 AM, Steven D'Aprano wrote: > The first time I ever compiled a full-sized application (not a particular > large one either, it was a text editor a little more featureful than > Notepad) it took something like nine hours to compile on a Mac SE (this was > circa 1990). How mad woul

Re: What's the best way to minimize the need of run time checks?

2016-08-12 Thread Michael Selik
On Fri, Aug 12, 2016, 7:11 AM Steven D'Aprano wrote: > > [1] Are there programming language aware spell checkers? If not, there > should be. > A good autocomplete is much like a spell-checker. I have far fewer spelling errors when using an editor with autocomplete. > -- https://mail.python.org

Re: Creating dictionary of items from Excel with mutliple keys

2016-08-13 Thread Michael Selik
On Sat, Aug 13, 2016 at 12:46 PM Atri Mahapatra wrote: > I am trying to create a following dictionary. I am reading data from excel > Rather than using xlrd or other tools to read from excel, can you save the file as CSV (comma-separated values)? I think you'll find Python's csv module is very p

Re: Win32 API in pywin32

2016-08-13 Thread Michael Torrie
On 08/13/2016 06:22 PM, Lawrence D’Oliveiro wrote: > On Saturday, August 13, 2016 at 10:49:11 PM UTC+12, eryk sun wrote: >> You can call GetFileSizeEx [1]. Or call GetFileInformationByHandleEx >> [2] to get the FileStandardInfo. These APIs use the LARGE_INTEGER >> union type, which has a long long

Re: Win32 API in pywin32

2016-08-13 Thread Michael Torrie
On 08/13/2016 06:22 PM, Lawrence D’Oliveiro wrote: > On Saturday, August 13, 2016 at 10:49:11 PM UTC+12, eryk sun wrote: >> You can call GetFileSizeEx [1]. Or call GetFileInformationByHandleEx >> [2] to get the FileStandardInfo. These APIs use the LARGE_INTEGER >> union type, which has a long long

Re: Anyone here running Python on a PowerPC?

2016-08-13 Thread Michael Torrie
On 08/13/2016 08:35 PM, Paul Rubin wrote: > Steven D'Aprano writes: >> Is there anyone here running Python on a PowerPC willing to help me >> diagnose and fix this issue? http://bugs.python.org/issue27761 > > https://duckduckgo.com/?q=powerpc+emulator > > gets a few hits, one on sourceforge and

Re: Anyone here running Python on a PowerPC?

2016-08-13 Thread Michael Torrie
On 08/13/2016 08:35 PM, Paul Rubin wrote: > Steven D'Aprano writes: >> Is there anyone here running Python on a PowerPC willing to help me >> diagnose and fix this issue? http://bugs.python.org/issue27761 > > https://duckduckgo.com/?q=powerpc+emulator > > gets a few hits, one on sourceforge and

Re: What's the best way to minimize the need of run time checks?

2016-08-14 Thread Michael Torrie
On 08/14/2016 04:45 PM, Lawrence D’Oliveiro wrote: > On Monday, August 15, 2016 at 4:31:44 AM UTC+12, BartC wrote: > >> But it can't create a new record or struct type at runtime which can >> then be accessed using normal syntax, in compiled code that already >> existed before the record was cre

Re: Finding the first index in a list greater than a particular value

2016-08-14 Thread Michael Selik
On Sun, Aug 14, 2016 at 2:21 PM Atri Mahapatra wrote: > I have a list of dictionaries which look like this: > [{'Width': 100, 'Length': 20.0, 'Object': 'Object1'}, {'Width': 12.0, > 'Length': 40.0, 'Object': 'Object2'}.. so on till 10] > > I would like to find the first index in the list of d

Re: Finding the first index in a list greater than a particular value

2016-08-15 Thread Michael Selik
On Mon, Aug 15, 2016 at 2:01 AM Jussi Piitulainen < [email protected]> wrote: > There is a tradition of returning -1 when no valid index is found. > Sometimes it's better to break with tradition. Raise a ValueError. No silent errors, and all that Zen. -- https://mail.python.org/mailm

Re: What's the best way to minimize the need of run time checks?

2016-08-17 Thread Michael Selik
On Sun, Aug 14, 2016 at 11:01 AM wrote: > On Sunday, August 14, 2016 at 7:09:47 AM UTC+1, Paul Rubin wrote: > > Steven D'Aprano writes: > > > If the Python community rallies around this "record" functionality and > > > takes to it like they took too namedtuple > > > > I like namedtuple and I thin

Re: Two-Dimensional Expression Layout

2016-08-20 Thread Michael Selik
On Fri, Aug 19, 2016 at 5:01 AM Lawrence D’Oliveiro wrote: > It is handy to be able to keep complex expressions together sometimes, > when breaking them up would simply obscure their structure. To avoid lines > getting long, why not take advantage of the two available screen/page > dimensions to

Re: Two-Dimensional Expression Layout

2016-08-20 Thread Michael Selik
On Sat, Aug 20, 2016 at 6:21 PM Lawrence D’Oliveiro wrote: > > p0 = (0, 0) > > p1 = (major_dim, 0) > > colour_stops = (0, rect_1_colour), (1, complement(rect_1_colour)) > > rect_1_pattern = qah.Pattern.create_linear(p0, p1, colour_stops) > > That’s an example of what I mean about

Re: Two-Dimensional Expression Layout

2016-08-20 Thread Michael Selik
On Sat, Aug 20, 2016 at 8:43 PM Michael Selik wrote: > On Sat, Aug 20, 2016 at 6:21 PM Lawrence D’Oliveiro < > [email protected]> wrote: > >> > p0 = (0, 0) >> > p1 = (major_dim, 0) >> > colour_stops = (0, rect_1_colour), (1, compleme

Re: Two-Dimensional Expression Layout

2016-08-20 Thread Michael Selik
On Sun, Aug 21, 2016 at 12:31 AM Lawrence D’Oliveiro wrote: > On Sunday, August 21, 2016 at 12:44:21 PM UTC+12, Michael Selik wrote: > > > > On Sat, Aug 20, 2016 at 6:21 PM Lawrence D’Oliveiro wrote: > > > >>> if any(not isinstance(obj, I

Re: Two-Dimensional Expression Layout

2016-08-21 Thread Michael Selik
On Sun, Aug 21, 2016, 3:06 AM Lawrence D’Oliveiro wrote: > On Sunday, August 21, 2016 at 6:49:19 PM UTC+12, Michael Selik wrote: > > > Indeed it is, not sure why. > > Moral: It helps to understand the code you’re criticizing, before you > start criticizing, not after. >

Re: Does This Scare You?

2016-08-21 Thread Michael Torrie
On 08/19/2016 05:42 PM, Lawrence D’Oliveiro wrote: > Python 3.5.2+ (default, Aug 5 2016, 08:07:14) > [GCC 6.1.1 20160724] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> from pathlib import PureWindowsPath > >>> PureWindowsPath("prn").is

Re: Is duck-typing misnamed?

2016-08-28 Thread Michael Torrie
On 08/27/2016 05:28 PM, ROGER GRAYDON CHRISTMAN wrote: > They took a woman who originally, I think we might agree, was not a witch, Umm no, she was actually a witch. Which makes the scene even funnier. "Fair caught," she says at the end. -- https://mail.python.org/mailman/listinfo/python-list

Re: Extend unicodedata with a name/pattern/regex search for character entity references?

2016-09-04 Thread Michael Torrie
On 09/04/2016 04:22 PM, Gregory Ewing wrote: > Larry Hudson wrote: >> If you continue to read this forum, you will quickly learn to ignore >> "Pointy-Ears". He rarely has anything worth while to post, and his >> unique fetish about Real Names shows him to be a hypocrite as well. > > To be fair,

Re: manually sorting images?

2016-09-04 Thread Michael Torrie
On 09/04/2016 04:09 PM, Gregory Ewing wrote: > Quivis wrote: >> 2. You want to sort them according to red houses, blue houses, green >> trees, yellow trees (that's autumn leaves), cats, dogs, children, elderly >> people, > > But... but... what if you have a picture of a child > playing with a do

Re: how to automate java application in window using python

2016-09-18 Thread Michael Torrie
On 09/18/2016 04:03 AM, Lawrence D’Oliveiro wrote: > Like I said, trying to automate a GUI is a waste of time. GUIs are > designed for humans, not computers, to use. Well then we have a huge problem. Especially for users who are visually-impaired. Fortunately almost all GUIs (Windows, Linux, and

Re: how to automate java application in window using python

2016-09-18 Thread Michael Torrie
On 09/18/2016 02:22 PM, Lawrence D’Oliveiro wrote: > I know one blind computer user who is quite capable with the command > line, and who has little fondness for GUI apps. You should see how > quickly he works... Good for him. This is very good that there are tools like that that he and many othe

Re: how to automate java application in window using python

2016-09-29 Thread Michael Torrie
On 09/29/2016 01:18 PM, Lawrence D’Oliveiro wrote: > On Thursday, September 29, 2016 at 11:46:59 PM UTC+13, Ned Batchelder wrote: >> This is just getting rude. Let's please drop it. > > Do you have anything substantive to contribute? He's already contributed far more to this list, and to Python,

Re: Copying a compiled Python from one system to another

2016-10-01 Thread Michael Torrie
On 10/01/2016 05:21 AM, Steve D'Aprano wrote: > Long story short: I have no working systems capable of compiling the > latest Python 3.6, and no time to upgrade my usual machines to > something which will work. > > However I do have access to another machine (actually a VM) which > can compile Pyt

Merecurial and Python-2.7.x, Python-3.Y

2016-10-01 Thread Michael Felt
Finally, I got to where I understood what needed to be done to get both Mercurial built - and the the new SSL requirements met. So, running: # hg clone https://hg.python.org/cpython works. What is the next step to getting Python-2.7 AND Python-3.7 so I can submit patches against both versions

Re: announcing fython

2016-10-01 Thread Michael Torrie
On 10/01/2016 09:06 PM, Chris Angelico wrote: > On Sun, Oct 2, 2016 at 1:58 PM, wrote: >> Fython speed is the same as Fortran speed. >> >> There is no restriction on the Python code. >> Once a Fython program is avalaible, Python can throw any scalar or Numpy >> array at it. >> >> For the program

Re: Merecurial and Python-2.7.x, Python-3.Y

2016-10-02 Thread Michael Felt
On 02/10/2016 08:34, Terry Reedy wrote: No. By default, the working directory for a clone is for the default branch. Any clone can be 'updated' to any branch. I have each share clone updated to a different branch, so I never update to a different branch. -- This answers my underlying questi

working with ctypes and complex data structures

2016-10-02 Thread Michael Felt
, c_ulonglong), ("pwait", c_ulonglong), ("buffer3", c_ulonglong * 12) ] xxx = time_t print xxx print xxx.v print sizeof(xxx) # print sizeof(xxx.v) xxx = perfstat_cpu_total_t print xxx print xxx.lbolt print sizeof(xxx) # print sizeof(xxx.lbolt) xxx = xxx.lbolt print

Re: Merecurial and Python-2.7.x, Python-3.Y

2016-10-02 Thread Michael Felt
On 02/10/2016 19:01, Ned Batchelder wrote: On Saturday, October 1, 2016 at 9:25:57 PM UTC-4, Michael Felt wrote: Finally, I got to where I understood what needed to be done to get both Mercurial built - and the the new SSL requirements met. So, running: # hg clone https://hg.python.org

Re: working with ctypes and complex data structures

2016-10-03 Thread Michael Felt
On 02-Oct-16 23:44, eryk sun wrote: On Sun, Oct 2, 2016 at 5:50 PM, Michael Felt wrote: > >a) where is documentation on "CField"'s? I will reply more later - just a quick thanks. Not using maxsize will be good, also in a different patch - also specific to AIX

Re: working with ctypes and complex data structures

2016-10-03 Thread Michael Felt
On 02-Oct-16 23:44, eryk sun wrote: On Sun, Oct 2, 2016 at 5:50 PM, Michael Felt wrote: a) where is documentation on "CField"'s? It's undocumented. So I do not feel so bad about not finding anything :) A CField is a data descriptor that accesses a struct field with

Re: working with ctypes and complex data structures

2016-10-03 Thread Michael Felt
On 03-Oct-16 16:35, Michael Felt wrote: I'd alias the type instead of defining a struct, e.g. `time_t = c_long`. This preserves automatic conversion of the simple type. The reason for the not using alias is because a) I was trying to be more inline with the text of the include file. I

Re: Is that forwards first or backwards first? (Re: unintuitive for-loop behavior)

2016-10-03 Thread Michael Torrie
On 10/03/2016 03:10 AM, Gregory Ewing wrote: > Rustom Mody wrote: >> My new car goes in reverse when I put it in first gear but only on full-moon >> nights with the tank on reserve when the left light is blinking > > OT aside: When I went to take my current car (a manual) > for a test drive, I ha

Re: Is that forwards first or backwards first? (Re: unintuitive for-loop behavior)

2016-10-03 Thread Michael Torrie
On 10/03/2016 11:57 AM, [email protected] wrote: > Surprisingly, despite driving that previous car for 13 years, the switch was > incredibly easy. I've never accidentally gone to sixth gear instead of > reverse, or forgotten to shift into sixth on the highway. Also, accidentally > going in

Re: working with ctypes and complex data structures

2016-10-03 Thread Michael Felt
On 02-Oct-16 19:50, Michael Felt wrote: class perfstat_cpu_total_t(Structure): """ typedef struct { /* global cpu information */ int ncpus;/* number of active logical processors */ int ncpus_cfg; /* number of config

Re: Is that forwards first or backwards first? (Re: unintuitive for-loop behavior)

2016-10-03 Thread Michael Torrie
On 10/03/2016 08:21 PM, Steve D'Aprano wrote: > On Tue, 4 Oct 2016 05:48 am, Michael Torrie wrote: > >> There is that old, but false, saying that the only intuitive interface >> is the nipple. Turns out everything, even that, is learned > > Citation required. S

Re: how to read linux kernel source with pycparser

2016-10-04 Thread Michael Torrie
On 10/04/2016 03:36 AM, meInvent bbird wrote: > i expect to use pycparser to read linux kernel source > and get a AST tree, > > but there are so many directory, > > how to read linux kernel source with pycparser? > > how to customize pycparser to search what we want such as bug or fix > to ma

Re: working with ctypes and complex data structures

2016-10-05 Thread Michael Felt
On 02-Oct-16 19:50, Michael Felt wrote: I am trying to understand the documentation re: ctypes and interfacing with existing libraries. I am reading the documentation, and also other sites that have largely just copied the documentation - as well as the "free chapter" at O'

Re: working with ctypes and complex data structures

2016-10-05 Thread Michael Felt
On 05-Oct-16 22:29, Emile van Sebille wrote: Thanks for the reply! After a shirt coffeebreak - back into the fray - and I found the following: +76 class cpu_total: +77 def __init__(self): +78 __perfstat__ = CDLL("libperfstat.a(shr_64.o)") +79 prototype = CFUNC

Re: working with ctypes and complex data structures

2016-10-05 Thread Michael Felt
- because it made me pause and understand better what I had written. And now the real thankyou for the detail you shared! M On 03-Oct-16 17:53, eryk sun wrote: On Mon, Oct 3, 2016 at 2:35 PM, Michael Felt wrote: On 02-Oct-16 23:44, eryk sun wrote: On Sun, Oct 2, 2016 at 5:50 PM, Michael Felt

Re: Python and ssh for remote login

2016-10-05 Thread Michael Torrie
On 10/05/2016 11:46 AM, Noah wrote: > Hello folk, > > I would like to use a python script to ssh into a server using a username > and password and perhaps ass port. > > Any ideas on how to script that. If paramiko doesn't fit your needs, traditionally this sort of work was done with the pexpect

Re: working with ctypes and complex data structures

2016-10-06 Thread Michael Felt
On 04-Oct-16 04:48, eryk sun wrote: On Mon, Oct 3, 2016 at 9:27 PM, Michael Felt wrote: int perfstat_subsystem_total( perfstat_id_t *name, perfstat_subsystem_total_t *userbuff, int sizeof_struct, int desired_number); ... +79 class cpu_total: +80 def __init__

Re: BeautifulSoup help !!

2016-10-06 Thread Michael Torrie
On 10/06/2016 11:34 AM, Navneet Siddhant wrote: > I guess I will have to extract data from multiple divs as only > extracting data from the parent div which has other divs in it with > the different data is coming up all messed up. Will play around and > see if I could get through it. Let me clarif

Re: Question on multiple Python users in one application

2016-10-06 Thread Michael Torrie
On 10/06/2016 04:47 PM, Loren Wilton wrote: > The Python code is running as (I hope) a native Windows DLL, so should be > able to access any existing Python libraries that exist on the WIndows > machine. Obviously this Python code will be using Windows-shaped data > objects like integers, floats

Re: Question on multiple Python users in one application

2016-10-06 Thread Michael Torrie
On 10/06/2016 06:03 PM, Loren Wilton wrote: >> So I take it that currently users access the software running in the >> virtual mainframe over telnet or some form of serial link and that they >> interact with it in a text terminal? This point is fairly important, >> because if it's true, then you r

Re: Question on multiple Python users in one application

2016-10-06 Thread Michael Torrie
On 10/06/2016 07:48 PM, Chris Angelico wrote: > If that had been your original plan, it's dead simple to enhance it to > use per-user module names. Just do this same work, but substitute a > different module name right at the beginning! Other > extremely-high-level interface functions are similar.

Re: segfault using shutil.make_archive

2016-10-07 Thread Michael Torrie
On 10/06/2016 10:46 AM, Tim wrote: > I need to zip up a directory that's about 400mb. > I'm using shutil.make_archive and I'm getting this response: > > Segmentation fault: 11 (core dumped) > > The code is straightforward (and works on other, smaller dirs): > > shutil.make_archive(os.pat

Re: PyQT - Signals and Slots?

2016-10-10 Thread Michael Torrie
On 10/10/2016 07:32 AM, Veek M wrote: > Whaaa...t?? Could someone explain what exactly is his grand design > besides being awfully circuitous? So he has some other Form thingy.. and > in that he sets up another mapping from ZeroSpinBox.atzero --> > ZeroSpinBox.announce where's announce and

Conventions and requirements for a python module

2016-10-11 Thread Michael Felt
know/knew. Assume python "does it differently" and mistakes maybe fewer. Thanks for your time and pointers (to links, if not direct advice) Michael -- https://mail.python.org/mailman/listinfo/python-list

Re: Conventions and requirements for a python module

2016-10-11 Thread Michael Torrie
On 10/11/2016 08:29 AM, Michael Felt wrote: > From reading the python source, and other projects I am looking to > patch I see that there is often a file __init__.py, sometimes empty > (only comments), sometimes not. > > I have tried looking in what I hope are the "reg

Re: Python Shell in Russian exists/possible??

2016-10-11 Thread Michael Torrie
On 10/11/2016 05:33 AM, Андрей Логунов wrote: > I need the Python Shell for use in education (turtle graphics, etc.), > but the UI must be localized in the Russian language. The question is > if it's at all possible to feed the strings in or rebuild it or... For educational purposes, you might fin

Re: while loop

2016-10-11 Thread Michael Torrie
On 10/11/2016 11:58 AM, [email protected] wrote: > > n=6 > x=1 > while x<=n: > print "*"*x > x+=1 > while n>=x: > n=n-1 > print "*"* n > > > Only first loop is executing not the second one? Did you try printing out the loop variable to see what it does and what it is aft

<    2   3   4   5   6   7   8   9   10   11   >