Re: Creating Win .exe file from *.py on Linux

2018-10-02 Thread William Ray Wing via Python-list
> On Oct 2, 2018, at 3:03 PM, John Doe wrote: > > Hello World > > Is it possible to create on Linux win .exe file from *.py file? > -- > https://mail.python.org/mailman/listinfo/python-list As was pointed out here a day or so ago, the answer is yes, but it is a two step process. First step

Re: This thread is closed [an actual new thread]

2018-10-02 Thread Ben Finney
Ethan Furman writes: > On 10/01/2018 04:26 PM, Ben Finney wrote: > > If there is some specific formal meaning to the above statement, I > > don't know where it's documented. If it's not a specific formal > > statement, that is itself troubling, because it's not clear what > > would constitute a v

Re: Re : So apparently I've been banned from this list

2018-10-02 Thread Ethan Furman
On 10/02/2018 03:40 PM, armand.fouca...@telecom-bretagne.eu wrote: Hello there, I'm quite new here. Welcome! I'm sorry to interfere, but this thread is only creating noise on this list. You are correct. This thread is now closed. Is there a place where such topics can be debated, other

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Gary Herron
On 10/02/2018 01:23 PM, tomusa...@gmail.com wrote: Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. DATA 31, 71, 73, 137, 211, 311, 419, 421, 647, 877, 1117, 1487, 1979, 2447, 3079, 3547, 4027, 7307, 7309, 12211, 14243, 18911, 18913, 23557, 25439, 28729, 36683, 37831,

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread Cameron Simpson
On 02Oct2018 06:04, zljubi...@gmail.com wrote: I have to execute the same sql in two different programs. Each of them marks parameters differently. Then you are MUCH better off assembling the SQL using come kind of query constructor, which correctly inserts parameter placeholders is the corre

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Martin Musatov
I am drafting a sequence for OEIS. I was told Python was most accesible for beginners. On Tue, Oct 2, 2018, 4:48 PM Bob Gailer wrote: > On Oct 2, 2018 4:59 PM, "Musatov" wrote: > > > > Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. > > DATA > > > > 31, 71, 73, 137, 211, 3

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Max Zettlmeißl via Python-list
On Tue, Oct 2, 2018 at 10:23 PM, Musatov wrote: > Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. > DATA > > 31, 71, 73, 137, 211, 311, 419, 421, 647, 877, 1117, 1487, 1979, 2447, 3079, > 3547, 4027, 7307, 7309, 12211, 14243, 18911, 18913, 23557, 25439, 28729, > 36683, 37831

Re: Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Bob Gailer
On Oct 2, 2018 4:59 PM, "Musatov" wrote: > > Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. > DATA > > 31, 71, 73, 137, 211, 311, 419, 421, 647, 877, 1117, 1487, 1979, 2447, 3079, 3547, 4027, 7307, 7309, 12211, 14243, 18911, 18913, 23557, 25439, 28729, 36683, 37831, 46853, 50

Re: So apparently I've been banned from this list

2018-10-02 Thread Ethan Furman
On 10/02/2018 02:24 PM, Mark Lawrence wrote: I fully support Steven D'Aprano.  This disgraceful behaviour by the moderators has been perpetuated by Ethan Thurman who doesn't have the guts to say things online but has instead sent me a message to my personal inbox.  Please can we get rid of thi

Re: So apparently I've been banned from this list

2018-10-02 Thread Mark Lawrence
On 02/10/18 19:11, Roel Schroeven wrote: Jon Ribbens schreef op 2/10/2018 om 1:20: On 2018-10-01, Roel Schroeven wrote: I'm not very active here, but I've been lurking for years. In my eyes Steven has always been active and helpful. Now he has *once* been a *tiny bit* rude, and he's banned for

Program to find Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1.

2018-10-02 Thread Musatov
Primes of the form prime(n+2) * prime(n+1) - prime(n) +- 1. DATA 31, 71, 73, 137, 211, 311, 419, 421, 647, 877, 1117, 1487, 1979, 2447, 3079, 3547, 4027, 7307, 7309, 12211, 14243, 18911, 18913, 23557, 25439, 28729, 36683, 37831, 46853, 50411, 53129, 55457, 57367, 60251, 67339, 70489

Re: Creating Win .exe file from *.py on Linux

2018-10-02 Thread Grant Edwards
On 2018-10-02, John Doe wrote: > Hello World > > Is it possible to create on Linux win .exe file from *.py file? Yes... if you run on Linux a VM instance that's running Windows? -- Grant Edwards grant.b.edwardsYow! Do you guys know we at

Creating Win .exe file from *.py on Linux

2018-10-02 Thread John Doe
Hello World Is it possible to create on Linux win .exe file from *.py file? -- https://mail.python.org/mailman/listinfo/python-list

Re: python not working on RHEL6

2018-10-02 Thread Chris Angelico
On Wed, Oct 3, 2018 at 5:17 AM Thomas Jollans wrote: > > On 02/10/2018 19:22, Dan Purgert wrote: > > Thomas Jollans wrote: > >> [...] (preferably, not in /usr - that's for OS-installed files only. > >> /usr/local is a nice place to put things you installed from source). > > > > While I agree that

Re: python not working on RHEL6

2018-10-02 Thread Thomas Jollans
On 02/10/2018 19:22, Dan Purgert wrote: Thomas Jollans wrote: [...] (preferably, not in /usr - that's for OS-installed files only. /usr/local is a nice place to put things you installed from source). While I agree that /usr(/bin) is incorrect, I believe that "for OS-installed files only" is ta

Re: So apparently I've been banned from this list

2018-10-02 Thread Roel Schroeven
Jon Ribbens schreef op 2/10/2018 om 1:20: On 2018-10-01, Roel Schroeven wrote: I'm not very active here, but I've been lurking for years. In my eyes Steven has always been active and helpful. Now he has *once* been a *tiny bit* rude, and he's banned for that? It's not "once", it's a long-stan

Re: Querying MariaDB from python

2018-10-02 Thread Thomas Jollans
On 2018-10-02 18:07, Tony van der Hoff wrote: > On 02/10/18 16:47, Ervin Hegedüs wrote: >> hi, >> >> now rows will looks like this: >> ({'id':...,...},{'id':...,}...) > > Thanks Ervin, but: > >cursor = cnx.cursor(pymysql.cursors.DictCursor) > NameError: name 'pymysql' is not defined > > I ha

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread MRAB
On 2018-10-02 14:04, zljubi...@gmail.com wrote: I have to execute the same sql in two different programs. Each of them marks parameters differently. Anyway, I have found the solution. cnv_sel = re.sub(r"(:(.+?)\b)", r"${\2}", sel) A slightly better solution would be: cnv_sel = re.sub(r":(\w+

Re: python not working on RHEL6

2018-10-02 Thread Dan Purgert
Thomas Jollans wrote: > [...] (preferably, not in /usr - that's for OS-installed files only. > /usr/local is a nice place to put things you installed from source). While I agree that /usr(/bin) is incorrect, I believe that "for OS-installed files only" is taking it a bit far. My (admittedly, dim)

Re: This thread is closed [an actual new thread]

2018-10-02 Thread Ethan Furman
On 10/02/2018 03:46 AM, Rhodri James wrote: On 02/10/18 01:02, Ethan Furman wrote: It should be interpreted as: - No further discussion should take place on this thread. - I've done what I can with the primitive tools at hand to block    any further discussion. - Continued considerate posts w

Re: Question about Multi-processing

2018-10-02 Thread Chris Angelico
On Wed, Oct 3, 2018 at 2:13 AM Anthony Flury via Python-list wrote: > I continued to read the documentation and came to this quote : > > /Functionality within this package requires that the > //|__main__|//module be importable by the children. This is covered > in //Programming guideli

[SOLVED] Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
On 02/10/18 17:13, Larry Martell wrote: > On Tue, Oct 2, 2018 at 12:09 PM Tony van der Hoff > wrote: >> >> On 02/10/18 16:47, Ervin Hegedüs wrote: >>> hi, >>> >>> now rows will looks like this: >>> ({'id':...,...},{'id':...,}...) >> >> Thanks Ervin, but: >> >>cursor = cnx.cursor(pymysql.curso

Re: Querying MariaDB from python

2018-10-02 Thread Ervin Hegedüs
Hi Tony, On Tue, Oct 02, 2018 at 05:07:38PM +0100, Tony van der Hoff wrote: > On 02/10/18 16:47, Ervin Hegedüs wrote: > > hi, > > > > now rows will looks like this: > > ({'id':...,...},{'id':...,}...) > > Thanks Ervin, but: > >cursor = cnx.cursor(pymysql.cursors.DictCursor) > NameError: nam

Re: Querying MariaDB from python

2018-10-02 Thread Larry Martell
On Tue, Oct 2, 2018 at 12:09 PM Tony van der Hoff wrote: > > On 02/10/18 16:47, Ervin Hegedüs wrote: > > hi, > > > > now rows will looks like this: > > ({'id':...,...},{'id':...,}...) > > Thanks Ervin, but: > >cursor = cnx.cursor(pymysql.cursors.DictCursor) > NameError: name 'pymysql' is not d

Question about Multi-processing

2018-10-02 Thread Anthony Flury via Python-list
I decided to spend this morning to get my head around multi-processing, and decided to try to experiment initially in the command line interpreter, using the Python 3 documentation I fired up P

Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
On 02/10/18 16:47, Ervin Hegedüs wrote: > hi, > > now rows will looks like this: > ({'id':...,...},{'id':...,}...) Thanks Ervin, but: cursor = cnx.cursor(pymysql.cursors.DictCursor) NameError: name 'pymysql' is not defined I have been using the mysql.connector module, which seems to be the "

Re: Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
On 02/10/18 16:37, Larry Martell wrote: > On Tue, Oct 2, 2018 at 11:34 AM Tony van der Hoff > wrote: >>I would have expected the connector to be able to return a >> dictionary. >> >> Can anyone suggest a better way of doing this? > > https://pymysql.readthedocs.io/en/latest/modules/cursors.html#

Re: How to change '\\' to '\'

2018-10-02 Thread Michael Torrie
On 10/02/2018 12:48 AM, Ethan Furman wrote: > Even for two-person, private email discussions I prefer the interleaved > replies -- in a week when I have to remind myself what was discussed it > is much easier to comprehend. Absolutely. I've been saved from embarrassment countless times because w

Re: Querying MariaDB from python

2018-10-02 Thread Ervin Hegedüs
hi, On Tue, Oct 02, 2018 at 04:14:45PM +0100, Tony van der Hoff wrote: > I'm writing a database application, in python 3,5 under Debian9. > > My code: > >     def get_albums(self, parent_id = 0 ): >     cursor = self.cnx.cursor() cursor = self.cnx.cursor(pymysql.cursors.DictCursor

Re: Querying MariaDB from python

2018-10-02 Thread Larry Martell
On Tue, Oct 2, 2018 at 11:34 AM Tony van der Hoff wrote: > > I'm writing a database application, in python 3,5 under Debian9. > > My code: > > def get_albums(self, parent_id = 0 ): > cursor = self.cnx.cursor() > sql =( "select" > "id" > ",

Querying MariaDB from python

2018-10-02 Thread Tony van der Hoff
I'm writing a database application, in python 3,5 under Debian9. My code:     def get_albums(self, parent_id = 0 ):     cursor = self.cnx.cursor()     sql =(  "select"     "    id"     ",   parent_id"     ",   title"     ",   ifnull( descrip

Re: How to achieve pyc only deployment for module in python3.6

2018-10-02 Thread Michael F. Stemper
On 2018-10-02 00:41, Chris Angelico wrote: > On Tue, Oct 2, 2018 at 12:01 PM Chandana Pattanayak > wrote: >> I have a requirement to provide basic code protection for a module in our >> product suite. With python 3.6 the .pyc files are created under pycache , >> so if i remove the py file the mod

Re: python not working on RHEL6

2018-10-02 Thread Thomas Jollans
On 2018-10-02 15:59, mchathuran...@gmail.com wrote: > Hi All, > > I'm a beginner on this. I was trying to install a new python version which is > 2.7.5. My OS(RHEL6) had already installed version 2.6. so I downloaded the > tar and unzipped it then executed > > ./configure --prefix=/usr \

Re: This thread is closed [an actual new thread]

2018-10-02 Thread Ian Kelly
On Tue, Oct 2, 2018 at 4:50 AM Rhodri James wrote: > > On what grounds are you suppressing debate? It is exactly and precisely > not irrelevant to Python, since it's discussing a Python-specific change > to known and understood computing terminology, and frankly the statement > "Continued conside

Re: python not working on RHEL6

2018-10-02 Thread Chris Angelico
On Wed, Oct 3, 2018 at 12:20 AM Madushan Chathuranga wrote: > > Hi, > > when I type python2.6 terminal opens for python. So no issue on that. but > when I type python2.7, python or any yum command It gives the error, > python: error while loading shared libraries: libpython2.7.so.1.0: cannot > o

Re: python not working on RHEL6

2018-10-02 Thread Madushan Chathuranga
Hi, when I type python2.6 terminal opens for python. So no issue on that. but when I type python2.7, python or any yum command It gives the error, python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory Thanks -- https://mai

Error after installing python 2.7.5 on rhel6

2018-10-02 Thread Madushan Chathuranga
Hi All, I'm a beginner on this. I tried to install python 2.7.5 on my rhel6 os. It already had installed 2.6.6. I downloaded the tar and unzipped it the executed below command. ./configure --prefix=/usr \ --enable-shared \ --with-system-expat \ --wi

Re: This thread is closed [an actual new thread]

2018-10-02 Thread Grant Edwards
On 2018-10-02, Rhodri James wrote: > On 02/10/18 01:02, Ethan Furman wrote: > On what grounds are you suppressing debate? It is exactly and precisely > not irrelevant to Python, since it's discussing a Python-specific change > to known and understood computing terminology, and frankly the stat

Re: How to change '\\' to '\'

2018-10-02 Thread Chris Angelico
On Wed, Oct 3, 2018 at 12:05 AM Dennis Lee Bieber wrote: > > On Tue, 2 Oct 2018 10:17:27 +0800, Jach Fong > declaimed the following: > > > >It was supposed that most discussant want to see the reply message > >instantly when they open the mail. They already know what is going on > >and no need to

Re: python not working on RHEL6

2018-10-02 Thread Chris Angelico
On Wed, Oct 3, 2018 at 12:01 AM wrote: > > Hi All, > > I'm a beginner on this. I was trying to install a new python version which is > 2.7.5. My OS(RHEL6) had already installed version 2.6. so I downloaded the > tar and unzipped it then executed > > ./configure --prefix=/usr \ >

python not working on RHEL6

2018-10-02 Thread mchathuranga4
Hi All, I'm a beginner on this. I was trying to install a new python version which is 2.7.5. My OS(RHEL6) had already installed version 2.6. so I downloaded the tar and unzipped it then executed ./configure --prefix=/usr \ --enable-shared \ --with-system-expat

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread zljubisic
I have to execute the same sql in two different programs. Each of them marks parameters differently. Anyway, I have found the solution. cnv_sel = re.sub(r"(:(.+?)\b)", r"${\2}", sel) Reagards. -- https://mail.python.org/mailman/listinfo/python-list

Re: Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread Chris Angelico
On Tue, Oct 2, 2018 at 10:36 PM wrote: > > Hi, > > if I have a string: > > sql = """ > where 1 = 1 > and field = :value > and field2 in (:list) > """ > > I would like to replace every word that starts with ":" in the following way: > 1. replace ":" with "${" > 2. at the end of the word add "}" > >

Replacing : with "${" at the beginning of the word and adding "}" at the end of the word

2018-10-02 Thread zljubisic
Hi, if I have a string: sql = """ where 1 = 1 and field = :value and field2 in (:list) """ I would like to replace every word that starts with ":" in the following way: 1. replace ":" with "${" 2. at the end of the word add "}" An example should look like this: where 1 = 1 and field = ${valu

Re: This thread is closed [an actual new thread]

2018-10-02 Thread Robin Becker
On 02/10/2018 11:46, Rhodri James wrote: On 02/10/18 01:02, Ethan Furman wrote: On 10/01/2018 04:26 PM, Ben Finney wrote:  > Ethan Furman writes:  >> This thread is closed.  >  > Coming from a moderator of this forum, I don't know how that statement  > is to be interpreted. It should be interp

ANN: distlib 0.2.8 released on PyPI

2018-10-02 Thread Vinay Sajip via Python-list
I've recently released version 0.2.8 of distlib on PyPI [1]. For newcomers,distlib is a library of packaging functionality which is intended to beusable as the basis for third-party packaging tools. The main changes in this release are as follows: * Fixed #107: Updated documentation on testing to

Re: This thread is closed [an actual new thread]

2018-10-02 Thread Rhodri James
On 02/10/18 01:02, Ethan Furman wrote: On 10/01/2018 04:26 PM, Ben Finney wrote: > Ethan Furman writes: >> This thread is closed. > > Coming from a moderator of this forum, I don't know how that statement > is to be interpreted. It should be interpreted as: - No further discussion should

Re: How to achieve pyc only deployment for module in python3.6

2018-10-02 Thread Kirill Balunov
On Tue, Oct 2, 2018, 08:42 Chris Angelico wrote: > On Tue, Oct 2, 2018 at 12:01 PM Chandana Pattanayak > wrote: > > > > Hi, > > > > I have a requirement to provide basic code protection for a module in our > > product suite. With python 3.6 the .pyc files are created under pycache , > > so if i