Re: Python Problems

2020-04-26 Thread Mats Wichmann
On 4/26/20 2:06 AM, helal uddin wrote: > https://drive.google.com/open?id=1DCciLNPkARXnVIHFhXmijRTbFEC9Xsa- > Please visit this link to see my problem > I'm facing some problems to installlibraries like 'torch library' > My Operating System is Windows 10 64bit. > I don't think anyone is going

Re: Not able use installed modules

2020-05-08 Thread Mats Wichmann
On 5/6/20 10:15 PM, Music lover wrote: > Hello python team, > I have installed the latest version of python from your site. > Then I successfully installed some modules like :- numpy , pandas, > matplotlib from command prompt. But I am not able to use them while > programing in python Id

Re: Installation problem

2020-05-11 Thread Mats Wichmann
On 5/10/20 3:31 PM, Solomon Onuche Faruna wrote: > I install python 3.8 and pycharm community edition on window 8 but when I > try to install matplotlib in pycharm I discovered I got "error loading > package list pypi.python.org" so I updated the pycharm to version 2020.1. > The packages loaded bu

Re: Help Problem with python : python-3.8.3rc1-amd64

2020-05-13 Thread Mats Wichmann
On 5/11/20 9:25 PM, Michael Torrie wrote: > On 5/11/20 8:33 PM, Buddy Peacock wrote: >> I am trying to install python on my surface with windows 10, version 1903, >> build 18362.778. The installer seems to think everything worked. But there >> is no Python folder anywhere on the system. I looked

Re: PROBLEM WITH PYTHON IDLE

2020-05-14 Thread Mats Wichmann
On 5/14/20 5:15 AM, aduojo samson wrote: > Hello, my name is Samson Haruna and I am from Nigeria.I have a problem with > my python 3.8, any time I click on it to write my python code I get this > error message "IDLE subprocess didn't make connection". I have uninstalled > and reinstalled several ti

Re: Help with installation please

2020-05-17 Thread Mats Wichmann
On 5/15/20 9:47 PM, Souvik Dutta wrote: > I dont know if you should shift from powershell to cmd. Python kinda does > not work in powershell. Powershell has a funky way of looking up programs, with the result that you have to type the full name for many. python.exe - should work, probably. ma

Re: Fwd: Unable to Install Python (3.5.0) Properly

2020-05-17 Thread Mats Wichmann
On 5/17/20 1:27 PM, Tarun Pathak wrote: > Oh, My apology ! I should have mentioned the system stats in mail. > > Windows 7 , 64 bit > Intel Core 2 duo > C drive free space : 23 GB > > Initially, during installation system is asking for service pack 1 > I did that. > > Later, it's asking for cor

Re: Is there some reason that recent Windows 3.6 releases don't included executable nor msi installers?

2020-05-23 Thread Mats Wichmann
On 5/23/20 12:23 AM, Adam Preble wrote: > I wanted to update from 3.6.8 on Windows without necessarily moving on to > 3.7+ (yet), so I thought I'd try 3.6.9 or 3.6.10. > > All I see for both are source archives: > > https://www.python.org/downloads/release/python-369/ > https://www.python.org/d

Re: Behaviour of os.path.join

2020-05-26 Thread Mats Wichmann
On 5/26/20 8:56 AM, BlindAnagram wrote: > I came across an issue that I am wondering whether I should report as an > issue. If I have a directory, say: > > base='C:\\Documents' > > and I use os.path.join() as follows: > > join(base, '..\\..\\', 'build', '') > > I obtain as expected from th

Re: Behaviour of os.path.join

2020-05-26 Thread Mats Wichmann
On 5/26/20 10:57 AM, BlindAnagram wrote: > On 26/05/2020 16:59, Mats Wichmann wrote: >> On 5/26/20 8:56 AM, BlindAnagram wrote: >>> I came across an issue that I am wondering whether I should report as an >>> issue. If I have a directory, say: >>> >>

Re: Issues regarding running of application.

2020-05-26 Thread Mats Wichmann
On 5/26/20 8:45 AM, Meet Agrawal wrote: > I have tried and installed the python application a lot of times but after > the installation get completed and I try to run the application, it say > that api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. > > Please tell me a way out. Inst

Re: Is there some reason that recent Windows 3.6 releases don't included executable nor msi installers?

2020-05-29 Thread Mats Wichmann
On 5/28/20 3:20 PM, Peter J. Holzer wrote: > On 2020-05-23 13:22:26 -0600, Mats Wichmann wrote: >> On 5/23/20 12:23 AM, Adam Preble wrote: >>> I wanted to update from 3.6.8 on Windows without necessarily moving >>> on to 3.7+ (yet), so I thought I'd try 3.6.9 or 3.6

Re: Python with text editor

2020-06-04 Thread Mats Wichmann
On 5/30/20 1:42 AM, Preetha M wrote: > Hello. Thank you for responding to my previous mail. Can someone tell me > how to connect python to sublime text 3. Whenever I select python and type > the code, it does not work when I press ctrl+B. Please tell. > Try Corey Schaefer's video on setup: (sear

Re: pyinstaller

2020-06-10 Thread Mats Wichmann
On 6/10/20 8:50 AM, Calvin Spealman wrote: > On Wed, Jun 10, 2020 at 10:06 AM Chris Angelico wrote: > >> On Wed, Jun 10, 2020 at 11:49 PM Robin Becker wrote: >>> >>> I'm sure this has come up before, but a tiny pyinstaller created exe is >> being seen as malware by windows 10. >>> >>> Is there a

Re: Fwd: python 3.8.3 fails

2020-06-13 Thread Mats Wichmann
On 6/11/20 8:58 AM, Avraham Markov wrote: > Please suggest something to fix > > -- Forwarded message - > From: Avraham Markov > Date: Thu, Jun 11, 2020 at 5:50 PM > Subject: python 3.8.3 fails > To: > > > Hello, I successfully installed Python 3.8.3 (64-bit) > at Windows 10 LTS

Re: problem at the time of using editor

2020-06-18 Thread Mats Wichmann
On 6/18/20 4:20 AM, Sourav Kundu wrote: > when I am using the editor to write a long program and trying to run it the > python command line showing it syntax error > That almost certainly means there is a syntax error in your code. Please provide some details - like the actual error text. Note

Re: How to test?

2020-06-20 Thread Mats Wichmann
On 5/1/20 2:34 PM, DL Neil via Python-list wrote: >>> Given your replies, 'now' might be a good time to take a look at >>> Pytest, and see how you could use it to help build better code - by >>> building tested units/functions which are assembled into ever-larger >>> tested-units... (there is a ran

Re: Formal Question to Steering Council (re recent PEP8 changes)

2020-07-02 Thread Mats Wichmann
On 7/2/20 12:04 PM, Rhodri James wrote: > On 02/07/2020 18:11, Dieter Maurer wrote: >> I am no member of the Council. Thus, your questions are not directed >> to me. **BUT** you made your questions public and thus you are >> likely prepared to receive public comments. > > Fortunately you don't ans

Re: Issues in downloading python

2020-07-17 Thread Mats Wichmann
On 7/17/20 11:09 AM, Abhiram R wrote: > It's most likely because you haven't added Python to your environment PATH > variable. > > The easiest path forward is to uninstall it from Applications and then when > you reinstall, tick the option on the bottom of the first splash screen of > the installe

Re: A Python installation help doc much more friendly to newcomers? [Was Re: help]

2020-07-19 Thread Mats Wichmann
On 7/18/20 5:02 PM, dn via Python-list wrote: > - most docs seem to try to be 'all things to all people', whereas the > differences between platforms inevitably make the writing complicated > and the reading difficult to follow. Thus, consider separating entries > by OpSys and/or installation meth

Re: Request help w/pip install jq

2020-07-19 Thread Mats Wichmann
On 7/19/20 8:46 AM, Ed Walser wrote: > Hi all, > > I've tried installing jq several times in my local environment, but it > fails, saying it can't find a file that pip downloads. Here is the entire > pip output: > > (base) C:\Users\edwal>pip install jq Don't install that way, do: python -m pip

Re: Request help w/pip install jq

2020-07-19 Thread Mats Wichmann
On 7/19/20 11:42 AM, Dennis Lee Bieber wrote: > On Sun, 19 Jul 2020 10:39:09 -0600, Mats Wichmann > declaimed the following: > >> there is no mention of Windows at all, so the guess would be it's not >> supported. >> > There is a whole open "is

Re: Issues Download the Latest Version of Python Programming Language

2020-07-23 Thread Mats Wichmann
On 7/24/20 12:05 AM, Ejiofor Chidinma Peace wrote: > Dear Sir/Madam, > I trust this email finds you well. > > I have been having issues downloading the latest version of Python > programming Language on my PC (windows 10 operating system). Kindly assist > in resolving this issue at your earliest c

Re: Dowloading package dependencies from locked down machine

2020-07-28 Thread Mats Wichmann
On 7/27/20 7:33 PM, Igor Korot wrote: > Hi, >> The issue is that the IT department thinks that installing the full >> power of Python scripting on an Internet facing machine is inconsistent >> with the "Cyber Essentials Plus" accreditiation that they need to win >> Government contracts. > Coming

Re: Are instances of user-defined classes mutable?

2020-08-07 Thread Mats Wichmann
On 8/6/20 8:53 PM, ZHAOWANCHENG wrote: > So instances of user-defined classes are immutable by default? No, they're clealry mutable. > Or the description of "if a tuple contains any mutable object either directly > or indirectly, it cannot be used as a key." in the document is not > completel

Re: Module import question

2020-08-09 Thread Mats Wichmann
On 8/9/20 12:51 AM, Gabor Urban wrote: > Hi guys, > > I have a quite simple question but I could not find the correct answer. > > I have twoo modules A and B. A imports B. If I import A in a script, Will > be B imported automatically? I guess not, but fő not know exactly. > > Thanks for your ans

Re: print the output of my code in Markdown using variable (not the value)

2020-08-15 Thread Mats Wichmann
On 8/15/20 11:00 AM, Michio Suginoo wrote: > Hi, > > I am still at an early stage of my personal Python evolution. > > I am coding Python3 in Jupyter Notebook (Anaconda environment). > > I want to print the output of my code in a 'markdown'. > I want to use the variable in the 'markdown' rather

Re: Can't use interpreter

2020-08-29 Thread Mats Wichmann
On 8/28/20 5:02 AM, Joshua Sharma wrote: > I have downloaded python 3.7.6, but I can't seem to use it in PyCharm. I > have subscribed. > See the PyCharm instructions for setting an interpreter, which can be default, and per-project. Unless there was more to this question that you didn't ask...

Re: FW: pip not recognized

2020-08-29 Thread Mats Wichmann
On 8/27/20 2:18 PM, gpostle500 wrote: > > Sent from my Verizon, Samsung Galaxy smartphone > Original message From: geoff postle > Date: 8/27/20 12:08 PM (GMT-08:00) To: python-list@python.org Subject: pip > not recognized Hey just downloaded the 3.8.5 and when I search for pi

Re: Uninstall problem

2020-09-05 Thread Mats Wichmann
On 9/5/20 7:54 AM, f.le...@omnias.fr wrote: > Hello, > > > > I commit an error to install python because I chose python 3.8.5 x32bytes > > So I wanted uninstalling it to install python 3.7.9 x64bytes why not 3.8.5, by the way? > But 3.8.5 version don't want uninstall !?! what does this mean

Re: Uninstall problem

2020-09-06 Thread Mats Wichmann
On 9/6/20 6:24 AM, Luuk wrote: > On 5-9-2020 19:40, Mats Wichmann wrote: >> On 9/5/20 7:54 AM, f.le...@omnias.fr wrote: >>> Hello, >>> >>>   >>> I commit an error to install python because I chose python 3.8.5 >>> x32bytes >>> &

Re: Opening python

2020-09-08 Thread Mats Wichmann
On 9/7/20 11:33 PM, Rnyx_ Scarl01 wrote: > Hello I've downloaded the newest python but I can't find the python > compiler app eventhough I've already downloaded tge necessary files. What > shoukd I do? What have you tried? And what platform are you on? This is mildly more involved on Windows.

Re: Fwd: PYTHON BUG. deleting elements of list.

2020-09-08 Thread Mats Wichmann
On 9/7/20 5:01 PM, Driuma Nikita wrote: _list = list(range(50)) for i, el in enumerate(_list): del _list[i] print(_list) Don't change the the list while you are iterating over it, it messes up the iteration. It's not "randomly deleting", it's when next is called to fetch

Re: Fwd: PYTHON BUG. deleting elements of list.

2020-09-09 Thread Mats Wichmann
On 9/8/20 5:18 PM, Richard Damon wrote: > On 9/8/20 7:06 PM, Mats Wichmann wrote: >> On 9/7/20 5:01 PM, Driuma Nikita wrote: >> for i, el in enumerate(_list[:]): >> del _list[i] >> > The issue isn't so much that he is modifying the list that he is

Re: Question from a "java background" developer

2020-09-22 Thread Mats Wichmann
On 9/22/20 3:25 AM, Chris Angelico wrote: > On Tue, Sep 22, 2020 at 7:15 PM Agnese Camellini > wrote: >> >> Hello to everyone, I have a question. I come from a Java background and I >> would like to develop in python but i'm wondering: is there anything, in >> python, like Java "reflection"? >> I

Re: FW: pipenv has issues

2020-09-27 Thread Mats Wichmann
On 9/25/20 10:00 PM, Rhett Prince wrote: > see below: > > > > pipenv gets lost and crashes. > > > > > > hi, where do we write to to post defects in pipenv? on a windows 8.1 > machine after installing pipenv with poip as administrator pipenv simply > crashes with a trace dump it get

Re: Can't install Python

2020-09-27 Thread Mats Wichmann
On 9/27/20 4:48 PM, MRAB wrote: >> Whatever I try, whenever I click on the phyton.exe file, Python seems >> to install, but only ultimately displays a Modify Setup screen. >> I have tried the modifying and repairing options, but they all just >> lead to the same Modify Setup screen. > So you ran

Re: [RELEASE] Python 3.8.6 is now available

2020-09-30 Thread Mats Wichmann
On 9/29/20 9:16 AM, David Raymond wrote: >> Python 3.8.6 is the sixth maintenance release of Python 3.8. Go get it here: > >> https://www.python.org/downloads/release/python-386/ >> > > > Just a quick note that there still seem to be a few

Re: Error 0xc000007b on opening python

2020-10-02 Thread Mats Wichmann
On 10/2/20 4:15 AM, Nipur Gupta wrote: > I've downloaded python 3.6.0 64 bits but whenever I try to open idle, it > doesn't open and displays error 0xc07b. I've tried everything from > reinstalling to updating windows and visual c++ but it's still the same. I > downloaded python earlier also it

Re: help with installation

2020-10-08 Thread Mats Wichmann
On 10/7/20 2:00 AM, rebecca kahn wrote: > Good morning. > I need to install numpy and matplotlib for school. But everytime I run the > comand i get a error on the metadata fase. Can you offer assistance? > Sincerely Rebecca Kahn > > Microsoft Windows [Version 10.0.18362.1082] > (c) 2019 Microsof

Re: Crashing and opening problems

2020-10-09 Thread Mats Wichmann
On 10/9/20 4:23 AM, Jamie wrote: >I’ve downloaded python and when I try to launch a application to use with >python it opens then closes fast but when I double click it it opens the >installer and not python, so I have to use “Open with” The window opened on behalf of the program is no

Re: Which Version Of Python Is Best To Install Now..

2020-10-09 Thread Mats Wichmann
On 10/9/20 1:02 AM, Muhammad Saad wrote: >  > >  > >Sent from [1]Mail for Windows 10 > >I Want To Reinstall Python Now Which Version I Install Now > > References > >Visible links >1. https://go.microsoft.com/fwlink/?LinkId=550986 > The latest, 3.9, is as always consid

Re: Issues installing python

2020-10-09 Thread Mats Wichmann
On 10/8/20 9:36 PM, Vedant Nichal wrote: > Hello, > > I am an amateur python developer but I’m facing a lot of issues regarding > python installation on windows 10...whenever I install python on my > pc...irrespective of its version my scripts folder is always empty.. are you sure you're actually

Re: Trying to Download PygameZero

2020-10-10 Thread Mats Wichmann
On 10/10/20 12:22 AM, Tom Hedge via Python-list wrote: > I am in a 8 grade coding class at the moment and my teacher asked me to > download a script called pgzero. I can not seem to download pgzer or pygame > when i try it shoots me a error message:  ERROR: Command errored out with > exit status

Re: CLI parsing—with `--help` text—`--foo bar`, how to give additional parameters to `bar`?

2020-10-16 Thread Mats Wichmann
On 10/15/20 5:09 PM, Samuel Marks wrote: > Yes it’s my module, and I’ve been using argparse > https://github.com/SamuelMarks/ml-params > > No library I’ve found provides a solution to CLI argument parsing for my > use-case. > > So I’ll write one. But what should it look like, syntactically and >

Re: Are there Python ways to execute queries on PostgreSQL without getting data over?

2020-10-18 Thread Mats Wichmann
On 10/18/20 5:53 AM, Shaozhong SHI wrote: > Are there Python ways to execute queries on PostgreSQL without getting data > over? > > Are there ways just to fire off PostgreSQL queries and not get data into > Python? > > Regards, > > David > When you "execute" the query, you don't get back the d

Re: How to expand and flatten a nested of list of dictionaries of varied lengths?

2020-10-18 Thread Mats Wichmann
On 10/18/20 2:09 PM, Shaozhong SHI wrote: > Even worse is that, in some cases, an addition called serviceRatings as a > key occur with new data unexpectedly. > > How to produce a robust Python/Panda script to coping with all these? > > Regards, > > David > > u'historicRatings': [{u'overall': {u

Re: How to write differently to remove this type hint in Python 2.7?

2020-10-21 Thread Mats Wichmann
On 10/21/20 3:24 PM, Shaozhong SHI wrote: > Is there another way to do this? > > def greet(name: str) -> str: > return "Hello, " + name > greet > > File "", line 1 def greet(name: str) -> str: > ^ SyntaxError: invalid syntax > The hinting pep PEP (484) has an alternate syntax that doesn't b

Re: Issue with Python

2020-10-23 Thread Mats Wichmann
On 10/23/20 3:52 AM, Ifeanyi Obinelo wrote: > Hello! I am a Python programmer and I love the language. However, I > installed Python 3.9 and suddenly, pip does not install Python libraries > anymore. It says that I need Visual Studio C++ 2014 and exits with: > > "ERROR: Command errored out with ex

Re: Module Download Problem

2020-10-29 Thread Mats Wichmann
On 10/29/20 11:07 AM, Gian_Xatzak. wrote: >Hello!! > >  > >I just download the latest version of python3 (Python3.9) and I have >problem to download NumPy,… etc. There are projects who have not released their 3.9-compatible wheels yet - the schedule for doing so is up to each of

Re: Best way to determine user's screensize?

2020-10-31 Thread Mats Wichmann
On 10/30/20 6:47 PM, songbird wrote: > Chris Angelico wrote: > ... >> I add my voice to those who detest applications that think they know >> best and decide that they own the entire screen. It is incredibly >> annoying. > > do you object to a window being put in the approximate > center of the

Re: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

2020-10-31 Thread Mats Wichmann
On 10/30/20 1:38 PM, Gian_Xatzak. wrote: >When I tried to download  matplotlib, it show me that message in the end: > >  > >ERROR: Command errored out with exit status 1: python setup.py egg_info >Check the logs for full command output. > >  > >*I have Windows 10, Python

Re: Is there a conflict of libraries here?

2020-11-06 Thread Mats Wichmann
On 11/6/20 3:05 PM, Steve wrote: "Right, because the name "datetime" points to the class datetime in the module datetime. The class, unlike the module, has no "datetime" attribute." Ok, how do I unpoint/repoint a "datetime" to let the two locations work? "Apologies if you already knew

Re: Is there a conflict of libraries here?

2020-11-07 Thread Mats Wichmann
On 11/7/20 11:26 AM, Steve wrote: Ok, I think I see a light in the fog. It looks as if I can identify a variable to contain a library. Import datetime as dt1 I guess that I can have a second variable containing that same library: Import datetime as dt2 Should I presume that no

Re: problem in installation of python 3.9.0

2020-12-02 Thread Mats Wichmann
On 12/2/20 10:57 AM, Priyankgasree K wrote: Hello, I am Priyankgasree, i am facing problem in installing python3.9.0. after i finish download it always says you have to repair or uninstall. I have repaired and uninstalled and reinstalled several times but i can't do anything . And also I

Re: problem in installation of python 3.9.0

2020-12-02 Thread Mats Wichmann
On 12/2/20 10:58 AM, Dan Stromberg wrote: Don't rerun the installer. This seems to be a common question and answer. It certainly does... Perhaps the installer could be named better, or Python could provide a shortcut for itself? I know it makes proper start menu entries for

Re: [osx] dyld: Library not loaded: /usr/local/Cellar/python@3.8/3.8.3_1/Frameworks/Python.framework/Versions/3.8/Python

2020-12-04 Thread Mats Wichmann
On 12/4/20 7:15 AM, Noah wrote: Hi there, Anybody know how to fix this issue on a mac? ❯ /usr/local/bin/python dyld: Library not loaded: /usr/local/Cellar/python@3.8/3.8.3_1/Frameworks/Python.framework/Versions/3.8/Python   Referenced from: /usr/local/bin/python   Reason: image not found

Re: Error

2020-12-07 Thread Mats Wichmann
On 12/7/20 11:13 AM, Michael Torrie wrote: On 12/7/20 11:07 AM, Barry Fitzgerald wrote: I did the pip install I did the pip install pygameThe pip install pgzero I get this error C:\Users\barol>pip install pgzeroDefaulting to user installation because normal site-packages is not writeableCollecti

Re: using regex for password validation

2020-12-23 Thread Mats Wichmann
On 12/23/20 10:03 AM, Sadaka Technology wrote: hello guys, I have this pattern for password validation (regex): I want these rules to be applied: Minimum 8 characters. The alphabets must be between [a-z] At least one alphabet should be of Upper Case [A-Z] At least 1 number or digit between [0-

Re: Installing python3 modules

2020-12-26 Thread Mats Wichmann
On 12/26/20 10:13 AM, Rich Shepard wrote: Running Slackware-14.2/x86_64 here. I'm trying to learn if any installed applications are still dependent on Python2 (version 2.7.17 installed) as its EOL is this coming Thursday and I want to clean out all Python2 modules and replace them with their Pyth

Re: Which method to check if string index is queal to character.

2020-12-28 Thread Mats Wichmann
On 12/28/20 10:46 AM, Marco Sulla wrote: On Mon, 28 Dec 2020 at 17:37, Bischoop wrote: I'd like to check if there's "@" in a string and wondering if any method is better/safer than others. I was told on one occasion that I should use is than ==, so how would be on this example. s = 't...@mail

Re: Is there any way to check/de-cruft/update Python packages installed using pip?

2020-12-29 Thread Mats Wichmann
On 12/29/20 7:48 AM, Chris Green wrote: I seem to have quite a lot of old python packages installed over the years using pip and would like, if I can. to clear some of them out. Is there any way to tell if a python package was installed by me directly using pip or was installed from the [x]ubun

Re: help

2020-12-30 Thread Mats Wichmann
On 12/30/20 2:14 PM, BearGod777 wrote: every time i try and open a .py file it just ciomes up with either modify, uninstall or repair. i have tried every single one of these and i have tried to install another version (it couldnt run on that version) and it just doesnt load up. if i try and open

Re: help

2020-12-31 Thread Mats Wichmann
On 12/31/20 8:11 AM, BearGod777 wrote: i am trying to open it by just left clicking the file in file explorer and i tried right clicking it and then pressing open with python 3.9.1 64-bit That *shouldn't* open the installer... (you can actually remove the installer file once you're done instal

Re: A random word from one of two lists

2021-01-03 Thread Mats Wichmann
On 1/3/21 5:30 AM, Bischoop wrote: On 2021-01-02, Stefan Ram wrote: Bischoop writes: On 2021-01-02, Stefan Ram wrote: Otherweise, I'd go this way without a dictionary. import random animal = ['koala', 'kangaroo'] fruit = ['banana', 'apple'] kinds = [animal,fruit] kind = random.choice( kinds

Re: A random word from one of two lists

2021-01-03 Thread Mats Wichmann
On 1/3/21 11:34 AM, Richard Damon wrote: It depends on what distribution of results you want. Since the example had two equal length list is doesn't matter, but if, say, there were many more animals then fruit, your method would produce an animal more often than a fruit, but the two level method

Re: dayofyear is not great when going into a new year

2021-01-05 Thread Mats Wichmann
On 1/5/21 4:04 PM, Chris Angelico wrote: On Wed, Jan 6, 2021 at 10:01 AM Eli the Bearded <*@eli.users.panix.com> wrote: In comp.lang.python, Chris Angelico wrote: There are multiple definitions for "day of year", depending on how you want to handle certain oddities. The simplest is to identi

Re: Question about Reading Files

2010-09-04 Thread Mats Rauhala
On 2010-09-04, genxtech wrote: > Hello. I am still really new to python and I have a project where I > am trying to use the data files from another program and write a new > program with new user interface and all. My first step was to open > one of the files in 'rb' mode and print the contents,

Re: Question about Reading Files

2010-09-05 Thread Mats Rauhala
On 2010-09-05, genxtech wrote: > I am using Fedora 13. When I run the file command the response is > that it is a 'data' file. If there are any tips on how to > programatically figure out the format, I would greatly appreciate it. I tried python-magic from the fedora repositories, but was unabl

Re: Assistance Request - Issue with Installing 'pip' despite Python 3.10 Installation

2023-06-07 Thread Mats Wichmann via Python-list
On 6/7/23 10:08, MRAB via Python-list wrote: On 2023-06-07 15:54, Florian Guilbault via Python-list wrote: Dear Python Technical Team, I hope this email finds you well. I am reaching out to you today to seek assistance with an issue I am facing regarding the installation of 'pip' despite my num

Re: Compiling python on windows with vs

2023-06-13 Thread Mats Wichmann via Python-list
On 6/13/23 12:12, Thomas Schweikle via Python-list wrote: Am Di., 13.Juni.2023 um 19:20:38 schrieb Jim Schwartz: What version of visual studio are you using? Visual Studio 2022, aka 17.6.2. What version of python? python 3.10.11 or 3.11.4 I’ve had success with using the cython package i

Re: Multiple inheritance and a broken super() chain

2023-07-03 Thread Mats Wichmann via Python-list
On 7/3/23 12:01, Richard Damon via Python-list wrote: On 7/3/23 1:38 PM, Peter Slížik via Python-list wrote: Hello. The legacy code I'm working with uses a classic diamond inheritance. Let me call the classes *Top*, *Left*, *Right*, and *Bottom*. This is a trivial textbook example. The classe

Re: Multiple inheritance and a broken super() chain

2023-07-03 Thread Mats Wichmann via Python-list
On 7/3/23 12:13, Mats Wichmann via Python-list wrote: To natter on a bit, and possibly muddy the waters even further... Now, as I see it, from the super()'s point of view, there are two inheritance chains, one starting at Left and the other at Right. But *Right.__init__()* is called twic

Re: Setup-tools

2023-07-16 Thread Mats Wichmann via Python-list
On 7/15/23 12:56, MRAB via Python-list wrote: On 2023-07-15 07:12, YOUSEF EZZAT via Python-list wrote: Hey!. i face a problem when i get setup packages by pip when i code this : "pip install numpy" in my command line it gives me error "ModuleNotFoundError: No module named 'distutils'" ple

Re: Imports and dot-notation

2023-08-10 Thread Mats Wichmann via Python-list
On 8/9/23 17:28, dn via Python-list wrote: Side note: Using "...import identifier, ..." does not save storage-space over "import module" (the whole module is imported regardless, IIRC), however it does form an "interface" and thus recommend leaning into the "Interface Segregation Principle", o

Re: PEP668 / pipx and "--editable" installs

2023-09-18 Thread Mats Wichmann via Python-list
On 9/18/23 02:16, Peter J. Holzer via Python-list wrote: On 2023-09-15 14:15:23 +, c.buhtz--- via Python-list wrote: I tried to install it via "pipx install -e .[develop]". It's pyproject.toml has a bug: A missing dependency "dateutil". But "dateutil" is not available from PyPi for Python 3.

Re: PEP668 / pipx and "--editable" installs

2023-09-18 Thread Mats Wichmann via Python-list
On 9/18/23 12:56, c.buhtz--- via Python-list wrote: On 2023-09-18 10:16 "Peter J. Holzer via Python-list" wrote: On 2023-09-15 14:15:23 +, c.buhtz--- via Python-list wrote: I tried to install it via "pipx install -e .[develop]". It's pyproject.toml has a bug: A missing dependency "dateutil

Re: Unable to uninstall 3.10.9

2023-09-27 Thread Mats Wichmann via Python-list
On 9/25/23 12:10, Pau Vilchez via Python-list wrote: Hello Python Team, I am somehow unable to completely remove Python 3.10.9 (64 Bit) from my computer. I have tried deleting the Appdata folder then repairing and then uninstalling but it still persists in the remove/add program function in wi

Re: upgrade of pip on my python 2.7 version

2023-09-27 Thread Mats Wichmann via Python-list
On 9/27/23 05:17, Zuri Shaddai Kuchipudi via Python-list wrote: hello everyone this the error that im getting while trying to install and upgrade pip on what is the solution for it? C:\repository\pst-utils-pc-davinci-simulator>pip install You are using pip version 7.0.1, however version 23.2.1

Re: path to python in venv

2023-09-27 Thread Mats Wichmann via Python-list
On 9/27/23 13:46, Larry Martell via Python-list wrote: On Wed, Sep 27, 2023 at 12:42 PM Jon Ribbens via Python-list wrote: On 2023-09-27, Larry Martell wrote: I was under the impression that in a venv the python used would be in the venv's bin dir. But in my venvs I see this in the bin dirs:

Re: upgrade of pip on my python 2.7 version

2023-09-27 Thread Mats Wichmann via Python-list
On 9/27/23 14:02, Zuri Shaddai Kuchipudi via Python-list wrote: Why it's trying to select an incompatible version when you ask to upgrade is not something I'd like to speculate on, for me personally that's a surprise. Maybe something else you did before? Also make sure you're using a pip that m

Re: type annotation vs working code

2023-09-30 Thread Mats Wichmann via Python-list
On 9/30/23 13:00, Karsten Hilbert via Python-list wrote: A type annotation isn't supposed to change what code does, or so I thought: # class Borg: _instances:dict = {} def __new__(cls, *args, **kargs): #

Re: Unable to completely remove Python 3.10.9 (64 bit) from Computer

2023-10-05 Thread Mats Wichmann via Python-list
On 10/4/23 13:08, Roland Müller via Python-list wrote: On 25.9.2023 19.58, Pau Vilchez via Python-list wrote:     Hello Python Team,     I am somehow unable to completely remove Python 3.10.9 (64 Bit) from my     computer. I have tried deleting the Appdata folder then repairing and then    

Re: Running a subprocess in a venv

2023-10-21 Thread Mats Wichmann via Python-list
On 10/21/23 07:01, Larry Martell via Python-list wrote: I have a python script, and from that I want to run another script in a subprocess in a venv. What is the best way to do that? I could write a file that activates the venv then runs the script, then run that file, but that seems messy. Is th

Re: Too Broad of an exception

2023-10-26 Thread Mats Wichmann via Python-list
On 10/26/23 03:04, Rene Kita via Python-list wrote: Rene Kita wrote: rsutton wrote: Hi all, I am fairly new to python (ie < 2 years). I have a question about pylint. I am running on windows 10/11, python 3.10.11. [...] if p.returncode >= 8: raise Exception(f'Invalid

Re: Checking if email is valid

2023-11-01 Thread Mats Wichmann via Python-list
On 11/1/23 05:35, Simon Connah via Python-list wrote: OK. I've been doing some reading and that you should avoid regex to check email addresses. So what I was thinking was something like this: To be a little more specific, Avoid Rolling Your Own RegEx. It's very tricky, and you will get it s

Re: pip/pip3 confusion and keeping up to date

2023-11-02 Thread Mats Wichmann via Python-list
On 11/2/23 04:58, Chris Green via Python-list wrote: I have a couple of systems which used to have python2 as well as python3 but as Ubuntu and Debian verions have moved on they have finally eliminated all dependencies on python2. So they now have only python3 and there is no python executable i

Re: Checking if email is valid

2023-11-05 Thread Mats Wichmann via Python-list
On 11/5/23 10:34, Grant Edwards via Python-list wrote: Indeed. There is a tiny but brightly burning kernel of hate in my heart for web sites (and their developers) that refuse to accept credit card numbers entered with spaces _as_they_are_shown_on_the_card_! I've concluded that using PHP causes

Re: Checking if email is valid

2023-11-06 Thread Mats Wichmann via Python-list
On 11/6/23 01:57, Simon Connah via Python-list wrote: The thing I truly hate is when you have two telephone number fields. One for landline and one for mobile. I mean who in hell has a landline these days? People who live in places with spotty, or no, mobile coverage. We do exist. -- https://m

Re: Checking if email is valid

2023-11-06 Thread Mats Wichmann via Python-list
On 11/6/23 08:23, Jon Ribbens via Python-list wrote: On 2023-11-06, Mats Wichmann wrote: On 11/6/23 01:57, Simon Connah via Python-list wrote: The thing I truly hate is when you have two telephone number fields. One for landline and one for mobile. I mean who in hell has a landline these days

Re: pip/pip3 confusion and keeping up to date

2023-11-06 Thread Mats Wichmann via Python-list
On 11/6/23 14:28, Karsten Hilbert via Python-list wrote: I had just hoped someone here might have a handy pointer for how to deal with modules having to be installed from pip for use with an apt-installed python-based application. That just shouldn't happen - such packages are supposed to be

Re: xor operator

2023-11-13 Thread Mats Wichmann via Python-list
On 11/13/23 16:24, Dom Grigonis via Python-list wrote: I am not arguing that it is a generalised xor. I don’t want anything, I am just gauging if it is specialised or if there is a need for it. So just thought could suggest it as I have encountered such need several times already. It is fairl

Re: Silly/crazy problem with sqlite

2023-11-25 Thread Mats Wichmann via Python-list
On 11/24/23 14:10, Chris Green via Python-list wrote: Chris Green wrote: This is driving me crazy, I'm running this code:- OK, I've found what's wrong:- cr.execute(sql, ('%' + "2023-11" + '%')) should be:- cr.execute(sql, ('%' + x + '%',) ) I have to say this seems very

Re: argparse argument post-processing

2023-11-27 Thread Mats Wichmann via Python-list
On 11/27/23 04:29, Dom Grigonis via Python-list wrote: Hi all, I have a situation, maybe someone can give some insight. Say I want to have input which is comma separated array (e.g. paths='path1,path2,path3') and convert it to the desired output - list: import argparse parser = argparse.Argume

Re: argparse argument post-processing

2023-11-27 Thread Mats Wichmann via Python-list
On 11/27/23 13:21, Dom Grigonis wrote: Thank you, exactly what I was looking for! One more question following this. Is there a way to have a customisable action? I.e. What if I want to join with space in one case and with coma in another. Is there a way to reuse the same action class? I've w

Re: How/where to store calibration values - written by program A, read by program B

2023-12-05 Thread Mats Wichmann via Python-list
On 12/5/23 07:37, Chris Green via Python-list wrote: Is there a neat, pythonic way to store values which are 'sometimes' changed? My particular case at the moment is calibration values for ADC inputs which are set by running a calibration program and used by lots of programs which display the va

Re: IDLE editor suggestion.

2023-12-12 Thread Mats Wichmann via Python-list
On 12/12/23 13:50, Thomas Passin via Python-list wrote: On 2023-12-12 08:22, Steve GS via Python-list wrote: > Maybe this already exists but > I have never seen it in any > editor that I have used. > > It would be nice to have a > pull-down text box that lists > all of the searches I have

Re: Type hints - am I doing it right?

2023-12-13 Thread Mats Wichmann via Python-list
On 12/13/23 00:19, Frank Millman via Python-list wrote: I have to add 'import configparser' at the top of each of these modules in order to type hint the method. This seems verbose. If it is the correct way of doing it I can live with it, but I wondered if there was an easier way. Think of

Re: mypy question

2023-12-29 Thread Mats Wichmann via Python-list
On 12/29/23 05:15, Karsten Hilbert via Python-list wrote: Hi all, I am not sure why mypy thinks this gmPG2.py:554: error: Argument "queries" to "run_rw_queries" has incompatible type "List[Dict[str, str]]"; expected "List[Dict[str, Union[str, List[Any], Dict[str, Any" [arg-type]

Re: Are there any easy-to-use Visual Studio C# WinForms-like GUI designers in the Python world for Tk?

2023-12-29 Thread Mats Wichmann via Python-list
On 12/28/23 18:05, Félix An via Python-list wrote: I'm used to C# WinForms, which has an easy-to-use drag-and-drop GUI designer in Visual Studio. Is there anything similar for Tk? How about Qt? What do you recommend as the easiest way to create GUI programs in Python, similar to the ease of use

<    1   2   3   4   >