Re: a,b = 2,3 and [a,b] = [2,3]

2019-09-02 Thread Alan Bawden
Chris Angelico writes: > On Mon, Sep 2, 2019 at 12:36 PM Alan Bawden wrote: ... > > > > a,b = 2,3 and [a,b] = [2,3] ... > > It looks to me like they generate identical code. The first one calls the > > construction of a tuple, where the second one calls for the construction of > > a list. It w

Re: a,b = 2,3 and [a,b] = [2,3]

2019-09-02 Thread Chris Angelico
On Mon, Sep 2, 2019 at 6:31 PM Alan Bawden wrote: > > Dang! There is exactly the instruction sequence I just argued could be > optimized away still sitting right there. So maybe my belief that this is > being done by peephole optimization is in fact incorrect? So I went and > tried again: > > b

a,b = 2,3 and [a,b] = [2,3]

2019-09-02 Thread Hongyi Zhao
Hi, What's differences: a,b = 2,3 and [a,b] = [2,3] Regards -- https://mail.python.org/mailman/listinfo/python-list

Re: Using exec with embedded python interpreter 3.7

2019-09-02 Thread Eko palypse
Just saw, that I replied to you directly instead to python list, sorry. That did it, changed encoding from function to property and now I'm able to call help(object) Thank you. -- https://mail.python.org/mailman/listinfo/python-list

Re: Using exec with embedded python interpreter 3.7

2019-09-02 Thread Eko palypse
@MRAB, I'm building a notepad++ plugin which can execute the written code and if one writes help(os) it gets executed via exec(editor.getText()) and output redirected to the plugin console window. Sorry to you as well as I have also replied to you directly. Thank you -- https://mail.python.org/mai

Re: a,b = 2,3 and [a,b] = [2,3]

2019-09-02 Thread Eko palypse
Am Montag, 2. September 2019 00:49:05 UTC+2 schrieb Hongyi Zhao: > Hi, > > What's differences: > > a,b = 2,3 and [a,b] = [2,3] > > Regards In this example the result is the same but the second one builds, internally, an additional list, therefore isn't as sufficient as the first one. -- https:

EuroPython 2019: Please send in your feedback

2019-09-02 Thread M.-A. Lemburg
EuroPython 2019 is over now and so it’s time to ask around for what we can improve next year. If you attended EuroPython 2019, please take a few moments and fill in our feedback form, if you haven’t already done so: EuroPython 2019 Feedback Form * https://www.europyth

Re: Need help: integrating unittest with setuptools

2019-09-02 Thread YuXuan Dong
No, it doesn't. The stackoverflow question you posted is about the renaming of `winreg`. `_winreg` is renamed to `winreg`. That's why the poster can't find the module. My program is written for and running on unix-like systems. I think `winreg` should not appear here. I have tried running `pi

Re: Problem while integrating unittest with setuptools

2019-09-02 Thread YuXuan Dong
Thank you. It helps. I have uninstalled `six` using `pip uninstall six` but the problem is still there. As you suggested, I have checked the traceback and found the exception is caused by `/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/test_winreg.py

Hi how do I import files inside a txt file?

2019-09-02 Thread Spencer Du
Hi How do i import files inside a txt file if they exist in the current directory? Here is the current code but I dont know how to do it correctly. import paho.mqtt.client as mqtt from mqtt import * import importlib import os import os.path # from stateMachine import * with open("list_of_device

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread Pankaj Jangid
Spencer Du writes: > How do i import files inside a txt file if they exist in the current > directory? > > Here is the current code but I dont know how to do it correctly. > > import paho.mqtt.client as mqtt > from mqtt import * > import importlib > import os > import os.path > # from stateMachi

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread Spencer Du
On Monday, 2 September 2019 13:36:06 UTC+2, Pankaj Jangid wrote: > Spencer Du writes: > > > How do i import files inside a txt file if they exist in the current > > directory? > > > > Here is the current code but I dont know how to do it correctly. > > > > import paho.mqtt.client as mqtt > > fr

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread Spencer Du
On Monday, 2 September 2019 13:36:06 UTC+2, Pankaj Jangid wrote: > Spencer Du writes: > > > How do i import files inside a txt file if they exist in the current > > directory? > > > > Here is the current code but I dont know how to do it correctly. > > > > import paho.mqtt.client as mqtt > > fr

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread Joel Goldstick
On Mon, Sep 2, 2019 at 8:46 AM Spencer Du wrote: > > On Monday, 2 September 2019 13:36:06 UTC+2, Pankaj Jangid wrote: > > Spencer Du writes: > > > > > How do i import files inside a txt file if they exist in the current > > > directory? > > > > > > Here is the current code but I dont know how t

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread Spencer Du
On Monday, 2 September 2019 15:03:52 UTC+2, Joel Goldstick wrote: > On Mon, Sep 2, 2019 at 8:46 AM Spencer Du wrote: > > > > On Monday, 2 September 2019 13:36:06 UTC+2, Pankaj Jangid wrote: > > > Spencer Du writes: > > > > > > > How do i import files inside a txt file if they exist in the curre

Execute complex shell commands within python and obtain the output.

2019-09-02 Thread Hongyi Zhao
Hi, I try to execute some complex shell commands with in python and obtain the output, I tried the following method: For python 3.x: import subprocess cmd= some_complex_command_with_pipe_and_others ps = subprocess.Popen (cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT) output = p

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread Joel Goldstick
On Mon, Sep 2, 2019 at 9:21 AM Spencer Du wrote: > > On Monday, 2 September 2019 15:03:52 UTC+2, Joel Goldstick wrote: > > On Mon, Sep 2, 2019 at 8:46 AM Spencer Du wrote: > > > > > > On Monday, 2 September 2019 13:36:06 UTC+2, Pankaj Jangid wrote: > > > > Spencer Du writes: > > > > > > > > >

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread Spencer Du
On Monday, 2 September 2019 15:29:07 UTC+2, Joel Goldstick wrote: > On Mon, Sep 2, 2019 at 9:21 AM Spencer Du wrote: > > > > On Monday, 2 September 2019 15:03:52 UTC+2, Joel Goldstick wrote: > > > On Mon, Sep 2, 2019 at 8:46 AM Spencer Du wrote: > > > > > > > > On Monday, 2 September 2019 13:36

Re: Problem while integrating unittest with setuptools

2019-09-02 Thread dieter
YuXuan Dong writes: > I have uninstalled `six` using `pip uninstall six` but the problem is still > there. Your traceback shows that `six` does not cause your problem. It is quite obvious that a `test_winreg` will want to load the `wingreg` module. > As you suggested, I have checked the traceba

Help needed urgently for running some code!!!!

2019-09-02 Thread Spencer Du
Hi I want to execute "from devicesEmbedded import *": in GUI.py after all code in GUI.py is run. Also how do I make the devicesEmbedded.py reload and run when a txt file is created in the name of "list_of_devices.txt" in the GUI.py python program. GUI.py import logging from datetime import

Help needed to run some code!!!!

2019-09-02 Thread Spencer Du
Hi How can I execute "from devicesEmbedded import *" after this: "print("Device added to list")" in GUI.py because currently if I have the import added at the top of GUI.py file it always executes first before the GUI.py file is executed. I want the devicesEmbedded.py to execute after GUI.py ha

Re: Hi how do I import files inside a txt file?

2019-09-02 Thread DL Neil via Python-list
On 3/09/19 1:48 AM, Spencer Du wrote: On Monday, 2 September 2019 15:29:07 UTC+2, Joel Goldstick wrote: On Mon, Sep 2, 2019 at 9:21 AM Spencer Du wrote: On Monday, 2 September 2019 15:03:52 UTC+2, Joel Goldstick wrote: On Mon, Sep 2, 2019 at 8:46 AM Spencer Du wrote: On Monday, 2 Septem

Re: Issue About Install pyinstaller

2019-09-02 Thread Eryk Sun
On 9/1/19, Mehmet Furkan ÇOLAK wrote: > > I did “cmd > pip install pyinstaller > enter” > > from C:\Users\Furkan ÇOLAK\AppData\Local\Programs\Python\Python37-32 > but there isnt Script folder. > > İn cmd I see this kind of ERROR > 'pip' is not recognized as an internal or external command, > opera

Re: "Edit With Python" option missing

2019-09-02 Thread Eryk Sun
On 8/31/19, Akash verma wrote: > "Edit With Python" option missing from message context when right clicked > with mouse . If you mean "Edit with IDLE", this means that you've changed the file association. It's no longer using the default "Python.File" program identifier (progid). Create an empty

Re: Execute complex shell commands within python and obtain the output.

2019-09-02 Thread Cameron Simpson
On 02Sep2019 13:20, Hongyi Zhao wrote: I try to execute some complex shell commands with in python and obtain the output, I tried the following method: For python 3.x: import subprocess cmd= some_complex_command_with_pipe_and_others ps = subprocess.Popen (cmd,shell=True,stdout=subprocess.PIPE,

Re: PYTHON DIDNT DETECTED

2019-09-02 Thread Cameron Simpson
On 31Aug2019 21:30, АРТЁМ БОЗАДЖИ wrote: Traceback (most recent call last): File "", line 1, in NameError: name 'python' is not defined and more  You seem to have left off the command which gave this error message. C:\Users\VeNoMD>python -v [..."python" from your command prompt works...]

Re: Append some stuff into a file with only the last appended line reserved.

2019-09-02 Thread Cameron Simpson
On 01Sep2019 04:13, Hongyi Zhao wrote: I want to append some log of pycurl's downloading info to file, and I only want to reserve the last appended line when write. How to do this? Please describe this in more detail. Present a little pycurl output and then explain what portion of it should

GPG wrapper, ECC 25519 compatible?

2019-09-02 Thread rmlibre
I'm looking for a non-gui GPG wrapper that supports elliptic-curve 25519 for development. The only one's I've seen that support ECC, only support the p-XYZ curves created by NIST. I've tried monkey-patching python-gnupg to add 25519 support, but I can't get my head around that codebase. Or if you h

Re: Execute complex shell commands within python and obtain the output.

2019-09-02 Thread Hongyi Zhao
On Tue, 03 Sep 2019 08:24:17 +1000, Cameron Simpson wrote: > It seems reasonable to me, but I would not use stderr=subprocess.STDOUT. > Why did you do that? The stderr stream pretty much exists to avoid > polluting stdout with error messages. Thanks for your suggestion. > > For really complex s

Re: Problem while integrating unittest with setuptools

2019-09-02 Thread YuXuan Dong
Finally I found why my setup.py dosen't work. I didn't put a `__init__.py` in my `test` folder, thus Python dosen't think it's a package. That's why it found the wrong package. Thank you. On Mon, Sep 02, 2019 at 04:28:50PM +0200, dieter wrote: > YuXuan Dong writes: > > I have uninstalled `six`

Announcing Scm Workbench 0.9.3 for Git, Mercurial and Subversion

2019-09-02 Thread Barry Scott
SCM Workbench features • Support Subversion (svn), Mercurial (hg) and Git projects. • Experimental support for Perforce (P4) • Easy to learn and use • Builtin User Guide describes the operation and features of the application. • Add project wizard can scan

Re: GPG wrapper, ECC 25519 compatible?

2019-09-02 Thread Johannes Bauer
On 03.09.19 05:28, rmli...@riseup.net wrote: > But I just don't understand how to get > and pass information back to the gpg command line prompts at all, not to > mention automating the process. The manpage describes how to enable the machine-parsable interface, which is exactly what you want. Th