Re: Call a shell command from Python

2016-11-01 Thread Wildman via Python-list
expands $USER to the actual user name beforehand. If you >>> are on a Linux system, enter this into a terminal to illustrate: >>> >>> sudo grep ^$USER\: /etc/shadow >> >> Bash is not involved here. Python is calling grep directly. > > He's already

Re: Call a shell command from Python

2016-11-01 Thread Wildman via Python-list
On Tue, 01 Nov 2016 11:23:09 -0400, D'Arcy Cain wrote: > On 2016-11-01 01:23 AM, Ben Finney wrote: >> Wildman via Python-list writes: >> So the way your script was invoked has no bearing on whether Bash will >> get involved in what your script does. Your script is *dire

PyQt pass data from class

2016-11-15 Thread luca72 via Python-list
dati = [] in the class Form i have a lineEdit in the class Cornice i need to write something link self.lineEdit.setText('blabla') that is in the class Form in wich way i can have access to the lineedit of class Form without event from class Cornice Many Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: PyQt pass data from class

2016-11-15 Thread luca72 via Python-list
Thanks for your reply Is the latter, can you explain how i can do it. Thanks -- https://mail.python.org/mailman/listinfo/python-list

need help to get my python image to move around using tkinter

2016-11-18 Thread twgrops--- via Python-list
Hi I am new here and to python, I am currently studying towards my degree in computer science and have to build a program but I have hit a brick wall. I am trying to make an image move around the canvas. I can make a rectangle move using the following: #test rectangle id1

Re: Quick help for a python newby, please

2016-11-23 Thread Wildman via Python-list
(today - birthdate).days print person + "'s birthday was " + str(dif) + " days ago." except ValueError: print "The date you entered is not valid!" -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Quick help for a python newby, please

2016-11-23 Thread Wildman via Python-list
On Thu, 24 Nov 2016 11:59:17 +1100, Chris Angelico wrote: > On Thu, Nov 24, 2016 at 10:02 AM, Wildman via Python-list > wrote: >> Try the code that is below: >> >> import datetime >> from datetime import date >> >> today = date.today() >> person =

Re: Quick help for a python newby, please

2016-11-23 Thread Wildman via Python-list
On Thu, 24 Nov 2016 14:49:27 +1100, Chris Angelico wrote: > On Thu, Nov 24, 2016 at 2:41 PM, Wildman via Python-list > wrote: >> Point taken. I did miss the python3 part. >> >> I switched to raw_input because it handles an empty >> input. An empty input would

Request Help With Byte/String Problem

2016-11-29 Thread Wildman via Python-list
t call last): File "./ifaces.py", line 32, in ifs = all_interfaces() File "./ifaces.py", line 11, in all_interfaces names = array.array("B", '\0' * bytes) TypeError: cannot use a str to initialize an array with typecode 'B' -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Request Help With Byte/String Problem

2016-11-29 Thread Wildman via Python-list
On Tue, 29 Nov 2016 18:29:51 -0800, Paul Rubin wrote: > Wildman writes: >> names = array.array("B", '\0' * bytes) >> TypeError: cannot use a str to initialize an array with typecode 'B' > > In Python 2, str is a byte string and you can do

Re: Request Help With Byte/String Problem

2016-12-01 Thread Wildman via Python-list
On Wed, 30 Nov 2016 07:54:45 -0500, Dennis Lee Bieber wrote: > On Tue, 29 Nov 2016 22:01:51 -0600, Wildman via Python-list > declaimed the following: > >>I really appreciate your reply. Your suggestion fixed that >>problem, however, a new error appeared. I am doing some

Re: Request Help With Byte/String Problem

2016-12-01 Thread Wildman via Python-list
+ '.' + \ str(int(addr[3])) ifs = all_interfaces() for i in ifs: # added decode("utf-8") print("%12s %s" % (i[0].decode("utf-8"), format_ip(i[1]))) Thanks again! -- GNU/Linux user #557453 May the Source be with you. -- https://mail.python.org/mailman/listinfo/python-list

Re: Request Help With Byte/String Problem

2016-12-02 Thread Wildman via Python-list
t;return '.'.join(str(b) for b in a) > > addr = b'\x12\x34\x56\x78' > > print(format_ip(addr)) It is a byte string just like your 'addr =' example and the above code works perfectly. Thank you. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Request Help With Byte/String Problem

2016-12-03 Thread Wildman via Python-list
On Fri, 02 Dec 2016 19:39:39 +, Grant Edwards wrote: > On 2016-12-02, Wildman via Python-list wrote: >> On Fri, 02 Dec 2016 15:11:18 +, Grant Edwards wrote: >> >>> I don't know what the "addr" array contains, but if addr is a byte >>>

Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
I there a way to detect what the Linux runlevel is from within a Python program? I would like to be able to do it without the use of an external program such as 'who' or 'runlevel'. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.py

Re: Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
On Mon, 05 Dec 2016 16:25:56 -0500, DFS wrote: > On 12/05/2016 03:58 PM, Wildman wrote: >> I there a way to detect what the Linux runlevel is from >> within a Python program? I would like to be able to do >> it without the use of an external program such as 'who'

Re: Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
;m just a rebel without a clue. > Then, proceed to: > >https://dbus.freedesktop.org/doc/dbus-python/doc/tutorial.html> > > > Marko Even if I could ‎figure this out, I can't depend on systemd being installed. The way things are going that may change tho. I have

Re: Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
On Mon, 05 Dec 2016 15:39:24 -0700, Michael Torrie wrote: > On 12/05/2016 03:34 PM, Wildman via Python-list wrote: >> Too bad I don't speak C. I am an amateur programmer and most or all >> my experience has been with assembly and various flavors of BASIC, >> including

Re: Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
On Mon, 05 Dec 2016 16:08:57 -0600, Tim Chase wrote: > On 2016-12-05 14:58, Wildman via Python-list wrote: >> I there a way to detect what the Linux runlevel is from >> within a Python program? I would like to be able to do >> it without the use of an external progra

Re: Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
On Mon, 05 Dec 2016 18:25:58 -0700, Michael Torrie wrote: > I think Python is a good choice for such a utility, but I agree it is > much better to rely on these external utilities as children to do the > platform-dependent work, rather than try to re-implement everything in > Python.

Re: Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
On Mon, 05 Dec 2016 20:46:22 -0700, Michael Torrie wrote: > On 12/05/2016 08:27 PM, Wildman via Python-list wrote: >> On Mon, 05 Dec 2016 18:25:58 -0700, Michael Torrie wrote: >> >>> I think Python is a good choice for such a utility, but I agree it is >>> much

Re: Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
On Mon, 05 Dec 2016 21:42:52 -0600, Tim Chase wrote: > On 2016-12-05 18:26, Wildman via Python-list wrote: >> On Mon, 05 Dec 2016 16:08:57 -0600, Tim Chase wrote: >> >> > On 2016-12-05 14:58, Wildman via Python-list wrote: >> >> I there a way to de

Re: Detect Linux Runlevel

2016-12-06 Thread Wildman via Python-list
On Tue, 06 Dec 2016 01:14:35 +0100, Bernd Nawothnig wrote: > On 2016-12-05, Wildman wrote: >> And I am trying to write it without using external programs, where >> possible. > > That is not the Unix way. Yes, but it is my way. >> I am a hobby programmer and I

Re: Detect Linux Runlevel

2016-12-06 Thread Wildman via Python-list
On Mon, 05 Dec 2016 16:08:57 -0600, Tim Chase wrote: > On 2016-12-05 14:58, Wildman via Python-list wrote: >> I there a way to detect what the Linux runlevel is from >> within a Python program? I would like to be able to do >> it without the use of an external progra

Re: Detect Linux Runlevel

2016-12-06 Thread Wildman via Python-list
On Tue, 06 Dec 2016 13:06:35 -0600, Tim Chase wrote: > On 2016-12-06 12:10, Wildman via Python-list wrote: >> If I had tried this in the beginning, it would have >> save you a lot of work. >> >> Since both versions of the code works, which one do >> you recomm

Re: Detect Linux Runlevel

2016-12-06 Thread Wildman via Python-list
/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Detect Linux Runlevel

2016-12-06 Thread Wildman via Python-list
she gets home from the grocery. -- GNU/Linux user #557453 The voices in my head may not be real but they have some good ideas. -- https://mail.python.org/mailman/listinfo/python-list

Re: CLP stats: last 500 posts

2016-12-10 Thread Wildman via Python-list
'\n' > m=(int(e)-int(y.argv[3])+1,int(e)) > printStat("From","Posters",m) > printStat("Subject","Subjects",m) > printStat("User-Agent","User-Agents",m) > n.quit() >

Re: CLP stats: last 500 posts

2016-12-10 Thread Wildman via Python-list
;>> print('Posts %s %s'%(len(set(p)),hd)) >>> for v in x: print(' %s %s'%(v[1],v[0])) >>> print >>> print 'As of '+d.datetime.now().strftime("%I:%M%p %B %d, %Y") + '\n' >>> m=(int(e)-int(y.argv[3])+

Re: CLP stats: last 500 posts

2016-12-11 Thread Wildman via Python-list
use aioe.org I don't get the error and the user agents are printed. I don't think it is a problem with the code but any thoughts why giganews is not playing nice? And it is not related to the python group. I have tried on other groups and i get the same error. Here is the complete er

Re: CLP stats: last 500 posts

2016-12-11 Thread Wildman via Python-list
at my headers there is an entry for User-Agent User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2; x86_64-pc-linux-gnu) -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Problem running Python 3.5.2 on school network PC

2016-12-15 Thread Wildman via Python-list
On Thu, 15 Dec 2016 11:11:51 -0500, Jed Mack wrote: > We are having a problem running Python 3.5.2 on Windows 10 x64 computers, > which are members of a school network. > > > > The program seems to install correctly, but when we try to run the program > it stops and

Re: learning and experimenting python.

2016-12-30 Thread Wildman via Python-list
On Fri, 30 Dec 2016 11:08:30 -0800, einstein1410 wrote: > LAN you are right. I am agree with you that it's easy to recognise. > > But look > $ for normal user > # for special user/root > % for other shell >>>> For python > And so on... > Why? > Why t

Re: learning and experimenting python.

2016-12-30 Thread Wildman via Python-list
don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: learning and experimenting python.

2016-12-30 Thread Wildman via Python-list
t was a little snide but I tend to get that way when trying to explain the obvious. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: learning and experimenting python.

2016-12-30 Thread Wildman via Python-list
On Fri, 30 Dec 2016 19:23:17 -0700, Michael Torrie wrote: > On 12/30/2016 07:05 PM, Wildman via Python-list wrote: >> On Fri, 30 Dec 2016 23:39:43 +, Erik wrote: >> >>> On 30/12/16 23:34, einstein1...@gmail.com wrote: >>>> You are also confusing me

Re: learning and experimenting python.

2017-01-01 Thread Wildman via Python-list
On Sun, 01 Jan 2017 10:41:22 -0800, einstein1410 wrote: > What contribution I had made especially valuable? Ask your mommy what sarcasm means. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: learning and experimenting python.

2017-01-02 Thread Wildman via Python-list
. | \ \ \/ \ \/ /||Y||\ \/ / \__/ || || \__/ () () || || ooO Ooo -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: learning and experimenting python.

2017-01-03 Thread Wildman via Python-list
On Mon, 02 Jan 2017 20:25:25 -0800, Ethan Furman wrote: > On 01/02/2017 09:53 AM, Wildman via Python-list wrote: > > [rude ascii art omitted] > > That is a completely inappropriate response. Yes it was. I tend to get upset when told to shut up and go away for no good reason.

Re: Can not run the Python software

2017-01-13 Thread Bernard via Python-list
-Original Message- From: hba008 To: hba008 ; python-list Sent: Fri, Jan 13, 2017 7:02 pm Subject: Re: Can not run the Python software I have been added to the mailing list per your instructions. Please, have someone address the problem belowThanks Sent from my

Re: Can not run the Python software

2017-01-13 Thread Bernard via Python-list
Thanks for the info.. -Original Message- From: Michael Torrie To: python-list Sent: Fri, Jan 13, 2017 11:08 pm Subject: Re: Can not run the Python software On 01/13/2017 08:32 PM, Joseph L. Casale wrote: >> Just downloaded Python 3.6.0 2016-12-23 and PyCharm. Tried to r

Re: How coding in Python is bad for you

2017-01-23 Thread Wildman via Python-list
gt; It isn't. >> >> chocolate is a poison (lethal dose for a human approx 22lb) > > That's a meaningless statement. *Everything* is a poison > in sufficient quantities. Yes, even water. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Is shutil.get_terminal_size useless?

2017-01-29 Thread Wildman via Python-list
YMMV. import fcntl import os import struct import termios tty = os.open(os.ctermid(), os.O_RDONLY) ts = struct.unpack("hh", fcntl.ioctl(tty, termios.TIOCGWINSZ, "1234")) os.close(tty) columns = ts[1] rows = ts[0] print(str(columns) + "x" + str(rows)) -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

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

2017-02-01 Thread Wildman via Python-list
On Wed, 01 Feb 2017 17:12:26 +, Chris Green wrote: > I'm often hitting this problem, how does one find out what package to > install to provide what a give import needs? > > Currently I'm modifying some code which has 'import gtk', I want to > migrate fro

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

2017-02-01 Thread Wildman via Python-list
ds? >> > >> > Currently I'm modifying some code which has 'import gtk', I want to >> > migrate from Python 2 to Python 3 if I can but at the moment the >> > import fails in Python 3. >> > >> > There are dozens of packages in th

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

2017-02-01 Thread Wildman via Python-list
> I'm often hitting this problem, how does one find out what package to >> >> > install to provide what a give import needs? >> >> > >> >> > Currently I'm modifying some code which has 'import gtk', I want to >> >> > migr

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

2017-02-03 Thread Wildman via Python-list
true whenever I run python3? In python, this method will work but it is only in effect for the running process that calls it while it is running. It is not system wide and it is not permanent. import os os.environ["PATH"] = os.environ["PATH"] + ":./" or os.environ[

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

2017-02-03 Thread Wildman via Python-list
beginning. >> >> What's the best way to ensure this is always true whenever I run python3? > > In python, this method will work but it is only in effect > for the running process that calls it while it is running. > It is not system wide and it is not permanent. > >

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

2017-02-03 Thread Wildman via Python-list
On Fri, 03 Feb 2017 13:19:30 -0700, Michael Torrie wrote: > On 02/03/2017 12:07 PM, Wildman via Python-list wrote: >> Sorry, I forgot something important. If you use >> /etc/rc.local, the execute bit must be set. > > I don't think this is what Neal Becker was asking ab

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

2017-02-03 Thread Wildman via Python-list
On Sat, 04 Feb 2017 09:25:42 +1100, Cameron Simpson wrote: > On 03Feb2017 14:55, Wildman wrote: >>On Fri, 03 Feb 2017 13:19:30 -0700, Michael Torrie wrote: >> >>> On 02/03/2017 12:07 PM, Wildman via Python-list wrote: >>>> Sorry, I forgot something important.

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

2017-02-04 Thread Wildman via Python-list
rstand the danger in having the dot in the path. The './' only means the current directory. DOS and Windows has searched the current directory since their beginning. Is that also dangerous? -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

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

2017-02-04 Thread Wildman via Python-list
On Sat, 04 Feb 2017 18:25:03 +, Grant Edwards wrote: > On 2017-02-04, Wildman via Python-list wrote: > >> No, I do not know. You might try your question in a linux specific >> group. Personally I don't understand the danger in having the dot >> in the p

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

2017-02-05 Thread Wildman via Python-list
On Sat, 04 Feb 2017 19:12:55 +, Grant Edwards wrote: > On 2017-02-04, Wildman via Python-list wrote: >>> >>> The next time you are in the /tmp directory looking for something, can >>> you guess what happens when you mistype "ls" as "sl"?

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

2017-02-05 Thread Wildman via Python-list
is very unlikely. One would have a hard time placing a program on my computer and running it without me knowing about it. No, that is not a challenge. :-) -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: test

2018-03-12 Thread Alister via Python-list
On Mon, 12 Mar 2018 13:43:01 -0500, Yuan Xue wrote: > test failed -- Mollison's Bureaucracy Hypothesis: If an idea can survive a bureaucratic review and be implemented it wasn't worth doing. -- https://mail.python.org/mailman/listinfo/python-list

Re: Style Q: Instance variables defined outside of __init__

2018-03-20 Thread Alister via Python-list
nd *and test*. > > That is really well said Terry, thank you for articulating what I was > thinking but couldn't find the words for. but why would a functional programmer be programming an OOP class? -- No one becomes depraved in a moment. -- Decimus Junius Juvenalis -- https://mail.python.org/mailman/listinfo/python-list

Re: Thank you Python community!

2018-03-20 Thread Alister via Python-list
of yours are not merely chosen at > random, but are in fact, delectable morsels of laser-focused sarcasm. maybe not - I use fortune to generate mine & it can be supprisingly apt at times -- The primary function of the design engineer is to make things difficult for the fabricator and impossible for the serviceman. -- https://mail.python.org/mailman/listinfo/python-list

lire du son en format natif avec python

2018-03-21 Thread asphjt--- via Python-list
7;un peut m'aider, merci à lui d'avance. -- https://mail.python.org/mailman/listinfo/python-list

Code for Using Keyboard to Play music notes "ABCDEFG"

2018-03-25 Thread Bernard via Python-list
Pyton Friends, Do you have any code that will play the notes "ABCDEFG" from my computer keyboard when a key is pressed ? For example if I press the "a" key the note "a" will sound out of my speaker. Thanks, BigB -- https://mail.python.org/mailman/listinfo/python-list

OSError: [Errno -9981] Input overflowed

2018-04-04 Thread asphjt--- via Python-list
200) ser.write(data) ) but I have the same error as when I display it on the screen. If anyone knows an answer to this question, thank you in advance. -- https://mail.python.org/mailman/listinfo/python-list

Re: Data Integrity Parsing json

2018-04-26 Thread Alister via Python-list
is there any reason you appear to be re-inventing the wheel rather than using the existing json module from the std library? -- "Well, if you can't believe what you read in a comic book, what *___can* you believe?!" -- Bullwinkle J. Moose [Jay Ward] -- https://mail.python.org/mailman/listinfo/python-list

Re: problem in compiling C API in mingw

2018-05-08 Thread m.overmeyer--- via Python-list
On Tuesday, 26 July 2011 23:53:36 UTC, llw...@gmail.com wrote: > Hi all again, > I wonder if so far only Python 2.5.x support c extension. I try the > MSVC 2010 and 2008, also try mingw (gcc 4.x.x) and swig. But even I try > the simplest example, it said > > example_wra

Python library to break text into words

2018-05-31 Thread beliavsky--- via Python-list
I bought some e-books in a Humble Bundle. The file names are shown below. I would like to hyphenate words within the file names, so that the first three titles are a_devils_chaplain.pdf atomic_accidents.pdf chaos_making_a_new_science.pdf Is there a Python library that uses intelligent guesses

Re: Python library to break text into words

2018-05-31 Thread beliavsky--- via Python-list
On Thursday, May 31, 2018 at 5:31:48 PM UTC-4, Dietmar Schwertberger wrote: > On 5/31/2018 10:26 PM, beliavsky--- via Python-list wrote: > > Is there a Python library that uses intelligent guesses to break sequences > > of characters into words? The general strategy would be t

Re: Stefan's headers [was:Names and identifiers]

2018-06-11 Thread Alister via Python-list
doesn't matter how good the engine is (or how much you've upgraded > the processor), because without the fuel (or software) it's just a large > paperweight (or room heater). :-) its a bloody lousy room heater without the fuel to burn & generate heat -- I want to be the white man's brother, not his brother-in-law. -- Martin Luther King, Jr. -- https://mail.python.org/mailman/listinfo/python-list

Re: What is the "Unpacking Arguments List" rule?

2018-06-13 Thread Alister via Python-list
metry with the function definition syntax. >> >> The message is quite clear, however: after the "*arg", >> you must pass keyword arguments only, i.e. they must have the form >> "param=value". >> >>> The only reason I can guess is that it ch

Re: Python list vs google group

2018-06-15 Thread Alister via Python-list
On Fri, 15 Jun 2018 08:28:38 -0700, T Berger wrote: > I'm suspecting that posting to python google groups (this site) gets > more responses than mailing to the python list. Am I correct? Also, > contrary to what I read on the python list information sheet, what shows > up in th

Re: syntax difference

2018-06-16 Thread Alister via Python-list
re I had to get a haircut or both feet firmly planted in the air. -- https://mail.python.org/mailman/listinfo/python-list

Re: Understanding memory location of Python variables

2018-06-16 Thread Alister via Python-list
as the >> myName variable itself. I also expected myName[1] to be located >> immediately after myName[0]. >> -- >> https://mail.python.org/mailman/listinfo/python-list > > Others can probably give a more complete explanation, but small numbers, > and apparently letters are

Re: Scanner freakishness [was Re: Python list vs google group]

2018-06-16 Thread Alister via Python-list
light bulbs in a nearby display board (i don't know who originally identified that one). working on the help desk it was always "fun" trying to convince the user that this was the problem, understandably they though we were pulling their leg" > > >> -- >> Steven D'Aprano "Ever since I learned about confirmation bias, I've >> been seeing it everywhere." -- Jon Ronson >> >> -- >> https://mail.python.org/mailman/listinfo/python-list -- It's later than you think. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python list vs google group

2018-06-18 Thread Alister via Python-list
re for any moderately complex question you are still likely to get contradictory answers -- Iron Law of Distribution: Them that has, gets. -- https://mail.python.org/mailman/listinfo/python-list

Re: syntax difference

2018-06-20 Thread Alister via Python-list
-) -- Do what comes naturally. Seethe and fume and throw a tantrum. -- https://mail.python.org/mailman/listinfo/python-list

Re: syntax difference

2018-06-20 Thread Alister via Python-list
On Wed, 20 Jun 2018 13:59:40 +, Grant Edwards wrote: > On 2018-06-20, Alister via Python-list wrote: > >> Annotations were invented by the Nazi's on the explicit instruction of >> Hitler. there, can someone now invoke Godwins law & call this >> discussion

Re: syntax difference

2018-06-20 Thread Alister via Python-list
ft. -- Shelley -- https://mail.python.org/mailman/listinfo/python-list

Re: syntax difference

2018-06-21 Thread Alister via Python-list
g tested. So > you evaluate it once then keep it on the stack. > > Think of Switch as another kind if hint. which can be implemented in python by putting function calls as members of a list or dictionary switch=[case1,case2,case3] switch[a]() (although i personally would still like to s

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-25 Thread Alister via Python-list
> > > for elem in list: > > print(elem) > > Abdur-Rahmaan Janhangeer https://github.com/Abdur-rahmaanJ > > > for i in range(len(list)): is a python anti-pattern it is almost a 100% guarantee that you are doing something wrong* *as with all rules of thumb there is

Re: Python for beginners or not? [was Re: syntax difference]

2018-06-25 Thread Alister via Python-list
On Mon, 25 Jun 2018 11:42:27 +0100, Mark Lawrence wrote: > On 25/06/18 10:10, Alister via Python-list wrote: >> On Mon, 25 Jun 2018 11:36:25 +0400, Abdur-Rahmaan Janhangeer wrote: >> >>> i think he means like for a loop to iterate over a list you might do >>>

Re: Something new which all programmers world wide will appreciate

2018-06-28 Thread Alister via Python-list
checks in and a time > out of 20 the thing gets lost and starts putting the sauce directly on > the customer. as a diabetic the bread base puts them firmly on the bad list anyway :-( -- "If it ain't broke, don't fix it." - Bert Lantz -- https://mail.python.org/mailman/listinfo/python-list

Re: Using Python with a website

2018-07-05 Thread Alister via Python-list
On Wed, 04 Jul 2018 23:25:14 +, Adrian Taylor wrote: > G'day All, > > I have just discovered Python and thanks to a script by Ethan I can read > a foxpro database and change the required values. > However my next big step is to be able to use this python featur

Re: Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-05 Thread Mark via Python-list
On Thursday, July 5, 2018 at 6:24:09 PM UTC+1, Tim Williams wrote: > On Thu, Jul 5, 2018 at 9:02 AM Mark Summerfield via Python-list < > python-list@python.org> wrote: > > > For GUI programming I often use Python bindings for Qt. > > > > There are two co

Re: Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-06 Thread Mark via Python-list
the script if anyone's interested.) This means that there are no import hacks and no (manual) duplication, while still being easy to test using either binding library. -- https://mail.python.org/mailman/listinfo/python-list

Re: Is there a nice way to switch between 2 different packages providing the same APIs?

2018-07-06 Thread Mark via Python-list
On Friday, July 6, 2018 at 1:22:46 PM UTC+1, Bev in TX wrote: > > On Jul 6, 2018, at 3:14 AM, Mark via Python-list > > wrote: > > > > In the end I changed to a completely different approach. > > > > I now have two parallel directories, one with PySide-bas

Re: test for absence of infinite loop

2018-07-17 Thread Alister via Python-list
On Tue, 17 Jul 2018 10:10:49 +0100, Robin Becker wrote: > A user reported an infinite loop in reportlab. I determined a possible > cause and fix and would like to test for absence of the loop. Is there > any way to check for presence/absence of an infinite loop in python? I > imagine

Python Console Menu

2018-07-31 Thread Tcpip via Python-list
Hi all, Im new with python, im working on a Python console Menu, I found some examples on Git, but what I need to understand is how I can call a subprocess. Here is an Example , if choice==1: print "Test SSH Connection (check ssh to all hosts)" ## You can add yo

Re: Python Console Menu

2018-07-31 Thread juraj.papic--- via Python-list
El martes, 31 de julio de 2018, 11:56:47 (UTC-3), Tcpip escribió: > Hi all, > > Im new with python, im working on a Python console Menu, I found some > examples on Git, but what I need to understand is how I can call a > subprocess. > > Here is an Example , > > if

How to make python pick up my new-and-shiny openssl shared object

2018-08-07 Thread Fetchinson . via Python-list
fault 1.0.0. How do I tell python to use /home/fetch/opt for the ssl module? Note that I have /home/fetch/opt as the first entry in LD_LIBRARY_PATH. Also, I know for a fact that I don't need to recompile python for this so please don't suggest "just recompile python with the new ope

Re: How to make python pick up my new-and-shiny openssl shared object

2018-08-08 Thread Fetchinson . via Python-list
On 8/8/18, Christian Heimes wrote: > On 2018-08-08 00:07, Fetchinson . via Python-list wrote: >> The highest version of openssl available on my system is 1.0.0 which >> is not good enough for pip these days (or github for that matter). So >> I've installed 1.1.0 to a c

Re: using python's logo in your own logo

2018-08-09 Thread Alister via Python-list
a big NO. I am pretty sure you would need to get permission. -- VICARIOUSLY experience some reason to LIVE!! -- https://mail.python.org/mailman/listinfo/python-list

how to make super() work with externally defined methods in inheritance???

2018-08-15 Thread thomas.lynch--- via Python-list
Appreciate some help in how in Python a person can add some external methods to existing classes in the presence of simple one level inheritance. Here is an example stripped down to the shiny brass tacks: class A: def __init__(self): self.number = 1 def A_biginc(self): self.number

Unexpected behaviour with DeprecationWarning, Python 3.7 and escape codes

2018-08-23 Thread Peter via Python-list
I understand that Python 3.7 now issues DeprecationWarning for code entered in the interactive shell and also for single-module programs. I see this behaviour with: C:\wrk> python python 3.7.0 (v3.7.0:... import imp __main__:1: DeprecationWarning: the imp module is deprecated... But i

Re: Cannot pass a variable given from url to route's callback fucntion and redirect issue

2018-08-30 Thread Rurpy via Python-list
nse back of a cgi-script I haven't looked at your problem in detail (I seldom read this group anymore) but I think you want something like: def index( page='myhomepage' ): If the function gets called via the "/" url, there will be no 'page' argument so you need to write the function signature to make that argument optional. No idea about question #2. -- https://mail.python.org/mailman/listinfo/python-list

Re: Cannot pass a variable given from url to route's callback fucntion and redirect issue

2018-08-30 Thread Rurpy via Python-list
response back of a cgi-script A subprocess should work if you run it with environment variables set up the way web server would call it with. Alternatively you could take the code in the cgi script (assuming its python) and put it in a module function somewhere, then the cgi script becomes a wrapper aroun

Re: Re: CURSES WINDOWS

2018-09-05 Thread Peter via Python-list
I get this: C:\Users\Me> py Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Inte l)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import curses Traceback (most recent call la

Re: Debug script under pdb, how to avoid a bunch of errors caused by the exit()?

2018-09-06 Thread Peter via Python-list
9/2018 7:38 PM, Jach Fong wrote: Here the script file, test0.py: -- password = 'bad' if password == 'bad':     print('bad password')     exit() else:     print('good password') print('something else to do')     When runnin

Re: (new try) - Running a second wsgi script from within the first wsgi script

2018-09-10 Thread Alister via Python-list
response as html data? repeatedly asking the same question will not get you answered any faster in fact it may simply get you black-listed by many posters -- Why are you so hard to ignore? -- https://mail.python.org/mailman/listinfo/python-list

Re: Sending file to the user gives UnicodeEncodeError in Flask framework

2018-09-12 Thread Alister via Python-list
oblem & you may get some assistance although i suspect many posters may believe you to be a previous poster (also called Nicos) who was a disaster looking for somewhere to happen, if that is not you then I would also suggest you try reading https://www.biostars.org/p/75548/ -- "Free markets select for winning solutions." -- Eric S. Raymond -- https://mail.python.org/mailman/listinfo/python-list

Re: Experiences with a programming exercise

2018-09-15 Thread Alister via Python-list
n not go hiking in the hills. Said he, "I'm an anti-climb Max." [So is that punchline.] -- https://mail.python.org/mailman/listinfo/python-list

Re: What is not working with my "map" usage?

2018-09-22 Thread Victor via Python-list
33 BEFORE total = 333 AFTER total = 666 FINAL total = 666 [6, 66, 666] -- https://mail.python.org/mailman/listinfo/python-list

Re: What is not working with my "map" usage?

2018-09-22 Thread Victor via Python-list
On Saturday, September 22, 2018 at 6:22:32 AM UTC-7, Peter Otten wrote: > Victor via Python-list wrote: > > > Let me use a different input args and display them below. Basically, I am > > hoping to add up all elements of each nested list. So at first it should > > start

Re: What is not working with my "map" usage?

2018-09-22 Thread Victor via Python-list
On Saturday, September 22, 2018 at 12:20:08 PM UTC-7, Thomas Jollans wrote: > On 22/09/2018 20:18, Victor via Python-list wrote: > > On Saturday, September 22, 2018 at 6:22:32 AM UTC-7, Peter Otten wrote: > >> Victor via Python-list wrote: > >> > >>> Let me

<    9   10   11   12   13   14   15   16   17   18   >