Re: pyinstaller wrong classified as Windows virus

2021-11-28 Thread anthony.flury via Python-list
il*: anthony.fl...@btinternet.com <mailto:anthony.fl...@btinternet.com> -- https://mail.python.org/mailman/listinfo/python-list

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-29 Thread dn via Python-list
On 29/11/2021 12.06, Cameron Simpson wrote: > On 29Nov2021 09:19, Chris Angelico wrote: >> On Mon, Nov 29, 2021 at 8:10 AM dn via Python-list >> wrote: >>> However, when trying the above, with our local flag in (Fedora Linux, >>> Gnome) Terminal or PyCharm's

Re: Failure to Display Top menu

2021-11-29 Thread dn via Python-list
f not, at least we will have some common terminology to be able to express and solve any remaining problem... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Negative subscripts

2021-11-29 Thread dn via Python-list
On 27/11/2021 21.23, Chris Angelico wrote: > On Sat, Nov 27, 2021 at 7:21 PM dn via Python-list > wrote: >> The expression list is evaluated once; it should yield an iterable >> object. An iterator is created for the result of the expression_list. >> The suite is the

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-11-29 Thread dn via Python-list
7;s not to say there won't be considerably more who manage to diagnose the problem without admitting such to 'the outside world'! There are times when there is no need to (wait quite a while to) boot-up a whole IDE, eg running a utility program. I've nominated Kitty as Fedora's default terminal. We'll see how it goes with work-loads beyond raising the flag... Salute! -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

PyCharm settings - per: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-01 Thread dn via Python-list
On 29/11/2021 10.08, dn via Python-list wrote: > On 29/11/2021 02.18, Chris Angelico wrote: >> On Mon, Nov 29, 2021 at 12:10 AM Abdur-Rahmaan Janhangeer >> wrote: >> >> Flags are actually constructed from multiple codepoints. What you want >> is to insert each

Re: Return

2021-12-07 Thread dn via Python-list
On 08/12/2021 09.45, Roland Mueller via Python-list wrote: > Hello > > ti 7. jouluk. 2021 klo 19.47 vani arul (arulvan...@gmail.com) kirjoitti: > >> Hey There, >> Can someone help to understand how a python function can return value with >> using return in th

Re: Return

2021-12-07 Thread dn via Python-list
On 08/12/2021 11.07, Chris Angelico wrote: > On Wed, Dec 8, 2021 at 9:04 AM dn via Python-list > wrote: >> >> plus Python, unlike some other languages, allows us to return multiple >> values, either as a collection or as an implied-tuple: >> >> def function_

Re: print('\N{flag: Mauritius}') not supported in py3.9

2021-12-21 Thread dn via Python-list
, terminal suggestions... (during my post-op recovery period, am hoping to experiment with another Linux distro (and Window Manager), which may alter the playing-field...) Meantime, casting-off the terminal-Grinch, compliments of the season to you... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Selection sort

2021-12-24 Thread dn via Python-list
ion be necessary). Hopefully, you have now figured-out both the algorithm, and the code to implement same. Does it work? Is the list properly sorted by the end? If not, come back to us with a more detailed question (plus code and sample output). If you're successful, also revert (with pride), and we'll try showing you another way to implement the same algorithm - but in a manner many?most other programming languages cannot. In other words, a 'pythonic' solution... Apologies - I've taken several sessions to write this msg, with breaks to rest my eyes in-between. Now I've clicked the wrong button on the Spelling-Checker, but can't figure-out what I did/didn't correct, or correct correctly. Confused? So am I. Please be understanding for this and any other typos or proof-reading failings... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-07 Thread alister via Python-list
was a homework assignment data should still be imported into a DB (a trivial task) It can be exported back to a compatible format just as easily if hard copy output is required -- "Rembrandt's first name was Beauregard, which is why he never used it." -- Dave Barry -- https://mail.python.org/mailman/listinfo/python-list

Re: Extracting dataframe column with multiple conditions on row values

2022-01-07 Thread dn via Python-list
Salaam Mahmood, On 08/01/2022 12.07, Mahmood Naderan via Python-list wrote: >I have a csv file like this >V0,V1,V2,V3 >4,1,1,1 >6,4,5,2 >2,3,6,7 > >And I want to search two rows for a match and find the column. For >example, I want to searc

Re: What to write or search on github to get the code for what is written below:

2022-01-09 Thread alister via Python-list
months to find what is required by me when I found nothing of > what is required by me then posted on this google group. 1st save the data from excel as a csv file you will find the csv module makes these much easier to deal with, even if you do not import into a db (although even then I would import into sql- lite just for the benefits of the search algorithms) -- Sometime in 1993 NANCY SINATRA will lead a BLOODLESS COUP on GUAM!! -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-09 Thread alister via Python-list
otherwise CSV looks to me as fine. To do everything > using CSV I will be requiring a tutorial to see how to do all this. > > Anything not clear? Sql-lite is not essential to the task CSV would be sufficient, but you may find that taking the time to learn it pays off later (even if you wait untill after this project) -- Trying to establish voice contact ... please yell into keyboard. -- https://mail.python.org/mailman/listinfo/python-list

Re: What to write or search on github to get the code for what is written below:

2022-01-13 Thread dn via Python-list
dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Writing a string with comma in one column of CSV file

2022-01-15 Thread dn via Python-list
On 16/01/2022 09.56, Mahmood Naderan via Python-list wrote: > Hi, > I use the following line to write some information to a CSV file which is > comma delimited. > > f = open(output_file, 'w', newline='') > wr = csv.writer(f) > ... > f.write(str(n)

Re: Writing a string with comma in one column of CSV file

2022-01-15 Thread alister via Python-list
) writes the entire key in one column, but > I would like to do the same with write(). Any idea to fix that? > > > Regards, > Mahmood you need to quote the data the easies way to ensure this is to inculde to QUOTE_ALL option when opening the file wr = csv.writer(output, quoting=csv.QUOTE_ALL) -- Chocolate chip. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to set environmental variables for Python

2022-01-17 Thread dn via Python-list
in: https://docs.python.org/3/using/windows.html#setting-envvars -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: How do you log in your projects?

2022-02-11 Thread alister via Python-list
epeat the essential data to identify a specific call in >>all the logs of the function, so if it is called simultaneously by more >>clients you can distinguish them >> >>> - How do you decide, which kind of log message goes into which level? >> >>It depends o

venv and executing other python programs

2022-02-14 Thread Mirko via Python-list
eople here deal with that? Please note: I'm not interested in discussing whether the env-variant is good or bad. ;-) It's not that *I* use it, but several progs in /usr/bin/. Thanks for your time. -- https://mail.python.org/mailman/listinfo/python-list

Re: venv and executing other python programs

2022-02-15 Thread Mirko via Python-list
ecent call last): File "/home/mirko/bin/foo.py", line 3, in import pandas ModuleNotFoundError: No module named 'pandas' (xxx) [2, 1] mirko@wizbox:~$ deactivate [2, 0] mirko@wizbox:~$ foo.py Works So, the problem seems to be solved. Thanks all! :-) -- https://mail.python.org/mailman/listinfo/python-list

Python Qualification?

2022-03-29 Thread alister via Python-list
tin Hustle now! -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Qualification?

2022-03-30 Thread alister via Python-list
blocked or sanitized). Pretty much where I am (only less so) I have used python & flask to make a reasonably sucsessfull web app for my fellow engineers at work, lots of stuff with home Raspberry pi robotics but no formal qualifications in the field. -- Earth is a beta site. -- https://mail.python.org/mailman/listinfo/python-list

Re: How to detect an undefined method?

2022-04-02 Thread anthony.flury via Python-list
ernet.com -- https://mail.python.org/mailman/listinfo/python-list

Re: ANN: eGenix Antispam Bot for Telegram 0.2.0

2022-04-04 Thread alister via Python-list
istered at Amtsgericht Duesseldorf: HRB 46611 >https://www.egenix.com/company/contact/ > https://www.malemburg.com/ Classic, spam a news group with an add for anti spam software can you even spell irony? -- The mosquito exists to keep the mighty humble. -- https://mail.python.org/mailman/listinfo/python-list

Re: Functionality like local static in C

2022-04-14 Thread Mirko via Python-list
Am 14.04.2022 um 17:02 schrieb Cecil Westerhof via Python-list: > In C when you declare a variable static in a function, the variable > retains its value between function calls. > The first time the function is called it has the default value (0 for > an int). > But when the funct

Re: No shortcut Icon on Desktop

2022-04-14 Thread Mirko via Python-list
okes .py script files > and the OS activates the correct interpreter. With all due respect, but do you really think that it is useful for a Python beginner to know how to run the bare interpreter? ;-) Wouldn't it be much better to educate them about IDLE which can be found in the "Startmenu"? -- https://mail.python.org/mailman/listinfo/python-list

Re: is there somebody that have experince with python and canopen

2022-04-15 Thread alister via Python-list
any takers) -- MS and Y2K: Windows 95, 98, ... and back again to 01 -- Laurent Szyster -- https://mail.python.org/mailman/listinfo/python-list

Re: No shortcut Icon on Desktop

2022-04-15 Thread Mirko via Python-list
s it do add that functionality to the Windows installer? Because I just can't see any reason not to do it. What is there to lose in trying/doing that? What dire consequences does that might have? -- https://mail.python.org/mailman/listinfo/python-list

Subprocess Startup Error

2016-08-09 Thread Sean via Python-list
t machine. I am running Python 3.5.2. I have tried uninstalling the software and reinstalling but no luck with that. -- https://mail.python.org/mailman/listinfo/python-list

Re: Does This Scare You?

2016-08-19 Thread Wildman via Python-list
me? Paths, drive letters, file extensions, don't matter. All that > matters is the base name. > > Not a Python issue; they're reserved by Windows. > > ChrisA Since I am fairly new to Python, I realize there is much that I still don't know but I don't understand how Windows can have reserved names on a Linux system. What am I missing? -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Does This Scare You?

2016-08-19 Thread Wildman via Python-list
On Sat, 20 Aug 2016 11:20:44 +1000, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 11:11 AM, Wildman via Python-list > wrote: >> Since I am fairly new to Python, I realize there is much that I >> still don't know but I don't understand how Windows can have >>

Re: Does This Scare You?

2016-08-22 Thread Wildman via Python-list
t have 8.x. I would, however, expect the same result. On Linux a file is created named con.txt that contains hello/n as expected. -- GNU/Linux user #557453 "The Constitution only gives people the right to pursue happiness. You have to catch it yourself." -Benjamin Franklin -- https://mail.python.org/mailman/listinfo/python-list

Re: saving octet-stream png file

2016-08-22 Thread Wildman via Python-list
rd?" I said "That is also a byte." He thought for a moment, > then said "So the full word is 'byte byte'?" LOL! Did you explain to him that a full word could also be 'nibble nibble nibble nibble' or 'bit bit bit bit bit bit bit bit bit bit bit bit bit bit bit bit'? -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Installing python

2016-09-05 Thread Wildman via Python-list
ny Linux distros now have Python 2.7 and 3.x installed. For Python 3.x you would use this hash-bang... #!/usr/bin/env python3 -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 curiosity.

2016-09-06 Thread Wildman via Python-list
raschka.com/Articles/2014_python_2_3_key_diff.html -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 3 curiosity.

2016-09-06 Thread Wildman via Python-list
On Wed, 07 Sep 2016 02:27:40 +1000, Chris Angelico wrote: > On Wed, Sep 7, 2016 at 2:13 AM, Wildman via Python-list > wrote: >> On Tue, 06 Sep 2016 02:51:39 -0700, wxjmfauth wrote: >> >>> It's curious to see all these apps, that were >>> more o

Re: Why does the insert after list function fail?

2016-09-22 Thread Wildman via Python-list
>>> list.insert(A,0,"1") >>> print(A) ['1', '1', '2', '3'] -- 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 reduce the DRY violation in this code

2016-09-27 Thread Wildman via Python-list
gt; Patterns book by the so-called Gang of Four (GoF). http://c2.com/cgi/wiki?GangOfFour -- GNU/Linux user #557453 Keyboard not detected! Press any key to continue... -- https://mail.python.org/mailman/listinfo/python-list

Re: Scripting Help please

2016-10-12 Thread Wildman via Python-list
o no definite clue there. I'm not sure about the Mouse functions. They could also be from a library. In VB the functions would be called like this: object.MouseUp(). I'm not sure what the code is but it definitely is not Python. -- GNU/Linux user #557453 May the Source be with you. -- https://mail.python.org/mailman/listinfo/python-list

Re: [FAQ] "Best" GUI toolkit for python

2016-10-17 Thread Wildman via Python-list
e is Tkinter. Here is a good place to start... http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html This will give you several places to look for additional info... https://duckduckgo.com/?q=tkinter+tutorials&t=h_&ia=web -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Button Widget and Key Binding Problem

2016-10-18 Thread Wildman via Python-list
(self, _): self.load_image() Both the key bindings and the button click work. My question is whether my workaround is the correct way? Could my key binding code be wrong in some way? An insight appreciated. -- GNU/Linux user #557453 May the source be with you. -- https://mail.python.org/mailman/listinfo/python-list

Re: Button Widget and Key Binding Problem

2016-10-19 Thread Wildman via Python-list
gle method with a default argument that you ignore: > > def load_image(self, event=None): > # code to load an image That 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: How to handle errors?

2016-10-20 Thread Wildman via Python-list
ip = socket.gethostbyname(url) return ip except socket.gaierror: return "***ERROR***\nUnknown domain name!" domain = raw_input("Enter a domain name: "); print "Your domain is ", domain print get_ip(domain) -- 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 handle errors?

2016-10-20 Thread Wildman via Python-list
installed. 'env' will always know where it is. -- 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 handle errors?

2016-10-21 Thread Wildman via Python-list
do ~]$ PATH="/tmp" /usr/bin/env python -c "import sys; > print(sys.version)" > /usr/bin/env: python: No such file or directory > > > Even if env finds something called "python", you can't be sure that it is > the right version of Python, or even Python at all. All you know is that it > is something called "python" on the search path. Not likely an average user is going muck around with the path in the way you describe. -- 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 handle errors?

2016-10-22 Thread Wildman via Python-list
n the hash-bang line*. OK, I misunderstood Steve's statement. I stand corrected. -- GNU/Linux user #557453 "Well, that's quite different. Never mind." -Emily Litella -- https://mail.python.org/mailman/listinfo/python-list

Re: exist loop by pressing esc

2016-10-23 Thread Wildman via Python-list
pen a terminal in that directory and enter this... sudo python setup.py install Here is a code example: (tested) import getch while something: if getch.getch() == '\x1b': break -- GNU/Linux user #557453 May the Source be with you. -- https://mail.python.org/mailman/li

Qtimer and extra argument

2016-10-26 Thread luca72 via Python-list
Text(testo) How i can pass the variable testo to the def test? If i use : self.timer.singleShot(1000, self.metto_testo(testo) i get error Thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: Qtimer and extra argument

2016-10-26 Thread luca72 via Python-list
I get () missing 1 required positional argument: 's' -- https://mail.python.org/mailman/listinfo/python-list

Re: Qtimer and extra argument

2016-10-26 Thread luca72 via Python-list
thanks -- https://mail.python.org/mailman/listinfo/python-list

Re: How to execute "gksudo umount VirtualDVD"

2016-10-28 Thread Wildman via Python-list
dout.read in case you're getting >> deadlocked. See the big red warning below >> https://docs.python.org/3/library/subprocess.html#subprocess.Popen.stdout Try this: def umount(self): '''unmounts VirtualDVD''' cmd = ["gksudo", "umount", VirtualDVD p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) proc = p.communicate() print proc -- 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 execute "gksudo umount VirtualDVD"

2016-10-28 Thread Wildman via Python-list
s.python.org/3/library/subprocess.html#subprocess.Popen.stdout > > Try this: > > def umount(self): > '''unmounts VirtualDVD''' > cmd = ["gksudo", "umount", VirtualDVD] ^ > p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE) > proc = p.communicate() > print proc Oops! -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Calling Bash Command From Python

2016-10-30 Thread Wildman via Python-list
GNU/Linux user #557453 -- https://mail.python.org/mailman/listinfo/python-list

Re: Calling Bash Command From Python

2016-10-31 Thread Wildman via Python-list
On Mon, 31 Oct 2016 15:31:27 +1100, Chris Angelico wrote: > On Mon, Oct 31, 2016 at 3:19 PM, Wildman via Python-list > wrote: >> Here is a bash command that I want to run from a python >> program: sudo grep "^user\:" /etc/shadow >> >> If I enter the c

Re: Call a shell command from Python (was: Calling Bash Command From Python)

2016-10-31 Thread Wildman via Python-list
On Mon, 31 Oct 2016 15:44:13 +1100, Ben Finney wrote: > Wildman via Python-list writes: > >> Python 2.7.9 on Linux >> >> Here is a bash command that I want to run from a python >> program: sudo grep "^user\:" /etc/shadow > > Some points to note:

Re: Calling Bash Command From Python

2016-10-31 Thread Wildman via Python-list
On Mon, 31 Oct 2016 09:12:57 +0100, Peter Otten wrote: > Wildman via Python-list wrote: > >> Python 2.7.9 on Linux >> >> Here is a bash command that I want to run from a python >> program: sudo grep "^user\:" /etc/shadow >> >> If I

Re: Calling Bash Command From Python

2016-10-31 Thread Wildman via Python-list
as the bash: > > ["sudo", "grep", "^" + os.environ["USER"] + r"\:", "/etc/shadow"] The above line works perfectly. I didn't occur to me to use the 'r' modifier. Thank you. Still one thing is odd. No matter what, if I use the environment variable $USER in the code, it won't work. Just returns an empty string. At this point that is a non-issue tho. Thanks again. -- GNU/Linux user #557453 -- https://mail.python.org/mailman/listinfo/python-list

Re: Calling Bash Command From Python

2016-10-31 Thread Wildman via Python-list
On Mon, 31 Oct 2016 11:05:23 -0400, Random832 wrote: > On Mon, Oct 31, 2016, at 10:55, Wildman via Python-list wrote: >> I have code using that approach but I am trying to save myself >> from having to parse the entire shadow file. Grep will do it >> for me if I can get co

Re: Calling Bash Command From Python

2016-10-31 Thread Wildman via Python-list
On Mon, 31 Oct 2016 11:55:26 -0500, Wildman wrote: > On Mon, 31 Oct 2016 11:05:23 -0400, Random832 wrote: > >> On Mon, Oct 31, 2016, at 10:55, Wildman via Python-list wrote: >>> I have code using that approach but I am trying to save myself >>> from having to parse

Re: Call a shell command from Python

2016-10-31 Thread Wildman via Python-list
On Tue, 01 Nov 2016 12:08:52 +1100, Ben Finney wrote: > Wildman via Python-list writes: > >> On Mon, 31 Oct 2016 15:44:13 +1100, Ben Finney wrote: >> >> > One immediate difference I see is that you specify different >> > arguments to ‘grep’. You have

Re: Call a shell command from Python

2016-11-01 Thread Wildman via Python-list
On Tue, 01 Nov 2016 16:23:08 +1100, Ben Finney wrote: > Wildman via Python-list writes: > >> […] in this case grep never "sees" the '$' sign. Bash expands $USER to >> the actual user name beforehand. > > I understand how Bash substitutes variab

Re: Call a shell command from Python

2016-11-01 Thread Wildman via Python-list
> So there you have it: categorical proof that bash does not expand the > string '$USER'. It cannot: bash is not involved in the subprocess call. > Python calls grep directly. > > If you want to expand the '$USER' string from Python, do it yourself: I understand now. That explains more clearly why my original code did not work. 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: Call a shell command from Python

2016-11-01 Thread Wildman via Python-list
been told this 6 times, and is willfully ignoring it. > > Just give up. That was not my intention. I was trying to understand that which I did not understand. Ever been there? -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

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
man/listinfo/python-list

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
n all_interfaces name = namestr[i:i+16].split('\0', 1)[0] TypeError: Type str doesn't support the buffer API -- 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-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
thon.org/mailman/listinfo/python-list

Re: Detect Linux Runlevel

2016-12-05 Thread Wildman via Python-list
new about systemctl. As I already said my goal is to do it without the use of an external program. -- GNU/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-05 Thread Wildman via Python-list
bookmarked the pages for possible future use. Thank you, I do appreciate your post. -- GNU/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-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
thon.org/mailman/listinfo/python-list

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
not because I had a particular problem to solve. If your job was to advocate Python, I would suggest you find another line of work. -- GNU/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
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
", line 7, in n=t.NNTP(s,119,'','') File "/usr/lib/python2.7/nntplib.py", line 119, in __init__ self.sock = socket.create_connection((host, port)) File "/usr/lib/python2.7/socket.py", line 553, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno -2] Name or service not known -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: CLP stats: last 500 posts

2016-12-10 Thread Wildman via Python-list
ort)) >> File "/usr/lib/python2.7/socket.py", line 553, in create_connection >> for res in getaddrinfo(host, port, 0, SOCK_STREAM): >> socket.gaierror: [Errno -2] Name or service not known > > > That code runs unchanged on py2.7 on Linux (I just now tested it). > > You just need to put in your own credentials for the newsserver, user > and password (lines 2 and 4). OK, thanks. That didn't occur to me although it should have. -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

Re: CLP stats: last 500 posts

2016-12-11 Thread Wildman via Python-list
sp resp = self.getresp() File "/usr/lib/python2.7/nntplib.py", line 229, in getresp raise NNTPPermanentError(resp) nntplib.NNTPPermanentError: 501 unsupported header field -- GNU/Linux user #557453 The cow died so I don't need your bull! -- https://mail.python.org/mailman/listinfo/python-list

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
been done already. Change 'python' to the actual folder name. C:\python C:\python\Lib\site-packages C:\python\Scripts -- 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
heir developer selected that? > Is there any special reason? That would be questions for the developer(s). As an end-user, the only answer I can give is, it is that way because that is the way it is. -- GNU/Linux user #557453 Keyboard not detected! Press any key to continue... -- https://mail.python.org/mailman/listinfo/python-list

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

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