Re: Posts from gmane no longer allowed?

2021-09-26 Thread dn via Python-list
On 27/09/2021 06.34, Grant Edwards wrote: > On 2021-09-26, Ethan Furman wrote: >> On 9/26/21 9:21 AM, Grant Edwards wrote: >>> On 2021-09-26, Chris Angelico wrote: >> >>>> I'm not sure whether the policy change happened on python-list, or at >>>&

Re: XML Considered Harmful

2021-09-28 Thread dn via Python-list
On 25/09/2021 11.26, David L Neil via Python-list wrote: > On 25/09/2021 11.00, Chris Angelico wrote: > >> Invented because there weren't enough markup languages, so we needed another? > > Anything You Can Do I Can Do Better > https://www.youtube.com/watch?v=_UB1YAsPD

OT: AttributeError

2021-09-28 Thread dn via Python-list
On 29/09/2021 10.50, Stefan Ram wrote: > (For Python programmers who have watched "Game of Thrones".) > > |>>> class girl: > |... pass > |... > |>>> girl = girl() > |>>> print( girl.name ) > |Traceback (most recent call last): &g

Re: XML Considered Harmful

2021-09-28 Thread dn via Python-list
. Whereas 'today', many follow the sequence of "Test-Driven Development" (er, um, often omitting the initial test) of attempting some idea as code, reviewing the result, and then "re-factoring" (improving), in a circular progression - until it not only works, but works

Re: OT: AttributeError

2021-09-28 Thread dn via Python-list
On 29/09/2021 12.21, Chris Angelico wrote: > On Wed, Sep 29, 2021 at 9:10 AM <2qdxy4rzwzuui...@potatochowder.com> wrote: >> >> On 2021-09-29 at 11:38:22 +1300, >> dn via Python-list wrote: >> >>> For those of us who remember/can compute in binary, octal,

Re: OT: AttributeError

2021-09-29 Thread dn via Python-list
ou're implementing a CPU, though. Oh yes! The D2 kit - I kept those books for years... https://www.electronixandmore.com/adam/temp/6800trainer/mek6800d2.html -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Definitive guide for Regex

2021-09-30 Thread dn via Python-list
On 01/10/2021 06.16, Barry Scott wrote: > > >> On 30 Sep 2021, at 12:29, Shaozhong SHI wrote: >> >> Dear All, >> >> I am trying to look for a definitive guide for Regex in Python. >> Can anyone help? > > Have you read the python docs for the r

Re: How to pass a method as argument?

2021-09-30 Thread dn via Python-list
On 30/09/2021 18.11, Anil Anvesh wrote: > I want to write a python calculator program that has different methods to > add, subtract, multiply which takes 2 parameters. I need to have an execute > method when passed with 3 parameters, should call respective method and > perform t

Re: Understanding the working mechanis of python unary arithmetic operators.

2021-10-05 Thread dn via Python-list
es, eg an integer and a floating-point number, both utilise the same operator-symbol, enables us to draw analogies (and in this case, probably get it 100% correct), but this does not imply a complete equivalence across-the-board (particularly when crazy-people are let-loose with custom classes! Thus "a" + "b" should not be pronounced "add", even though the operator looks very much like the one we use to add two numbers! For fun, and quickly now, what happens here: 2 + 2 2 + 2.0 2.0 + 2 2.0 + 2.0 "2" + "2" 2 + "2" "2" + 2 (they're all 'the same', except the last two?three - aren't they???) -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: Selenium py3.8+ DepreciationWarnings - where to find doc to update code?

2021-10-16 Thread dn via Python-list
The issues illustrated likely have less to do with Python than with Selenium (or even Firefox - depending how far back we need to go). That and our fate with the many web-search engines prioritising 'authoritative sources' in their results. Such definition includes 'clicks' ov

Re: New assignmens ...

2021-10-22 Thread dn via Python-list
On 23/10/2021 08.34, Chris Angelico wrote: > On Sat, Oct 23, 2021 at 6:24 AM Jon Ribbens via Python-list > wrote: >> >> On 2021-10-22, Stefan Ram wrote: >>> Paulo da Silva writes: >>>> Why doesn't this work >>>> if (self.ctr:=self.c

Re: New assignmens ...

2021-10-22 Thread dn via Python-list
With apologies for pressing Send too early... On 23/10/2021 08.41, dn via Python-list wrote: > On 23/10/2021 08.34, Chris Angelico wrote: >> On Sat, Oct 23, 2021 at 6:24 AM Jon Ribbens via Python-list >> wrote: >>> >>> On 2021-10-22, Stefan Ram wrote: >&

Re: New assignmens ...

2021-10-22 Thread dn via Python-list
creating a (whole) new list (for example) IS legal, because the list's name IS an identifier. Yes, the LHS must be an identifier - the point that was made in the first response (quoting "Python Language Reference") and since. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: New assignmens ...

2021-10-25 Thread dn via Python-list
On 26/10/2021 10.45, Chris Angelico wrote: > On Tue, Oct 26, 2021 at 8:42 AM Avi Gross via Python-list > wrote: >> Personally, I don't care what is done and suspect I will rarely feel much >> need to use the current walrus operator, let alone an enhanced Odobenus &g

The task is to invent names for things

2021-10-26 Thread dn via Python-list
heme developed throughout the talk. Have searched, but been unable to re-locate this video. Do you recall the talk? Please advise its URL... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

2021-10-26 Thread dn via Python-list
On 27/10/2021 11.16, Stefan Ram wrote: > dn writes: >> Some time ago I watched a video of a Raymond Hettinger talk. In it he >> recounted answering his son's question of 'what do you do, Dad?' > > The Mental Game of Python - Raymond Hettinger (PyBay 2019) &

Re: The task is to invent names for things

2021-10-26 Thread dn via Python-list
On 27/10/2021 11.21, Stefan Ram wrote: > r...@zedat.fu-berlin.de (Stefan Ram) writes: >> The Mental Game of Python - Raymond Hettinger (PyBay 2019) >> |What daddy does is make new words to make computers easier to use." > > BTW: It now also reminds me of: >

Re: Create a contact book

2021-10-26 Thread dn via Python-list
On 27/10/2021 04.16, Avi Gross via Python-list wrote: > Chris, > > I think it is time someone set up a business where they do the homework for > people for a mere $1,000 or so per hour. Anonymously, of course. And we can > refer requests for free homework advice there. > >

Re: New assignmens ...

2021-10-27 Thread dn via Python-list
another data-structure, eg a list of data-points, then combining such with/into my_class may well yield further simplifications, encapsulations, and benefits - but all in-theory and complete ignorance of your application... Hope the above gives you some ideas/pause for thought! * this gratuitous and somewhat awkward expression is me claiming to be clever by quoting Lewis Carroll - if he isn't sick of me baiting-the-hook, it might earn extra brownie-points (or another groan) from @Chris... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

2021-10-27 Thread dn via Python-list
e written in the user's terms (those of the "domain"). Thus, the easiest (and accuracy/consistency promoting) path, is to maintain the use of that terminology/names all the way through from spec to code. Above also reduces my cognitive load - an appealing characteristic for such a lazy "bear of little brain"... -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

2021-10-29 Thread alister via Python-list
osen there is less impetus on the programmer to change it, "its not great but it'll do" where as a nonsense name sticks out like a saw thumb until it is corrected. I am firmly undecided -- Riches cover a multitude of woes. -- Menander -- https://mail.python.org/mailman/listinfo/python-list

Re: The task is to invent names for things

2021-10-29 Thread alister via Python-list
unless it's easy -- After a number of decimal places, nobody gives a damn. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python script seems to stop running when handling very large dataset

2021-10-29 Thread dn via Python-list
On 30/10/2021 11.42, Shaozhong SHI wrote: > Python script works well, but seems to stop running at a certain point when > handling very large dataset. > > Can anyone shed light on this? Storage space? Taking time to load/format/process data-set? -- Regards, =dn -- https://mai

Re: The task is to invent names for things

2021-10-29 Thread dn via Python-list
logic. YMMV! Indeed some may wish to argue that the data-set includes unnecessary verbiage, and that this in-and-of-itself might contribute to cognitive-overload... import this >> So, the obvious solution is to ask the language, like Python, to allow >> variables that are syno

Re: Getting Directory of Command Line Entry Point For Packages

2021-11-12 Thread dn via Python-list
file_path as-required. -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

OT: Alternatives to Jupyter Notebook

2021-11-15 Thread dn via Python-list
;open"? Is it $free? Are you free from 'surveillance'? Is the product as a whole, "open-source"? Are you free (legally unencumbered) to modify (or even read) the source-code of any/all MSFT 'improvements'? VSCodium claims to be an "open source" version/equival

Re: Advantages of Default Factory in Dataclasses

2021-11-16 Thread dn via Python-list
tra process-time and storage-allocation. (?) Doesn't it already return a (evaluated) function? Remember: one is not limited to Python built-in or PSL types. Thus: def countdown(): return [ 10, 9, 8, 7, ..., "blast-off" ] ... launch_commentary:list = field( default_factory=countdow

Re: import question

2021-11-19 Thread dn via Python-list
On 20/11/2021 03.38, lucas wrote: > ok. all good advice. thank you for that. and with all that I've decided > what to do. > > I'm going to close off any server-side python access so that I don't expose > my server or the file system to vulnerabilities and/or won

Re: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-19 Thread dn via Python-list
point numbers), and particularly values to the 'right' of a decimal-point; we had to study?suffer classes in "Numerical Analysis" and be able to gauge the declining accuracy and precision of sundry calculations. A skill disappearing as fast as slide-rules!? This 'pool of

Re: Unexpected behaviour of math.floor, round and int functions (rounding)

2021-11-19 Thread dn via Python-list
On 20/11/2021 10.21, Chris Angelico wrote: > On Sat, Nov 20, 2021 at 7:39 AM dn via Python-list > wrote: >>>> >>> 0.3 + 0.3 + 0.3 == 0.9 >>>> False >>> >>> That's because 0.3 is not 3/10. It's not because floats are >>>

Eventfd with epoll BlockingIOError

2021-11-24 Thread Jen via Python-list
I have a C program that uses fork-execv to run Python 3.10 in a child process, and I am using eventfd with epoll for IPC between them.  The eventfd file descriptor is created in C and passed to Python through execv.  Once the Python child process starts I print the file descriptor to verify

Re: Eventfd with epoll BlockingIOError

2021-11-25 Thread Jen via Python-list
Thanks very much for your reply.  I am now getting a single event returned in Python, but it's not the right event, as I'll explain below.  I rearranged the Python code based on your comments: #!/usr/bin/python3 import sys import os import select print("Inside Python&qu

Re: Negative subscripts

2021-11-26 Thread dn via Python-list
that this good-looking boy has not missed the point about "ugly". Is this the problem, re-stated to be fully explicit, with (almost) zero-complexity? [Zen of Python] >>> x = [ "a", "b", "c", "d", "e" ] >>> for y in [ 1,

Friday Finking: Docstrings and DataClasses

2021-11-26 Thread dn via Python-list
ir purpose. NB no mention of the output/return-value's specifics. This format plays-nicely with the Python help() system and related. Barely one year later the topic was advanced, with the more detailed "PEP 287 -- reStructuredText Docstring Format" (https://www.python.org/dev/peps

Re: Negative subscripts

2021-11-27 Thread dn via Python-list
On 27/11/2021 19.11, Frank Millman wrote: > On 2021-11-26 11:24 PM, dn via Python-list wrote: >> On 26/11/2021 22.17, Frank Millman wrote: >>> In my program I have a for-loop like this - >>> >>>>>> for item in x[:-y]: >>> ...    [do stuff]

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

2021-11-28 Thread dn via Python-list
a web-browser, the flags appear, as desired. Is this a terminal short-coming (locale charmap -> UTF-8 - which brings to mind the old UCS-4 questions), a font issue, or what (to fix)? -- Regards, =dn -- https://mail.python.org/mailman/listinfo/python-list

Re: pyinstaller wrong classified as Windows virus

2021-11-28 Thread anthony.flury via Python-list
Have you tried using Nuitka - rather than pyInstalller - it means you distribute a single executable and the Python run time library (which they probably have already), and it has the advantage that it is a bit quicker than standard python. Rather than bundle the source code and interpreter

Re: pyinstaller wrong classified as Windows virus

2021-11-28 Thread anthony.flury via Python-list
On 26/11/2021 07:13, Ulli Horlacher wrote But consider another possibility that your compiler software is compromised Then https://www.python.org/ftp/python/3.10.0/python-3.10.0-amd64.exe is infected. I doubt this. But you aren't using python3.10 to 'compile' the code to

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
On 30/11/2021 07.43, Peter Mwale wrote: > Hello Christian, > Am referring to menu marked in picture below. It's not coming on my window. > > > On Sat, Nov 27, 2021, 20:19 Christian Gollwitzer wrote: > >> Am 26.11.21 um 21:38 schrieb Peter Mwale: >>&

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
Go on, I dare you to remind me that good-old 'dumb-terminals' didn't have 'clipboards'... (neither did they have to cope with Unicode, emoticons, or national flags!) Accordingly, having developed an idea in the REPL (running within Kitty), could not later copy-paste into

Re: Selection sort

2021-12-24 Thread dn via Python-list
rr)-1): > if arr[b]>arr[a+1]: > arr[b],arr[a+1]=arr[a+1],arr[b] > return arr > > arr=[3,5,9,8,2,6] > print(selectionsort(arr)) This looks like a typical 'homework question'. Accordingly, we are happy to help, but that means helping yo

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
Database > > - All functions mentioned above are to be deployed on the website > pythonhow.com so make according to > https://pythonhow.com/python-tutorial/flask/web-development-with-python- and-flask/ > > - Do you know any other websites to deploy a python web application?? &

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
er will be >> > entered/added in the Excel file table or sheet already made and the >> > column name is BORROWER’S NAME. >> > >> Database! >> > 4. The borrower’s or user name can be more than one so they will be >> > separated with a comma in the E

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
On 17/01/2022 22.31, Shaozhong SHI wrote: > I got quite a few version of Python on my machine. > > How do I set environmental variables for Python 3.6.1 to work? Set from Python, or set in the OpSys? https://docs.python.org/3/library/os.html?highlight=environment%20variable MS-W

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
Hi, I have recently started using venv for my hobby-programming. There is an annoying problem. Since venv modifies $PATH, python programs that use the "#!/usr/bin/env python" variant of the hashbang often fail since their additional modules aren't install inside in venv. How to p

Re: venv and executing other python programs

2022-02-15 Thread Mirko via Python-list
ou only enter it when you actually want > that specific python stack. Well, it's not that I activate the venv *for* those troubling programs. I activate it to work on the particular project. ;-) > Get yourself a terminal that can either multiplex, or add something like > tmux or screen

Python Qualification?

2022-03-29 Thread alister via Python-list
I'm currently considering a career change (not much choice actually just been made redundant). I'd like to be able to turn my interest in python to my advantage, What qualifications do employers look for? -- I'm reporting for duty as a modern person. I want to do the La

Re: Python Qualification?

2022-03-30 Thread alister via Python-list
On Tue, 29 Mar 2022 20:49:53 -0400, Dennis Lee Bieber wrote: > On Tue, 29 Mar 2022 19:26:03 - (UTC), alister > declaimed the following: > >>I'm currently considering a career change (not much choice actually just >>been made redundant). >>I'd like to be

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
ntispam-Bot-for- Telegram-0.2.0-GA.html > > > > INTRODUCTION > > eGenix has long been running a local user group meeting in Düsseldorf > called Python Meeting Düsseldorf and we are using a Telegram group for > most of our communication. > > In the early

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
Am 13.04.2022 um 20:39 schrieb Dennis Lee Bieber: > On Thu, 14 Apr 2022 03:38:11 +1000, Tim Deke declaimed > the following: > >> Dear Sir, >> >> I have successfully downloaded Python into my laptop but the shortcut icon >> is not appearing on the desktop.

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

2022-04-15 Thread alister via Python-list
On Fri, 15 Apr 2022 10:18:33 -0700 (PDT), luca72.b...@gmail.com wrote: > We are searching for someone that can develop a python program for use > servomotor for automotive. What location & what is the salary? (although based on the method of recruitment I doubt that you will get m

Re: No shortcut Icon on Desktop

2022-04-15 Thread Mirko via Python-list
e Windows for myself since many years, but it is hard for me to remember any software that did not add those shortcuts. > right-click + create shortcut. Right-click on what and where? On something called "IDLE" (has what to do with python?). Right click on "python.exe" which gives s

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
On Sat, 20 Aug 2016 10:57:37 +1000, Chris Angelico wrote: > On Sat, Aug 20, 2016 at 9:42 AM, Lawrence D’Oliveiro > wrote: >> Python 3.5.2+ (default, Aug 5 2016, 08:07:14) >> [GCC 6.1.1 20160724] on linux >> Type "help", "copyright",

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
On Mon, 05 Sep 2016 20:01:08 +, alister wrote: > On Mon, 05 Sep 2016 12:46:58 -0700, emaraiza98 wrote: > >> I installed pycharm for a computer science class I'm taking, and also >> downloaded python 3.5.2. However, my computer for some reason won't use >>

Re: Python 3 curiosity.

2016-09-06 Thread Wildman via Python-list
On Tue, 06 Sep 2016 02:51:39 -0700, wxjmfauth wrote: > It's curious to see all these apps, that were > more of less working correctly up to Python 3.2 > (included) and are now no more working at all. > > Probably something wrong somewhere... http://sebastian

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
f here. The following will insert 1 at the head of the list... Python 3.4.2 (default, Oct 8 2014, 10:45:20) [GCC 4.9.1] on linux Type "help", "copyright", "credits" or "license" for more information. >>> A=["1","2","3"]

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
height - offsetBottom, 1) >> MouseDown("Left") >> EndIf >> Next >>EndIf >> End >> >> Can someone help me please? > > Is observation this is not Python code > it looks more like some variety of BASIC but I

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

2016-10-17 Thread Wildman via Python-list
On Tue, 18 Oct 2016 00:58:42 +0200, pozz wrote: > I'm sorry, I know it is a FAQ..., but I couldn't find a good answer. > > I'm learning python and I'd like to start creating GUI applications, > mainly for Windows OS. In the past, I wrote many applications in Vis

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
On Thu, 20 Oct 2016 12:48:28 -0700, SS wrote: > The following script works fine: > > #!/bin/python > > import socket > > str = raw_input("Enter a domain name: "); > print "Your domain is ", str > print socket.gethostbyname(str) > > You

Re: How to handle errors?

2016-10-20 Thread Wildman via Python-list
On Thu, 20 Oct 2016 12:48:28 -0700, SS wrote: > The following script works fine: > > #!/bin/python I meant to include this with my other post but I forgot it. Using a direct path to the Python interpreter can cause problems on some systems because it is not always installed to

Re: How to handle errors?

2016-10-21 Thread Wildman via Python-list
On Fri, 21 Oct 2016 16:14:41 +1100, Steve D'Aprano wrote: > On Fri, 21 Oct 2016 11:03 am, Wildman wrote: > >> On Thu, 20 Oct 2016 12:48:28 -0700, SS wrote: >> >>> The following script works fine: >>> >>> #!/bin/python >> >&

Re: How to handle errors?

2016-10-22 Thread Wildman via Python-list
On Sat, 22 Oct 2016 15:01:46 +, John Gordon wrote: > In Wildman > writes: > >> > Another serious problem with using env in the hash-bang line is that you >> > cannot pass commandline options to the Python executable. > >> Not true. I made a test scr

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
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 enter the command directly into a terminal it works perfectly. If I run it from a python program it returns an empty string. Below is the code I am using. S

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
On Mon, 31 Oct 2016 08:13:54 +, Jon Ribbens wrote: > On 2016-10-31, Wildman wrote: >> Here is a bash command that I want to run from a python >> program: sudo grep "^user\:" /etc/shadow >> >> If I enter the command directly into a terminal it works >

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
>> 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. > > > You don't have to believe us, you can test this yourself. Create a simple > text

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