Re: Help with the best practice to learn python

2020-10-19 Thread Michael Torrie
On 10/19/20 9:12 AM, Azhar Ansari wrote: > Hello Python Community, > Kindly help me with the best practice to learn python. > Lots of material over net but its very confusing. What is your goal? Python is a tool. What do you want to do with it? If you don't have any particular thing in mind, it'

Pickle in C does not work

2020-10-19 Thread Marco Sulla
I tried this code: static PyObject * frozendict_reduce(PyFrozenDictObject* mp, PyObject *Py_UNUSED(ignored)) { PyObject* args = PyTuple_New(1); if (args == NULL) { return NULL; } PyTuple_SET_ITEM(args, 0, (PyObject *)mp); PyObject *d = PyObject_Call((PyObject *)&PyDi

Re: Help with the best practice to learn python

2020-10-19 Thread dn via Python-list
On 20/10/2020 04:12, Azhar Ansari wrote: Hello Python Community, Kindly help me with the best practice to learn python. Lots of material over net but its very confusing. You are so right - it is very confusing! Different people have different preferences for 'the best way to learn'. Also, we

Re: Simple question - end a raw string with a single backslash ?

2020-10-19 Thread Eryk Sun
On 10/19/20, Grant Edwards wrote: > On 2020-10-19, Stephen Tucker wrote: > >> For a neatish way to get a string to end with a single backslash, how >> about >>mystr = r"abc\ "[:-1] >> (Note the space at the end of the rough-quoted string.) > > That's the first thing I thought of, though I wou

Re: Help with the best practice to learn python

2020-10-19 Thread Marco Sulla
The first time I started python I simply followed the official tutorial: https://docs.python.org/3.9/tutorial/introduction.html PS: Note that this is for Python 3.9. You can change the version in the page if you have another one. -- https://mail.python.org/mailman/listinfo/python-list

Help with the best practice to learn python

2020-10-19 Thread Azhar Ansari
Hello Python Community, Kindly help me with the best practice to learn python. Lots of material over net but its very confusing. Thanks and Regards, Azhar Ansari -- https://mail.python.org/mailman/listinfo/python-list

Re: Simple question - end a raw string with a single backslash ?

2020-10-19 Thread Grant Edwards
On 2020-10-19, Stephen Tucker wrote: > For a neatish way to get a string to end with a single backslash, how about >mystr = r"abc\ "[:-1] > (Note the space at the end of the rough-quoted string.) That's the first thing I thought of, though I would probably use a non-space character to avoid

Re: Covariance matrix syntax

2020-10-19 Thread Markos
Hi Meghna, I organized some tutorials about Machine Learning for Chemistry with Python. Where you can find some info about the use of Covariance Matrix that may help you. The originals are in Portugueese, but you can read using Google Translator: https://tinyurl.com/yybazx9n https://tinyurl

RE: Are there Python ways to execute queries on PostgreSQL without getting data over?

2020-10-19 Thread David Raymond
> Are there Python ways to execute queries on PostgreSQL without getting data > over? > > Are there ways just to fire off PostgreSQL queries and not get data into > Python? > > Regards, > > David What is your use case for this? Normally when you do basic things like an UPDATE/DELETE, etc a

Re: Embedding version in command-line program

2020-10-19 Thread Loris Bennett
Tony Flury writes: > On 07/10/2020 12:06, Loris Bennett wrote: >> Hi, >> >> I have written a program, which I can run on the command-line thus >> >>mypyprog --version >> >> and the get the version, which is currently derived from a variable in >> the main module file. >> >> However, I also ha

Re: Simple question - end a raw string with a single backslash ?

2020-10-19 Thread Stephen Tucker
For a neatish way to get a string to end with a single backslash, how about mystr = r"abc\ "[:-1] (Note the space at the end of the rough-quoted string.) Virus-free. www.avast.com

Re: Simple question - end a raw string with a single backslash ?

2020-10-19 Thread Antoon Pardon
Op 13/10/20 om 15:14 schreef Serhiy Storchaka: 13.10.20 11:52, Tony Flury via Python-list пише: I am trying to write a simple expression to build a raw string that ends in a single backslash. My understanding is that a raw string should ignore attempts at escaping characters but I get this :