Re: if STREAM.isatty():

2019-08-30 Thread Michael Torrie
On Fri, Aug 30, 2019, 05:02 Hongyi Zhao On Fri, 30 Aug 2019 17:53:02 +1000, Chris Angelico wrote: > > (Also, why the sleep? Seems unnecessary.) > > Because without using sleep, the stuff on screen will display very > shortly and then disappear. Is this not your testing result? No it is not. Wha

Re: "How to protect the python code"

2019-09-05 Thread Michael Torrie
On 9/5/19 2:48 AM, Saba Kauser wrote: > I am looking for ways available to protect the python source code > from being available to users for write/modify. Is it a good idea to > think that python source code can be protected? In general, no, not with an interpreted language. Intellectual property

Re: What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-15 Thread Michael Torrie
On 9/14/19 8:19 PM, Louis Valence wrote: > I had to read this twice. It confused the hell out of me. Anyhow, I > suppose you should take a look at > > https://github.com/hylang/hy Yup that's probably exactly the opposite of what the OP was asking about. Neat, though. -- https://mail.pytho

Re: What about idea of making a "Pythonic Lisp"...i.e. a Lisp that more closely resembles the syntax of Python?

2019-09-15 Thread Michael Torrie
On 9/15/19 9:10 AM, Christian Seberino wrote: > Say if I may ask a tangential question...I've always wondered whether it > would be not too hard to compile Python source code to a Lisp like source > code? How hard would it be to say compile Python source to Clojure source? I'm sure a compiler c

Re: Python shows error on line 15 that i cant fix

2019-09-21 Thread Michael Torrie
On 9/21/19 12:51 PM, Dave Martin wrote: > You seem to have the expectation that you know more about coding than > me and that you can insult me without me retaliating. If I were you, > I would leave this forum and never respond to another person question > again, if you think that you can rudely ra

Re: How can I set the value of the textedit box and slider of ui with the value from a config file when it has been created?

2019-10-01 Thread Michael Torrie
On 10/1/19 9:51 AM, Spencer Du wrote: > Hi > How can I set the value of the textedit box and slider of ui with the value > from a config file when it has been created meaning if a configuration file > exists then set the UI with value from the config file otherwise load ui with > nothing set to

Re: uses both shell and python codes in one script.

2019-10-03 Thread Michael Torrie
On 10/3/19 8:15 AM, James Lu wrote: > I would use IPython as a scripting language. It has a slow startup time > though. Lately I've been using Xonsh, which is a much more comfortable application of Python to shell scripting than anything else I've tried. Occasionally subprocess mode selection vs P

Re: how can i run python script in spamassassin

2019-10-03 Thread Michael Torrie
On 10/3/19 1:10 PM, Doris Marca Guaraca wrote: > > Hello, I'm sorry to bother you, I just reviewed this post, the Python > beginner, the Linux beginner, needs to run spamassassin, and now I'm trying > to do something very similar with a Python script is for a project, maybe you > can help me th

Re: Print to Paper

2019-10-04 Thread Michael Torrie
On 10/4/19 8:59 AM, Daniel wrote: > How to do a code to print to paper? please post here a "Hello World" > code to be printed on paper with an inkjet. What operating system? Are you using a graphical UI toolkit or is this a command-line program you're making? -- https://mail.python.org/mailman/

Re: question about making an App for Android

2019-10-10 Thread Michael Torrie
On 10/10/19 9:47 AM, pyotr filipivich wrote: > What I want is a "simple" program to calculate and display the > "natural time", and do so on my phone. > > "A simple program" to divide the amount of "today's" daylight into 12 > even '"hours", so that Dawn begins the First hour, the third hour is >

Re: python -m pip install and pip install

2019-10-10 Thread Michael Torrie
On 10/10/19 1:21 AM, Pankaj Jangid wrote: > So the scripts will just work fine if you simply use ~import pip~ > and work with it. > > Suppose you were writing bash scripts around python programs. Then > what will be the behaviour of, > > pip2 install mod > > under a python3 environment. If Pyth

Re: upgrading python on raspbian

2019-10-14 Thread Michael Torrie
On 10/14/19 8:52 AM, Gene Heskett wrote: > I think thats the obvious path forward. Once ported, we don't have to > worry about that legacy stuff for two or 3 generations of linux. A worthy goal and I'm sure the LinuxCNC folk would be grateful for contributions. Be aware that porting the python

Re: upgrading python on raspbian

2019-10-14 Thread Michael Torrie
On 10/14/19 10:00 AM, Michael Torrie wrote: > https://github.com/LinuxCNC/linuxcnc/issues/403 > > Whatever you do, you probably will want to discuss it on the github > issue tracker to make sure efforts aren't duplicated. Reading further, it appears that the binding and embed

Re: web scraper

2019-10-26 Thread Michael Torrie
On 10/25/19 9:19 AM, joseph pareti wrote: > but can it be generalized? > Not all tags are in the form ofto just replace those tags in the code, should > one process a different website? Not really, no. There is not an easy way to generalize this sort of web scraping. There are many different

Re: Is there some python libary for edit iso file drectly?

2019-11-04 Thread Michael Torrie
On 11/4/19 4:11 PM, Hongyi Zhao wrote: > Is there some python libary for edit iso file drectly? Isn't an ISO image a read-only sort of thing? If you want to modify files don't you have to create a whole new image? -- https://mail.python.org/mailman/listinfo/python-list

Re: How execute at least two python files at once when imported?

2019-11-06 Thread Michael Torrie
On 11/6/19 9:16 AM, Spencer Du wrote: > I just wanted a way to import at least two python files in parallel > and I wanted to know how this can be done or a reason why its bad as > stated in another post. It's not "bad," but it's also not possible. Nor does it make sense. That's why so many people

Re: Using Makefiles in Python projects

2019-11-10 Thread Michael Torrie
On 11/9/19 5:09 PM, Skip Montanaro wrote: > I thought recent versions of Win10 had a full Ubuntu subsystem. Before > that, doesn't something like Cygwin still exist/work? Sure you can install Ubuntu into the WSL2 system, but it's not like you can use that to script things back into Windows land. T

Re: Help!

2019-11-11 Thread Michael Torrie
On 11/11/19 12:07 PM, Jack Gilbert wrote: > Here's the deal, I have loaded both, one at a time, 3.7.2, and tried 3.8.0, > separately, when I go to open the program to run I get the same message, > Each time and for each version I get a Setup window. asking to modify, > repair, or uninstall, I usu

Re: Can we use Python for hacking?

2019-11-11 Thread Michael Torrie
On 11/11/19 9:49 PM, Abdur-Rahmaan Janhangeer wrote: > Someone requested my answer to the question: "Can we use Python for > hacking?" Sigh. I suppose it's a lost battle to reclaim that word. Most of what I do with Python is hacking but likely not as you are using the word. Most recently I hack

Re: Help!

2019-11-12 Thread Michael Torrie
As always, keep your messages on the mailing list so others can benefit. On 11/12/19 7:02 AM, Jack Gilbert wrote: > > . how do I get the PY program onto my desktop? Not quite sure what you mean. Python programs are saved into text files which you can store anywhere you want. Save them to the l

Re: nonlocal fails ?

2019-11-14 Thread Michael Torrie
On 11/14/19 7:15 AM, R.Wieser wrote: > Too bad though, it means that procedures that want to share/use its callers > variables using nonlocal can never be called from main. And that a caller > of a procedure using nonlocal cannot have the variable declared as global > (just tested it). nonloc

Re: nonlocal fails ?

2019-11-14 Thread Michael Torrie
On 11/14/19 10:57 AM, R.Wieser wrote: >> I know of no sane way that a function could work with the scope of >> any arbitrary caller. > > The trick seems to be to emulate a "by reference" call, by using a mutable > object as the argument and stuff the value inside of it (IIRC a tuple with a > sin

Re: nonlocal fails ?

2019-11-14 Thread Michael Torrie
On 11/14/19 10:57 AM, R.Wieser wrote: > The trick seems to be to emulate a "by reference" call, by using a mutable > object as the argument and stuff the value inside of it (IIRC a tuple with a > single element). I note that you didn't answer the question, what are you trying to accomplish? In o

Re: nonlocal fails ?

2019-11-14 Thread Michael Torrie
On 11/14/19 2:16 PM, R.Wieser wrote: > I think I did - though implicitily. What do normal people use "by > reference" arguments for ? Yep, that is what I wanted too. Well I've only seen this done in languages where other mechanisms for returning complex types are not present. For example in C

Re: How to delay until a next increment of time occurs ?

2019-11-14 Thread Michael Torrie
On 11/14/19 2:13 AM, R.Wieser wrote: > Too bad that the Pi has no free hardware that can be abused for stuff like > this (like a serial port in synchronous mode). An arduino working in conjunction with the Pi can fill in the gaps. At one time you could buy an arduino board that was also a Pi hat

Re: nonlocal fails ?

2019-11-15 Thread Michael Torrie
On 11/15/19 4:56 AM, R.Wieser wrote: >> Well I've only seen this done in languages where other mechanisms >> for returning complex types are not present. > > :-) Than you have not seen to many languages I'm afraid. Careful there. > If I would have wanted that, why would I post here with open qu

Re: nonlocal fails ?

2019-11-15 Thread Michael Torrie
On 11/15/19 5:28 AM, R.Wieser wrote: > :-) Although that is how we humans remember the effect of what we do, there > is no reason for a programming language to do it exactly like that. And > sometimes they don't. So, in effect he's saying not all languages use the classic variable model, which

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-18 Thread Michael Torrie
On 11/18/19 1:15 PM, R.Wieser wrote: > The thing is that the arguments of py_proc1 and py_proc2 are the same, but > for a single argument. Does this have to be done in the C API? Depending on how this class is used in your Python code, I would just create a new Python class that extends this cla

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Michael Torrie
On 11/19/19 1:09 AM, R.Wieser wrote: > Michael > >> Does this have to be done in the C API? > > As far as I can tell, yes. What I need to do is not exposed by the > extension itself, meaning that a wrapper class can't get access to it > either. Sure but the Python methods themselves are expos

Re: How to delay until a next increment of time occurs ?

2019-11-19 Thread Michael Torrie
On 11/19/19 12:57 AM, R.Wieser wrote: > First things first: For some reason I see your message coming in empty, but > with two attachments. An "att*.txt" one with the actual message contents, > and a "signature.asc". Makes it kind of hard to read ... His message is a (standard) PGP-signed mes

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Michael Torrie
On 11/19/19 9:00 AM, Michael Torrie wrote: > Sure but the Python methods themselves are exposed and accessible and > according to your previous posts, I meant to say the class methods defined by the C code. -- https://mail.python.org/mailman/listinfo/python-list

Re: Writing a CPython extension - calling another sibbling method ?

2019-11-19 Thread Michael Torrie
On 11/19/19 10:12 AM, R.Wieser wrote: > Feel free to post code showing that it can be done. The extension is > RPi.GPIO, the method is "output", and the extra argument is the pinnaming > scheme (BCM or BOARD). Success! :-p If you mentioned RPi.GPIO before, I apologize for my mistake. That's v

Re: Python Resources related with web security

2019-11-26 Thread Michael Torrie
On 11/26/19 11:57 AM, Pycode wrote: > On Wed, 27 Nov 2019 04:35:10 +1100, Chris Angelico wrote: >> On Wed, Nov 27, 2019 at 4:26 AM Pycode wrote: >>> asking offtopic question, >>> can you give a few guides that teach how to search the web? >>> >> At this point, I'm starting to be quite confused as

Re: Python Resources related with web security

2019-11-26 Thread Michael Torrie
On 11/26/19 10:24 AM, Pycode wrote: > On Tue, 26 Nov 2019 10:20:11 -0500, Dennis Lee Bieber wrote: > >> On Tue, 26 Nov 2019 02:51:36 + (UTC), Pycode >> declaimed the following: >> >>> which keywords should i use for web-search? do you have a list? >>> what is the best "manual" for the specifi

Re: Does module socketserver using epoll in python3?

2019-11-28 Thread Michael Torrie
On 11/28/19 8:46 PM, lampahome wrote: > As title, > > I want to use socketserver to replace my own server code to > maintain ealsier. > > But I don't found any info about tech. detail of socketserver, epoll is > important. > > Can anyone tell me? The source code is here: https://github.com/pyth

Re: "Don't install on the system Python"

2019-12-01 Thread Michael Torrie
On 11/30/19 9:42 PM, John Ladasky wrote: > Can anyone provide concrete examples of problems arising from > installing modules on top of the system Python? Am I courting > disaster? No you aren't. I've also never had any problems. I've installed many things into my root system Python installation

Re: increasing the page size of a dbm store?

2019-12-02 Thread Michael Torrie
On 12/1/19 7:50 PM, Tim Chase wrote: > After sparring with it a while, I tweaked the existing job so that it > chunked things into dbm-appropriate sizes to limp through; for the > subsequent job (where I would have used dbm again) I went ahead and > switched to sqlite and had no further issues. Ho

Re: Developers are advised to purge these malicious packages

2019-12-04 Thread Michael Torrie
On 12/4/19 10:59 AM, David Lowry-Duda wrote: > I notice that "python3-dateutil" is in over 4000 github repositories > [1]. That sounds like a disaster. > > [1]: https://github.com/search?q=python3-dateutil&type=Code It's clearly not, as Christian has already said. In fact it would be very diffic

Re: Error getting data from website

2019-12-06 Thread Michael Torrie
On 12/6/19 5:31 PM, DL Neil via Python-list wrote: > If you read the HTML data that the REPL has happily splattered all over > your terminal's screen (scroll back) (NB "soup" is easier to read than > is "content"!) you will observe that what you saw in your web-browser is > not what Amazon serve

Re: Error getting data from website

2019-12-07 Thread Michael Torrie
On 12/7/19 3:53 AM, Peter Otten wrote: > > ... because Amazon doesn' like what you do. You can cheat or play by their > rules and use the API. Yup and although I have no love for Amazon, I can understand why they don't want bots on the site. Already they have enough trouble with bots buying up m

Re: IOError: cannot open resource

2019-12-07 Thread Michael Torrie
On 12/7/19 9:48 AM, RobH wrote: > On 07/12/2019 16:00, Dan Sommers wrote: >> On 12/7/19 9:43 AM, RobH wrote: >>> When I run a python project with an oled display on a rasperry pi zero, >>> it calls for the Minecraftia.ttf font. I have the said file in >>> home/pi/.fonts/ >> >> Do you mean /home/pi/

Re: Aw: Re: stuck on time

2019-12-08 Thread Michael Torrie
On 12/8/19 11:47 AM, RobH wrote: > Err, excuse me, I was not attempting to hack into someone else's code. > As the code is in the public domain, I wanted it to work as is, like it > did for the author, without changing anything. No worries, you're totally fine. The word "hack" means something di

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Michael Torrie
On 12/10/19 5:44 AM, R.Wieser wrote: >> Well, that's exactly what happens. > > So, only the reference count gets lowered. Yep, thats daft. Why? Consider: a = someobject b = a How many references for someobject? After "del a" what should be be? It's still someobject (the same object). Or the

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Michael Torrie
On 12/10/19 11:47 AM, R.Wieser wrote: > Who did I call stupid ?I mentioned that the language doing it as Chris > thinks it happens would be stupid, and I gave a reason for that (race > conditions everywhere). But odd: Neither him nor you nor anyone else who > complains about me thinking for

Re: Python3 - How do I import a class from another file

2019-12-10 Thread Michael Torrie
On 12/10/19 2:08 PM, R.Wieser wrote: > You might know a thing or two about Python, but you (and a number of others > here) positivily stink as teachers, incapable or even unwilling to place > themselves in the shoes of a newbie. As it happens, I've heard Chris speak about teaching Python to studen

Re: Troubleshooting

2019-12-12 Thread Michael Torrie
On 12/12/19 5:40 PM, catherine morris wrote: > Good evening, > > My son is trying to download python 3.8.0 on my PC, which has Windows 10, > and it won't install properly. I'm not tech savvy and have no idea where to > start. > > Catherine Morris I just learned today that Python is officially av

Re: Troubleshooting

2019-12-12 Thread Michael Torrie
On 12/12/19 6:33 PM, Python wrote: > catherine morris wrote: >> Good evening, >> >> My son is trying to download python 3.8.0 on my PC, which has Windows 10, >> and it won't install properly. I'm not tech savvy and have no idea where to >> start. > > What happened exactly? Did you download the off

Re: Troubleshooting

2019-12-12 Thread Michael Torrie
On 12/12/19 8:03 PM, Python wrote: >> Just when I think Windows 10 is a pretty decent system, I encounter >> something inexplicable like this. > > We've gone through that before, haven't we? Yup, Several times. The good news is her son finally got it installed by launching the installer from exp

Re: urllib unqoute providing string mismatch between string found using os.walk (Python3)

2019-12-21 Thread Michael Torrie
On 12/21/19 2:46 PM, Ben Hearn wrote: > These 2 paths look identical, one from the drive & the other from an xml url: > a = '/Users/macbookpro/Music/tracks_new/_NS_2018/J.Staaf - ¡Móchate! > _PromoMix_.wav' ^^ > b = '/Users/macbookpro

Re: Python, Be Bold!

2020-01-02 Thread Michael Torrie
On 1/2/20 2:41 AM, Abdur-Rahmaan Janhangeer wrote: > i wonder who uses windows If this kind of thing is important to a user , what you propose would probably be the responsibility of the entity that is producing a Python distribution, such as Anaconda. Usually in such cases these distributions ar

Re: Python, Be Bold!

2020-01-02 Thread Michael Torrie
On 1/2/20 1:33 PM, Chris Angelico wrote: > Using a package manager means you have ONE copy of the Python > interpreter, and all your scripts depend on it. If you update that > interpreter, ALL scripts benefit from the update. This is a solved > problem. Except that it's not actually a solved probl

Re: Python, Be Bold!

2020-01-02 Thread Michael Torrie
On 1/2/20 1:42 PM, Abdur-Rahmaan Janhangeer wrote: > I am not proposing native executables, but a .jar like executable. The term > executable refers to one click run. But a jar file is not executable on Windows and never has been. You can't go to the cmd.exe window and type "myprogram.jar." Mayb

Re: Python, Be Bold!

2020-01-02 Thread Michael Torrie
On 1/2/20 2:11 PM, Abdur-Rahmaan Janhangeer wrote: > But single file are better suited for distribution. Maybe. Most windows applications are distributed with installers. I've made several bundles over the years with Nullsoft's installer builder. That's how commercial companies, including those

Re: Python, Be Bold!

2020-01-03 Thread Michael Torrie
On 2020-01-03 5:44 p.m., Abdur-Rahmaan Janhangeer wrote: > .jar provides more than just compression. It provides app info and has > signing ability This is the first time you've mentioned signing ability in this very long thread. At this point I have no idea what point you are even making anymore

Re:

2020-01-04 Thread Michael Torrie
On 1/4/20 3:29 PM, William Johnsson wrote: > Hello! My name is William and im 14 years old and live in sweden. Im > pretty new to programing in python and i need some help with code, > (That’s why i’m here). But i couldn’t really find what i was > searching for on the internet. I’m trying to write

Re: Error in python installation - was Re: Python, Be Bold!

2020-01-05 Thread Michael Torrie
On 1/5/20 7:59 AM, Kishor Soni wrote: > After proceeding installation, few minutes later such error appears > "0x80072f7d - unspecified error" > A log file is generated and attached herewith I prefer to keep communication on the list. Where did you download the installer from? Python.org or som

Re: Python, Be Bold! - The Draft

2020-01-06 Thread Michael Torrie
On 1/6/20 10:24 AM, Abdur-Rahmaan Janhangeer wrote: > Maybe but if you know or have heard of Julia the language. You will realise > its going to take over what python gives us. So i think there is urgent > need for upgrades to newer versions of python to make basic tasks on python > way quicker. N

Re:

2020-01-06 Thread Michael Torrie
On 1/6/20 10:06 AM, AAKASH JANA wrote: > Julia is a rapidly progressing language directly attacking python's sweet > spot in a.i , m.l and other computational areas. I love python and want it > to remain undefeated . I think its time we create a compiler for python . > So that python can be compile

Re: Python, Be Bold! - The Draft

2020-01-06 Thread Michael Torrie
On 1/6/20 6:33 PM, Abdur-Rahmaan Janhangeer wrote: > No, i did not write that, it's not Abdur-Rahmaan Janhangeer wrote rather My mistake. I see now that it was something you forwarded to the list from someone else. Doesn't change my reply, though. Whoever said it, it's not very relevant. Who's

Re: Floating point overflow and underflow

2020-01-07 Thread Michael Torrie
On 1/7/20 8:18 PM, Shashank Tiwari wrote: > Thanks Chris. What if it's pow(2.2,0.45)? Why not do some more experimentation: >>> import decimal >>> a = decimal.Decimal('2.2') >>> b = decimal.Decimal('0.45') >>> a ** b Decimal('1.425903734234490793207619170') Is this what you mean? I'm sure there

Re: Floating point overflow and underflow

2020-01-07 Thread Michael Torrie
On 1/7/20 8:46 PM, Shashank Tiwari wrote: > Yes, I tried this and it worked. I was wondering if I could use the output > of pow (or math.pow). Sure: pow(Decimal('2.2'), Decimal('0.45')) -- https://mail.python.org/mailman/listinfo/python-list

Re: Debian Buster: ModuleNotFoundError: No module named 'mysql'

2020-01-18 Thread Michael Torrie
On 1/18/20 9:03 AM, ^Bart wrote: >> What could I do to fix this issue?! :\ > > I understood I have Python 2.7 and Python 3 but I can't install modules > on Python 3... :\ > > ^Bart pip is probably defaulting to Python 2.7. Try using pip3, or this more explicit syntax: python3 -m pip install

Re: Clarification on Immutability please

2020-01-21 Thread Michael Torrie
On 1/21/20 11:38 AM, Chris Angelico wrote: > Are you sure that it does? I can't reproduce this. When you slice the > first two from a tuple, you create a new tuple, and until the > assignment happens, both the new one and the original coexist, which > means they MUST have unique IDs. And furthermo

Re: Clarification on Immutability please

2020-01-21 Thread Michael Torrie
On 1/21/20 6:52 PM, Ethan Furman wrote: > On 01/21/2020 10:55 AM, Michael Torrie wrote: > >> Slicing >> returns a new object whether one is slicing a tuple, list, or a string, >> the latter two are mutable objects. > > Strings are not mutable. Yup I got my items

Re: Python-list Digest, Vol 196, Issue 26

2020-01-27 Thread Michael Torrie
On 1/27/20 12:03 AM, אורי wrote: > Please don't reply to digest. Replying to a digest is just fine. Just make sure to change the subject line in the future so people know what it's referring to. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help on dictionaries...

2020-01-29 Thread Michael Torrie
On 1/29/20 6:14 PM, Souvik Dutta wrote: > Hey I was thinking how I can save a dictionary in python(obviously) so that > the script is rerun it automatically loads the dictionary. You could use the pickle module for that. See the python.org documentation on pickle. Alternatively you could use a js

Re: PyQt5 QLineEditor help!!!

2020-01-29 Thread Michael Torrie
On 1/29/20 6:11 PM, Souvik Dutta wrote: > Hi guys I just started to learn PyQt5 and was wondering if like kivy we can > delete the text in a textbox after taking the input. That is I want to make > the textbox blank after the text is read. Also can you suggest a way to > connect a cancel button wit

Re: Help on PyQt5 !!

2020-01-30 Thread Michael Torrie
On 1/30/20 4:38 AM, Souvik Dutta wrote: > Hey guys. I might be asking the most childish question. I have a window in > pyqt5 (a file in python). Let's call it win1. > I have another pyqt5 (another file in python). Let's call it win2. Now win2 > is called when add button in win1 is clicked. So far n

Re: How to make a cross platform python app with pyinstaller??

2020-02-04 Thread Michael Torrie
On 2/4/20 8:33 PM, Chris Angelico wrote: > On Wed, Feb 5, 2020 at 2:32 PM Souvik Dutta wrote: >> >> Hi, >> I made a python gui with pyqt5 and packed it with pyinstaller. It is >> running well in my computer but when I gave it to a friend who doesn't have >> any python version installed and it didn

Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Michael Torrie
On 2/11/20 4:05 AM, Chris Angelico wrote: > Or just the recognition that, eventually, technical debt has to be > paid. Speaking about technical debt is certainly fashionable these days. As if we've somehow discovered a brand new way of looking at things. But it doesn't matter what you do, there

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Michael Torrie
On 2/11/20 2:25 PM, Barry Scott wrote: > At Chris said moving to python3 will *reduce* your technical debt. > You are paying off the debt. While at the same time incurring new debt. > Not to mention that its harder to hire people to work on tech-debt legacy > code. > > Given the choice between

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Michael Torrie
On 2/11/20 1:09 PM, Chris Angelico wrote: > What you're talking about is costs in general, but "debt" is a very > specific term. You accrue technical debt whenever you "borrow" time > from the future - doing something that's less effort now at the > expense of being worse in the future. You pay off

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Michael Torrie
On 2/11/20 5:37 PM, Chris Angelico wrote: > On Wed, Feb 12, 2020 at 11:32 AM Michael Torrie wrote: >> >> On 2/11/20 2:25 PM, Barry Scott wrote: >>> At Chris said moving to python3 will *reduce* your technical debt. >>> You are paying off the debt. >> >&

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Michael Torrie
On 2/11/20 5:42 PM, Chris Angelico wrote: > Yes, if you consider the term to be synonymous with TCO, then > naturally you'll see it as useless. But it isn't. Technical debt is a > very specific thing and it CAN be paid off. We'll agree to disagree on the last bit. And I'm not the only one that bel

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Michael Torrie
On 2/11/20 5:55 PM, Chris Angelico wrote: > But you CAN rewrite code such that it reduces technical debt. You can > refactor code to make it more logical. You can update things to use > idioms that better express the concepts you're trying to represent > (maybe because those idioms require syntacti

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Michael Torrie
On 2/11/20 5:53 PM, Python wrote: > If your hypothetical project was implemented perfectly from the > beginning, in Python2.x, it may never need updating, and therefore > there may well never be any reason to port it to python3. So doing so > would be neither "debt" nor "cost" but rather "waste."

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-11 Thread Michael Torrie
On 2/11/20 6:15 PM, Chris Angelico wrote: > On Wed, Feb 12, 2020 at 12:13 PM Michael Torrie wrote: >> >> On 2/11/20 5:55 PM, Chris Angelico wrote: >>> But you CAN rewrite code such that it reduces technical debt. You can >>> refactor code to make it more logi

Re: Technical debt - was Re: datetime seems to be broken WRT timezones (even when you add them)

2020-02-12 Thread Michael Torrie
On 2/12/20 7:44 AM, Ethan Furman wrote: > On 02/11/2020 04:38 PM, Michael Torrie wrote: > >> It's all just different ways of accounting for the same things. In >> the olden days before the term "technical debt" was invented, we >> called this "total

Re: insert data in python script

2020-02-18 Thread Michael Torrie
On 2/18/20 2:41 AM, alberto wrote: > Il giorno martedì 18 febbraio 2020 09:34:51 UTC+1, DL Neil ha scritto: >> The first instruction (immediately above) imports the module preos.py. >> That works (no error message!). >> >> The second instruction refers to a Python class called Molecule. That >> f

Re: Application setup like windows msi

2020-03-04 Thread Michael Torrie
On 3/4/20 4:51 PM, J A wrote: > I was wondering g if there was a way to distribute an application that took > advantage of user input like a windows .msi does. On linux of course. Several installer frameworks can make interactive installers for Linux. There's the NullSoft installer and InstallerVI

Using zipfile to create a zip file with directories and files inside those directories

2020-03-06 Thread Michael Torrie
I am trying to do something very simple but having no success in finding out how to do it. I just want to use the Python zipfile module to create a zip file with a specific directory structure and create and write to files inside those subdirectories (not files already on disk). The documentation

Re: Using zipfile to create a zip file with directories and files inside those directories

2020-03-07 Thread Michael Torrie
On 3/7/20 1:08 AM, mus...@posteo.org wrote: > On Fri, 6 Mar 2020 20:06:40 -0700 > Michael Torrie wrote: > >> The documentation talks about writing files from >> disk, but I'm interested in creating these files from within Python >> directly in the zip archive.

Using zipfile to create a zip file with directories and files inside

2020-03-07 Thread Michael Torrie
I am trying to do something very simple but having no success in finding out how to do it. I just want to use the Python zipfile module to create a zip file with a specific directory structure and create and write to files inside those subdirectories (not files already on disk). The documentati

Re: Using zipfile to create a zip file with directories and files

2020-03-07 Thread Michael Torrie
On 3/7/20 1:08 AM, mus...@posteo.org wrote: > On Fri, 6 Mar 2020 20:06:40 -0700 > Michael Torrie wrote: > >> The documentation talks about writing files from >> disk, but I'm interested in creating these files from within Python >> directly in the zip archive

Re: Python question

2020-03-10 Thread Michael Torrie
On 3/10/20 6:40 AM, Chris Angelico wrote: > On Tue, Mar 10, 2020 at 11:22 PM Marco Sulla via Python-list >> I would reply, but I was already too much off topic. I want only to >> write what Gmail reports to me about the last message of the person >> that started this discussion: >> >>> This message

Re: Python question

2020-03-10 Thread Michael Torrie
On 3/10/20 6:49 PM, Souvik Dutta wrote: > What about moving on to a social media app completely made in pythoj for > python? No thanks. I don't want to be on yet another web forum. I don't need "social media" or a "social media app." Email works exceedingly well for this sort of thing, despite G

Re: Python question

2020-03-12 Thread Michael Torrie
On 3/11/20 8:47 PM, DL Neil via Python-list wrote: > Didn't someone once claim "do no harm"? > > There are two sides to every story! Rather than changing the (Discussion > List) server, which affects everyone; ask those who don't like Google's > tactics/behavior to change their (email) client!

Re: Python question

2020-03-13 Thread Michael Torrie
On 3/12/20 4:19 PM, Mike Dewhirst wrote: > I'm not sure I understand what you are saying. How is gmail > behaviour breaking things? The problem is if I post to a mailing list from gmail (either the web interface or Thunderbird via Google's SMTP servers), Google will silently discard my own message

Re: How to build python binaries including external modules

2020-03-18 Thread Michael Torrie
On 2020-03-18 5:06 p.m., James via Python-list wrote: > When you build python binaries from source, how to add external modules? > For example, to install cython, conventional method is building python first, > then running setup.py for cython. > I'd like to combine the 2-step into one. Cython re

Re: Confusing textwrap parameters, and request for RE help

2020-03-27 Thread Michael Torrie
On 3/27/20 3:28 PM, Dan Stromberg wrote: > Back when I was a kid, and wordprocessors were exemplified by WordStar, I > heard about a study the conclusion of which was that aligned right edges > were harder to read - that it was better to align on the left and leave the > right ragged. > > But one

Re: How to uninstall Python3.7 in Windows using cmd ?

2020-03-29 Thread Michael Torrie
On 3/29/20 6:41 PM, Mike Dewhirst wrote: > I would first determine whether it is the 32 or 64 bit version which is > installed. I would then visit www.python.org and download the exact same > python executable installer. Don't know what msi is but it doesn't > matter. I think it just means micro

Re: Fw: Python installation problem

2020-04-01 Thread Michael Torrie
On 4/1/20 11:09 AM, HERNANDEZ AGUIRRE JOSE GABRIEL DE LA DOLOROSA wrote: > I  installed  the Python software , but I could not find the python.exe file > with the Unscramble software What is this "Unscramble software?" After Python is installed, you probably will find the "Idle" integrated devel

Re: Fw: Python installation problem

2020-04-01 Thread Michael Torrie
On 4/1/20 11:09 AM, HERNANDEZ AGUIRRE JOSE GABRIEL DE LA DOLOROSA wrote: > Para: python-list@python.org > > I  installed  the Python software , but I could not find the python.exe file > with the Unscramble software Actually in windows 10, Idle shows up in the start menu under the "I"s, not in a

Re: A PDF journey to find all python PDF

2020-04-03 Thread Michael Torrie
On 4/3/20 1:02 PM, anson freer wrote: > This forum mentioned the Tutor forum so I signed up > I waited a day or 2 heard nothing so I sent msg > got Post by non-member to a members-only list > replied to apologized and > received auto msg > part of which gave do's and don't's of forum > then I real

Re: A PDF journey to find all python PDF

2020-04-04 Thread Michael Torrie
On 4/4/20 9:08 AM, anson freer wrote: > Thanks, I'll check them out. > tutor sent "The reason it is being held: > > Post by non-member to a members-only list". > > could I be on both lists? I did unsubscribe Yes you can subscribe to both lists of course. But you have to subscribe to each lis

Re: Fwd: Troubling running my Python

2020-04-08 Thread Michael Torrie
On 4/8/20 1:12 PM, Lorraine Healy wrote: > Hi, > > I have downloaded the 3.8 64 bit python program to my PC but the > interpreter will not run. It seems to have 'repaired' itself when I ran the > setup again but the interpreter still won't run. > Is there a reason for this? Do you require a scree

Re: python programs to track bitcoins

2020-04-10 Thread Michael Torrie
On 4/9/20 11:16 PM, dreamyladyg...@gmail.com wrote: > I`m looking if there any programs out there to track bitcoins and those > programs were made by python You can use Google search as well as any of us, or some other search engine. What have you found so far? > > > it`s kinda urgent In the f

Re: What variable type is returned from Open()?

2020-04-15 Thread Michael Torrie
On 4/15/20 5:47 PM, dcwhat...@gmail.com wrote: > So in the case of Python, whenever the type information is available, > I want to make it explicit rather than inferred. Whether the A.I. is > running a simulation of the software in an IDE, or analyzing them as > text documents, they should be able

Re: pytube problem

2020-04-15 Thread Michael Torrie
On 4/14/20 11:22 PM, Abhi Bajpai wrote: > Respected sir or mam.. I am facing issue related to pytube there is > always problem with youtube module please look into this and try to > solve it... I have to submit project.. and now all depends on you. This is a mailing list for general Python help, a

Re: Function to avoid a global variable

2020-04-27 Thread Michael Torrie
On 4/27/20 10:39 AM, Bob van der Poel wrote: > Thanks Chris! > > At least my code isn't (quite!) as bad as the xkcd example :) > > Guess my "concern" is using the initialized array in the function: > >def myfunct(a, b, c=array[0,1,2,3] ) > > always feels like an abuse. > > Has anyone serio

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