Re: IoT automation

2018-01-29 Thread Prahallad Achar via Python-list
Thank you Mr. Marvin

On 29 Jan 2018 12:02 pm, "Dale Marvin via Python-list" <
python-list@python.org> wrote:

> On 1/28/18 7:39 AM, Prahallad Achar wrote:
>
>> Hello team,
>> Could you please help me out in automation of IoT product end to end
>>
>> Regards
>> Prahallad
>>
>>
>  ?
>
> --Dale
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


python not working

2018-01-29 Thread Abbas Hans
it shows thepythonw.exe  system error:
The program can't start because api-ms-win-crt-runtime-|1-1-0.dll  is
missing from your computer. try reinstalling the program to fix this
problem.


I reinstall it many times try to repair it is not working
-- 
https://mail.python.org/mailman/listinfo/python-list


Issues while using CallerLookup Package

2018-01-29 Thread Mark.luther0987 via Python-list
I accessed the CallerLookup package from below link
https://pypi.python.org/pypi/CallerLookup

and faced the following issue-
>>>
RESTART: 
C:\Users\hp\Desktop\CallerLookup-1.2.94\CallerLookup-1.2.94\CallerLookup\Main.py

Traceback (most recent call last):
  File 
"C:\Users\hp\Desktop\CallerLookup-1.2.94\CallerLookup-1.2.94\CallerLookup\Main.py",
 line 6, in 
from CallerLookup.Responses import *
  File "C:\Python27\lib\site-packages\CallerLookup\__init__.py", line 6, in 

from CallerLookup.Main import lookup_number
  File "C:\Python27\lib\site-packages\CallerLookup\Main.py", line 6, in 
from CallerLookup.Responses import *
  File "C:\Python27\lib\site-packages\CallerLookup\Responses.py", line 7, in 

from CallerLookup.Utils.Logs import format_exception
ImportError: No module named Utils.Logs

I tried on python 2.7.14. Please help to resolve this issue.
-- 
https://mail.python.org/mailman/listinfo/python-list


Automation query... Plz help

2018-01-29 Thread Prahallad Achar
Hello friends,

There is an desktop application which runs on Windows and written in java

There is a requirement to automate that application.

Am trying with pyautogui but it is very slow and lengthy code to compete.

Is there a way to run this automation without launching the application
(headless)

Plz help me
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Issues while using CallerLookup Package

2018-01-29 Thread Chris Angelico
On Mon, Jan 29, 2018 at 9:52 PM, Mark.luther0987 via Python-list
 wrote:
> I accessed the CallerLookup package from below link
> https://pypi.python.org/pypi/CallerLookup
>
> and faced the following issue-

> RESTART: 
> C:\Users\hp\Desktop\CallerLookup-1.2.94\CallerLookup-1.2.94\CallerLookup\Main.py
>
> Traceback (most recent call last):
>   File 
> "C:\Users\hp\Desktop\CallerLookup-1.2.94\CallerLookup-1.2.94\CallerLookup\Main.py",
>  line 6, in 
> from CallerLookup.Responses import *
>   File "C:\Python27\lib\site-packages\CallerLookup\__init__.py", line 6, in 
> 
> from CallerLookup.Main import lookup_number
>   File "C:\Python27\lib\site-packages\CallerLookup\Main.py", line 6, in 
> 
> from CallerLookup.Responses import *
>   File "C:\Python27\lib\site-packages\CallerLookup\Responses.py", line 7, in 
> 
> from CallerLookup.Utils.Logs import format_exception
> ImportError: No module named Utils.Logs
>
> I tried on python 2.7.14. Please help to resolve this issue.

Did you follow the installation and usage instructions in the PyPI landing page?

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


Re: Automation query... Plz help

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 16:23:23 +0530, Prahallad Achar wrote:

> Hello friends,
> 
> There is an desktop application which runs on Windows and written in
> java
[...]
> Is there a way to run this automation without launching the application
> (headless)

Is the name of the application a secret?



-- 
Steve

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


Re: Automation query... Plz help

2018-01-29 Thread Prahallad Achar
No.. Not at all.

Its CTP application.. Which is basically transport planner for networks

On 29 Jan 2018 5:38 pm, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:

> On Mon, 29 Jan 2018 16:23:23 +0530, Prahallad Achar wrote:
>
> > Hello friends,
> >
> > There is an desktop application which runs on Windows and written in
> > java
> [...]
> > Is there a way to run this automation without launching the application
> > (headless)
>
> Is the name of the application a secret?
>
>
>
> --
> Steve
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Automation query... Plz help

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 17:50:46 +0530, Prahallad Achar wrote:

> No.. Not at all.
> 
> Its CTP application.. Which is basically transport planner for networks

If you want to know whether CTP can be run headless, you should ask the 
CTP support team or software maintainer, not Python forums.

Do you have a support contract for this software? You could ask the help 
desk.


-- 
Steve

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Jugurtha Hadjar

On 01/28/2018 04:43 PM, Skip Montanaro wrote:

I've never been a Windows user, but at my current job, Windows is core to
just about everything, so I am forced to use it for a lot of stuff
(Outlook, SQL Server, Excel, etc).


I was hired at a startup which made a good impression on me and I was 
eager to start working. I checked in for my first day, signed the 
paperwork, then the CTO showed me around and told me "Here's your 
laptop, you can install Windows and I'll check in with you later". Life 
started draining out of my body and my mind was racing in all directions 
before he even finished his sentence. I felt tricked: I was hired based 
on a test and the file I've received was a *.tar.gz* and it made me 
happy because I assumed they were a NIX shop..


I was considering how I should go about quitting gracefully. I have 
stopped using Windows in 2008 for psychological reasons for it made me 
really anxious, irritable, angry, and tense to the point of abusing 
hardware with low kicks and punches which was not very healthy or sane. 
It was only when I switched OS that this behavior stopped. There was no 
way I would be going back to my bully.


The CTO then said "Sorry.. I meant Ubuntu." and seeing my pale face, he 
said in a reassuring tone "Don't be afraid, there are no Windows 
machines here." which brought me back to life.


I hope to be as brave as you some day.

--
~ Jugurtha Hadjar,

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread alister via Python-list
On Sun, 28 Jan 2018 22:11:12 +, Stefan Ram wrote:

> Tim Delaney  writes:
>>These are support people who are employed by the company I'm contracted
>>to.
>>Doesn't matter how often I try to train them otherwise, this type of
>>thing keeps happening.
> 
>   That might be more a problem of power.

I would simply repeatedly reject the fault report until the user provided 
the information in the requested format




-- 
Work smarter, not harder, and be careful of your speling.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread alister via Python-list
On Mon, 29 Jan 2018 15:20:06 +0100, Jugurtha Hadjar wrote:

> On 01/28/2018 04:43 PM, Skip Montanaro wrote:
>> I've never been a Windows user, but at my current job, Windows is core
>> to just about everything, so I am forced to use it for a lot of stuff
>> (Outlook, SQL Server, Excel, etc).
> 
> I was hired at a startup which made a good impression on me and I was
> eager to start working. I checked in for my first day, signed the
> paperwork, then the CTO showed me around and told me "Here's your
> laptop, you can install Windows and I'll check in with you later". Life
> started draining out of my body and my mind was racing in all directions
> before he even finished his sentence. I felt tricked: I was hired based
> on a test and the file I've received was a *.tar.gz* and it made me
> happy because I assumed they were a NIX shop..
> 
> I was considering how I should go about quitting gracefully. I have
> stopped using Windows in 2008 for psychological reasons for it made me
> really anxious, irritable, angry, and tense to the point of abusing
> hardware with low kicks and punches which was not very healthy or sane.
> It was only when I switched OS that this behavior stopped. There was no
> way I would be going back to my bully.
> 
> The CTO then said "Sorry.. I meant Ubuntu." and seeing my pale face, he
> said in a reassuring tone "Don't be afraid, there are no Windows
> machines here." which brought me back to life.
> 
> I hope to be as brave as you some day.

Any Vacancies
whatever they do I am sure I can learn :-)



-- 
The ideas of economists and political philosophers, both when they
are right and when they are wrong, are more powerful than is generally
understood.  Indeed, the world is ruled by little else.
-- John Maynard Keyes
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread alister via Python-list
On Mon, 29 Jan 2018 12:17:39 +1300, Gregory Ewing wrote:

> Steven D'Aprano wrote:
>> (The day a programmer posts a WAV file of themselves reading their code
>> out aloud, is the day I turn my modem off and leave the internet
>> forever.)
> 
> Shh! Don't give them ideas!

just wait, once they realise you cant send pictures to a text only news 
group they take the screen shot, print it place it on a wooden table*, 
photograph it & then convert the JPeg to base64 encoding so they can 
paste it in!


* credit to thedailywtf.com


-- 
You look tired.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Rhodri James

On 29/01/18 04:29, Dan Stromberg wrote:

On Sun, Jan 28, 2018 at 8:24 PM, Dan Stromberg  wrote:

If an NN can ... play go on a level that can beat the best human in the
world


Correcting myself: I think Google's AlphaGo used more than one NN,
plus perhaps a little traditional reading algorithm.  So I probably
should have said "If NN's can ...".


No, you should have said "If NNs can..." without the grocer's apostrophe :-)

(Well, it seems to be that sort of thread.)

--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Re: python not working

2018-01-29 Thread Dan Stromberg
Please google for "pythonw.exe  system error:
The program can't start because api-ms-win-crt-runtime-|1-1-0.dll  is
missing from your computer. try reinstalling the program to fix this
problem.".

I believe the Windows binaries for Python are built with a proprietary
compiler that requires a separate download.


On Sun, Jan 28, 2018 at 11:07 PM, Abbas Hans  wrote:
> it shows thepythonw.exe  system error:
> The program can't start because api-ms-win-crt-runtime-|1-1-0.dll  is
> missing from your computer. try reinstalling the program to fix this
> problem.
>
>
> I reinstall it many times try to repair it is not working
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Hello *,

because I am runing into problems with SOME python based programs, I the
this as opportunity to learn python (after ASM, C,  BaSH,  CP/M,  COBOL,
JS, PHP and perl).


OK, I tried to install "blueman" (Bluetooth Manager) on  my  Debian  9.2
(Stretch system and discovered a problem:

[ c 'blueman-applet' ]--
Traceback (most recent call last):
  File "./blueman-applet", line 15, in 
from blueman.Functions import create_logger, create_parser,
set_proc_title
ImportError: No module named 'blueman'


So ist does not find the module and this are the fist 16  lines  of  the
python script:

[ '/usr/bin/blueman-applet' ]---
#!/usr/bin/env python3
# coding=utf-8

import sys
import os
import signal
import logging

# support running uninstalled
_dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if 'BLUEMAN_SOURCE' in os.environ:
sys.path = [_dirname, os.path.join(_dirname, 'module', '.libs')] +
sys.path
os.environ["GSETTINGS_SCHEMA_DIR"] = os.path.join(_dirname, "data")

from blueman.Functions import create_logger, create_parser, set_proc_title
from blueman.main.Applet import BluemanApplet


I think, that I have found the error here:

sys.path = [_dirname, os.path.join(_dirname, 'module', '.libs')] + sys.path

because there is written in

[ '/usr/lib/python-3.5/os.py' ]-
To get a full path (which begins with top) to a file or directory in
dirpath, do os.path.join(dirpath, name).


Hence, os.path.join() has only 2 parameters and not 3.

The module "blueman" is a subdirectory and the full path is

/usr/lib/python-3.5/site-packages/blueman

So, how can I correct this problem?

And then here is anoter thing which I do not understand becasue I have
not found it in the Tutorial:

What do the [ ... ] mean or what function is it?

Thanks in avance

-- 
Michelle KonzackMiila ITSystems @ TDnet
GNU/Linux Developer 00372-54541400

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


Re: Automation query... Plz help

2018-01-29 Thread Prahallad Achar
Thanks for the kind response.
Sure.. Definitely I shall ask development team for the same.

Regards
Prahallad

On 29 Jan 2018 7:48 pm, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:

> On Mon, 29 Jan 2018 17:50:46 +0530, Prahallad Achar wrote:
>
> > No.. Not at all.
> >
> > Its CTP application.. Which is basically transport planner for networks
>
> If you want to know whether CTP can be run headless, you should ask the
> CTP support team or software maintainer, not Python forums.
>
> Do you have a support contract for this software? You could ask the help
> desk.
>
>
> --
> Steve
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Peter Pearson
On Sun, 28 Jan 2018 20:24:55 -0800, Dan Stromberg  wrote:
[snip]
>
> Is it really true that OCR appeared long before Neural Networks
> (NN's)?  I first heard of NN's in the 80's, but OCR more like the
> 90's.

In 1964, the IBM exhibit at the World's Fair in New York demonstrated
a system that read dates that visitors wrote by hand.  (You were
supposed to write your date of birth, and the system then printed
the New York Times's headline for that date.)

-- 
To email me, substitute nowhere->runbox, invalid->com.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread John Gordon
In  Steven D'Aprano 
 writes:

> I'm seeing this annoying practice more and more often. Even for trivial 
> pieces of text, a few lines, people post screenshots instead of copying 
> the code.

In some (perhaps rare) cases, a screenshot can provide useful independent
verification.

Such a screenshot recently helped me diagnose an issue in a stackoverflow
post.  A user was having trouble with some code that opens a file, and he
posted a screenshot of the code and a screenshot of a Windows File Explorer
window containing the desired file.  The File Explorer screenshot clearly
contained the desired file (named input.txt), and he was mystified as to
why the code was claiming the file did not exist.

The displayed filename in File Explorer was input.txt -- meaning that the
real filename was actually input.txt.txt, because File Explorer shows file
extensions as a separate column.

Without this screenshot, we would have had only the user's (incorrect)
assertion that the file existed, and no way to diagnose the true issue.

Granted, this was an environment issue and not a code issue, but I can
imagine situations where the same sort of thing could apply to code.

-- 
John Gordon   A is for Amy, who fell down the stairs
gor...@panix.com  B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

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


Re: New to Python and understanding problem

2018-01-29 Thread Dan Stromberg
On Mon, Jan 29, 2018 at 9:01 AM, Michelle Konzack
 wrote:
> OK, I tried to install "blueman" (Bluetooth Manager) on  my  Debian  9.2
> (Stretch system and discovered a problem:
>
> [ c 'blueman-applet' ]--
> Traceback (most recent call last):
>   File "./blueman-applet", line 15, in 
> from blueman.Functions import create_logger, create_parser,
> set_proc_title
> ImportError: No module named 'blueman'
> 

I don't see blueman on pypi, so this is probably part of the package
you downloaded, and not something you need to "pip3 install".

Sometimes this sort of problem surfaces when someone tries to run a
package with a different python than the python the package is
installed into.  Do you have more than one python on your machine?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: New to Python and understanding problem

2018-01-29 Thread MRAB

On 2018-01-29 17:01, Michelle Konzack wrote:
[snip]


I think, that I have found the error here:

sys.path = [_dirname, os.path.join(_dirname, 'module', '.libs')] + sys.path

because there is written in

[ '/usr/lib/python-3.5/os.py' ]-
To get a full path (which begins with top) to a file or directory in
dirpath, do os.path.join(dirpath, name).


Hence, os.path.join() has only 2 parameters and not 3.


os.path.join() will accept any number of parameters, except zero.

[snip]
--
https://mail.python.org/mailman/listinfo/python-list


Re: New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Hello Dan,

Am 2018-01-29 hackte Dan Stromberg in die Tasten:
> I don't see blueman on pypi, so this is probably part of the package
> you downloaded, and not something you need to "pip3 install".

I have Python 2.7 and 3.5 from the Debian GNU/Linux repository installed
I use the Stable (Stretch) version.

Installing blueman 2.0.4 (for Python 2.7) ended with a SEGFAULT.
Hence I downloaded the sources 2.1~alpha2 from the Experimantal Mirror,
comiled and packed it as Backport.

Anything went fine, except, if I execute /usr/bin/blueman-applet it
does not find the path to blueman which is in

/usr/lib/python-3.5/site-packages

as subdirectory "bluman".  OK, I can hardcode this pig for myself,
but I would prefer to make it the correct way and submit a
bugreport with patch.

> Sometimes this sort of problem surfaces when someone tries to run a
> package with a different python than the python the package is
> installed into.  Do you have more than one python on your machine?

2.7 and 3.5

But since the Python script /usr/bin/blueman-applet has the shebang

#!/usr/bin/env python3

The module path should be ok.


Thanks in avance

-- 
Michelle KonzackMiila ITSystems @ TDnet
GNU/Linux Developer 00372-54541400

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


Re: New to Python and understanding problem

2018-01-29 Thread Peter Otten
Michelle Konzack wrote:

> Hello *,
> 
> because I am runing into problems with SOME python based programs, I the
> this as opportunity to learn python (after ASM, C,  BaSH,  CP/M,  COBOL,
> JS, PHP and perl).
> 
> 
> OK, I tried to install "blueman" (Bluetooth Manager) on  my  Debian  9.2
> (Stretch system and discovered a problem:
> 
> [ c 'blueman-applet' ]--
> Traceback (most recent call last):
>   File "./blueman-applet", line 15, in 
> from blueman.Functions import create_logger, create_parser,
> set_proc_title
> ImportError: No module named 'blueman'
> 
> 
> So ist does not find the module and this are the fist 16  lines  of  the
> python script:
> 
> [ '/usr/bin/blueman-applet' ]---
> #!/usr/bin/env python3
> # coding=utf-8
> 
> import sys
> import os
> import signal
> import logging
> 
> # support running uninstalled
> _dirname = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
> if 'BLUEMAN_SOURCE' in os.environ:
> sys.path = [_dirname, os.path.join(_dirname, 'module', '.libs')] +
> sys.path
> os.environ["GSETTINGS_SCHEMA_DIR"] = os.path.join(_dirname, "data")
> 
> from blueman.Functions import create_logger, create_parser, set_proc_title
> from blueman.main.Applet import BluemanApplet
> 
> 
> I think, that I have found the error here:
> 
> sys.path = [_dirname, os.path.join(_dirname, 'module', '.libs')] +
> sys.path
> 
> because there is written in
> 
> [ '/usr/lib/python-3.5/os.py' ]-
> To get a full path (which begins with top) to a file or directory in
> dirpath, do os.path.join(dirpath, name).
> 
> 
> Hence, os.path.join() has only 2 parameters and not 3.

os.path.join() accepts one or more parameters as you can verify in the 
interactive interpreter:

$ python3
Python 3.4.3 (default, Nov 28 2017, 16:41:13) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.join()
Traceback (most recent call last):
  File "", line 1, in 
TypeError: join() missing 1 required positional argument: 'a'
>>> os.path.join("foo")
'foo'
>>> os.path.join("foo", "bar")
'foo/bar'
>>> os.path.join("foo", "bar", "baz")
'foo/bar/baz'

> 
> The module "blueman" is a subdirectory and the full path is
> 
> /usr/lib/python-3.5/site-packages/blueman
> 
> So, how can I correct this problem?

Random idea: Did you set the BLUEMAN_SOURCE environment variable? If so, try 
to unset it. If that doesn't help insert the line

print(sys.path)

into the blueman-applet script right after the line 

import sys

This should print a list of paths that Python searches for modules. Does 
this list contain the 

/usr/lib/python-3.5/site-packages

directory? If it doesn't, what's actually in that list? 

> And then here is anoter thing which I do not understand becasue I have
> not found it in the Tutorial:
> 
> What do the [ ... ] mean or what function is it?

If it occurs in Python source code it is a list literal

>>> a = [1, 10, 100]
>>> type(a)


or a list comprehension

>>> b = [x*x for x in a]
>>> b
[1, 100, 1]

Both should be mentioned in every Python tutorial.

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread John Ladasky
On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:
>
> (The day a programmer posts a WAV file of themselves reading their code 
> out aloud, is the day I turn my modem off and leave the internet forever.)

What's a... modem?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Chris Angelico
On Tue, Jan 30, 2018 at 6:43 AM, John Ladasky
 wrote:
> On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:
>>
>> (The day a programmer posts a WAV file of themselves reading their code
>> out aloud, is the day I turn my modem off and leave the internet forever.)
>
> What's a... modem?

A device for turning good code into line noise.

Synonym: maintenance-programmer.

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread eryk sun
On Mon, Jan 29, 2018 at 5:34 PM, John Gordon  wrote:
>
> The displayed filename in File Explorer was input.txt -- meaning that the
> real filename was actually input.txt.txt, because File Explorer shows file
> extensions as a separate column.

One of the first things I do after creating an account is to modify
Explorer to show all files and not hide extensions. Windows 10 makes
this more discoverable. In the settings page that enables developer
mode, you can configure the system to show file extensions, hidden and
system files, empty drives, the full path in Explorer's title bar, and
the start-menu option to run a program as a different user.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread eryk sun
On Mon, Jan 29, 2018 at 7:43 PM, John Ladasky
 wrote:
> On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:
>>
>> (The day a programmer posts a WAV file of themselves reading their code
>> out aloud, is the day I turn my modem off and leave the internet forever.)
>
> What's a... modem?

A modem is a MOulator-DEMmodulator. The idea is to transmit a baseband
signal by modulating the amplitude, frequency, or phase of a carrier
signal. At the receiving end, the signal is demodulated back to
baseband. It's a common technique in communication systems (e.g. DSL,
cable, wireless modems -- even optical modems). In popular culture,
people tend to think of telephone-system modems that were common in
the 1980s and 90s.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread D'Arcy Cain
On 01/29/2018 01:43 PM, John Ladasky wrote:
> On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:
>>
>> (The day a programmer posts a WAV file of themselves reading their code 
>> out aloud, is the day I turn my modem off and leave the internet forever.)
> 
> What's a... modem?

That would be a MOdulator-DEModulator device.  It's what you plug your
DSL phone line or cable coax into.  At one time it simply plugged into a
regular phone line but there aren't many of those around any more.

You may be connecting directly to a provider's Wifi AP but 90% of the
people still use modems.  And even if you connect directly to an AP that
device still needs to talk to a modem so you are still connected to a
modem at some point.

Modems are still around.  They have simply evolved from the 300 baud
acoustic coupler.

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python not working

2018-01-29 Thread Terry Reedy

On 1/29/2018 10:35 AM, Dan Stromberg wrote:

Please google for "pythonw.exe  system error:
The program can't start because api-ms-win-crt-runtime-|1-1-0.dll  is
missing from your computer. try reinstalling the program to fix this
problem.".

I believe the Windows binaries for Python are built with a proprietary
compiler that requires a separate download.


They are build with the standard VS2017 compiler.  The new .dll is an 
update for pre-Win10 and probably early Win10, but some people block 
updates and don't manually request needed one's like this.


--
Terry Jan Reedy

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Michelle Konzack
Am 2018-01-29 hackte John Ladasky in die Tasten:
> On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:
>>
>> (The day a programmer posts a WAV file of themselves reading their code
>> out aloud, is the day I turn my modem off and leave the internet
>> forever.)
>
> What's a... modem?

Something I have in my ThinkPad T400 and let me access
my Homenetwork without going over the Internet...

Hehehe, ThinkPads are the more advanced Laptops...
PS/2 Mouse/Keyboard, LPT with Centronics Cabel, ...
All with a Dualcore 2,27GHz and 4 GByte of memory (8 GByte
upgrade in sight) because of memory hungry Debian Stretch!

Oh, I can even exchange my DVD-RW against a second HDD on
the fly without shuting down the Laptop...

ROTFL!

All for only 114€ on german eBay.

Thanks in avance

-- 
Michelle KonzackMiila ITSystems @ TDnet
GNU/Linux Developer 00372-54541400

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Grant Edwards
On 2018-01-29, D'Arcy Cain  wrote:

> Modems are still around.  They have simply evolved from the 300 baud
> acoustic coupler.

Those did _not_ work well with "trimline" style phones, but you could
get by if you wrapped it in a couple towels, stuffed it in a small
cooler, and kept the TV volume low.  Really.

-- 
Grant Edwards   grant.b.edwardsYow! The FALAFEL SANDWICH
  at   lands on my HEAD and I
  gmail.combecome a VEGETARIAN ...

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 11:43:36 -0800, John Ladasky wrote:

> On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:
>>
>> (The day a programmer posts a WAV file of themselves reading their code
>> out aloud, is the day I turn my modem off and leave the internet
>> forever.)
> 
> What's a... modem?


Its the component of the router that actually handles the 
telecommunications side of things. Legend has it that once upon a time 
they were a stand alone device.


-- 
Steve

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


String matching based on sound?

2018-01-29 Thread Israel Brewster
I am working on a python program that, at one step, takes an input (string), 
and matches it to songs/artists in a users library. I'm having some difficulty, 
however, figuring out how to match when the input/library contains 
numbers/special characters. For example, take the group "All-4-One". In my 
library it might be listed exactly like that. I need to match this to ANY of 
the following inputs:

• all-4-one (of course)
• all 4 one (no dashes)
• all 4 1 (all numbers)
• all four one (all spelled out)
• all for one

Or, really, any other combination that sounds the same. The reasoning for this 
is that the input comes from a speech recognition system, so the user speaking, 
for example, "4", could be recognized as "for", "four" or "4". I'd imagine that 
Alexa/Siri/Google all do things like this (since you can ask them to play 
songs/artists), but I want to implement this in Python.

In initial searching, I did find the "fuzzy" library, which at first glance 
appeared to be what I was looking for, but it, apparently, ignores numbers, 
with the result that "all 4 one" gave the same output as "all in", but NOT the 
same output as "all 4 1" - even though "all 4 1" sounds EXACTLY the same, while 
"all in" is only similar if you ignore the 4.

So is there something similar that works with strings containing numbers? And 
that would only give me a match if the two strings sound identical? That is, 
even ignoring the numbers, I should NOT get a match between "all one" and "all 
in" - they are similar, but not identical, while "all one" and "all 1" would be 
identical.





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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 17:34:34 +, John Gordon wrote:

[...]
> The displayed filename in File Explorer was input.txt -- meaning that
> the real filename was actually input.txt.txt, because File Explorer
> shows file extensions as a separate column.
> 
> Without this screenshot, we would have had only the user's (incorrect)
> assertion that the file existed, and no way to diagnose the true issue.

No way to diagnose it -- apart from asking the programmer to run the DOS 
command `dir` in the directory and copy and paste the file listing.

Or os.listdir() in Python.


> Granted, this was an environment issue and not a code issue, but I can
> imagine situations where the same sort of thing could apply to code.

The only time a programmer MUST include a screen shot is when they are 
trying to diagnose a problem with graphical output that can't easily and 
accurately be described in words. And that's a screen shot of the 
*output*, not the code.

It MAY be useful to include a screen shot of system crashes where the 
error message is impossible to copy and too long and complex to 
transcribe.

Or possibly when trying to ask for help with your GUI IDE or editor, 
although even then most questions can be described in words.

So I don't quite rule out the possibility of programmers needing to take 
screen shots at all. I'm not a troglodyte :-)

But what I do rule out is the necessity and usefulness of programmers 
taking screen shots of their *code* to ask for help with program logic or 
solving errors (with the very rare possible exception of especially 
difficult to solve syntax errors).


-- 
Steve

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


Re: String matching based on sound?

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 13:28:32 -0900, Israel Brewster wrote:

> In initial searching, I did find the "fuzzy" library, which at first
> glance appeared to be what I was looking for, but it, apparently,
> ignores numbers, with the result that "all 4 one" gave the same output
> as "all in", but NOT the same output as "all 4 1" - even though "all 4
> 1" sounds EXACTLY the same, while "all in" is only similar if you ignore
> the 4.

Before passing the string to the fuzzy matcher, do a simple text 
replacement of numbers to their spelled out version: "4" -> "four".

You may want to do other text replacements too, based on sound or visual 
design, for example to deal with Kei$ha a.k.a. Keisha, etc.


-- 
Steve

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Ethan Furman

On 01/29/2018 02:41 PM, Steven D'Aprano wrote:

On Mon, 29 Jan 2018 11:43:36 -0800, John Ladasky wrote:

On Sunday, January 28, 2018 at 7:07:11 AM UTC-8, Steven D'Aprano wrote:



(The day a programmer posts a WAV file of themselves reading their code
out aloud, is the day I turn my modem off and leave the internet
forever.)


What's a... modem?


Its the component of the router that actually handles the
telecommunications side of things. Legend has it that once upon a time
they were a stand alone device.


Mine was never stand-alone.  I always had to prop it up with some books.

--
~Ethan~

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Abdur-Rahmaan Janhangeer
well maybe screenshot of shell sessions to show varying formatted test
cases might be valid (like the increasingly popular practise of coding py
on android)

also, sreenshot sources tend to be syntax colored which might be easier to
read.

overall it is a bad idea as you won't have the full code if the code is
long unless you are on android with the scroll screenshot option.

ease of access is the culprit !

Abdur-Rahmaan Janhangeer
https://abdurrahmaanjanhangeer.wordpress.com

On 28 Jan 2018 19:08, "Steven D'Aprano" <
steve+comp.lang.pyt...@pearwood.info> wrote:

> I'm seeing this annoying practice more and more often. Even for trivial
> pieces of text, a few lines, people post screenshots instead of copying
> the code.
>
> Where has this meme come from? It seems to be one which inconveniences
> *everyone* involved:
>
> - for the sender, instead of a simple copy and paste, they have to take a
> screen shot, possibly trim the image to remove any bits of the screen
> they don't want to show, attach it to their email or upload it to an
> image hosting site;
>
> - for the receiver, you are reliant on a forum which doesn't strip
> attachments, or displays externally hosted images; the visually impaired
> are excluded from using a screen reader; and nobody can copy or edit the
> given text.
>
> It is as if people are deliberately inconveniencing themselves in order
> to inconvenience the people they are asking to help them.
>
> With the exception of one *exceedingly* overrated advantage, namely the
> ability to annotate the image with coloured lines and circles and
> squiggles or other graphics (which most people don't bother to do), this
> seems to me to be 100% counter-productive for everyone involved. Why has
> it spread and why do people keep doing it?
>
> I don't want to be the old man yelling "Get Of My Lawn!" to the cool
> kids, but is this just another sign of the downward spiral of programming
> talent? Convince me that there is *some* justification for this practice.
> Even a tiny one.
>
> (The day a programmer posts a WAV file of themselves reading their code
> out aloud, is the day I turn my modem off and leave the internet forever.)
>
>
>
> --
> Steve
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Chris Angelico
On Tue, Jan 30, 2018 at 11:40 AM, Abdur-Rahmaan Janhangeer
 wrote:
> well maybe screenshot of shell sessions to show varying formatted test
> cases might be valid (like the increasingly popular practise of coding py
> on android)

Maybe, but that isn't code.

> also, sreenshot sources tend to be syntax colored which might be easier to
> read.

No. The syntax highlighting comes from the code, so I should be able
to paste your code into my editor and see it in colour. No benefit to
seeing it in YOUR colours, which may not be helpful to me.

> ease of access is the culprit !

I find that hard to believe... you're saying it's actually easier to
screenshot a text editor than to copy and paste?

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Abdur-Rahmaan Janhangeer
XD since we were elaborating on the reasons why users use screenshot, well
i was elaborating why users use screenshot, not me. those are some reasons
i came across being admin in some whatsapp groups and python lists (where
the user complains of his attachments not showing).


Garanti
sans virus. www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Tue, Jan 30, 2018 at 5:13 AM, Chris Angelico  wrote:

> On Tue, Jan 30, 2018 at 11:40 AM, Abdur-Rahmaan Janhangeer
>  wrote:
> > well maybe screenshot of shell sessions to show varying formatted test
> > cases might be valid (like the increasingly popular practise of coding py
> > on android)
>
> Maybe, but that isn't code.
>
> > also, sreenshot sources tend to be syntax colored which might be easier
> to
> > read.
>
> No. The syntax highlighting comes from the code, so I should be able
> to paste your code into my editor and see it in colour. No benefit to
> seeing it in YOUR colours, which may not be helpful to me.
>
> > ease of access is the culprit !
>
> I find that hard to believe... you're saying it's actually easier to
> screenshot a text editor than to copy and paste?
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Variable scope in nested functions

2018-01-29 Thread Prahallad Achar
def a() :
Print (value)
def b() :
 Value = 100
Return b

Its a nested function.  How can I use variable value just one function
above the parent function.
This is possible in tcl.. Is it possible in Python too?
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Variable scope in nested functions

2018-01-29 Thread Chris Angelico
On Tue, Jan 30, 2018 at 1:48 PM, Prahallad Achar  wrote:
> def a() :
> Print (value)
> def b() :
>  Value = 100
> Return b
>
> Its a nested function.  How can I use variable value just one function
> above the parent function.
> This is possible in tcl.. Is it possible in Python too?

It is. What you have is a "nonlocal" variable. You will need to assign
to the variable in the outer function though.

def a():
value = None
def b():
nonlocal value
value = 100
return b

You can do this through any number of levels of nested functions.

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Chris Angelico
On Tue, Jan 30, 2018 at 12:56 PM, Abdur-Rahmaan Janhangeer
 wrote:
>
> XD since we were elaborating on the reasons why users use screenshot, well i 
> was elaborating why users use screenshot, not me. those are some reasons i 
> came across being admin in some whatsapp groups and python lists (where the 
> user complains of his attachments not showing).
>

Sorry, I was using the generic "you", rather than pointing the finger
specifically at you. That was a bit unclear in my post - mea culpa.

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


Re: Variable scope in nested functions

2018-01-29 Thread Prahallad Achar
Thanks Chris,
Without using nonlocal any other options available?

On 30 Jan 2018 8:30 am, "Chris Angelico"  wrote:

> On Tue, Jan 30, 2018 at 1:48 PM, Prahallad Achar 
> wrote:
> > def a() :
> > Print (value)
> > def b() :
> >  Value = 100
> > Return b
> >
> > Its a nested function.  How can I use variable value just one function
> > above the parent function.
> > This is possible in tcl.. Is it possible in Python too?
>
> It is. What you have is a "nonlocal" variable. You will need to assign
> to the variable in the outer function though.
>
> def a():
> value = None
> def b():
> nonlocal value
> value = 100
> return b
>
> You can do this through any number of levels of nested functions.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Rustom Mody
On Sunday, January 28, 2018 at 8:37:11 PM UTC+5:30, Steven D'Aprano wrote:
> I'm seeing this annoying practice more and more often. Even for trivial 
> pieces of text, a few lines, people post screenshots instead of copying 
> the code.
> 
> Where has this meme come from? It seems to be one which inconveniences 
> *everyone* involved:

Have you heard of the “Dutch Reach¨?
http://www.telegraph.co.uk/travel/news/the-dutch-reach-how-opening-car-door-like-the-dutch-could-save-lives-cycling/

Presumably it goes beyond the 'inconvenience' of images-instead-of-text to the
saving-of-lives…
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: New to Python and understanding problem

2018-01-29 Thread careenjoseph36
One contributing factor to this problem is the artificial environment that 
online courses provide to students. Students are usually typing code into a web 
page that contains instructions and hints. This is not how real programming 
gets done. So when the course is over and it’s time to use a real programming 
environment, students feel lost without the environment that they are 
accustomed to.
https://www.besanttechnologies.com/training-courses/salesforce-training-institute-in-chennai
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: New to Python and understanding problem

2018-01-29 Thread Michelle Konzack
Good morning,

Am 2018-01-30 hackte careenjosep...@gmail.com in die Tasten:
> One contributing factor to this problem is the artificial environment that
> online courses provide to students. Students are usually typing code into
> a web page that contains instructions and hints. This is not how real
> programming gets done. So when the course is over and it’s time to use a
> real programming environment, students feel lost without the environment
> that they are accustomed to.

I started coding in 1984 with ASM on a 8049 Microcontroller and since
then, I was always looking into other sourcecodes to understand how
something is working.

I have no clue about Python, but I feel very well/comfortable with it. I
think, it is not very complicate to learn, because python is very logic
structured.

This is why I just go the idea of bug-hunting in the blueman app.

Thanks in avance

-- 
Michelle KonzackMiila ITSystems @ TDnet
GNU/Linux Developer 00372-54541400

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


Re: Where has the practice of sending screen shots as source code come from?

2018-01-29 Thread Steven D'Aprano
On Mon, 29 Jan 2018 21:32:11 -0800, Rustom Mody wrote:

> On Sunday, January 28, 2018 at 8:37:11 PM UTC+5:30, Steven D'Aprano
> wrote:
>> I'm seeing this annoying practice more and more often. Even for trivial
>> pieces of text, a few lines, people post screenshots instead of copying
>> the code.
>> 
>> Where has this meme come from? It seems to be one which inconveniences
>> *everyone* involved:
> 
> Have you heard of the “Dutch Reach¨?
> http://www.telegraph.co.uk/travel/news/the-dutch-reach-how-opening-car-
door-like-the-dutch-could-save-lives-cycling/

Ah, yes, the Dutch Reach. That would be like the French Pox (which isn't 
French), the Spanish Flu (that didn't start in Spain), the Jerusalem 
artichoke (which is neither an artichoke nor from Jerusalem), and the 
turkey (the bird, which has nothing to do with Turkey, the country).

This technique is neither taught nor commonly used used by the Dutch: 
apparently some Americans decided that because the Netherlands has a lot 
of cyclists, they'll say its Dutch.

https://en.wikipedia.org/wiki/Dooring

So let me see if I understand the logic... 

Rather than teach people to *explicitly* check their mirror to make sure 
it is safe before opening the car door, teach them a difficult, awkward 
maneuver which they're guaranteed to stop using the second the driving 
test is over, that merely points their head more-or-less vaguely in the 
right direction to *maybe* notice on-coming cyclists *if and only if* 
they're actually paying attention.

I can see this falls under the problem solving technique, "We must do 
something, this is something, therefore we must do it!"

The sorts of people who can't remember to check their mirror before 
opening the car door aren't the sort who will remember to use this 
awkward technique. And for those who can remember to do so, it is simpler 
and more effective to explicitly check your mirror (as the Dutch actually 
do).


> Presumably it goes beyond the 'inconvenience' of images-instead-of-text
> to the saving-of-lives…

I have no idea what connection you think is between this and emailing 
pictures of source code in place of source code.


-- 
Steve

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