Re: Setting property for current class from property in an different class...

2017-09-07 Thread Christopher Reimer via Python-list
On 9/6/2017 9:26 PM, Christopher Reimer wrote: On Sep 6, 2017, at 9:14 PM, Stefan Ram wrote: I can run this (your code) without an error here (Python 3.6.0), from a file named "Scraper1.py": I'll check tomorrow. I recently switched from 3.5.x to 3.6.1 in the PyCharm IDE

My Issues

2017-09-08 Thread Carson McDaniel via Python-list
Hello, I am an extreme beginner at this so forgive me if I've done something simple wrong, but every time I try to open Python (3.6.2), I get an error message that says the program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from my computer. It says to try re

Re: [Tutor] beginning to code

2017-09-13 Thread Larry Hudson via Python-list
e and only check data types when it is absolutely necessary — which is rarely! Roger Christman -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: "tkinter"

2017-09-13 Thread Larry Hudson via Python-list
hear it directly, or the WAV or AU formats to download the audio clips. -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: The Incredible Growth of Python (stackoverflow.blog)

2017-09-14 Thread Mark Lawrence via Python-list
On 14/09/2017 05:37, Terry Reedy wrote: On 9/13/2017 2:44 AM, Paul Rubin wrote: Are there actually Py3 codebases? Let's think a bit.  There is the Python half of the Python3 codebase, perhaps 400K.  But we can discount that. Then there are all the Py compatible modules on PyPI, whi

Re: Easy way to get a list of tuples.

2017-09-21 Thread Mark Lawrence via Python-list
6, 1600), ('THE SHORTS', 7, 1100), ('KINGTON TOWN STAKES', 8, 2000), ('BM 84 HANDICAP', 9, 1200)] I get close creating a list of elements but each attempt I try to create the list of tuples fails. This is my closest code data = r.json() raceData = [] for item in data["RaceDay"]['Meetings'][0]['Races']: raceDetails = item['RacingFormGuide']['Event']['Race'] raceData += (raceDetails['Name'],raceDetails['Number'],raceDetails['Distance']) print(raceDetails) which returns ['CLASS 3 HANDICAP', 1, 1000, 'BM 90 HANDICAP', 2, 1600, 'HERITAGE STAKES', 3, 1100, 'BILL RITCHIE HANDICAP', 4, 1400, 'TEA ROSE STAKES', 5, 1400, 'GEORGE MAIN STAKES', 6, 1600, 'THE SHORTS', 7, 1100, 'KINGTON TOWN STAKES', 8, 2000, 'BM 84 HANDICAP', 9, 1200] How do I get the tuples? Cheers Sayth --- This email has been checked for viruses by AVG. http://www.avg.com After a quick glance and hence completely untested:- raceData.append((raceDetails['Name'],raceDetails['Number'],raceDetails['Distance'])) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: [Tutor] beginning to code

2017-09-22 Thread Mark Lawrence via Python-list
On 22/09/2017 08:01, Bill wrote: Steve D'Aprano wrote: On Fri, 22 Sep 2017 02:57 pm, Bill wrote: I find Python to be more more like Java, with regard to "passing objects by reference". Which is not a surprise, since both Python and Java use the same value passing style:

Re: [Tutor] beginning to code

2017-09-22 Thread Mark Lawrence via Python-list
On 22/09/2017 10:53, Bill wrote: I just wanted to mention that my comment was made in the context that Python is implemented by an interpreter written in C.   I realize that this may not always be the case.  However, I haven't heard anyone mention a Python interpreter written in Pytho

Re: [Tutor] beginning to code

2017-09-23 Thread Mark Lawrence via Python-list
On 23/09/2017 04:06, Bill wrote: Mark Lawrence wrote: On 22/09/2017 08:01, Bill wrote: Steve D'Aprano wrote: On Fri, 22 Sep 2017 02:57 pm, Bill wrote: I find Python to be more more like Java, with regard to "passing objects by reference". Which is not a surprise, since both

Re: Beginners and experts (Batchelder blog post)

2017-09-27 Thread Larry Hudson via Python-list
On 09/27/2017 09:41 AM, leam hall wrote: On Sat, Sep 23, 2017 at 5:26 PM, Ned Batchelder wrote: [snip] The question is, what should a person "know" when hiring out as a programmer? What is 'know" and what should be "known"? Specifically with Python.

Re: Printing a Chunk Of Words

2017-09-28 Thread Mark Lawrence via Python-list
for our language. Mark Lawrence --- This email has been checked for viruses by AVG. http://www.avg.com -- https://mail.python.org/mailman/listinfo/python-list

Re: newb question about @property

2017-10-02 Thread Larry Hudson via Python-list
27;t expect run into any difficulties.  : ) Except perhaps for your sense of time... "I'll try" implies the future, "last night" is the past.:-) :-) (Couldn't resist...) -- -=- Larry -=- -- https://mail.python.org/mailman/listinfo/python-list

Re: The "loop and a half"

2017-10-03 Thread Larry Hudson via Python-list
On 10/03/2017 10:29 AM, Stefan Ram wrote: Is this the best way to write a "loop and a half" in Python? x = 1 while x: x = int( input( "Number (enter 0 to terminate)? " )) if x: print( f'Square = { x**2 }' ) In a C-like language, one coul

Re: Python 2 -> 3, urllib.urlOpen

2017-10-14 Thread Mark Lawrence via Python-list
On 13/10/17 23:27, Irv Kalb wrote: One of the colleges where I teach has just moved from Python 2 to Python 3. I am in the process of converting my beginning Python class from Python 2 to Python 3. Everything has gone smoothly, until I just tried to convert some code that imports and uses

why del is not a function or method?

2017-10-16 Thread Xue Feng via Python-list
illar with? -- https://mail.python.org/mailman/listinfo/python-list

Re: why del is not a function or method?

2017-10-16 Thread Ben Finney via Python-list
Steve D'Aprano writes: > On Tue, 17 Oct 2017 03:16 am, Oren Ben-Kiki wrote: > > > That doesn't explain why `del` isn't a method though. > > `del` cannot be a method or a function, because the argument to `del` > is the name of the variable, not the conte

ANN: distlib 0.2.6 released on PyPI

2017-10-28 Thread Vinay Sajip via Python-list
https://mail.python.org/mailman/listinfo/python-list

pythonw.exe error

2017-10-30 Thread George Kalamaras via Python-list
When I am running IDLE return to me Missing python36.dll error Στάλθηκε από την Αλληλογραφία για Windows 10 -- https://mail.python.org/mailman/listinfo/python-list

Any good explanations on pd.merge(df,df2, on=['Code', 'Region'])

2017-11-08 Thread David Shi via Python-list
I am trying to gain a clear understanding on pd.merge(df,df2, on=['Code', 'Region']). Can anyone assist? Regards, David -- https://mail.python.org/mailman/listinfo/python-list

Re: can't get python to run

2017-11-12 Thread Mary Ann via Python-list
trying to install and run Python 3.5.2 (64 bit) and keep getting error message: the program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing from your computer. Try reintalling the program to fix this problem. I am on Windows 7 Home Premium I have uninstalle

Round to 2 decimal places

2017-12-06 Thread nick martinez via Python-list
I'm stuck. I need my program to round the end solution to 2 decimal places but cant figure it out. Can someone help? I've been trying between printf and round() but cant seem to get either to work. Python 3.5 is what I'm using. import math print("This program will calculate

Re: Round to 2 decimal places

2017-12-06 Thread nick martinez via Python-list
, > round(surfacearea,2), ) > else: > print("No negatives allowed, try again.") Tried this but it doesn't seem to work. It still prints out all of the decimals -- https://mail.python.org/mailman/listinfo/python-list

Re: Round to 2 decimal places

2017-12-06 Thread nick martinez via Python-list
it doesn't seem to work. It still prints out all of the > > decimals > > This is the output from the code above (Working): > > What is the radius in feet? (no negatives): >? 2 > What is the height in feet? (no negatives): >? 4 > Your Answer is: > A cone with radius 2.0 > and height of 4.0 > has a volume of : 16.76 > and surface area of : 40.67 interesting, what version of python are you using? Tried it multiple times and it still isn't working. -- https://mail.python.org/mailman/listinfo/python-list

Re: Round to 2 decimal places

2017-12-06 Thread nick martinez via Python-list
"\nand surface area of : ", > > > > round(surfacearea,2), ) > > > > else: > > > > print("No negatives allowed, try again.") > > > > > > Tried this but it doesn't seem to work. It still prints out all of the

Python homework

2017-12-08 Thread nick martinez2 via Python-list
f __name__ == "__main__": result = rollDie(50) print (result) print(max(result)) -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Templating Language

2017-12-18 Thread Brian Oney via Python-list
you may consider checking out a more general approach. Noweb was the first to my knowledge and lead the way for Sweave (R or S), and pyweave, as mentioned. https://en.wikipedia.org/wiki/Noweb Cheers -- https://mail.python.org/mailman/listinfo/python-list

Re: Native object exposing buffer protocol

2018-01-05 Thread Ben Finney via Python-list
Rob Gaddi writes: > I'd like to create a native Python object that exposes the buffer > protocol. Basically, something with a ._data member which is a > bytearray that I can still readinto, make directly into a numpy array, > etc. The “etc.” seems pretty important, th

Re: Why does __ne__ exist?

2018-01-07 Thread Ben Finney via Python-list
. > Let's put it this way. Suppose that __eq__ existed and __ne__ didn't, > just like with __contains__. Go ahead: sell the notion of __ne__. > Pitch it, show why we absolutely need to allow this. I think “reject unless absolutely needed” is an unreasonably high bar, which wou

Re: Very strange issues with collections.Mapping

2018-01-19 Thread John Krukoff via Python-list
I ask > here is because I'm wondering if anybody has encountered this before and > managed to hunt down which of these libraries is doing something naughty? > > Thanks! > Jason > > -- > Jason M. Swails > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list

error message by installation

2018-01-19 Thread ‪Ibrahim Nasr‬ ‪ via Python-list
kindly inform me what to do. -- https://mail.python.org/mailman/listinfo/python-list

Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-22 Thread Jason Qian via Python-list
Hello! I am using ctypes on Windows to interface with a dll and it works fine on Linux and windows 32-bit python. But, when using 64-bit python, we got error "exception: access violation writing 0x99222A60". Checking our server, it seems work without any problem. but

Re: Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-22 Thread Jason Qian via Python-list
Thanks you very much, fixed the problem :) On Mon, Jan 22, 2018 at 4:28 PM, Random832 wrote: > On Mon, Jan 22, 2018, at 16:00, Jason Qian via Python-list wrote: > > Hello! > > > > I am using ctypes on Windows to interface with a dll and it works fine > > on Linu

Re: Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-22 Thread Jason Qian via Python-list
Thanks for the help, Jason On Mon, Jan 22, 2018 at 5:41 PM, eryk sun wrote: > On Mon, Jan 22, 2018 at 9:00 PM, Jason Qian via Python-list > wrote: > > > > I am using ctypes on Windows to interface with a dll and it works fine > > on Linux and windows 32-bit python.

Re: Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-24 Thread Jason Qian via Python-list
application will give a exception due to the pointer of callback handler = NULL; Not sure, why the callback handler missed up, when the app calling from python. Thanks -- python lib.createService.argtypes=[ctypes.c_void_p,ctypes.c_char_p] lib.createService.restype=ctypes.c_int def

Python call c pass a callback function on Linux

2018-01-24 Thread Jason Qian via Python-list
ponse ---') print(message) print(code) class GSPythonDriver(object): def submif(self,methodname) invm_fn = InvocationCB(handleResponse) lib.submit(self.obj,methodname,invm_fn) How can I do this on the Linux ? Thanks for the help Jason -- https://mail.python.org/mailman/listinfo/python-list

Re: Python call c pass a callback function on Linux

2018-01-24 Thread Jason Qian via Python-list
HI Dennis, Thanks for the help, After changing WINFUNCTYPE to CFUNCTYPE, the call back function works on the Linux :) Thanks again, Jason On Wed, Jan 24, 2018 at 6:15 PM, Dennis Lee Bieber wrote: > On Wed, 24 Jan 2018 17:16:22 -0500, Jason Qian via Python-list > declaim

Re: Help: 64bit python call c and got OSError: exception: access violation writing 0xFFFFFFFF99222A60

2018-01-24 Thread Jason Qian via Python-list
ack handler as second > parameter. >Without callback handler, it works fine. But if we add the callback > handler, the application will give a exception due to the pointer of > callback handler = NULL; > >Not sure, why the callback handler missed up, when the app calling

Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
HI I am a string that contains \r\n\t [Ljava.lang.Object; does not exist*\r\n\t*at com.livecluster.core.tasklet I would like it print as : [Ljava.lang.Object; does not exist tat com.livecluster.core.tasklet -- https://mail.python.org/mailman/listinfo/python-list

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
HI I have a string that contains \r\n\t [Ljava.lang.Object; does not exist*\r\n\t*at com.livecluster.core.tasklet I would like to print it as : [Ljava.lang.Object; does not exist tat com.livecluster.core.tasklet How can I do this in python print ? Thanks On Sat, Jan 27

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
Thanks for taking look this. 1. Python pass a function to c side as callback, and print out the message. def handleError(message, code): print('** handleError **') * print('exception ' + str(message))* 2. On c side : send stack trace back to python by calling the callbac

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
Thanks for taking look this. The source of the string is std::string from our c code as callback . On the python side is shows as bytes. Is there way we can reformat the string that replace \r\n with newline, so python can correctly print it ? Thanks On Sat, Jan 27, 2018 at 5:39 PM, Terry

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-27 Thread Jason Qian via Python-list
there are 0D 0A 09 %c %d 116 *%c %d 13%c %d 10%c %d 9* %c %d 97 On Sat, Jan 27, 2018 at 9:05 PM, Dennis Lee Bieber wrote: > On Sat, 27 Jan 2018 20:33:58 -0500, Jason Qian via Python-list > declaimed the following: > > > Ljava.lang.Object; does not exis

Re: How to embed a native JIT compiler to a django app?

2018-01-28 Thread Stephane Wirtel via Python-list
On 01/27, Etienne Robillard wrote: Hi, I want to compile a Django application into a C source file and embed a JIT compiler into the binary. Is there any way of doing this with llvm/clang? Hi Etienne, I think no, Django will use Python and this one is interpreted. Answer, no... Now

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-28 Thread Jason Qian via Python-list
99 c %d %c 111 o %d %c 109 m On Sun, Jan 28, 2018 at 9:50 AM, Steven D'Aprano < [email protected]> wrote: > On Sat, 27 Jan 2018 21:23:02 -0500, Jason Qian via Python-list wrote: > > > there are 0D 0A 09 > > If your string actually contains CARRIAGE

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-28 Thread Jason Qian via Python-list
Thanks a lot :) os.write(1, message) works ! On Sun, Jan 28, 2018 at 8:04 PM, Dan Stromberg wrote: > How about: > >>> os.write(1, message) > > On Sun, Jan 28, 2018 at 4:51 PM, Jason Qian via Python-list > wrote: > > print(repr(message)) out : >

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-28 Thread Jason Qian via Python-list
Thanks Peter, replace print with os.write fixed the problem. On Sun, Jan 28, 2018 at 3:57 AM, Peter Otten <[email protected]> wrote: > Jason Qian via Python-list wrote: > > > HI > > > >I have a string that contains \r\n\t > > > >[L

Re: Please help on print string that contains 'tab' and 'newline'

2018-01-28 Thread Jason Qian via Python-list
The message type is bytes, this may make different ? print(type(message)) On Sun, Jan 28, 2018 at 8:41 PM, Steven D'Aprano < [email protected]> wrote: > On Sun, 28 Jan 2018 20:31:39 -0500, Jason Qian via Python-list wrote: > > > Thanks a lot :) >

Re: IoT automation

2018-01-28 Thread Dale Marvin via Python-list
On 1/28/18 7:39 AM, Prahallad Achar wrote: Hello team, Could you please help me out in automation of IoT product end to end Regards Prahallad <https://micropython.org/> ? --Dale -- https://mail.python.org/mailman/listinfo/python-list

Re: IoT automation

2018-01-29 Thread Prahallad Achar via Python-list
Thank you Mr. Marvin On 29 Jan 2018 12:02 pm, "Dale Marvin via Python-list" < [email protected]> wrote: > On 1/28/18 7:39 AM, Prahallad Achar wrote: > >> Hello team, >> Could you please help me out in automation of IoT product end to end >>

Help on convert PyObject to string (c) Python 3.6

2018-02-04 Thread Jason Qian via Python-list
Hi, This is the case of calling python from c and the python function will return a string. It seems python been called correctly, but got error when convert the python string to c string. -- c -- PyObject* pValue = PyObject_CallObject(pFunc, pArgs); -- python -- import string

Re: Help on convert PyObject to string (c) Python 3.6

2018-02-04 Thread Jason Qian via Python-list
Hi Chris, Thanks a lot ! Using PyUnicode_DecodeUTF8 fix the problem. On Sun, Feb 4, 2018 at 12:02 PM, Chris Angelico wrote: > On Mon, Feb 5, 2018 at 3:52 AM, Jason Qian via Python-list > wrote: > > Hi, > > > >This is the case of calling python from c and th

Help on PyImport_Import(pNAme)

2018-02-04 Thread Jason Qian via Python-list
Hi, This only works when loading modules from the current directory. Is there a way I can load from somewhere else ? Thanks for help, -- https://mail.python.org/mailman/listinfo/python-list

Re: $srcdir and $datadir

2018-02-10 Thread Ben Finney via Python-list
y hard-code them at all, then? So, I am going to have to ignore the “$srcdir and $datadir” specifics, and address the stated intent. The current convention in Python build systems is the Setuptools library. You will be familiar with the ‘setup.py’ top-level script for co-ordinating Setuptools action

"Programs" folder not found.

2018-02-15 Thread Enerel Amgalan via Python-list
Hello! So I downloaded “Python” program in C:>Users>(my name)>AppData>Local>Programs>Python.And then in “Local” folder I can’t find “Programs” folder,but it says it downloaded in “Programs”.So can you help me. -- https://mail.python.org/mailman/listinfo/python-list

Re: Help on convert PyObject to string (c) Python 3.6

2018-02-19 Thread Jason Qian via Python-list
Thanks a lot and I will take a look Cython, On Mon, Feb 19, 2018 at 3:23 PM, Stefan Behnel wrote: > Jason Qian via Python-list schrieb am 04.02.2018 um 17:52: > >This is the case of calling python from c and the python function > will > > return a string. > > Hi J

How to link to python 3.6.4 library on linux ?

2018-02-19 Thread Jason Qian via Python-list
Hi, I am calling python from a c application. It compiles and works fine on the windows. How do I compile and link it on the linux for Python 3.6.4 ? Under python dir, it only have a static library, /opt/Python-3.6.4*/lib*/*libpython3.6m.a* * If I link to it, I

Re: How to link to python 3.6.4 library on linux ?

2018-02-19 Thread Jason Qian via Python-list
Thanks Chris, I think I figured it out that when build python on Linux, we need to enable-shared. Thanks again, On Mon, Feb 19, 2018 at 5:04 PM, Chris Angelico wrote: > On Tue, Feb 20, 2018 at 8:07 AM, Jason Qian via Python-list > wrote: > > Hi, > > > > I am

APPLICATION NOT RUNNING.

2018-03-02 Thread Faruq Bashir via Python-list
I try to run an application with the latest version of python that is python 3.6.4 (32-bit) ., instead of running the application it only shows feel free to mail [email protected] if you continue to encounter issues,Please help me out thanks. -- https://mail.python.org/mailman/listinfo

Bypassing firewall

2018-03-05 Thread Faruq Bashir via Python-list
    How will i bypass web application firewall -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-16 Thread Jon Ribbens via Python-list
ds (or indeed any other fixed time period), to a timezone-aware >>datetime in Python, how do I do it? It would appear that, without >>converting to UTC before doing the calculation, you can't. > > Which is probably the recommended means to do just that. Yes, as I've a

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-19 Thread Jon Ribbens via Python-list
5 I don't recognise that format and can't work out what it means. It should be trivial to write functions to parse whatever format you wanted and convert between it and timedelta objects though. > It is obviously fairly easy to rustle up something to do this, but I am > surprised that

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-19 Thread Jon Ribbens via Python-list
also defines a format for durations (e.g. 'P4Y3M' for '4 years 3 months'), I don't think I have ever seen it used in practice - not least because apparently it doesn't define what it actually means. So there isn't one simple standard agreed by everyone that is an obvious candidate for inclusion in language standard libraries. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-19 Thread Jon Ribbens via Python-list
's all in their own slightly-different little niches. There isn't one straightforward standard that makes all or even most of them happy. -- https://mail.python.org/mailman/listinfo/python-list

Re: Why does datetime.timedelta only have the attributes 'days' and 'seconds'?

2022-04-19 Thread Jon Ribbens via Python-list
division operation ;-) -- https://mail.python.org/mailman/listinfo/python-list

Re: Why no list as dict key?

2022-04-20 Thread Avi Gross via Python-list
.  Life is complicated. Then you die. -Original Message- From: Chris Angelico To: [email protected] Sent: Wed, Apr 20, 2022 3:49 pm Subject: Re: Why no list as dict key? On Thu, 21 Apr 2022 at 05:30, Sam Ezeh wrote: > > Repeating the above points, here is an example of what would

How to have python 2 and 3 both on windows?

2022-04-22 Thread Sunil KR via Python-list
I have some scripts that are old and won't work under python2 and at the same time I am writing new scripts which will use python3. However, if python 2 and 3 cannot co-exist in a windows box it will be impossible to transition What I try:- remove all pythons and launchers- Use windows inst

Re: How to have python 2 and 3 both on windows?

2022-04-22 Thread Sunil KR via Python-list
Please excuse the formatting in my previous message. And it is not complete even, so here is the rest of it. What happens after I follow the above steps: - Upon running one of my python 2 scripts (using python2), I see this error:     """       ^SyntaxError: (unicode error) '

Re: Style for docstring

2022-04-22 Thread Rob Cliffe via Python-list
uot;. Checking out help() on a few functions in the stdlib, they all used "Return" or a grammatical equivalent, so this does seem to be a Python cultural thing.  But why?  To me, "Returns" begins a description as to what the function does, whereas "Return" is an imperat

Re: Style for docstring

2022-04-22 Thread Avi Gross via Python-list
Python does have a concept of "truthy" that includes meaning for not just the standard Booleans but for 0 and non-zero and the empty string and many more odd things such as an object that defines __bool__ (). But saying it returns a Boolean True/False valuesounds direct and

Re: Style for docstring

2022-04-22 Thread Avi Gross via Python-list
d by either style but when documenting what is, I prefer proper English (or any otherlanguage) in communicating what it does for them. As with many such things, if you work for a company or with groups of others, it is wise to find out what is expected and do the same as much as reasonable.

Re: Style for docstring

2022-04-23 Thread Avi Gross via Python-list
. -Original Message- From: Michael F. Stemper To: [email protected] Sent: Sat, Apr 23, 2022 8:57 am Subject: Re: Style for docstring On 22/04/2022 21.58, Avi Gross wrote: > Python does have a concept of "truthy" that includes meaning for not just the > standard

Re: How to have python 2 and 3 both on windows?

2022-04-23 Thread Sunil KR via Python-list
I am happy with how the python starts up. When I use python I get python 2.  I am ok with using py -3 for my new scripts, even using the shebang like #!py -3 I don't want to put a unix (or for that matter windows) path in the shebang, as it is not platform portable But the real question/s f

Re: How to have python 2 and 3 both on windows?

2022-04-24 Thread Sunil KR via Python-list
The question is not one of conversion. The question is this: When I have both python 2 and python3, why is my python 2 script breaking? And when I remove python3 the problem goes away? In both cases (regardless of installing python 3 or not) I am using only python 2 to run the python2 script

Re: tail

2022-04-24 Thread Avi Gross via Python-list
wing file, often into a pipeline for further processing. The variant now being mentioned is a sort of "reverse" that has nothing to do with that kind of "tail" except if the implementation is to read the file backwards. A very straightforward way to reverse a file takes perhap

Re: Style for docstring

2022-04-24 Thread Avi Gross via Python-list
t;, "Return(s)": "Text", "Optional-Note": "Text", "French version": DocStringFrench} Too late to seriously change the language now! -Original Message- From: Michael F. Stemper To: [email protected] Sent: Sun, Apr 24, 2022 9:24 am Subj

Re: Verifying I installed Python correctly

2022-04-25 Thread Sunil KR via Python-list
cd C:\google-python-exercises> python hello.py this doesn't looks like a valid command. However, is it because a newline got swallowed by misformatting? For clarity, I am reproducing the correct version of the steps: cd /d  C:\google-python-exercises python hello.py The error is:  Th

Re: Style for docstring

2022-04-25 Thread Rob Cliffe via Python-list
items which are frobby and composes a nangle of the items. ''' I very much like the concise imperative opening sentence, sometimes 2 sentences. Then the elaboration if the function isn't trivially obvious. Cheers, Cameron Simpson -- https://mail.python.org/mailman/listinfo/python-list

Re: Printing Unicode strings in a list

2022-04-28 Thread Jon Ribbens via Python-list
On 2022-04-28, Stephen Tucker wrote: > Hi PythonList Members, > > Consider the following log from a run of IDLE: > >== > > Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] > on win32 > Type "copyright", "cr

Re: Printing Unicode strings in a list

2022-04-28 Thread Rob Cliffe via Python-list
On 28/04/2022 14:27, Stephen Tucker wrote: To Cameron Simpson, Thanks for your in-depth and helpful reply. I have noted it and will be giving it close attention when I can. The main reason why I am still using Python 2.x is that my colleagues are still using a GIS system that has a Python

Re: Python/New/Learn

2022-05-04 Thread Avi Gross via Python-list
https://wiki.python.org/moin/PythonBooks -Original Message- From: Patrick 0511 To: [email protected] Sent: Wed, May 4, 2022 9:36 pm Subject: Python/New/Learn Hello, I'm completely new here and don't know anything about python. Can someone tell me how best to start? So w

Re: Python/New/Learn

2022-05-04 Thread Avi Gross via Python-list
Chris, It was an extremely open-ended question to a forum where most of the readers are more advanced, at least I think. My library has oodles of Python Books for free to borrow on paper and return and I have read many of them. There are various e-books too, and of course lots of free internet

Re: Python/New/Learn

2022-05-04 Thread Avi Gross via Python-list
I agree Chris that the Ukrainian Python Books are daunting as I barely started learning that language now even though my early years were just a few miles away and I might even have relatives still there! But as has been pointed out, suggestions are more helpful if you know a bit more about

Re: Python/New/Learn

2022-05-05 Thread Avi Gross via Python-list
calls asking if I want to sell my house ... -Original Message- From: Schachner, Joseph To: Patrick 0511 ; [email protected] Sent: Thu, May 5, 2022 12:04 pm Subject: RE: Python/New/Learn Buy the book "Python 101" and do the examples.  When you're done with that buy

Re: Python/New/Learn

2022-05-06 Thread Avi Gross via Python-list
This topic has rapidly shifted over way beyond Python even as the original  person has not returned to participate. There are many ways to teach anything and since the classical method was to learn in person from someone using mainly sound or pantomime, it has hung on. Even with the existence

Re: tail

2022-05-07 Thread Avi Gross via Python-list
general purpose tool, internationalization from ASCII has created a challenge for lots of such tools. -Original Message- From: Marco Sulla To: Dennis Lee Bieber Cc: [email protected] Sent: Sat, May 7, 2022 9:21 am Subject: Re: tail On Sat, 7 May 2022 at 01:03, Dennis Lee Bieber wrote: > >

Re: tail

2022-05-11 Thread Avi Gross via Python-list
than how to stepwise make changes in a pipeline so reading from the beginning to end was not an issue. -Original Message- From: Marco Sulla To: Chris Angelico Cc: [email protected] Sent: Wed, May 11, 2022 5:27 pm Subject: Re: tail On Wed, 11 May 2022 at 22:09, Chris Angelico wrote

Re: tail

2022-05-11 Thread Avi Gross via Python-list
numpy/pandas in Python often provide functions with names like head or tail as do other languages where data structures with names like data.frame are commonly used. These structures are in some way indexed to make it easy to jump towards the end. Text files are not. Efficiency aside, a 3-year-old

Re: .0 in name

2022-05-13 Thread Avi Gross via Python-list
rame with embedded spaces and other anomalies requiring special handling. So why you wonder where it is documented that variables cannot be what you feel like is a bit puzzling!  -Original Message- From: bryangan41 To: [email protected] Sent: Fri, May 13, 2022 12:47 pm Subject: .0 i

Re: .0 in name

2022-05-13 Thread Avi Gross via Python-list
Boy do I hate when I see my code mangled by the stupid AOL mailer. Not that anyone cares, but the code should be read with each line starting with the "> " prompt. If I leave lots of blank lines, it may work, but as the illustration is not in python, I will now remove the pro

Re: .0 in name

2022-05-13 Thread Avi Gross via Python-list
t it to be. But although starting with a numeral is verboten for variable names, may I suggest that a relatively invisible character can make a name like _3CPO that will be allowed. But be careful as Python programs often have conventions on use of the underscore and don't even think about a

Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
I was shocked to discover that when repeatedly running the following program (condensed from a "real" program) under Python 3.8.3 for p in { ('x','y'), ('y','x') }:     print(p) the output was sometimes ('y', 'x') (&

Re: Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
On 16/05/2022 04:13, Dan Stromberg wrote: On Sun, May 15, 2022 at 8:01 PM Rob Cliffe via Python-list wrote: I was shocked to discover that when repeatedly running the following program (condensed from a "real" program) under Python 3.8.3 for p in { ('x

Re: Non-deterministic set ordering

2022-05-15 Thread Rob Cliffe via Python-list
Thanks, Paul.  Question answered! Rob Cliffe On 16/05/2022 04:36, Paul Bryan wrote: This may explain it: https://stackoverflow.com/questions/27522626/hash-function-in-python-3-3-returns-different-results-between-sessions On Mon, 2022-05-16 at 04:20 +0100, Rob Cliffe via Python-list wrote

Re: Python & nmap

2022-05-18 Thread Jon Ribbens via Python-list
ate']) for x in nm.all_hosts()] > for host, status in hosts_list: > print('{0}:{1}'.host) > > THE OUTPUT > ----- > Traceback (most recent call last): >File "/home/gabriele/Documenti

ANN: A new version (0.4.9) of python-gnupg has been released.

2022-05-20 Thread Vinay Sajip via Python-list
especially bug reports [3], patches and suggestions for improvement, or any other points via this group). Enjoy! Cheers Vinay Sajip [1] https://github.com/vsajip/python-gnupg [2] https://pypi.org/project/python-gnupg/0.4.9 [3] https://github.com/vsajip/python-gnupg/issues [4] https://github.com/vsa

Re: oop issue

2022-05-23 Thread Avi Gross via Python-list
get you up to speed, but then again, we often find out someone is given a homework assignment ... -Original Message- From: Tola Oj To: [email protected] Sent: Mon, May 23, 2022 4:54 pm Subject: oop issue i just finished learning oop as a beginner and trying to practice with i

Re: Problems with Python

2022-05-31 Thread Howard Samuels via Python-list
Good day I am new to programming.  I have signed up for a virtual online course and installed Python using Anaconda as well as jupyter notebook. I encountered problems & then went to YouTube tried going directly to the python website and used Pycharm. When I used pycharm and try to run

Re: How to test characters of a string

2022-06-07 Thread Avi Gross via Python-list
the original (perhaps with some normalization of case and whitespace, fine. If not will they match if one or both have something to remove as a prefix such as "02 ". And if you are comparing items where the same song is in two different numeric sequences on different disks, ...

Re: How to replace characters in a string?

2022-06-08 Thread Jon Ribbens via Python-list
x27;, 8722: '-', 8216: "'", 8217: "'", 8220: '"', 8221: '"', 64256: 'ff', 160: ' ', 64260: 'ffl', 8198: ' ', 230: 'ae', 12288: ' ', 173: '', 497: 'DZ', 498: 'Dz', 499: 'dz', 64259: 'ffi', 8230: '...', 64257: 'fi', 64262: 'st'}) If you want to go further then the Unidecode package might be helpful: https://pypi.org/project/Unidecode/ -- https://mail.python.org/mailman/listinfo/python-list

Re: How to replace characters in a string?

2022-06-08 Thread Avi Gross via Python-list
"Black Polish" would match a song about keeping your shoes dark with "black polish" so I keep repeating it is very hard or frankly impossible, to catch every case I can imagine and the many I can't! But the emphasis here is not your overall problem. It is about whe

<    20   21   22   23   24   25   26   27   28   29   >