How to read/write a field in MariaDB already managed/encrypted by PHP script.

2020-01-25 Thread ^Bart

Hy guys,

I'm doing a software with a login/register area by Python 3 and PHP 7.3, 
i followed this guide 
https://www.9lessons.info/2016/04/php-login-system-with-pdo-connection.html 
and it store the password in encrypted mode but now I need to understand 
how to set the same cypher in Python! :\


^Bart
--
https://mail.python.org/mailman/listinfo/python-list


Re: How to read/write a field in MariaDB already managed/encrypted by PHP script.

2020-01-25 Thread I

on 2020-01-25 at 12:08 user ^Bart wrote:

Hy guys,

I'm doing a software with a login/register area by Python 3 and PHP 
7.3, i followed this guide 
https://www.9lessons.info/2016/04/php-login-system-with-pdo-connection.html 
and it store the password in encrypted mode but now I need to 
understand how to set the same cypher in Python! :\


^Bart



everyone and his son uses oasswords, truth is, passwords totally suck.


do not ver use shitty passwords, mate

--
https://mail.python.org/mailman/listinfo/python-list


[RELEASE] Python 3.9.0a3 available for testing

2020-01-25 Thread Łukasz Langa
Go get it here: https://www.python.org/downloads/release/python-390a3/ 

This is an early developer preview of Python 3.9

Python 3.9 is still in development. This releasee, 3.9.0a3 is the third of six 
planned alpha releases. Alpha releases are intended to make it easier to test 
the current state of new features and bug fixes and to test the release 
process. During the alpha phase, features may be added up until the start of 
the beta phase (2020-05-18) and, if necessary, may be modified or deleted up 
until the release candidate phase (2020-08-10). Please keep in mind that this 
is a preview release and its use is not recommended for production environments.

Major new features of the 3.9 series, compared to 3.8

Many new features for Python 3.9 are still being planned and written. Among the 
new major new features and changes so far:

PEP 602 , Python adopts a stable 
annual release cadence
BPO 38379 , garbage collection does not 
block on resurrected objects;
BPO 38692 , os.pidfd_open added that allows 
process management without races and signals;
A number of standard library modules (audioop, ast, grp, _hashlib, pwd, 
_posixsubprocess, random, select, struct, termios, zlib) are now using the 
stable ABI defined by PEP 384 .
(Hey, fellow core developer, if a feature you find important is missing from 
this list, let Łukasz know .)
The next pre-release of Python 3.9 will be 3.9.0a4, currently scheduled for 
2020-02-17.

- Ł


signature.asc
Description: Message signed with OpenPGP
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: tkinter treeview widget - bind doubleclick to items only ? Anyone ?

2020-01-25 Thread R.Wieser
"R.Wieser"  wrote in message 
news:r040ls$fje$1...@gioia.aioe.org...
> Hello all,
>
> I've create a treeview, and would (ofcourse) want to register some 
> mouse-clicking on it, and for that I've found the ".bind()" method.
>
> https://stackoverflow.com/questions/3794268/command-for-clicking-on-the-items-of-a-tkinter-treeview-widget
>
> There is a slight problem with it though: when I click a columns caption 
> (for sorting) the events code also gets fired, which causes problems.
>
> I've found that I can connect mouse-click events to the column captions 
> as shown in the second example here in the "self.tree.heading()" call :
>
> https://stackoverflow.com/questions/5286093/display-listbox-with-columns-using-tkinter
>
> I was wondering if something similar is maybe also available for the items 
> below it ...
>
> If not, how do I ignore mouseclicks that are not done on one of the items 
> ?
>
> Regards,
> Rudy Wieser


-- 
https://mail.python.org/mailman/listinfo/python-list


pyttsx3 installation error

2020-01-25 Thread Mehr Abrar Lak
When I try to import pyytsx3 on python 3.7.3 having latest pip version then
I get error like exit code 1. I couldn't make it to install it I try using
pip install pyttsx3 but it doesn't work for me then I tried it's .whl wheel
file to install but instead fixing the issue am still facing the same one.
It tries to load and download some files but at some point it shows error
the exit status code 1 it is just because of the environment error2
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Threading

2020-01-25 Thread Cameron Simpson

On 24Jan2020 21:08, Dennis Lee Bieber  wrote:

My suggestion for your capacity thing: use a Semaphore, which is a
special thread safe counter which cannot go below zero.

   from threading import Semaphore

   def start_test(sem, args...):
   sem.acquire()
   ... do stuff with args ...
   sem.release()

   sem = Semaphore(10)

   threads = []
   for item in big_list:
   t = Thread(target=start_test, args=(sem, item))
   t.start()
   threads.append(t)
   ... wait for all the threads here ...

This version starts many threads, but only 10 at a time will do "work"
because they stall until they can acquire the Semaphore. The first 10
acquire it immediately, then the later only stall until an earlier
Thread releases the Semaphore.


You are actually proposing to create {200} threads, with related stack
and thread overhead -- and then block all but 10, releasing a blocked
thread only when a previous unblocked thread exits?


Well, yeah, but largely because semaphores are averlooked as a resource 
constraint tool, and because the expression is simple and clear.


I'd much prefer to create only 10 threads with the semaphore control in 
the thread dispatcher, but it was harder to write and be clear in its 
intent. Basic concepts first, superior complication later.


I also was wanting a scheme where the "set it all up" phase could be 
fast (== start alll the threads, wait later) versus process a capacity 
limited queue (takes a long time, stalling the "main" programme). Of 
course one might dispatch a thread to run the queue...


I'm aware this makes a lot of threads and they're not free, that's a 
very valid criticism.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list


Re: pyttsx3 installation error

2020-01-25 Thread Cameron Simpson

On 26Jan2020 00:21, Mehr Abrar Lak  wrote:

When I try to import pyytsx3 on python 3.7.3 having latest pip version then
I get error like exit code 1. I couldn't make it to install it I try using
pip install pyttsx3 but it doesn't work for me then I tried it's .whl wheel
file to install but instead fixing the issue am still facing the same one.
It tries to load and download some files but at some point it shows error
the exit status code 1 it is just because of the environment error2


Please post the full output of running:

   pip install pyttsx3

so that we can see the error messages. Likewise, if the "import pyytsx3" 
statement causes python to emit an error, please post the _full_ 
transcript of the failure. "error like exit code 1" is not sufficiently 
precise.


Note that this is a text only list, so do not attach screenshots; insert 
the error text straight into the message body.


If pip is working but an import fails, make sure the "pip" command 
you're running installs for the python you're using. It is common for 
systems to have both a python2 and python3 installed presently, so there 
is some scope for pip installing into the wrong python.


Cheers,
Cameron Simpson 
--
https://mail.python.org/mailman/listinfo/python-list