Re: Python 3 how to convert a list of bytes objects to a list of strings?

2020-08-29 Thread Grant Edwards
On 2020-08-28, Chris Green wrote: > Maybe I shouldn't but Python 2 has been managing to do so for several > years without any issues. I know I *could* put the exceptions in a > bucket somewhere and deal with them separately but I'd really rather > not. Then just leave it as bytes and do

Re: Python 3 how to convert a list of bytes objects to a list of strings?

2020-08-29 Thread Grant Edwards
On 2020-08-27, Chris Green wrote: > bbb = [b'aaa', b'bbb', b'ccc'] > sss = [] > for i in range(0, 2): > sss.append(str(bbb[i]) > > but that does seem a bit clumsy. Is there a better way? sss = [str(s) for s in bbb] -- Grant --

Re: Python 3 how to convert a list of bytes objects to a list of strings?

2020-08-29 Thread Grant Edwards
On 2020-08-27, Marco Sulla wrote: > Are you sure you want `str()`? > str(b'aaa') > "b'aaa'" > > Probably you want: > > map(lambda x: x.decode(), bbb) If you're an old Scheme or Lisp programmer. :) This is probably the more usual way to spell it: sss = [x.decode() for x in bbb] --

Re: Embedded python: How to debug code in an isolated way

2020-08-23 Thread Grant Edwards
On 2020-08-23, Chris Angelico wrote: > On Mon, Aug 24, 2020 at 6:00 AM Grant Edwards > wrote: >> >> On 2020-08-22, Chris Angelico wrote: >> > On Sun, Aug 23, 2020 at 5:51 AM Eko palypse wrote: >> >> So the question is, what do I need to read/le

Re: Embedded python: How to debug code in an isolated way

2020-08-23 Thread Grant Edwards
On 2020-08-22, Chris Angelico wrote: > On Sun, Aug 23, 2020 at 5:51 AM Eko palypse wrote: >> So the question is, what do I need to read/learn/understand in order to >> solve this issue? >> Or in other words, how can I debug my script in an isolated environment. > > I'd go for the old standby -

Re: Any ideas for a new language inspired to Python?

2020-08-09 Thread Grant Edwards
On 2020-08-09, Marco Sulla wrote: > On Sun, 9 Aug 2020 at 10:31, Barry Scott wrote: >> By going to C you are really saying you want to use the native >> instructions of your CPU. Contrast that with bytecode that needs >> an interpreter. > > This is also an answer

Re: Any ideas for a new language inspired to Python?

2020-08-08 Thread Grant Edwards
On 2020-08-07, Marco Sulla wrote: > My core ideas are: > > 1. Statically compiled (of course...). So if you write: > > var a = 1 > > the variable `a` is an integer and it's value can't be changed to > anything that is not an integer That's "statically typed". It has nothing to do with whether

Re: Symlinks already present

2020-07-27 Thread Grant Edwards
On 2020-07-27, Termoregolato wrote: > Il 26/07/20 22:47, dn ha scritto: > >> Thus, compare the results of the two calls to detect a difference. > > I will try also another way, If I don't err symlinks and original > directory have the same inode number (I talk about Linux, where I'm > using

Re: Fake news Detect

2020-07-17 Thread Grant Edwards
On 2020-07-17, Dennis Lee Bieber wrote: > On Fri, 17 Jul 2020 16:02:15 - (UTC), Gazu declaimed > the following: > >>Hey Guys I am new to python and i am building a fake news detection >>system ... > > I suspect that, if anyone had done this already, it would likely be > found on some

Re: An I connected here?

2020-07-17 Thread Grant Edwards
On 2020-07-17, Rhodri James wrote: > On 17/07/2020 19:33, Steve wrote: > >> I posted a request for assistance about a week ago, no response. I >> also see very little traffic here, less than there used to be. Has >> something gone wrong with my set up? > > No, nothing's wrong. I can't answer

Re: A rule for your twitlist/mailing list

2020-07-16 Thread Grant Edwards
On 2020-07-15, Jim wrote: > On 7/14/20 9:51 PM, Grant Edwards wrote: >> On 2020-07-15, Cameron Simpson wrote: >>> On 14Jul2020 08:49, Nomen Nescio wrote: >> >>>> Is the mailing list for comp.lang.python still open? >>> >>> If you me

Re: A rule for your twitlist/mailing list

2020-07-15 Thread Grant Edwards
On 2020-07-15, Cameron Simpson wrote: > On 14Jul2020 08:49, Nomen Nescio wrote: >>Is the mailing list for comp.lang.python still open? > > If you mean the python-list mailing list, yes. It is what I use, and it > does not suffer from the spam you describe. Here: > >

Re: Pycharm Won't Do Long Underscore

2020-06-24 Thread Grant Edwards
On 2020-06-24, Peter J. Holzer wrote: > There is U+FF3F Fullwidth Low Line. > >> If there were, Python would not know what to do with it > > You can use it in variable names, but not at the beginning, and it isn't > equivalent to two underscores, of course: Ouch. Anybody caught using that

Re: Pycharm Won't Do Long Underscore

2020-06-23 Thread Grant Edwards
On 2020-06-23, Tony Kaloki wrote: >in your reply, are you saying that Python would have treated the >two separate underscores the same way as a long underscore No. There is no long underscore in Python. In Python, it's always two underscores. In some fonts, two underscores just

Re: problem at the time of using editor

2020-06-18 Thread Grant Edwards
On 2020-06-18, 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 Fix the syntax error using the editor, then run the program again. -- https://mail.python.org/mailman/listinfo/python-list

Re: repair modify uninstall

2020-06-11 Thread Grant Edwards
On 2020-06-11, Terry Reedy wrote: > >> Indeed. Is the file name not clear that it's an installer? > > No. python-3.8.3-amd64.exe, which is typical naming for install files. > > I opened https://bugs.python.org/issue40948 and suggested adding > '-setup' or '-install', An excellent suggestion.

Re: pyinstaller

2020-06-11 Thread Grant Edwards
On 2020-06-11, Chris Angelico wrote: > But you DO get to choose what you support. True, for a certain value of "you". The requirement to support certains OSes and versions is often a business decision that is out of the hands of the developer. I suppose the OP could quit and stand on the

Re: repair modify uninstall

2020-06-10 Thread Grant Edwards
On 2020-06-11, Michael Torrie wrote: > Since this comes up on a weekly basis, perhaps the installer should open > that web page to section 3.8.1 after a successful installation. Maybe > users would read that short section and not try to run the installer > over and over again. Or since that

Re: pyinstaller

2020-06-10 Thread Grant Edwards
On 2020-06-10, Robin Becker wrote: > I think we used py2exe previously and I guess that will have > the same problems as pyinstaller. Why do you guess that? -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller

2020-06-10 Thread Grant Edwards
On 2020-06-10, Souvik Dutta wrote: > You might also try py2exe, in that way the user doesn't need to > install python in her/his computer. I used to use py2exe for Windows apps, and it worked well for 2.x. A couple years ago had to switch to cx_freeze due to issues with 3.x support in py2exe

Re: Behaviour of os.path.join

2020-05-28 Thread Grant Edwards
On 2020-05-27, Roel Schroeven wrote: > I find no hints of adding a backslash at the end to indicate directories. I suspect that, like Unix, that's not an OS/filesystem thing but merely a convention used by some user space applications to allow the user to provide an additional hint as to his

Re: Behaviour of os.path.join

2020-05-26 Thread Grant Edwards
On 2020-05-26, Dennis Lee Bieber wrote: > I'd also like to point out that the nasty "\\" is not needed. Windows > API understands "/" -- it is only the command line "DOS" shell that > requires back-slash Many, many applications also require that backslashes be used in path arguments

Re: exiting a while loop

2020-05-23 Thread Grant Edwards
On 2020-05-22, DL Neil via Python-list wrote: > On 23/05/20 4:31 AM, Grant Edwards wrote: >> On 2020-05-22, Peter Otten <__pete...@web.de> wrote: >> >>> If you want to terminate the script you can use exit. However exit >>> is a functio

Re: exiting a while loop

2020-05-22 Thread Grant Edwards
On 2020-05-22, Peter Otten <__pete...@web.de> wrote: > If you want to terminate the script you can use exit. However exit > is a function, and you have to call it > > exit() Actually it's an instance of _sitebuiltins.Quitter not a function. You still have to call it. ;) -- Grant --

Re: Concatenation of multiple video files in single file

2020-05-10 Thread Grant Edwards
On 2020-05-09, Chris Angelico wrote: > On Sun, May 10, 2020 at 8:50 AM Akshay Ghodake > wrote: > >> I want a help to concatenation of multiple video files into a single file >> in python. >> >> Any help will be greatly appreciated. > > Step 1: > import subprocess > > Step 2: > Run ffmpeg

Re: Python dependences

2020-04-21 Thread Grant Edwards
On 2020-04-21, jorge.confo...@inpe.br wrote: > I've already used the python list to clear up some doubts. It's > been about a year since I started using Python in my projects and I > still have some doubts. For those who have always used IDL, this > change is a little difficult. I already have

Re: Floating point problem

2020-04-18 Thread Grant Edwards
On 2020-04-18, Dennis Lee Bieber wrote: > At the very least, one was taught to not test for equality of two > floating point values (which also implies one did not test for the > negation of equality). One either tested for difference > (greater/less than) or for a delta between values being

Re: Floating point problem

2020-04-18 Thread Grant Edwards
On 2020-04-18, Souvik Dutta wrote: > I literally tried it!!! And it did not stop because I did not get any 1.0 > rather I got 0.999 But why does this happen. This is a simple math > which according to normal human logic should give perfect numbers which are > not endless. Then why does a

Re: pytube problem

2020-04-15 Thread Grant Edwards
On 2020-04-15, 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. Oh dear. If all depends on me, you're in trouble.

Re: Python launcher

2020-04-15 Thread Grant Edwards
On 2020-04-15, Pieter van Oostrum wrote: > Angel V writes: > >> Hello, >> >> I'm new to Python and recently began to self learn the language. >> Unfortunately, whenever I try to launch it, I'm met with a black pop-up >> screen the disappears as soon as it comes up. I've tried uninstalling and I

Re: A PDF journey to find all python PDF

2020-04-04 Thread Grant Edwards
On 2020-04-04, Michael Torrie wrote: > 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

Re: Confusing textwrap parameters, and request for RE help

2020-03-27 Thread Grant Edwards
On 2020-03-26, Chris Angelico wrote: > You know what's a lot more fun? Perfect block justification, no ragged > edges, no extra internal spaces. I'm not sure whether it's MORE > annoying or LESS than using internal spaces, but it's certainly a lot > more fun to write, since you have to compose

Re: Confusing textwrap parameters, and request for RE help

2020-03-26 Thread Grant Edwards
On 2020-03-26, Richard Damon wrote: >> [...] nobody in their right mind would actually >> want to generate real output that way. > > Back in the day it was FREQUENTLY done, in part to show off, anyone > could type with a typewriter and get jagged right margins, but with a > computer you could

Re: Confusing textwrap parameters, and request for RE help

2020-03-26 Thread Grant Edwards
On 2020-03-26, Peter J. Holzer wrote: >> Actually, fixed width fonts are easy to justify, you just add additional >> space between words through the line. > > Yes. It's easy to do it wrong and impossible to do it right :-) > > (BTDT) > > The problem is that you can only insert an integral number

Re: How to create an Excel app that runs Python?

2020-03-24 Thread Grant Edwards
On 2020-03-24, oliver wrote: > Use the win32com library to interact with Excel via COM. Huh? I thought that the users have no way of running a local Python app. -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: [Mostly OT] Feedback on Python homework using Canvas LMS

2020-03-16 Thread Grant Edwards
On 2020-03-16, Irv Kalb wrote: > I like both suggestions, and will probably go with the non-breaking > space (Option space on my Mac). I tested that and it works well. Until somebody tries to cut/paste the snippets you post into a .py file and run them. At that point the "distance learning"

Re: Python question

2020-03-11 Thread Grant Edwards
a "social media app." Email works exceedingly well > for this sort of thing, despite Google's antics. For me, "news" works even better than email, which is why I read all my email lists via the gmane NNTP server using a news client (slrn). :) -- Grant Edwards

Re: Please solve this problem

2020-03-09 Thread Grant Edwards
lved" > > The third was a sarcastic reply to the blank emails with just: "Solved, > answer is:" > > The fourth was Wildman trying to helpfully let them know nothing came through. > > And the fifth was you saying there was both a problem and a solution. It's always Septe

Re: Application setup like windows msi

2020-03-07 Thread Grant Edwards
xt file that says to run setup.py. But then again, I run Gentoo. ;) -- Grant Edwards grant.b.edwardsYow! I guess it was all a at DREAM ... or an episode of gmail.comHAWAII FIVE-O ... --

Re: ΓΏ in Unicode

2020-03-07 Thread Grant Edwards
On 2020-03-07, Jon Ribbens via Python-list wrote: > On 2020-03-06, Jon Ribbens wrote: >> What's the bug, or source of amusement? > > Oh, that's fun. There's a Russian Fidonet gateway, that somehow > still exists, that's re-injecting usenet posts back into the group. Last time I think it was one

Re: Application setup like windows msi

2020-03-06 Thread Grant Edwards
xt file that says to run setup.py. But then again, I run Gentoo. ;) -- Grant Edwards grant.b.edwardsYow! I guess it was all a at DREAM ... or an episode of gmail.comHAWAII FIVE-O ... --

Re: Application setup like windows msi

2020-03-06 Thread Grant Edwards
xt file that says to run setup.py. But then again, I run Gentoo. ;) -- Grant Edwards grant.b.edwardsYow! I guess it was all a at DREAM ... or an episode of gmail.comHAWAII FIVE-O ... --

Re: Application setup like windows msi

2020-03-05 Thread Grant Edwards
xt file that says to run setup.py. But then again, I run Gentoo. ;) -- Grant Edwards grant.b.edwardsYow! I guess it was all a at DREAM ... or an episode of gmail.comHAWAII FIVE-O ... --

Re: encapsulating a global variable (BlindAnagram)

2020-02-26 Thread Grant Edwards
On 2020-02-26, Chris Angelico wrote: > On Thu, Feb 27, 2020 at 9:45 AM Grant Edwards > wrote: >> >> On 2020-02-25, Dennis Lee Bieber wrote: >> >> > We seem to have some confusion with the use of the word "static"... >> >> No doubt carry

Re: encapsulating a global variable (BlindAnagram)

2020-02-26 Thread Grant Edwards
On 2020-02-25, Dennis Lee Bieber wrote: > We seem to have some confusion with the use of the word "static"... No doubt carrying on the tradition from C, where the 'static' keyword is used to mean two completely different, orthogonal things. -- Grant Edwards gr

Re: python

2020-02-23 Thread Grant Edwards
On 2020-02-22, Python wrote: > lberia...@gmail.com wrote: >> hi guys can you help me.how to find maximum and minimum in list using while >> loop python > > l = [1, 4, 2, -1, 0, 4, 2, 1, 10] > for i in range(100): > pass > > maximum = max(l) > minimum = min(l) The requirement is to

Re: Sandboxing eval() (was: Calculator)

2020-01-19 Thread Grant Edwards
On 2020-01-19, Jon Ribbens via Python-list wrote: > On 2020-01-19, mus...@posteo.org wrote: >> Is it actually possible to build a "sandbox" around eval [...] >> >> [...] >> >> It works, but is it safe? > > No, not even slightly. If you want to do this you need to write your > own interpreter

Re: Saying bye bye to Python 2

2020-01-13 Thread Grant Edwards
ve recently started to abandon 2.x support in my (mostly internal) apps. -- Grant Edwards grant.b.edwardsYow! I represent a at sardine!! gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Python, Be Bold!

2020-01-02 Thread Grant Edwards
ut that's true regardless of OS or language. -- Grant Edwards grant.b.edwardsYow! Are you the at self-frying president? gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Resources related with web security

2019-11-26 Thread Grant Edwards
On 2019-11-26, Joel Goldstick wrote: > I'm thinking this is a troll or a turing machine experiment? Yea, many of the posts remind me of ELIZA. -- Grant Edwards grant.b.edwardsYow! Hmmm ... A hash-singer at and a cross-e

Re: What do you use for slides?

2019-11-15 Thread Grant Edwards
On 2019-11-15, Abdur-Rahmaan Janhangeer wrote: > For slides i use https://yhatt.github.io/marp/, but sometimes i want a more > stylish tool. > > What do you use for slides? (besides powerpoint + syntax highlighting > included) Last time I made slides it was four a 3-day course I was teaching. I

Re: Using Makefiles in Python projects

2019-11-11 Thread Grant Edwards
Cygwin is > involved anyway so I just use GNU make and be done with it. And that's also what I usually do. I've been tempted to try msys make/bash instead of Cygwin, but that's probably not going to happen until something stops working under Cygwin or I run out of more enterta

Re: Using Makefiles in Python projects

2019-11-07 Thread Grant Edwards
ees from upstream, etc... -- Grant Edwards grant.b.edwardsYow! BARBARA STANWYCK makes at me nervous!! gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: SSL/TLS in Python using STARTTLS and ssl/ssltelnet and telnetlib

2019-11-07 Thread Grant Edwards
vers using the old Unix telnet client is because that client defaults to disabling all of the actual TELNET protocol and handshaking support when connected to a port other than 23. -- Grant Edwards grant.b.edwardsYow! PARDON me, am I at

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

2019-11-05 Thread Grant Edwards
allow you to combine steps 1-2 into a single step: "Extract files from ISO image into a read-write filesystem". But, I can't ever remember how to do that, so I just do the two steps. -- Grant Edwards grant.b.edwardsYow! I invented skydiving

Re: What's the difference between running a script under command box and interpreter?

2019-11-04 Thread Grant Edwards
ore succinct, I think it encourages bad behavior and causes a lot of problems. -- Grant Edwards grant.b.edwardsYow! I wonder if I could at ever get started in the gmail.comcredit wo

Re: Print to Paper

2019-10-04 Thread Grant Edwards
On 2019-10-04, 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. os.popen('lpr','w').write('Hello World\n') That's a bit old-school -- you should probably use subprocess.Popen instead. --

Re: Recursive method in class

2019-10-01 Thread Grant Edwards
s. I would email you privately, but I know n...@gmail.com isn't > your real email address. Worse yet, it's probably _somebody_else's_real_email_address_ -- Grant Edwards grant.b.edwardsYow! In Newark the at

Re: Irritating bytearray behavior

2019-09-17 Thread Grant Edwards
;4 or 16 bytes - IP address You probably already know this and have rejected it for some reason, but the struct module is very useful for this sort of thing... -- Grant Edwards grant.b.edwardsYow! I wonder if I should at pu

cx_freeze bdist_msi: shortcut in startmenu sub-folder?

2019-09-12 Thread Grant Edwards
top-level start menu. Can anybody point me to an example or clue on how to create a shortcut in a folder underneath the start menu with cx_freeze bdist_msi? -- Grant Edwards grant.b.edwardsYow! We are now enjoying at tota

Re: "How to protect the python code"

2019-09-05 Thread Grant Edwards
pany's reputation among others who are trying to use the now-broken program? -- Grant Edwards grant.b.edwardsYow! Is this TERMINAL fun? at gmail.com -- https://mail.python.org/mailman/li

Re: open, close

2019-08-31 Thread Grant Edwards
On 2019-08-31, Manfred Lotz wrote: > Hi there, > This is a beginner question. > > I learned that > > with open("foo.txt") as f: > lines = f.readlines() > > using the with-construct is the recommended way to deal with files > making sure that close() always happens. More importantly, it

Re: absolute path to a file

2019-08-20 Thread Grant Edwards
On 2019-08-21, Richard Damon wrote: > I think gmane feed the newsgroup comp.lang.python which feeds > python-list@python.org. No, gmane is a gateway to python-list@python.org. -- Grant -- https://mail.python.org/mailman/listinfo/python-list

Re: Web framework for static pages

2019-08-13 Thread Grant Edwards
On 2019-08-13, Jon Ribbens via Python-list wrote: > If it's really that small then it sounds like what you are looking for > is known as a "text editor". Bah. Kids these days. $ cat > index.hmtl -- Grant Edwards grant.b.edwards

Re: Fwd: PEP: add a `no` keyword as an alias for `not`

2019-08-01 Thread Grant Edwards
singleton object in the 'val is None'. Something not being there is a whole different thing... -- Grant Edwards grant.b.edwardsYow! My mind is making at ashtrays in Dayton ... gmail.com

Re: Boolean comparison & PEP8

2019-07-29 Thread Grant Edwards
On 2019-07-29, Michael Torrie wrote: > On 7/28/19 6:04 PM, Chris Angelico wrote: >> This is a fairly unusual case, though. More commonly, the default >> would be None, not False, and "if bar is None:" is extremely well >> known and idiomatic. > > Ahh yes, true

Re: Boolean comparison & PEP8

2019-07-28 Thread Grant Edwards
On 2019-07-29, Richard Damon wrote: > On 7/28/19 7:46 PM, Michael Torrie wrote: >> Yet the recommended solution to the problem of wanting a default >> argument of an empty list is something like this: >> >> def foo(bar=False); >> if bar is False: >> bar = [] >> >> > > I

Re: Creating time stamps

2019-07-22 Thread Grant Edwards
at I > explicitly imported, but a method of datetime.now(). Did I get that > right? Exactly. -- Grant Edwards grant.b.edwardsYow! TONY RANDALL! Is YOUR at life a PATIO of FUN?? gmail.com -- h

Re: Make sure the window title is visible in tkinter

2019-06-26 Thread Grant Edwards
's rendered in the same font as the window title. -- Grant Edwards grant.b.edwardsYow! I'm a fuschia bowling at ball somewhere in Brittany gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Creating a Windows executable on a Linux system

2019-06-26 Thread Grant Edwards
no longer have any wxPython apps I maintain for Windows.) Another popular option is PyInstaller, but I've never tried it. http://www.py2exe.org/ https://anthony-tuininga.github.io/cx_Freeze/ https://www.pyinstaller.org/ http://www.jrsoftware.org/isinfo.php -- Gran

Re: python 2 to 3 conversion

2019-06-17 Thread Grant Edwards
eds to be 2/3 compatible. I tried writing a bytes class for 2.7, but gave up. In anything dealing with bytes, trying to be compatible with 2 and 3 is a lot of work, and I usually don't bother. -- Grant Edwards grant.b.edwardsYow! I guess you guys got

Re: Fw: Download issues for Python

2019-06-04 Thread Grant Edwards
e error message: https://www.google.com/search?q=python+install+missing+api-ms-win-crt-runtime-l1-1-0.dll=python+install+missing+api-ms-win-crt-runtime-l1-1-0.dll -- Grant Edwards grant.b.edwardsYow! I'm thinking about at D

Re: More CPUs doen't equal more speed

2019-05-26 Thread Grant Edwards
On 2019-05-26, Chris Angelico wrote: > Sometimes, the "simple" and "obvious" code, the part that clearly has > no bugs in it, is the part that has the problem. :) And in this case, the critical part of the code that was actually serializing everything wasn't shown. One strives to post problem

Re: More CPUs doen't equal more speed

2019-05-26 Thread Grant Edwards
On 2019-05-23, Chris Angelico wrote: > On Fri, May 24, 2019 at 5:37 AM Bob van der Poel wrote: >> >> I've got a short script that loops though a number of files and >> processes them one at a time. I had a bit of time today and figured >> I'd rewrite the script to process the files 4 at a time

Re: not working

2019-05-14 Thread Grant Edwards
On 2019-05-14, Zacharia Khan wrote: > python is not working for me can you help fix it Yes. -- Grant Edwards grant.b.edwardsYow! Hello, GORRY-O!! at I'm a GENIUS from HARVARD!! gmail.

Re: Where is getstatusoutput() in subprocess module?

2019-05-03 Thread Grant Edwards
On 2019-05-03, Grant Edwards wrote: > I'm trying to update a python2 app to make it python3 compatible. It > uses commands.getstatusoutput(), which according to > > https://docs.python.org/2/library/commands.html#commands.getstatusoutput > > ... getstatusoutput() and getoutput

Where is getstatusoutput() in subprocess module?

2019-05-03 Thread Grant Edwards
are they? -- Grant Edwards grant.b.edwardsYow! How many retured at bricklayers from FLORIDA gmail.comare out purchasing PENCIL SHARPENERS right NOW

Re: Generating generations of files

2019-05-01 Thread Grant Edwards
tem/database. Every time you needed to make a change, you hand to export the source file from the Ada subsystem into the VMS filesystem, edit it, import it back into the Ada subsystem, then do the build. Yech. -- Grant Edwards grant.b.edwardsYow! Remem

Re: Generating generations of files

2019-04-30 Thread Grant Edwards
r a counter example, I'm pretty sure the VMS built in file versioning > went on the scheme MRAB described: rewriting version.rpt caused the old > version to become "version.rpt;n" where n counted up from 1. That sounds right. And you could configure how many versions were k

Re: Generating generations of files

2019-04-30 Thread Grant Edwards
On 2019-04-29, DL Neil wrote: > On 30/04/19 8:12 AM, Grant Edwards wrote: >> On 2019-04-29, DL Neil wrote: >> >>> Are you aware of a library/utility which will generate and maintain the >>> file names of multiple generations of a file? >> >>

Re: Generating generations of files

2019-04-29 Thread Grant Edwards
tually available for OpenVMS, and the porting of OpenVMS to AMD64 (aka x86-64) is progressing: https://www.vmssoftware.com/updates_port.html -- Grant Edwards grant.b.edwardsYow! They collapsed at ... lik

Re: Is this a "gotcha" in Python?

2019-04-22 Thread Grant Edwards
ting code that's easy to incorrectly understand. Yes, there's a difference. :) -- Grant Edwards grant.b.edwardsYow! I wonder if I should at put myself in ESCROW!! gmail.com -- https://mail.python.org/mailman/listinfo/python-list

Re: Function to determine list max without itertools

2019-04-22 Thread Grant Edwards
ill see an excption message and stack trace that's sent to stderr. A good GUI framework would already handle that, but not all do. -- Grant Edwards grant.b.edwardsYow! How many retured at

Re: Function to determine list max without itertools

2019-04-18 Thread Grant Edwards
On 2019-04-18, Rob Gaddi wrote: > On 4/18/19 4:35 PM, Sayth Renshaw wrote: > >> This is where I have ended up. Without itertools and max its what I got >> currently. >> >> def maximum(listarg): >> myMax = listarg[0] >> for item in listarg: >> for i in

Re: Friday Filosofical Finking: Import protections

2019-04-18 Thread Grant Edwards
On 2019-04-18, DL Neil wrote: > On 18/04/19 8:44 AM, Grant Edwards wrote: >> On 2019-04-17, DL Neil wrote: >> >>> Do you bother with exception handling for import statements? >> >> Sometimes. There are two cases when I do that: >> >> 1. W

Re: Friday Filosofical Finking: Import protections

2019-04-17 Thread Grant Edwards
what "a dev-ops environment means", and I plan on keeping it that way. :) -- Grant Edwards grant.b.edwardsYow! WHOA!! Ken and Barbie at are having TOO MUCH FUN!!

Re: Logging cf Reporting = Friday Filosofical Finking

2019-04-09 Thread Grant Edwards
one back to writing my own throw-away logging functions (typically containing a dozen or so lines of code). -- Grant Edwards grant.b.edwardsYow! You mean you don't at want to watch WRESTLING gmail.

Re: Losing words

2019-04-01 Thread Grant Edwards
line you want to send before sending it, and > compare it with the example commands in the RFC.) What he said! Adding a few print() calls can shed a _lot_ of light on a problem. Also: if reading the RFC doesn't help, use wireshark to compare behavior of an app that works with yours

Re: Your IDE's?

2019-03-27 Thread Grant Edwards
On 2019-03-25, John Doe wrote: > What is your favorite Python IDE? Unix+Emacs I sometimes wish that Emacs had a better code folding mode when browsing other people's code, but the editors I've tried that do have nice code-folding fall down at too many other tasks. -- Grant Edwa

Re: configparser - which one?

2019-03-26 Thread Grant Edwards
n JSON. As usual, YMMV. -- Grant Edwards grant.b.edwardsYow! HUMAN REPLICAS are at inserted into VATS of gmail.comNUTRITIONAL YEAST ... -- https://mail.python.org/mailman/listinfo/python-list

Re: Might be doing this wrong? (Turtle graphics)

2019-03-25 Thread Grant Edwards
On 2019-03-25, Larry Martell wrote: > On Mon, Mar 25, 2019 at 3:45 PM CrazyVideoGamez > wrote: >> wait no nevermind im such an idiot > > Every programmer I have ever known has said that. And never saying that is a 100% reliable indicator that you really are one...

Re: how to handle response data that is streaming and chunked?

2019-03-21 Thread Grant Edwards
r future? You can do either, but not everbody is willing to click on links, so you're limiting your audience if you don't actually include the source code you're asking about in your post. -- Grant Edwards grant.b.edwardsYow! Am I in GRADUATE

Re: File not closed

2019-03-20 Thread Grant Edwards
ams, that's fine. For long running servers, it's bad style. -- Grant Edwards grant.b.edwardsYow! Hmmm ... A hash-singer at and a cross-eyed guy were gmail.comSLEEPING on a deserted

Re: Block Ctrl+S while running Python script at Windows console?

2019-03-19 Thread Grant Edwards
ite calls are blocking due because the terminal emulator has stopped reading the other end of the pipe/pty/queue/buffer/whatever-it's-called-in-windows? -- Grant Edwards grant.b.edwardsYow! It's some people at inside

Re: running "python -i" in subprocess shows no prompt

2019-03-18 Thread Grant Edwards
epending on whether they're connected to a tty or not. -- Grant Edwards grant.b.edwardsYow! I'm young ... I'm at HEALTHY ... I can HIKE gmail.comTHRU CAPT GROGAN'S LUMBAR

Re: subprocess svn checkout password issue

2019-03-16 Thread Grant Edwards
On 2019-03-16, dieter wrote: > Otherwise, you must monitor what it written to the subprocess' > "stdout" and "stderr", recognized the interaction request > perform the interaction with the user and send the result > to the subprocess' stdin. I don't know about svn specifically, but in the past

Re: Python scope question

2019-03-12 Thread Grant Edwards
nd this code w.r.t to scope > in Python? https://www.ynonperek.com/2017/09/11/python-variable-scope-implicit-global-and-nonlocal/ -- Grant Edwards grant.b.edwardsYow! If I pull this SWITCH at I'll b

Re: System Beep?

2019-03-08 Thread Grant Edwards
On 2019-03-08, Steve wrote: > I tried all three, nothing audio. I am beginning to wonder if > something I the operating system is at fault. The three lines do > produce symbols. The first two are a rectangle with a space in the > middle and the last one spelled out "bel" in short/small

Re: Class Issue`

2019-03-06 Thread Grant Edwards
w people for whom it is their religion. :) That said, I don't think that stating ones lack of respect for some particular programming language is uncivil -- particularly compared to the things I've said about PHP in the past (maybe not in this group). -- Grant Edwards

Re: How to detect if a file is executable on Windows?

2019-02-19 Thread Grant Edwards
On 2019-02-19, MRAB wrote: > On 2019-02-19 18:31, Grant Edwards wrote: > >> FWIW, I've noticed that afer downloading a .exe under Linux and >> scp'ing the file to a Windows machine, it wont run when double-clicked >> until I fire up a Cygwin shell and do a >>

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