Re:

2015-12-31 Thread paul . hermeneutic
Please provide a few more clues about the problem. What is the problem?

On Thu, Dec 31, 2015 at 1:05 PM, ebuka ogbonnaya 
wrote:

> I use window 7 (32-bit). so i dont know what else to do. please i need a
> solution to that
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Stupid Python tricks

2016-01-01 Thread paul . hermeneutic
On Wed, Dec 30, 2015 at 11:09 PM, Steven D'Aprano 
wrote:

> On Thu, 31 Dec 2015 04:02 pm, Rick Johnson wrote:
>
> >> Fifteen years later, and Tim Peters' Stupid Python Trick is still the
> >> undisputed champion!
> >
> > And should we be happy about that revelation, or sad?
>
> Yes!
>
>
Which one, Steve? Happy or sad?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: We will be moving to GitHub

2016-01-01 Thread paul . hermeneutic
Mark, it is good to know that a decision has been made so that we can move
forward.

Is there a summary document that discusses the options examined and why
others did not meet the requirements? I am -NOT- trying to dredge up
arguments about the choice. I am guessing that there have been some.

If this fact-based decision was based solely on the fact that the BDFL
prefers GitHub, please just say so. It is clear that git is a capable tool.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python.Exe Problem

2016-01-01 Thread paul . hermeneutic
Daniel, after the download, please be sure to verify the MD5 checksum to
know that the download is correct.

On Tue, Dec 29, 2015 at 1:44 PM, Terry Reedy  wrote:

> On 12/29/2015 11:24 AM, Daniel Lee wrote:
>
>> Hello,
>>
>> When I try to run python.exe on my computer with Windows 8,
>>
>
> Which exact version?  From what source?  How did you download (from where)
> or compile?  How did you install?  How do you try to run it?
>
> I get the following error:
>>
>> "Python.exe - Entry Point Not Found"
>>
>> "The Procedure entry point ?terminate@@YAXXZ could not be located in the
>> dynamic link library C:\Program Files\Python3.5\python.exe."
>>
>
> Google return 76000 hits for 'terminate@@YAXXZ', so this appears to not
> be a unique issue in some form or another.
>
> What does this error mean and how can I fix it?
>>
>
> It seems like your installed python.exe is corrupt.  Make sure you have a
> final release.  I would re-install, possibly after re-downloading from
> python.org.  If you download from anywhere else, *they* are responsible
> for getting the compile options correct.
>
> --
> Terry Jan Reedy
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Stop writing Python 4 incompatible code

2016-01-16 Thread paul . hermeneutic
On Sat, Jan 16, 2016 at 7:48 AM, Bernardo Sulzbach
 wrote:
> Did people know this back then or it just surfaced years later? I
> suppose that at the beginning MS was more "vulnerable" than it is
> today.

This was either pre- or early days of the Web which provided to some
degree a shroud of secrecy. Companies today just have to work harder
and pay more lawyers to keep their questionable actions from being
known.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Pyton install Landmine

2016-01-16 Thread paul . hermeneutic
On Fri, Jan 15, 2016 at 2:49 PM, JeffP  wrote:
> Hi
> I installed pyth3.5 on my Windows machine and had some complications trying
> to connect other components.
> I installed to the default directory chosen by the installer but that
> included a folder with an embedded space in the name. BIG NO NO

What, exactly, is not connecting? Can you post some source code and
error messages?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: psss...I want to move from Perl to Python

2016-01-28 Thread paul . hermeneutic
On Thu, Jan 28, 2016 at 5:01 PM, Fillmore  wrote:
>
> I learned myself Perl as a scripting language over two decades ago. All
> through this time, I would revert to it from time to time whenever I needed
> some text manipulation and data analysis script.
>
> My problem? maybe I am stupid, but each time I have to go back and re-learn
> the syntax, the gotchas, the references and the derefercing, the different
> syntax between Perl 4 and Perl 5, that messy CPAN in which every author
> seems to have a different ideas of how things should be done

I know what you mean about Perl. I have probably re-learned Perl 12 times.

If you will not need to maintain any existing code, go directly to
Python 3.x. Not every third-party support Python 3 yet, but it is
coming for most. If you can eschew 2.x, then do. Maintaining a source
base targeting both 2.x and 3.x can be done, but it is not always a
simple picture.

Learning a new language at 45 is a great idea. Do it again at 65.
-- 
https://mail.python.org/mailman/listinfo/python-list


Daemon strategy

2016-02-05 Thread paul . hermeneutic
It appears that python-deamon would be exactly what I need. Alas,
appears not to run on Windows. If I am wrong about that, please tell
me.

To what tools should I turn?

I am not eager to produce a "service" on Windows unless it cannot be avoided.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Daemon strategy

2016-02-05 Thread paul . hermeneutic
On Fri, Feb 5, 2016 at 11:52 AM, Ben Finney  wrote:
> paul.hermeneu...@gmail.com writes:
>
>> It appears that python-deamon would be exactly what I need. Alas,
>> appears not to run on Windows. If I am wrong about that, please tell
>> me.
>
> You're correct that ‘python-daemon’ uses Unix facilities to create a
> well-behaved Unix daemon process.
>
> Since MS Windows lacks those facilities, ‘python-daemon’ can't use them.

As you might imagine, I am not always able to specify which OS is
deployed. That does not mean that I am not responsible for getting the
work done. Perhaps you will tell me that what I want is not a daemon.

BTW, I thought that pip would know that python-daemon would not run on
my machine, but it had no complaints installing it. That gave me
unmerited hope.

I want to create a program that will run a list of command lines. Some
of the tasks might take 42 milliseconds, but others might take 4.2
hours. I need to be able to:

- list the tasks currently being run
- kill a task that is currently being run
- list the tasks that are not yet run
- delete a task not yet run from the list
- add tasks to the list

The goal is to load the machine up to a specified percentage of
CPU/memory/io bandwidth. I want to keep the machine loaded up to 90%
of capacity. It is important to monitor more than just CPU utilization
because the machine may already be over-committed on memory while CPU
utilization is low. Adding more processes in such an environment just
makes the system go slower.

I realize that high-end schedulers like IBM/Tivoli, CA7, and BMC might
do things like that. Those are not usually within budget.

Is a daemon what I need? Any other suggestions?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Daemon strategy

2016-02-06 Thread paul . hermeneutic
On Fri, Feb 5, 2016 at 4:10 PM, Ben Finney  wrote:
> paul.hermeneu...@gmail.com writes:
>
>> On Fri, Feb 5, 2016 at 11:52 AM, Ben Finney  
>> wrote:
>> > Since MS Windows lacks those facilities, ‘python-daemon’ can't use
>> > them.
>>
>> As you might imagine, I am not always able to specify which OS is
>> deployed. That does not mean that I am not responsible for getting the
>> work done. Perhaps you will tell me that what I want is not a daemon.
>
> I'm telling you none of those. What I'm telling you is MS Windows does
> not support what is needed to make a Unix daemon.
>
> You may need to re-visit the requirements and negotiate something
> different — a different deployment platform, or something which MS
> Windows can do which is less than a proper Unix daemon.

I fully understand that Windows is not a proper UNIX. It might be that
UNIX is not in each and every aspect a proper Windows.

If it is possible, I would like to create one tool to do this rather
than multiple. Is there anything in Python that would help to
accomplish this goal?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Daemon strategy

2016-02-06 Thread paul . hermeneutic
> As Ben already said .. either deploy to Unix systems or use
> subprocess.Popen and detach the process:
>
> from subprocess import Popenfrom win32process import DETACHED_PROCESS
> Popen(["YOURPROCESS"],creationflags=DETACHED_PROCESS,shell=True)

This sounds promising. What are the common methods to communicate with
the subprocess? I need to query the status and change some settings
for the running process?
-- 
https://mail.python.org/mailman/listinfo/python-list


Simple tkinter query about creating a tk,StringVar() failure

2016-02-06 Thread paul . hermeneutic
I know this may be more suited to the tutor list. I tried to
subscribe, but no response yet.

Why does this interactive instantiation fail when it seems to work
when run in a script?

(py35-64) C:\src\pygui>python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:54:25) [MSC v.1900
64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter as tk
>>> name = tk.StringVar()
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Program Files\Python35\lib\tkinter\__init__.py", line 329,
in __init__
Variable.__init__(self, master, value, name)
  File "C:\Program Files\Python35\lib\tkinter\__init__.py", line 233,
in __init__
self._root = master._root()
AttributeError: 'NoneType' object has no attribute '_root'
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Considering migrating to Python from Visual Basic 6 for engineering applications

2016-02-17 Thread paul . hermeneutic
On Wed, Feb 17, 2016 at 12:49 PM,   wrote:
> Could someone kindly tell me advantages and disadvantages of Python? Or any 
> better options? I have like 40-50 VB Forms and may be around 2 lines of 
> code. It will be a task to learn a new language and translate/re-write that 
> code.

Why are you looking to change from VB? Too slow? Cannot run on
anything but Windows? Buggy?

I, like most people here, would encourage you to learn Python 3.
However, there is something to be said for "if it ain't broke, don't
fix it."
-- 
https://mail.python.org/mailman/listinfo/python-list


Cannot create a virtualenv

2015-09-13 Thread paul . hermeneutic
Installing Py 3.5 and `pip install virtualenv` worked fine. However, I
cannot create a virtualenv.


"OSError: Command C:\ve\ve33\Scripts\python.exe -c "import sys, pip;
sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error
code 1"

Any suggestions?
-- 
https://mail.python.org/mailman/listinfo/python-list


Cannot create a virtualenv

2015-09-14 Thread paul . hermeneutic
- I downloaded and installed Python 3.5 64-bit onto a Windows 7 64-bit machine.
- Using `pip install virtualenv` worked fine.
- Now, it is time to create a virtualenv, but it is not working fine.
- I had to add Python 3.5 to the PATH.
- Any suggestions?

C:\ve>virtualenv -p "\Program Files\Python 3.5\python.exe" ve33
Running virtualenv with interpreter C:\Program Files\Python 3.5\python.exe
Using base prefix 'C:\\Program Files\\Python 3.5'
New python executable in ve33\Scripts\python.exe
Installing setuptools, pip, wheel...
  Complete output from command C:\ve\ve33\Scripts\python.exe -c
"import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip wheel:
  Ignoring indexes: https://pypi.python.org/simple
Collecting setuptools
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  The repository located at None is not a trusted or secure host and
is being ignored. If this repository is available via HTTPS it is
recommended to use HTTPS instead, otherwis
e you may silence this warning and allow it anyways with '--trusted-host None'.
  Could not find a version that satisfies the requirement setuptools
(from versions: )
No matching distribution found for setuptools

...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "c:\program files\python 3.5\lib\site-packages\virtualenv.py",
line 2363, in 
main()
  File "c:\program files\python 3.5\lib\site-packages\virtualenv.py",
line 832, in main
symlink=options.symlink)
  File "c:\program files\python 3.5\lib\site-packages\virtualenv.py",
line 1004, in create_environment
install_wheel(to_install, py_executable, search_dirs)
  File "c:\program files\python 3.5\lib\site-packages\virtualenv.py",
line 969, in install_wheel
'PIP_NO_INDEX': '1'
  File "c:\program files\python 3.5\lib\site-packages\virtualenv.py",
line 910, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command C:\ve\ve33\Scripts\python.exe -c "import sys, pip;
sys...d\"] + sys.argv[1:]))" setuptools pip wheel failed with error
code 1
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Readlines returns non ASCII character

2015-09-23 Thread paul . hermeneutic
 If this starts at the beginning of the file, then it indicates that
the file is UTF-16 (LE).

UTF-8[t 1] EF BB BF   239 187 191
UTF-16 (BE)FE FF  254 255
UTF-16 (LE)FF FE  255 254
UTF-32 (BE)00 00 FE FF0 0 254 255
UTF-32 (LE)FF FE 00 00255 254 0 0
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Readlines returns non ASCII character

2015-09-23 Thread paul . hermeneutic
After looking at this briefly, I am not sure that this is a plain-text
file. Interpreting it as UTF-16 LE shows that the characters are as
they appear.

Immediately after the BOM is:

SINGLE LOW-9 QUOTATION MARK' (U+201A)
START OF HEADING (U+0001)
SPACE (U+0020)
SPACE (U+0020)
LATIN SMALL LETTER Y WITH DIAERESIS (U+00FF)
LATIN SMALL LETTER THORN (U+00FE)
LATIN SMALL LETTER Y WITH DIAERESIS (U+00FF)
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Readlines returns non ASCII character

2015-09-23 Thread paul . hermeneutic
After looking at this briefly, I am not sure that this is a plain-text
file. Interpreting it as UTF-16 LE shows that the characters are as
they appear.

Immediately after the BOM is:

SINGLE LOW-9 QUOTATION MARK' (U+201A)
START OF HEADING (U+0001)
SPACE (U+0020)
SPACE (U+0020)
LATIN SMALL LETTER Y WITH DIAERESIS (U+00FF)
LATIN SMALL LETTER THORN (U+00FE)
LATIN SMALL LETTER Y WITH DIAERESIS (U+00FF)
-- 
https://mail.python.org/mailman/listinfo/python-list


Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread paul . hermeneutic
After a fresh install of Python 2.7 32-bit and 64-bit, upgrading pip
using pip fails. Am I doing this incorrectly? Any suggestions?

C:\Python27-32\Scripts>pip install --upgrade pip
You are using pip version 7.0.1, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip
  Using cached pip-7.1.2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 7.0.1
Uninstalling pip-7.0.1:
  Successfully uninstalled pip-7.0.1
Exception:
Traceback (most recent call last):
  File "C:\Python27-32\lib\site-packages\pip\basecommand.py", line 223, in main
logger.debug('Exception information:', exc_info=True)
  File "C:\Python27-32\lib\site-packages\pip\commands\install.py",
line 297, in run
wb = WheelBuilder(
  File "C:\Python27-32\lib\site-packages\pip\req\req_set.py", line
633, in install
for requirement in to_install:
  File "C:\Python27-32\lib\site-packages\pip\req\req_install.py", line
734, in commit_uninstall

  File "C:\Python27-32\lib\site-packages\pip\req\req_uninstall.py",
line 153, in commit
self.save_dir = None
  File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
line 49, in wrapped_f
return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
line 212, in call
raise attempt.get()
  File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
line 247, in get
six.reraise(self.value[0], self.value[1], self.value[2])
  File "C:\Python27-32\lib\site-packages\pip\_vendor\retrying.py",
line 200, in call
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line
89, in rmtree
shutil.rmtree(dir, ignore_errors=ignore_errors,
  File "C:\Python27-32\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File "C:\Python27-32\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
  File "C:\Python27-32\lib\shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
  File "C:\Python27-32\lib\site-packages\pip\utils\__init__.py", line
101, in rmtree_errorhandler
# use the original function to repeat the operation
WindowsError: [Error 5] Access is denied:
'c:\\users\\pwatson\\appdata\\local\\temp\\pip-4nt07e-uninstall\\python27-32\\scripts\\pip.exe'
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Failed to upgrade pip in fresh 2.7 install

2015-09-26 Thread paul . hermeneutic
Joel, no need for elevated (Administrator) execution. I did need to
follow Zachary's suggestion and it worked well.
-- 
https://mail.python.org/mailman/listinfo/python-list


Interacting with a web site, which lib?

2015-09-27 Thread paul . hermeneutic
Does anyone have an opinion on the relative merits of using the
following packages to interact with web sites?

Mechanize - cannot run under Python 3
Requests
Robobrowser
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [ANN] MicroPython 1.5

2015-11-08 Thread paul . hermeneutic
What is the possibility that MicroPython could be another build from the
base python.org sources? Python already gets built for a variety of
architectures. Could a MicroPython be another one? In that way, it would
always be up to date on language changes.

On Sun, Nov 8, 2015 at 11:28 AM, Paul Rubin  wrote:

> Paul Sokolovsky  writes:
> > Recent 1.5 release is an important milestone for the project, major
> > changes including:
>
> Thanks for posting this.  We don't hear enough about MicroPython on
> this newsgroup so it's good to get these announcements.
>
> Is the language still Python 3.4?  Will it implement 3.5 sometime soon?
>
> > 1. Advanced REPL support with smart auto-indent and auto-completion
>
> Hmm does this make the code footprint significantly bigger?
>
> > 2. Support for client SSL connections.
>
> Nice.  Does it check the server certificate?  Is it based on TLSLite by
> any chance?
>
> > 5. There're now 2 well-supported microcontroller boards for
> > MicroPython, and dozen(s) community-supported ones.
>
> The PyBoard is very nice, but what is the other one?  I don't see
> anything about it on the MicroPython web site.  (Hmm, maybe you mean the
> Micro Bit).
>
> Btw, I notice that the "store" page doesn't show any products under my
> normal adblock settings.  It's probably best to make it a normal page
> instead of an AJAX one.
>
> > MicroPython supports growing subset of Python3 standard library
> > (including simplified asyncio package)
>
> This would look much nicer with the new Python 3.5 syntax.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list