lxml - minor problem appending new element

2020-02-02 Thread Frank Millman
Hi all I usually send lxml queries to the lxml mailing list, but it appears to be not working, so I thought I would try here. This is a minor issue, and I have found an ugly workaround, but I thought I would mention it. In Python I can iterate through a list, and on a certain condition app

The source of the PSL*

2020-02-02 Thread DL Neil via Python-list
Is there a set location for PSL project repos? (it used to be GitHub, and before that, Google) I'd like to review some serious PyTest/Unittest examples, eg as are applied to familiar (Python source) library members... * should be easier to find than was the source of the Nile (by Europeans) --

Re: Please answer fast.....

2020-02-02 Thread Abdur-Rahmaan Janhangeer
CSV as data entry with " " is a pain. > > -- https://mail.python.org/mailman/listinfo/python-list

Re: JavaScript's void operator in Python?

2020-02-02 Thread Jon Ribbens via Python-list
On 2020-02-02, Stefan Ram wrote: > Jon Ribbens writes: >>Why does it matter if the return value is None? > > In a lambda, a return value of None sometimes would be > convenient as by convention it indicates that the return > value does not carry any information and the function is > inten

Re: JavaScript's void operator in Python?

2020-02-02 Thread Jon Ribbens via Python-list
On 2020-02-02, Stefan Ram wrote: > Greg Ewing writes: >>If the functions you're calling all return None, you can >>do this: >> >>> print(2); print(3) > > »print(2); print(3)« is not an expression anymore but an stmt_list. > It cannot be used in all places where an expression is allowed. Why

Re: JavaScript's void operator in Python?

2020-02-02 Thread Greg Ewing
On 3/02/20 3:38 am, Stefan Ram wrote: void( ( print( 2 ), print( 3 ))) If the functions you're calling all return None, you can do this: >>> print(2); print(3) 2 3 -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Please answer fast.....

2020-02-02 Thread DL Neil via Python-list
On 3/02/20 7:05 AM, Abdur-Rahmaan Janhangeer wrote: ... suggest you put names, birthday in csv the load csv for each row: layout.addWidget(QLabel) On Sun, 2 Feb 2020, 21:21 Souvik Dutta, wrote: Because i want to show the name and date of 40 persons and their birthdays. Why csv? Wh

Re: Please answer fast.....

2020-02-02 Thread Abdur-Rahmaan Janhangeer
Ah ok. suggest you put names, birthday in csv the load csv for each row: layout.addWidget(QLabel) On Sun, 2 Feb 2020, 21:21 Souvik Dutta, wrote: > Because i want to show the name and date of 40 persons and their birthdays. > > On Sun, Feb 2, 2020, 10:42 PM Abdur-Rahmaan Janhangeer < > arj

Re: Pyqt5 help

2020-02-02 Thread Alan Gauld via Python-list
On 01/02/2020 12:06, Souvik Dutta wrote: > not happening. Now the no. Of labels depend upon something, so I decided to > use a for loop which is not working. Attaching the code below. Can you help? I just spotted something else odd in your code: def initUi(self): ... self.n = {}

Re: Please answer fast.....

2020-02-02 Thread Abdur-Rahmaan Janhangeer
I'm 100% ready to answer your question, just add some more details like why you need 40 labels. -- https://mail.python.org/mailman/listinfo/python-list

My Python programming book for kids is free for 48 hours

2020-02-02 Thread Kent Tong
Hi, If you're interested, please get it for free at: https://www.amazon.com/Yes-Kids-can-learn-Python-ebook/dp/B084CY2L43/ref=sr_1_3 This is a set of training materials I used to successfully teach Python to kids as little as 10 years old. The online learning environment are freely available at

Re: Pyqt5 help

2020-02-02 Thread Alan Gauld via Python-list
On 01/02/2020 12:06, Souvik Dutta wrote: > I was making a pyqt5 project and I ran into a problem. I want a button in > one window to add a label in another window when clicked upon. But that is > not happening. What is happening? Don't expect us to run your buggy code! > Now the no. Of labels de

Re: JavaScript's void operator in Python?

2020-02-02 Thread Python
Stefan Ram wrote: Jon Ribbens writes: On 2020-02-02, Stefan Ram wrote: void( ( print( 2 ), print( 3 ))) 2 3 I'm not sure why you'd want to - but "None and foo" is an expression that will return None regardless of the value of "foo". Yes, but it also does not evaluate the second operand.

Re: PyQt5 help on buttons and grid layout

2020-02-02 Thread Abdur-Rahmaan Janhangeer
d = {} layout = ... for key in d: layout.addWidget(QButton(...)) On Sun, 2 Feb 2020, 19:59 Souvik Dutta, wrote: > Hi, > I want to add about 40 buttons based upon a dictionary. I want them to be > added to a grid layout. How can I do it easily. Please write the code and > thank you for yo

Re: App made with pyinstaller is not running on another computer.

2020-02-02 Thread Abdur-Rahmaan Janhangeer
recompile with the latest dev versio of pyinstaller, fixed my issue. On Sun, 2 Feb 2020, 19:55 Souvik Dutta, wrote: > Hi, > I made an executable file with pyinstaller on my pc which had python 3.7. > It ran well in my pc but when I tried to run it on my friend computer > having a 32 bit windows

Re: App made with pyinstaller is not running on another computer.

2020-02-02 Thread Chris Angelico
On Mon, Feb 3, 2020 at 2:57 AM Souvik Dutta wrote: > > Hi, > I made an executable file with pyinstaller on my pc which had python 3.7. > It ran well in my pc but when I tried to run it on my friend computer > having a 32 bit windows 10 os it didn't run it is just saying that "this > app cannot be

PyQt5 help on buttons and grid layout

2020-02-02 Thread Souvik Dutta
Hi, I want to add about 40 buttons based upon a dictionary. I want them to be added to a grid layout. How can I do it easily. Please write the code and thank you for your trouble. -- https://mail.python.org/mailman/listinfo/python-list

App made with pyinstaller is not running on another computer.

2020-02-02 Thread Souvik Dutta
Hi, I made an executable file with pyinstaller on my pc which had python 3.7. It ran well in my pc but when I tried to run it on my friend computer having a 32 bit windows 10 os it didn't run it is just saying that "this app cannot be run on your pc". My pc has a 64 bit version of windows 10 and al

Re: JavaScript's void operator in Python?

2020-02-02 Thread Jon Ribbens via Python-list
On 2020-02-02, Stefan Ram wrote: > JavaScript has a void operator that maps everything to > undefined. E.g., > > JavaScript console > >|< void( console.log( 2 ) ) >| 2 >|> undefined > > I can easily write a corresponding function in Python. > > main.py > > def void( x ): > pass > >