Re: i am want to read data from the csv that i wrote using python csv module but apart from filed names and row count i am unable to read rest of the data

2020-04-15 Thread Peter Otten
sjeik_ap...@hotmail.com wrote:

>On 12 Apr 2020 12:30, Peter Otten <__pete...@web.de> wrote:
> 
>  Rahul Gupta wrote:
> 
>  >for line in enumerate(csv_reader):
>  >print(line[csv_reader.fieldnames[1]])
> 
>  enumerate() generates (index, line) tuples that you need to unpack:
> 
>  for index, line in enumerate(csv_reader):
>  print(line[csv_reader.fieldnames[1]])
> 
>==》 Shouldn't that be, e.g:
>print( line[csv_reader.fieldnames[1].index()] )

No. Remember that the OP used a DictReader. If you want to clean up the 
original code you can use a csv.reader

csv_reader = csv.reader(csv_file)
fieldnames = next(csv_reader)
for row in csv_reader:
print(row[1])

but my assumption was that

>  print(line[csv_reader.fieldnames[1]])

wasn't the final code, only something to get things working.

>Or maybe:
>cols = csv_reader.fieldnames
>print( [[val for val, col in zip(record, cols) if col in ['somecol']]
>for record in csv_reader])
>?

This is ugly and complex. It can be simplified to

num_rows = sum(1 for _ in csv_reader)
print([["somecol"]] * num_rows)

Why would you want to do this?

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


pytube problem

2020-04-15 Thread Abhi Bajpai
Respected sir or mam..
I am facing issue related to pytube there is always problem with youtube module 
please look into this and try to solve it... I have to submit project.. and now 
all depends on you.

Sent from Mail for Windows 10

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


Python launcher

2020-04-15 Thread Angel V
Hello,

I'm new to Python and recently began to self learn the language.
Unfortunately, whenever I try to launch it, I'm met with a black pop-up
screen the disappears as soon as it comes up. I've tried uninstalling and I
just run into the same issue. I tried downloading the program onto my
brother's computer and it did the same things.

Any suggestions?

Thank you so much,
Angel Viskinda
-- 
https://mail.python.org/mailman/listinfo/python-list


difficulty in using the python 3.8

2020-04-15 Thread Gloryebube
   It keeps showing these three options

    1. Modify
    2. Repair
    3. Uninstall

   Please what seems to be the problem
-- 
https://mail.python.org/mailman/listinfo/python-list


python

2020-04-15 Thread mike via Python-list

I need somehelpwith Python 36-32 and 38-32
I have been using sublime text 3 asmy ide for about 1 year now and everything 
was fine -I tried to change to Pycharm 2020 - I was going to use sublime 3 as 
my IDE for python36-32 and the Pycharm2020 forthe IDE forPython38-32. 
Unfortunatly snt wrong as nomatter which IDE I use I get the following 
Python -v info


Microsoft Windows [Version 10.0.18363.720]
© 2019 Microsoft Corporation. All rights reserved.

C:\Users\mkgrt>python
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Current thread 0x1688 (most recent call first):

C:\Users\mkgrt>python -v
import _frozen_importlib # frozen
import _imp # builtin
import sys # builtin
import '_warnings' # 
import '_thread' # 
import '_weakref' # 
import '_frozen_importlib_external' # 
import '_io' # 
import 'marshal' # 
import 'nt' # 
import _thread # previously loaded ('_thread')
import '_thread' # 
import _weakref # previously loaded ('_weakref')
import '_weakref' # 
import 'winreg' # 
# installing zipimport hook
import 'zipimport' # 
# installed zipimport hook
Fatal Python error: Py_Initialize: unable to load the file system codec
Traceback (most recent call last):
File "", line 971, in _find_and_load
File "", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'encodings'

Checking Pytghon36-32

C:\Users\mkgrt\AppData\Local\Programs\Python\Python36-32\Lib\encodings
the encodings in in the Lib -I have tried the following 
uninstalled Python36-32 / Python38-32 / Pycharmcreated the PYTHONPATH and 
PYTHONHOME and nothing works - Any Help would be appreciated thank you in 
advance
Top of Form
Bottom of Form


Python 36-32 problem encoding module not found 





Bottom of Form


Sent from Mail for Windows 10

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


DLL file was not loading everytime when pandas was use to run

2020-04-15 Thread ajayrpan...@hotmail.com
Whenever I try to run any file in which pandas was import it was showing that 
dll file is not loaded

Sent from Mail for Windows 10

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


ERROR GENERATED AFTER INSTALLING PYTHON 3.5.2 64-BIT

2020-04-15 Thread ogunleye ayobami
Dear Python Team,

After downloading and installing python on my system, error generated on
command prompt is
C:\Users\Olakunle Johnson>python

*'python' is not recognized as an internal or external command,operable
program or batch file.*

Kindly assist.
Regards


Virus-free.
www.avg.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
https://mail.python.org/mailman/listinfo/python-list


problem related to making setup

2020-04-15 Thread Dhruv Chaturvedi
I made a simple bot. I wanted to share my Bot with my friends but when I
convert it into an exe from pyinstaller it started showing an error shown
 below and when I use cx_Freeze  again it showing an error pls help me with
this.

These are all the files I use\\// 1st photo - when I
use cx_Freeze first time,
2nd photo - when I use cx_freeze second time,
3rd photo- when I use pyinstaller.
Dhruv ChaturvediDcdDcd-- 
https://mail.python.org/mailman/listinfo/python-list


Re: difficulty in using the python 3.8

2020-04-15 Thread NWANKWO GLORY
Attached to my complaint is a screenshot of what keeps showing. Even after
I had, modify and repair it several times

On Wed, Apr 15, 2020, 4:07 AM Gloryebube  wrote:

> It keeps showing these three options
>
>1. Modify
>2. Repair
>3. Uninstall
>
> Please what seems to be the problem
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: difficulty in using the python 3.8

2020-04-15 Thread Souvik Dutta
You are running the installer. Try searching for idle in the start menu...

Souvik flutter dev

On Wed, Apr 15, 2020, 5:45 PM Gloryebube  wrote:

>It keeps showing these three options
>
> 1. Modify
> 2. Repair
> 3. Uninstall
>
>Please what seems to be the problem
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: difficulty in using the python 3.8

2020-04-15 Thread Souvik Dutta
First of all understand what I said. You are running the installer again,
so go and search idle in the start menu. Second thing this list does not
support photos so you will always have to say the error through words.

On Wed, 15 Apr, 2020, 6:01 pm NWANKWO GLORY,  wrote:

> Attached to my complaint is a screenshot of what keeps showing. Even after
> I had, modify and repair it several times
>
> On Wed, Apr 15, 2020, 4:07 AM Gloryebube  wrote:
>
> > It keeps showing these three options
> >
> >1. Modify
> >2. Repair
> >3. Uninstall
> >
> > Please what seems to be the problem
> >
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: problem related to making setup

2020-04-15 Thread Chris Angelico
On Wed, Apr 15, 2020 at 10:28 PM Dhruv Chaturvedi
 wrote:
>
> I made a simple bot. I wanted to share my Bot with my friends but when I
> convert it into an exe from pyinstaller it started showing an error shown
>  below and when I use cx_Freeze  again it showing an error pls help me with
> this.
>
> These are all the files I use\\// 1st photo - when I
> use cx_Freeze first time,
> 2nd photo - when I use cx_freeze second time,
> 3rd photo- when I use pyinstaller.

Images don't come through. But I would recommend NOT converting it to
an exe - it's far simpler to just distribute the .py files and have
your friends install Python.

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


Re: problem related to making setup

2020-04-15 Thread Souvik Dutta
What is the error?

On Wed, 15 Apr, 2020, 5:57 pm Dhruv Chaturvedi, 
wrote:

> I made a simple bot. I wanted to share my Bot with my friends but when I
> convert it into an exe from pyinstaller it started showing an error shown
>  below and when I use cx_Freeze  again it showing an error pls help me with
> this.
>
> These are all the files I use\\// 1st photo - when I
> use cx_Freeze first time,
> 2nd photo - when I use cx_freeze second time,
> 3rd photo- when I use pyinstaller.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Threading module and embedded python

2020-04-15 Thread Eko palypse
Hi everyone,

the following happens on Windows7 x64 and Python37 x64

I have a plugin DLL for a C++ application in which Python37 is embedded.
The plugin itself works, except when I want to use the threading module.

If I start a Python script in my plugin which uses the threading module
I can verify via ProcessExplorer that the thread is started,
but it doesn't do anything (??) and the c++ application doesn't really do 
anything anymore either.

Only when I stop the C++ Applikation, the thread becomes active for a short 
time.
Verified with logging module over time print-outs.

Apparently I did not understand everything about threads and embedded python.

Any idea what I'm doing wrong?


The whole thing is initialized by the DllMain routine.


BOOL APIENTRY DllMain( HANDLE hModule,
   DWORD  reasonForCall,
   LPVOID /* lpReserved */ )
{
switch ( reasonForCall )
{
case DLL_PROCESS_ATTACH:
if (!Py_IsInitialized())
{
PyImport_AppendInittab("Npp", &PyInit_Npp);
Py_InitializeEx(0);
PyEval_InitThreads();  //<- this shouldn't be needed as I 
understand that it is called by Py_InitializeEx anyway
}
PyImport_ImportModule("Npp");
break;
case DLL_PROCESS_DETACH:
Py_Finalize();
break;

case DLL_THREAD_ATTACH:
break;

case DLL_THREAD_DETACH:
break;
}

return TRUE;
}

and the code in the plugin which executes the python scripts is this

cdef void run_code():
try:
global_dict = globals()
if '__name__' not in global_dict or global_dict['__name__'] != 
'__main__':
global_dict.update({"__name__": "__main__",})
exec(compile(editor.getText(), '', 'exec'), global_dict)

except Exception:
MessageBoxW(nppData._nppHandle,
traceback.format_exc(),
'RUN CODE EXCEPTION',
0)  

I don't know if this is important, but the DLL is generated by Cython.

Thank you for reading and stay healthy

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


Re: Python launcher

2020-04-15 Thread Souvik Dutta
What is the exact thing you are trying to launch?

On Wed, 15 Apr, 2020, 5:41 pm Angel V,  wrote:

> Hello,
>
> I'm new to Python and recently began to self learn the language.
> Unfortunately, whenever I try to launch it, I'm met with a black pop-up
> screen the disappears as soon as it comes up. I've tried uninstalling and I
> just run into the same issue. I tried downloading the program onto my
> brother's computer and it did the same things.
>
> Any suggestions?
>
> Thank you so much,
> Angel Viskinda
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


SPECIALS CHARACTERS

2020-04-15 Thread Gonzalo V
Good morning!
A tiny question.
 Are there a way to create a new character on python? i need to create some
kind of arroba @ but with other letter inside. Are there a library for that?

Really thanks.

Gonzalo from Chile.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: SPECIALS CHARACTERS

2020-04-15 Thread Souvik Dutta
I don't think you can do so but if you are using a gui app then consider
making a custom font.

On Wed, 15 Apr, 2020, 6:26 pm Gonzalo V,  wrote:

> Good morning!
> A tiny question.
>  Are there a way to create a new character on python? i need to create some
> kind of arroba @ but with other letter inside. Are there a library for
> that?
>
> Really thanks.
>
> Gonzalo from Chile.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


What variable type is returned from Open()?

2020-04-15 Thread dcwhatthe
Hi,


As much as possible, I make use of optional type hints.  So if I know a 
function returns an integer, then I use


this_number_i : int = GetThisNumber()


But there's no 'file' type, so I'm not sure what to use as the type for the 
return value of an Open() function.


config_file : file = open(config_file_s, "r")


What type of variable should config_file (above) be declared as?

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


Re: What variable type is returned from Open()?

2020-04-15 Thread Souvik Dutta
_io.TextIOWrapper

On Wed, 15 Apr, 2020, 7:30 pm ,  wrote:

> Hi,
>
>
> As much as possible, I make use of optional type hints.  So if I know a
> function returns an integer, then I use
>
>
> this_number_i : int = GetThisNumber()
>
>
> But there's no 'file' type, so I'm not sure what to use as the type for
> the return value of an Open() function.
>
>
> config_file : file = open(config_file_s, "r")
>
>
> What type of variable should config_file (above) be declared as?
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pytube problem

2020-04-15 Thread Igor Korot
Hi,

On Wed, Apr 15, 2020 at 7:14 AM Abhi Bajpai
 wrote:
>
> Respected sir or mam..
> I am facing issue related to pytube there is always problem with youtube 
> module please look into this and try to solve it... I have to submit 
> project.. and now all depends on you.

What kind of problem do you have?
Can't install? Can't use - why?

Can you copy'n'paste the error in the message body - the list doesn't
take an attachments...

Thank you.

>
> Sent from Mail for Windows 10
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: SPECIALS CHARACTERS

2020-04-15 Thread Karsten Hilbert
On Wed, Apr 15, 2020 at 08:45:45AM -0400, Gonzalo V wrote:

> A tiny question.
>  Are there a way to create a new character on python? i need to create some
> kind of arroba @ but with other letter inside. Are there a library for that?

Hello Gonzalo,

this is a font issue, and entirely unrelated to Python
itself.

As for Python libraries that might help in making fonts (or
glyphs, in your case), here's a list:

python3-compreffor - CFF table subroutinizer for FontTools
python3-defcon - UFO based objects for use in font editing applications
python3-fontmake - Python library for compiling fonts from UFO or Glyphs to 
OTF/TTF
python3-fontmath - Objects for performing math operations on font data
python3-fontpens - Classes implementing Pen protocol for manipulating UFO glyphs
python3-fonttools - Converts OpenType and TrueType fonts to and from XML 
(Python 3 Library)
python3-glyphslib - Library for converting between Glyphs files (.glyphs) and 
UFOs
python3-psautohint - Python library for standalone version of the AFDKO 
autohinter
python3-fontconfig - python bindings for the Fontconfig library for Python3
python3-fontconfig-dbg - python bindings for the Fontconfig library for Python3 
(debug build)
python3-qtawesome - iconic fonts in PyQt and PySide applications (Python 3)
python3-xstatic-font-awesome - Font Awesome XStatic support - Python 3.x
python3-xstatic-mdi - Material Design Icons Webfont XStatic support - Python 3.x
python3-xstatic-roboto-fontface - Roboto Fontface XStatic support - Python 3.x
python3-ufo2ft - Bridge from UFOs to fonttools objects
python3-ufolib2 - Unified Font Object (UFO) fonts library
python3-ufonormalizer - Python library to normalize the XML and other data 
inside of a UFO
python3-fontforge - font editor - Python bindings
python3-fontparts - API for interacting with the parts of fonts
python3-freetype - Freetype Python bindings for Python 3
python3-nototools - font support tools from the Noto Fonts project
python3-ufoprocessor - Process and generate Unified Font Object (UFO) files

Karsten
--
GPG  40BE 5B0E C98E 1713 AFA6  5BC0 3BEA AC80 7D4F C89B
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What variable type is returned from Open()?

2020-04-15 Thread dcwhatthe
On Wednesday, April 15, 2020 at 10:10:31 AM UTC-4, Souvik Dutta wrote:
> _io.TextIOWrapper
> 
> On Wed, 15 Apr, 2020, 7:30 pm ,  wrote:
> 
> > Hi,
> >
> >
> > As much as possible, I make use of optional type hints.  So if I know a
> > function returns an integer, then I use
> >
> >
> > this_number_i : int = GetThisNumber()
> >
> >
> > But there's no 'file' type, so I'm not sure what to use as the type for
> > the return value of an Open() function.
> >
> >
> > config_file : file = open(config_file_s, "r")
> >
> >
> > What type of variable should config_file (above) be declared as?
> >
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >

So you're saying this is a type _io.TextIOWrapper?  This type doesn't show up, 
on the hint listbox (I'm using Wing IDE).  So if I type var_file : _io, it 
doesn't show anything.

Maybe I don't understand what you're saying.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What variable type is returned from Open()?

2020-04-15 Thread Chris Angelico
On Thu, Apr 16, 2020 at 12:01 AM  wrote:
>
> Hi,
>
>
> As much as possible, I make use of optional type hints.  So if I know a 
> function returns an integer, then I use
>
>
> this_number_i : int = GetThisNumber()
>
>
> But there's no 'file' type, so I'm not sure what to use as the type for the 
> return value of an Open() function.
>
>
> config_file : file = open(config_file_s, "r")
>
>
> What type of variable should config_file (above) be declared as?
>

It returns a file-like object. Instead of annotating, just let the
type hinting system figure it out - you initialized it with the result
of an open() call, so it should be able to figure that out.

Python is not C, you do not need to declare all your variable types.

If you actually need a way to represent "file-like object" (maybe as a
parameter to some other function), there are tools for that in the
typing module, but just DON'T annotate every variable. Bad idea, will
cause you a maintenance headache and won't help anything.

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


Re: What variable type is returned from Open()?

2020-04-15 Thread Souvik Dutta
Yes that is the type. You can try using a print(type()) to
verify that.

Souvik flutter dev

On Wed, Apr 15, 2020, 9:45 PM  wrote:

> On Wednesday, April 15, 2020 at 10:10:31 AM UTC-4, Souvik Dutta wrote:
> > _io.TextIOWrapper
> >
> > On Wed, 15 Apr, 2020, 7:30 pm ,  wrote:
> >
> > > Hi,
> > >
> > >
> > > As much as possible, I make use of optional type hints.  So if I know a
> > > function returns an integer, then I use
> > >
> > >
> > > this_number_i : int = GetThisNumber()
> > >
> > >
> > > But there's no 'file' type, so I'm not sure what to use as the type for
> > > the return value of an Open() function.
> > >
> > >
> > > config_file : file = open(config_file_s, "r")
> > >
> > >
> > > What type of variable should config_file (above) be declared as?
> > >
> > > --
> > > https://mail.python.org/mailman/listinfo/python-list
> > >
>
> So you're saying this is a type _io.TextIOWrapper?  This type doesn't show
> up, on the hint listbox (I'm using Wing IDE).  So if I type var_file : _io,
> it doesn't show anything.
>
> Maybe I don't understand what you're saying.
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Threading module and embedded python

2020-04-15 Thread Barry Scott



> On 15 Apr 2020, at 13:30, Eko palypse  wrote:
> 
> Hi everyone,
> 
> the following happens on Windows7 x64 and Python37 x64
> 
> I have a plugin DLL for a C++ application in which Python37 is embedded.
> The plugin itself works, except when I want to use the threading module.
> 
> If I start a Python script in my plugin which uses the threading module
> I can verify via ProcessExplorer that the thread is started,
> but it doesn't do anything (??) and the c++ application doesn't really do 
> anything anymore either.
> 
> Only when I stop the C++ Applikation, the thread becomes active for a short 
> time.
> Verified with logging module over time print-outs.
> 
> Apparently I did not understand everything about threads and embedded python.
> 
> Any idea what I'm doing wrong?

This is what I typically do.

Make sure that you have installed the Python debug files.
Now you can use the visual C++ debugger to attach to the process and
look at what the threads are doing.

I always have the python source code on hand to read as well.

This should give you a clue.

What is the "stuck" thread doing? waiting for a lock?

Barry




> 
> 
> The whole thing is initialized by the DllMain routine.
> 
> 
> BOOL APIENTRY DllMain( HANDLE hModule,
>   DWORD  reasonForCall,
>   LPVOID /* lpReserved */ )
> {
>switch ( reasonForCall )
>{
>case DLL_PROCESS_ATTACH:
>if (!Py_IsInitialized())
>{
>PyImport_AppendInittab("Npp", &PyInit_Npp);
>Py_InitializeEx(0);
>PyEval_InitThreads();  //<- this shouldn't be needed as I 
> understand that it is called by Py_InitializeEx anyway
>}
>PyImport_ImportModule("Npp");
>break;
>case DLL_PROCESS_DETACH:
>Py_Finalize();
>break;
> 
>case DLL_THREAD_ATTACH:
>break;
> 
>case DLL_THREAD_DETACH:
>break;
>}
> 
>return TRUE;
> }
> 
> and the code in the plugin which executes the python scripts is this
> 
> cdef void run_code():
>try:
>global_dict = globals()
>if '__name__' not in global_dict or global_dict['__name__'] != 
> '__main__':
>global_dict.update({"__name__": "__main__",})
>exec(compile(editor.getText(), '', 'exec'), global_dict)
> 
>except Exception:
>MessageBoxW(nppData._nppHandle,
>traceback.format_exc(),
>'RUN CODE EXCEPTION',
>0)  
> 
> I don't know if this is important, but the DLL is generated by Cython.
> 
> Thank you for reading and stay healthy
> 
> Eren
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

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


Re: difficulty in using the python 3.8

2020-04-15 Thread Barry Scott



> On 15 Apr 2020, at 04:07, Gloryebube  wrote:
> 
>   It keeps showing these three options
> 
>1. Modify
>2. Repair
>3. Uninstall
> 
>   Please what seems to be the problem


As Souvk said you are running the setup program that installs python on to your 
system.

In the Start Menu you should find a "Python 3.8" item that has the programs you 
can run in it.

Barry


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

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


Re: Python launcher

2020-04-15 Thread Pieter van Oostrum
Angel V  writes:

> Hello,
>
> I'm new to Python and recently began to self learn the language.
> Unfortunately, whenever I try to launch it, I'm met with a black pop-up
> screen the disappears as soon as it comes up. I've tried uninstalling and I
> just run into the same issue. I tried downloading the program onto my
> brother's computer and it did the same things.

It seems to me that a Python installation on Windows needs some "First
steps" documentation to direct the beginners to the essentials of how to
start a Python program. Preferably something that is displayed
immediately after installation of in some other way is prominently
displayed. I am not on Windows myself, so I am afraid I will not be of
much help in this respect.
-- 
Pieter van Oostrum
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]
-- 
https://mail.python.org/mailman/listinfo/python-list


Helping Windows first time users

2020-04-15 Thread Barry Scott
I post some suggestion to improve the Python installer for Windows
to better sign post users on the next steps.

https://mail.python.org/archives/list/python-id...@python.org/message/TKHID7PMKN5TK5QDQ2BL3G45FYAJNYJX/

It also seems like we could do with drafting the text of a helpful
reply to help the Windows first time users. This would help folks that
reply to the Windows first time users to have a quick way to reply
without drafting the text a reply every time.

What are your thoughts on the installer changes and reply text?

Barry

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


Re: Python launcher

2020-04-15 Thread Grant Edwards
On 2020-04-15, Pieter van Oostrum  wrote:
> Angel V  writes:
>
>> Hello,
>>
>> I'm new to Python and recently began to self learn the language.
>> Unfortunately, whenever I try to launch it, I'm met with a black pop-up
>> screen the disappears as soon as it comes up. I've tried uninstalling and I
>> just run into the same issue. I tried downloading the program onto my
>> brother's computer and it did the same things.
>
> It seems to me that a Python installation on Windows needs some "First
> steps" documentation to direct the beginners to the essentials of how to
> start a Python program. Preferably something that is displayed
> immediately after installation of in some other way is prominently
> displayed. I am not on Windows myself, so I am afraid I will not be of
> much help in this respect.

I'm not a windows user either, but it's also a pretty good indication
that something needs to be fixed when people keep running the
installer instead of the installed applications, and then ask
(sometimes multiple times per day) on the mailing list why Python is
broken.

Perhaps the initial screen of the installer should state something like

This is the Python _installer_.  It is used to install, remove, or
repair Python.

If you have already installed Python and want to run a Python
application from a source file foo.py do . Or, to run the
Python "Idle" IDE do .

Then again at the end of the installation perhaps display the same
hints again?

OTOH, maybe the installer already does that, and people really _are_
that dense...

--
Grant





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


Re: ERROR GENERATED AFTER INSTALLING PYTHON 3.5.2 64-BIT

2020-04-15 Thread Barry Scott



> On 15 Apr 2020, at 09:28, ogunleye ayobami 
>  wrote:
> 
> Dear Python Team,
> 
> After downloading and installing python on my system, error generated on
> command prompt is
> C:\Users\Olakunle Johnson>python
> 
> *'python' is not recognized as an internal or external command,operable
> program or batch file.*
> 

Try the "py" command instead.

Is there a reason to use a very old version of python?
The latest version of 3.8.

Barry


> Kindly assist.
> Regards
> 
> 
> Virus-free.
> www.avg.com
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

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


Re: ERROR GENERATED AFTER INSTALLING PYTHON 3.5.2 64-BIT

2020-04-15 Thread ogunleye ayobami
Thanks. Indeed helpful and am now good.

Regards

On Wed, Apr 15, 2020, 1:39 PM Souvik Dutta  wrote:

> You have not added python to your system's path variable. Follow this.
> https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path
>
> On Wed, 15 Apr, 2020, 5:53 pm ogunleye ayobami, <
> ogunleyeayobamihezek...@gmail.com> wrote:
>
>> Dear Python Team,
>>
>> After downloading and installing python on my system, error generated on
>> command prompt is
>> C:\Users\Olakunle Johnson>python
>>
>> *'python' is not recognized as an internal or external command,operable
>> program or batch file.*
>>
>> Kindly assist.
>> Regards
>>
>> <
>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>> >
>> Virus-free.
>> www.avg.com
>> <
>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>> >
>> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
> On Wed, 15 Apr, 2020, 5:53 pm ogunleye ayobami, <
> ogunleyeayobamihezek...@gmail.com> wrote:
>
>> Dear Python Team,
>>
>> After downloading and installing python on my system, error generated on
>> command prompt is
>> C:\Users\Olakunle Johnson>python
>>
>> *'python' is not recognized as an internal or external command,operable
>> program or batch file.*
>>
>> Kindly assist.
>> Regards
>>
>> <
>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>> >
>> Virus-free.
>> www.avg.com
>> <
>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>> >
>> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ERROR GENERATED AFTER INSTALLING PYTHON 3.5.2 64-BIT

2020-04-15 Thread Souvik Dutta
You have not added python to your system's path variable. Follow this.
https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path

On Wed, 15 Apr, 2020, 5:53 pm ogunleye ayobami, <
ogunleyeayobamihezek...@gmail.com> wrote:

> Dear Python Team,
>
> After downloading and installing python on my system, error generated on
> command prompt is
> C:\Users\Olakunle Johnson>python
>
> *'python' is not recognized as an internal or external command,operable
> program or batch file.*
>
> Kindly assist.
> Regards
>
> <
> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> Virus-free.
> www.avg.com
> <
> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

On Wed, 15 Apr, 2020, 5:53 pm ogunleye ayobami, <
ogunleyeayobamihezek...@gmail.com> wrote:

> Dear Python Team,
>
> After downloading and installing python on my system, error generated on
> command prompt is
> C:\Users\Olakunle Johnson>python
>
> *'python' is not recognized as an internal or external command,operable
> program or batch file.*
>
> Kindly assist.
> Regards
>
> <
> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> Virus-free.
> www.avg.com
> <
> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
> >
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ERROR GENERATED AFTER INSTALLING PYTHON 3.5.2 64-BIT

2020-04-15 Thread Souvik Dutta
Glad to hear it!

On Wed, 15 Apr, 2020, 6:12 pm ogunleye ayobami, <
ogunleyeayobamihezek...@gmail.com> wrote:

> Thanks. Indeed helpful and am now good.
>
> Regards
>
> On Wed, Apr 15, 2020, 1:39 PM Souvik Dutta 
> wrote:
>
>> You have not added python to your system's path variable. Follow this.
>> https://superuser.com/questions/143119/how-do-i-add-python-to-the-windows-path
>>
>> On Wed, 15 Apr, 2020, 5:53 pm ogunleye ayobami, <
>> ogunleyeayobamihezek...@gmail.com> wrote:
>>
>>> Dear Python Team,
>>>
>>> After downloading and installing python on my system, error generated on
>>> command prompt is
>>> C:\Users\Olakunle Johnson>python
>>>
>>> *'python' is not recognized as an internal or external command,operable
>>> program or batch file.*
>>>
>>> Kindly assist.
>>> Regards
>>>
>>> <
>>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>>> >
>>> Virus-free.
>>> www.avg.com
>>> <
>>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>>> >
>>> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>> --
>>> https://mail.python.org/mailman/listinfo/python-list
>>>
>>
>> On Wed, 15 Apr, 2020, 5:53 pm ogunleye ayobami, <
>> ogunleyeayobamihezek...@gmail.com> wrote:
>>
>>> Dear Python Team,
>>>
>>> After downloading and installing python on my system, error generated on
>>> command prompt is
>>> C:\Users\Olakunle Johnson>python
>>>
>>> *'python' is not recognized as an internal or external command,operable
>>> program or batch file.*
>>>
>>> Kindly assist.
>>> Regards
>>>
>>> <
>>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>>> >
>>> Virus-free.
>>> www.avg.com
>>> <
>>> http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail
>>> >
>>> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>>> --
>>> https://mail.python.org/mailman/listinfo/python-list
>>>
>>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Threading module and embedded python

2020-04-15 Thread Eko palypse
Thank you for your suggestion. I will give it a try.

> What is the "stuck" thread doing? waiting for a lock?

No, it should open a dialog created with DialogBoxIndirectParamW

.

Eren

Am Mi., 15. Apr. 2020 um 20:12 Uhr schrieb Barry Scott <
ba...@barrys-emacs.org>:

>
>
> > On 15 Apr 2020, at 13:30, Eko palypse  wrote:
> >
> > Hi everyone,
> >
> > the following happens on Windows7 x64 and Python37 x64
> >
> > I have a plugin DLL for a C++ application in which Python37 is embedded.
> > The plugin itself works, except when I want to use the threading module.
> >
> > If I start a Python script in my plugin which uses the threading module
> > I can verify via ProcessExplorer that the thread is started,
> > but it doesn't do anything (??) and the c++ application doesn't really
> do anything anymore either.
> >
> > Only when I stop the C++ Applikation, the thread becomes active for a
> short time.
> > Verified with logging module over time print-outs.
> >
> > Apparently I did not understand everything about threads and embedded
> python.
> >
> > Any idea what I'm doing wrong?
>
> This is what I typically do.
>
> Make sure that you have installed the Python debug files.
> Now you can use the visual C++ debugger to attach to the process and
> look at what the threads are doing.
>
> I always have the python source code on hand to read as well.
>
> This should give you a clue.
>
> What is the "stuck" thread doing? waiting for a lock?
>
> Barry
>
>
>
>
> >
> >
> > The whole thing is initialized by the DllMain routine.
> >
> >
> > BOOL APIENTRY DllMain( HANDLE hModule,
> >   DWORD  reasonForCall,
> >   LPVOID /* lpReserved */ )
> > {
> >switch ( reasonForCall )
> >{
> >case DLL_PROCESS_ATTACH:
> >if (!Py_IsInitialized())
> >{
> >PyImport_AppendInittab("Npp", &PyInit_Npp);
> >Py_InitializeEx(0);
> >PyEval_InitThreads();  //<- this shouldn't be needed as I
> understand that it is called by Py_InitializeEx anyway
> >}
> >PyImport_ImportModule("Npp");
> >break;
> >case DLL_PROCESS_DETACH:
> >Py_Finalize();
> >break;
> >
> >case DLL_THREAD_ATTACH:
> >break;
> >
> >case DLL_THREAD_DETACH:
> >break;
> >}
> >
> >return TRUE;
> > }
> >
> > and the code in the plugin which executes the python scripts is this
> >
> > cdef void run_code():
> >try:
> >global_dict = globals()
> >if '__name__' not in global_dict or global_dict['__name__'] !=
> '__main__':
> >global_dict.update({"__name__": "__main__",})
> >exec(compile(editor.getText(), '', 'exec'), global_dict)
> >
> >except Exception:
> >MessageBoxW(nppData._nppHandle,
> >traceback.format_exc(),
> >'RUN CODE EXCEPTION',
> >0)
> >
> > I don't know if this is important, but the DLL is generated by Cython.
> >
> > Thank you for reading and stay healthy
> >
> > Eren
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >
>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: python

2020-04-15 Thread DL Neil via Python-list

On 15/04/20 2:05 PM, mike via Python-list wrote:


I need somehelpwith Python 36-32 and 38-32
I have been using sublime text 3 asmy ide for about 1 year now and everything 
was fine -I tried to change to Pycharm 2020 - I was going to use sublime 3 as 
my IDE for python36-32 and the Pycharm2020 forthe IDE forPython38-32. 
Unfortunatly snt wrong as nomatter which IDE I use I get the following


Is the issue 'hopeless confusion'?
Perhaps then the solution is to simplify...


Personal comments:

I haven't used PyCharm for some years, having been persuaded to use 
SublimeText to harmonise with colleagues (in a non-Python environment). 
My impression(!) is that whilst ST has a fairly loose relationship with 
Python/whatever language, PyCharm is more closely-coupled. PyCharm was 
built/adapted with Python in-mind. SublimeText was built to be less 
specific.


I don't use Microsoft products.

I resist changing my 'tools'. Once I'm familiar with one (eg an IDE), I 
stick with it for a while. I'm a high-speed, touch-typist, and thus a 
keyboard-person. Changing back-and-forth is a pain, because of the need 
to 'un-learn' or re-learn the muscle memory, eg writing to you from the 
Thunderbird email-client, I have to remember to (manually) type my own 
closing parentheses, quotation-marks, etc! My recommendation is to 
choose one (IDE) and stick-with-it, improving your command of its 
facilities and thereby your own productivity, over time.


I'm assuming you are fairly new to Python.


Dealing with the problem:

'Clean' the computer by uninstalling PyCharm, ST, and Python (in that 
sequence). You may want to vary that to 'protect' existing work, by only 
uninstalling stuff which is 'new'!


If you haven't already, read: 
https://docs.python.org/3/using/windows.html and any other relevant 
Windows-related info in the Python docs library.


Install your chosen IDE.

Install a (single) chosen version of Python.

Integrate these to suit your first project (utilising this fresh tool-set).

Once this is working, and when you have need, look at complicating your 
life with multiple projects, multiple versions of Python, multiple ...



Other thoughts:

Beginners, and particularly if interested in more math/scientific 
applications, often enjoy the simplicity of getting-started using a 
packaged-environment - variously and confusingly known as 
"distributions" or "environments". These offer, not only Python, but a 
curated collection of code-libraries, and sometimes an IDE, eg Enthought 
Canopy, Anaconda, ActivePython...


Python comes with a built-in system to enable multiple 
versions/interpreters on a single machine called "Virtual Environments". 
Rather than looking at the issue that way-around, perhaps it is better 
to suggest a philosophy of having (multiple) dev-projects, and enabling 
each project to utilise whichever version of Python is appropriate. This 
pattern is also applicable, should you persist in the wish to use a 
different IDE for separate projects. There are other ways to "isolate" 
project environments, eg "containers" and virtual machines...


Hopefully, there is (more than) enough information here to enable you to 
plan for future-glory... However, in closing, may I emphasise again; 
that simplicity is a virtue, and once we have 'the basics' under our 
belts, 'complexity' is more 'simple' to add, ie learn to walk first, 
then learn to run!



Web-Refs (your search-engine is your friend!):

https://www.osstuff.com/how-to-install-python-and-pycharm-on-windows-10/
(plenty of these available - have not evaluated this or any other)

http://www.brandsoftonline.com/setting-up-for-python-development-on-windows-with-sublime-text/

http://damnwidget.github.io/anaconda/
(configuring ST as a Python development environment)

https://docs.python.org/3/tutorial/venv.html
--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: DLL file was not loading everytime when pandas was use to run

2020-04-15 Thread DL Neil via Python-list

On 15/04/20 6:47 PM, ajayrpan...@hotmail.com wrote:

Whenever I try to run any file in which pandas was import it was showing that 
dll file is not loaded



Please copy-paste the *exact* error message.


Are you aware of the Python-Tutor list? 
https://mail.python.org/mailman/listinfo/tutor

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: What variable type is returned from Open()?

2020-04-15 Thread dcwhatthe
On Wednesday, April 15, 2020 at 1:09:26 PM UTC-4, Souvik Dutta wrote:
> Yes that is the type. You can try using a print(type()) to
> verify that.
> 
> Souvik flutter dev
> 
> On Wed, Apr 15, 2020, 9:45 PM  wrote:
> 
> > On Wednesday, April 15, 2020 at 10:10:31 AM UTC-4, Souvik Dutta wrote:
> > > _io.TextIOWrapper
> > >
> > > On Wed, 15 Apr, 2020, 7:30 pm ,  wrote:
> > >
> > > > Hi,
> > > >
> > > >
> > > > As much as possible, I make use of optional type hints.  So if I know a
> > > > function returns an integer, then I use
> > > >
> > > >
> > > > this_number_i : int = GetThisNumber()
> > > >
> > > >
> > > > But there's no 'file' type, so I'm not sure what to use as the type for
> > > > the return value of an Open() function.
> > > >
> > > >
> > > > config_file : file = open(config_file_s, "r")
> > > >
> > > >
> > > > What type of variable should config_file (above) be declared as?
> > > >
> > > > --
> > > > https://mail.python.org/mailman/listinfo/python-list
> > > >
> >
> > So you're saying this is a type _io.TextIOWrapper?  This type doesn't show
> > up, on the hint listbox (I'm using Wing IDE).  So if I type var_file : _io,
> > it doesn't show anything.
> >
> > Maybe I don't understand what you're saying.
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> >

Ok, thanks.  It's not showing up in the variable type picklist, so I'll just 
type it in manually, and see what happens, thanks.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Threading module and embedded python

2020-04-15 Thread Barry


> On 15 Apr 2020, at 21:18, Eko palypse  wrote:
> 
> Thank you for your suggestion. I will give it a try.
> 
>> What is the "stuck" thread doing? waiting for a lock?
> 
> No, it should open a dialog created with DialogBoxIndirectParamW
> 

I assume you are a C++ developer and can look at the stack of the thread.
What is the thread doing? Is it in python code? Is it in windows code?

Barry

> .
> 
> Eren
> 
>> Am Mi., 15. Apr. 2020 um 20:12 Uhr schrieb Barry Scott <
>> ba...@barrys-emacs.org>:
>> 
>> 
>> 
 On 15 Apr 2020, at 13:30, Eko palypse  wrote:
>>> 
>>> Hi everyone,
>>> 
>>> the following happens on Windows7 x64 and Python37 x64
>>> 
>>> I have a plugin DLL for a C++ application in which Python37 is embedded.
>>> The plugin itself works, except when I want to use the threading module.
>>> 
>>> If I start a Python script in my plugin which uses the threading module
>>> I can verify via ProcessExplorer that the thread is started,
>>> but it doesn't do anything (??) and the c++ application doesn't really
>> do anything anymore either.
>>> 
>>> Only when I stop the C++ Applikation, the thread becomes active for a
>> short time.
>>> Verified with logging module over time print-outs.
>>> 
>>> Apparently I did not understand everything about threads and embedded
>> python.
>>> 
>>> Any idea what I'm doing wrong?
>> 
>> This is what I typically do.
>> 
>> Make sure that you have installed the Python debug files.
>> Now you can use the visual C++ debugger to attach to the process and
>> look at what the threads are doing.
>> 
>> I always have the python source code on hand to read as well.
>> 
>> This should give you a clue.
>> 
>> What is the "stuck" thread doing? waiting for a lock?
>> 
>> Barry
>> 
>> 
>> 
>> 
>>> 
>>> 
>>> The whole thing is initialized by the DllMain routine.
>>> 
>>> 
>>> BOOL APIENTRY DllMain( HANDLE hModule,
>>>  DWORD  reasonForCall,
>>>  LPVOID /* lpReserved */ )
>>> {
>>>   switch ( reasonForCall )
>>>   {
>>>   case DLL_PROCESS_ATTACH:
>>>   if (!Py_IsInitialized())
>>>   {
>>>   PyImport_AppendInittab("Npp", &PyInit_Npp);
>>>   Py_InitializeEx(0);
>>>   PyEval_InitThreads();  //<- this shouldn't be needed as I
>> understand that it is called by Py_InitializeEx anyway
>>>   }
>>>   PyImport_ImportModule("Npp");
>>>   break;
>>>   case DLL_PROCESS_DETACH:
>>>   Py_Finalize();
>>>   break;
>>> 
>>>   case DLL_THREAD_ATTACH:
>>>   break;
>>> 
>>>   case DLL_THREAD_DETACH:
>>>   break;
>>>   }
>>> 
>>>   return TRUE;
>>> }
>>> 
>>> and the code in the plugin which executes the python scripts is this
>>> 
>>> cdef void run_code():
>>>   try:
>>>   global_dict = globals()
>>>   if '__name__' not in global_dict or global_dict['__name__'] !=
>> '__main__':
>>>   global_dict.update({"__name__": "__main__",})
>>>   exec(compile(editor.getText(), '', 'exec'), global_dict)
>>> 
>>>   except Exception:
>>>   MessageBoxW(nppData._nppHandle,
>>>   traceback.format_exc(),
>>>   'RUN CODE EXCEPTION',
>>>   0)
>>> 
>>> I don't know if this is important, but the DLL is generated by Cython.
>>> 
>>> Thank you for reading and stay healthy
>>> 
>>> Eren
>>> --
>>> https://mail.python.org/mailman/listinfo/python-list
>>> 
>> 
>> 
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

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


Re: What variable type is returned from Open()?

2020-04-15 Thread Random832
On Wed, Apr 15, 2020, at 12:11, dcwhat...@gmail.com wrote:
> So you're saying this is a type _io.TextIOWrapper?  This type doesn't 
> show up, on the hint listbox (I'm using Wing IDE).  So if I type 
> var_file : _io, it doesn't show anything.

While others have pointed out that you shouldn't need a type hint here at all 
since it can be inferred, the correct type hint to use would be typing.TextIO.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: i am want to read data from the csv that i wrote using python csv module but apart from filed names and row count i am unable to read rest of the data

2020-04-15 Thread sjeik_appie
   On 15 Apr 2020 10:28, Peter Otten <__pete...@web.de> wrote:

 sjeik_ap...@hotmail.com wrote:

 >    On 12 Apr 2020 12:30, Peter Otten <__pete...@web.de> wrote:
 >
 >  Rahul Gupta wrote:
 >
 >  >for line in enumerate(csv_reader):
 >  >print(line[csv_reader.fieldnames[1]])
 >
 >  enumerate() generates (index, line) tuples that you need to
 unpack:
 >
 >  for index, line in enumerate(csv_reader):
 >  print(line[csv_reader.fieldnames[1]])
 >
 >    ==》 Shouldn't that be, e.g:
 >    print( line[csv_reader.fieldnames[1].index()] )

 No. Remember that the OP used a DictReader. If you want to clean up the
 original code you can use a csv.reader

 csv_reader = csv.reader(csv_file)
 fieldnames = next(csv_reader)
 for row in csv_reader:
     print(row[1])

 but my assumption was that

 >  print(line[csv_reader.fieldnames[1]])

 wasn't the final code, only something to get things working.

 >    Or maybe:
 >    cols = csv_reader.fieldnames
 >    print( [[val for val, col in zip(record, cols) if col in
 ['somecol']]
 >    for record in csv_reader])
 >    ?

 This is ugly and complex. It can be simplified to

 num_rows = sum(1 for _ in csv_reader)
 print([["somecol"]] * num_rows)

 Why would you want to this?

   ===》 I thought the OP wanted to take a subset of the columns in his data.
   In my example I intended to select one column, but with code that cpuld
   easily be extended to a selection of multiple columns. Call it "pruning"
   of the lists of lists
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: ERROR GENERATED AFTER INSTALLING PYTHON 3.5.2 64-BIT

2020-04-15 Thread Tarjei Bærland via Python-list
ogunleye ayobami  writes:

> Dear Python Team,
>
> After downloading and installing python on my system, error generated on
> command prompt is
> C:\Users\Olakunle Johnson>python
>
> *'python' is not recognized as an internal or external command,operable
> program or batch file.*

Given that the installation went as it should, this probably means that
python is not in your path. This,
https://geek-university.com/python/add-python-to-the-windows-path/,
seems to explain fully how to add your python install directory to the
path.

Regards,
Tarjei



>
> Kindly assist.
> Regards
>
> 
> Virus-free.
> www.avg.com
> 
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
-- 
https://mail.python.org/mailman/listinfo/python-list


Detect dotted (broken) lines only in an image using OpenCV

2020-04-15 Thread Edu Py
I am trying to learn techniques on image feature detection.

I have managed to detect horizontal line(unbroken/continuous), however I am 
having trouble detecting all the dotted/broken lines in an image.

Here is my test image, as you can see there are dotted lines and some 
text/boxes etc.


my code is below:

import cv2
import numpy as np

img=cv2.imread('test.jpg')
img=functions.image_resize(img,1000,1000) #function from a script to resize 
image to fit my screen
imgGray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
imgEdges=cv2.Canny(imgGray,100,250)
imgLines= cv2.HoughLinesP(imgEdges,2,np.pi/100,60, minLineLength = 10, 
maxLineGap = 100)
for x1,y1,x2,y2 in imgLines[0]:
cv2.line(img,(x1,y1),(x2,y2),(0,255,0),2)

cv2.imshow('Final Image with dotted Lines detected',img) 

My output image is below. As you can see I only managed to detect the last 
dotted line. I have played around with the parameters rho,theta,min/max line 
but no luck.

Any advice is greatly appreciated :)

For the original link - which has the images 
https://stackoverflow.com/questions/61239652/detect-dotted-broken-lines-only-in-an-image-using-opencv
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What variable type is returned from Open()?

2020-04-15 Thread DL Neil via Python-list

On 16/04/20 1:55 AM, dcwhat...@gmail.com wrote:

As much as possible, I make use of optional type hints.  So if I know a 
function returns an integer, then I use
this_number_i : int = GetThisNumber()
But there's no 'file' type, so I'm not sure what to use as the type for the 
return value of an Open() function.
config_file : file = open(config_file_s, "r")
What type of variable should config_file (above) be declared as?



First point (at the risk of teaching you/Grandma how to suck eggs) is 
that Python is a "dynamically-typed" language. Thus we may write:


a = "abc"

in one place, and:

a = 123

in another.

Python won't complain. However, such code is a recipe for confusing 
people - if not yourself, more 'simple' colleagues, such as me; because 
we get used to the idea of "a" as a string of characters, only to be 
presented with a number/int. What???


Thus the 'virtue' of typed languages, and adding data-typing features 
into one's code!



It is important to remember that the Python docs (see refs, below) refer 
to data-typing as "Hints". Indeed Python itself pays little/no attention:


>>> i:int=6
>>> j:int="str"
>>> i
6
>>> j
'str'

Since when has the string of characters: "str" been an integer???

To make good use of typing hints requires a bolt-on checker such as 
"mypy". Quoting, the release notes for Python 3.5:

<<<
While these annotations are available at run-time through the usual 
__annotations__ attribute, no automatic type checking happens at 
run-time. Instead, it is assumed that a separate off-line type checker 
(e.g. mypy) will be used for on-demand source code analysis.

>>>

(most IDEs will offer a mechanism to automatically run this, along with 
linters, test-runners, etc, every time a source-file is saved)



Coming from other languages, there is a tendency to see typing as at 
least helpful, even when it's not 'required'. Similarly, some 
languages/conventions encourage the use of prefixes or suffixes in 
naming variables, to help one remember the data-type. These are habits 
that are difficult to break - and indeed, it is arguable whether 
breaking them entirely would make one a 'better programmer'! (IMHO)



Python prefers to be descriptive, and in making a variable's name 
meaningful, to imply or to 'carry' well-rounded and sufficient 
information. Choosing names is an under-rated skill, and difficult to 
master. (again, IMHO)


Now, because you (as above) "know a function returns an integer", Python 
does too! However, if you (so kindly) save me hours of work by offering 
this function to me, what do I know about it? The answer is that I look 
at the function's "signature".


If we totally eschew data-typing it might be:

def find_sentence_length( sentence ):
etc

We can guess the data-type of "sentence" and that of the value to be 
returned, but (a) it's a "guess", (b) we have to invest extra effort, 
and (c) we might guess wrong[ly]! (although such might/should be 
included in the function's docstring!)


You (as I) probably prefer:

def find_sentence_length( sentence:str )->int:
etc

This is readily-understood to describe the taking 'in' of a string of 
characters, and the subsequent return of an integer. No muss, no fuss!


Subsequently:

sentence_length = find_sentence_length( my_sentence )

tells both Python and me (and any typing checker), that sentence_length 
is an integer.


That said, there is still room for misunderstanding. Guessing again?


Even with such a contrived and simplistic example, there is room for 
confusion: is that "length" measured in characters, inches/millimeters, 
pixels, or what?


So, typing (or strongly-typed languages) is/are not the 
be-all-and-end-all, nor does it offer a 'silver bullet'!


Before anyone asks: when I use "sentence_lengthPX" it produces howls of 
complaint from certain ('pythonic') colleagues - notice though, that its 
purpose is clear!



My opinion/coding-habits may differ from others (surely (and sadly) it 
is 'they' who differ from me!). For each class I like to 'define' 
most/all of its data-attributes in the __init__(), and to add typing 
information to those definitions - with additional supportive comment, 
as appropriate. This is mostly a bid to carry-forward as much 
information as possible from the design-docs. (also, if the class 
contains 'state' information, it seems to make it easier to write and 
generalise __str__() and any other 'general' routines across states. YMMV!)


NB I'm not arguing with @Chris - I wouldn't dare!

I don't see this as an extension of the class's signature - it won't be 
read because it's not needed if we treat the class as a 'black box'. 
Conversely, it *is* a useful reminder/initiation to my/someone else's 
comprehension of the inner-workings of the class itself!



Another thought, relating to the (above) specific example of 
"config_file : file = open(config_file_s, "r")", is that once-again, the 
'py

Re: What variable type is returned from Open()?

2020-04-15 Thread dcwhatthe
On Wednesday, April 15, 2020 at 5:28:55 PM UTC-4, Random832 wrote:
> On Wed, Apr 15, 2020, at 12:11, dcwhatthe wrote:
> > So you're saying this is a type _io.TextIOWrapper?  This type doesn't 
> > show up, on the hint listbox (I'm using Wing IDE).  So if I type 
> > var_file : _io, it doesn't show anything.
> 
> While others have pointed out that you shouldn't need a type hint here at all 
> since it can be inferred, the correct type hint to use would be typing.TextIO.

Hi Random832,

I understand the advice, and don't want to get into a debate about it.  But I 
decided years ago, before looking at Python relatively recently, that I want to 
put as much structural & semantic information in my the code as possible.

The primary reason is artificial intelligence.  When intelligent software is 
ready to take over programming, I want to leave it as much information as 
possible.

So in the case of Python, whenever the type information is available, I want to 
make it explicit rather than inferred.  Whether the A.I. is running a 
simulation of the software in an IDE, or analyzing them as text documents, they 
should be able to glean as much as possible.  They should also be able to infer 
the type, via a Hungarian syntax variation.

Yeah, I know it's a minority opinion, and a little kooky.

Thanks for the advice, I'll try typing.TextIO tomorrow.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What variable type is returned from Open()?

2020-04-15 Thread Chris Angelico
On Thu, Apr 16, 2020 at 9:51 AM  wrote:
>
> On Wednesday, April 15, 2020 at 5:28:55 PM UTC-4, Random832 wrote:
> > On Wed, Apr 15, 2020, at 12:11, dcwhatthe wrote:
> > > So you're saying this is a type _io.TextIOWrapper?  This type doesn't
> > > show up, on the hint listbox (I'm using Wing IDE).  So if I type
> > > var_file : _io, it doesn't show anything.
> >
> > While others have pointed out that you shouldn't need a type hint here at 
> > all since it can be inferred, the correct type hint to use would be 
> > typing.TextIO.
>
> Hi Random832,
>
> I understand the advice, and don't want to get into a debate about it.  But I 
> decided years ago, before looking at Python relatively recently, that I want 
> to put as much structural & semantic information in my the code as possible.
>
> The primary reason is artificial intelligence.  When intelligent software is 
> ready to take over programming, I want to leave it as much information as 
> possible.
>

Uhhh. okay. Let's start right here.

1) Intelligent software ALREADY writes our code for us. We call them
"optimizing compilers" and stuff like that. A person still has to tell
the software what sort of code to write, and the instructions that
specify the required goal are what constitute a high level programming
language.

2) If you really think that it's going to be one of those
Hollywood-style "computer becomes smart enough to program itself"
situations, why do you think it would care about your preexisting
code? It's able to write its own code anyway.

3) Even if it cares about your code, what would the type hints give
it? It's already capable of running the code without the type hints.

Type hints are a tool for YOU, the human. They're not any sort of
assistance to the computer. People periodically talk about using type
hints to improve performance, and it never works.

> So in the case of Python, whenever the type information is available, I want 
> to make it explicit rather than inferred.  Whether the A.I. is running a 
> simulation of the software in an IDE, or analyzing them as text documents, 
> they should be able to glean as much as possible.  They should also be able 
> to infer the type, via a Hungarian syntax variation.
>

Type hints can be explicitly wrong:
x:float = 1
x += 0.5

Type inference can't:
x = 1
x += 0.5

When the AI is running a simulation of your software - which, by the
way, you can already see happen with tools like pythontutor - it can
manage *just fine* with no type hints. In fact, the best thing to do
is ignore them and follow the well-defined semantics of the rest of
Python.

> Yeah, I know it's a minority opinion, and a little kooky.
>

A little misdirected, perhaps. It's like hearing those
"tick-tick-tick" things at pedestrian crossings and thinking that
they're there for the benefit of seeing eye dogs. :)

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


Re: python

2020-04-15 Thread Souvik Dutta
I think uninstalling and reinstalling will help. My thoughts - might not be
100% true.

On Wed, 15 Apr, 2020, 5:45 pm mike via Python-list, 
wrote:

>
> I need somehelpwith Python 36-32 and 38-32
> I have been using sublime text 3 asmy ide for about 1 year now and
> everything was fine -I tried to change to Pycharm 2020 - I was going to use
> sublime 3 as my IDE for python36-32 and the Pycharm2020 forthe IDE
> forPython38-32. Unfortunatly snt wrong as nomatter which IDE I use I get
> the following
> Python -v info
>
>
> Microsoft Windows [Version 10.0.18363.720]
> © 2019 Microsoft Corporation. All rights reserved.
>
> C:\Users\mkgrt>python
> Fatal Python error: Py_Initialize: unable to load the file system codec
> ModuleNotFoundError: No module named 'encodings'
>
> Current thread 0x1688 (most recent call first):
>
> C:\Users\mkgrt>python -v
> import _frozen_importlib # frozen
> import _imp # builtin
> import sys # builtin
> import '_warnings' # 
> import '_thread' # 
> import '_weakref' # 
> import '_frozen_importlib_external' #  '_frozen_importlib.FrozenImporter'>
> import '_io' # 
> import 'marshal' # 
> import 'nt' # 
> import _thread # previously loaded ('_thread')
> import '_thread' # 
> import _weakref # previously loaded ('_weakref')
> import '_weakref' # 
> import 'winreg' # 
> # installing zipimport hook
> import 'zipimport' # 
> # installed zipimport hook
> Fatal Python error: Py_Initialize: unable to load the file system codec
> Traceback (most recent call last):
> File "", line 971, in _find_and_load
> File "", line 953, in _find_and_load_unlocked
> ModuleNotFoundError: No module named 'encodings'
>
> Checking Pytghon36-32
>
> C:\Users\mkgrt\AppData\Local\Programs\Python\Python36-32\Lib\encodings
> the encodings in in the Lib -I have tried the following
> uninstalled Python36-32 / Python38-32 / Pycharmcreated the PYTHONPATH and
> PYTHONHOME and nothing works - Any Help would be appreciated thank you in
> advanceTop of Form
> Bottom of Form
>
>
> Python 36-32 problem encoding module not found
>
>
>
>
> Bottom of Form
>
>
> Sent from Mail for Windows 10
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Helping Windows first time users

2020-04-15 Thread Souvik Dutta
I think there should be a text an the end of the installation process that
should say how to run idle. I think this confusion happens because of how
android installs any app.

On Thu, 16 Apr, 2020, 12:33 am Barry Scott,  wrote:

> I post some suggestion to improve the Python installer for Windows
> to better sign post users on the next steps.
>
>
> https://mail.python.org/archives/list/python-id...@python.org/message/TKHID7PMKN5TK5QDQ2BL3G45FYAJNYJX/
>
> It also seems like we could do with drafting the text of a helpful
> reply to help the Windows first time users. This would help folks that
> reply to the Windows first time users to have a quick way to reply
> without drafting the text a reply every time.
>
> What are your thoughts on the installer changes and reply text?
>
> Barry
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Python launcher

2020-04-15 Thread Souvik Dutta
Yes truly this exact question is a headache for beginners. Though it was
not for me.

On Thu, 16 Apr, 2020, 12:51 am Grant Edwards, 
wrote:

> On 2020-04-15, Pieter van Oostrum  wrote:
> > Angel V  writes:
> >
> >> Hello,
> >>
> >> I'm new to Python and recently began to self learn the language.
> >> Unfortunately, whenever I try to launch it, I'm met with a black pop-up
> >> screen the disappears as soon as it comes up. I've tried uninstalling
> and I
> >> just run into the same issue. I tried downloading the program onto my
> >> brother's computer and it did the same things.
> >
> > It seems to me that a Python installation on Windows needs some "First
> > steps" documentation to direct the beginners to the essentials of how to
> > start a Python program. Preferably something that is displayed
> > immediately after installation of in some other way is prominently
> > displayed. I am not on Windows myself, so I am afraid I will not be of
> > much help in this respect.
>
> I'm not a windows user either, but it's also a pretty good indication
> that something needs to be fixed when people keep running the
> installer instead of the installed applications, and then ask
> (sometimes multiple times per day) on the mailing list why Python is
> broken.
>
> Perhaps the initial screen of the installer should state something like
>
> This is the Python _installer_.  It is used to install, remove, or
> repair Python.
>
> If you have already installed Python and want to run a Python
> application from a source file foo.py do . Or, to run the
> Python "Idle" IDE do .
>
> Then again at the end of the installation perhaps display the same
> hints again?
>
> OTOH, maybe the installer already does that, and people really _are_
> that dense...
>
> --
> Grant
>
>
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What variable type is returned from Open()?

2020-04-15 Thread Michael Torrie
On 4/15/20 5:47 PM, dcwhat...@gmail.com wrote:
> So in the case of Python, whenever the type information is available,
> I want to make it explicit rather than inferred.  Whether the A.I. is
> running a simulation of the software in an IDE, or analyzing them as
> text documents, they should be able to glean as much as possible.
> They should also be able to infer the type, via a Hungarian syntax
> variation.

Hungarian syntax is definitely an acquired taste, and better suited to
statically-typed languages.

In this specific case of dealing with open(), keep in mind that most
things that work with files (including something like, for example,
csvreader) only require a file-like object. That can be something that
open() returns, or some other object that implements the semantics. This
is important because anything that can work with files can also work
with any other implementation, provided it speaks the same protocol.
For example you could feed it a stream from a zip archive.  Or a network
stream. Or something else of your own design.  No need for "interface"
classes (although Zope does implement and use them for some reason), or
a special class hierarchy.

In my opinion, the first line of documentation should be decent
docstrings that document the parameters and return values for functions.
I can think of some cases when type hinting would be desired and
recommended.  But storing the result of open() isn't one of them.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pytube problem

2020-04-15 Thread Michael Torrie
On 4/14/20 11:22 PM, Abhi Bajpai wrote:
> Respected sir or mam.. I am facing issue related to pytube there is
> always problem with youtube module please look into this and try to
> solve it... I have to submit project.. and now all depends on you.

This is a mailing list for general Python help, and help with the parts
of the Python standard library.

If you have problems with a specific third-party module, you will want
to contact the developers of that module.  Be sure to state clearly what
the problem is, provide a short, self-contained example that illustrates
the problem, and provide a complete text copy (not an image) of the
traceback.  Actually do this for posts to this mailing list also for all
Python problems.

Also, most developers welcome patches to fix problems, as they are only
donating their time. They don't owe you anything, and certainly it does
not "all [depend] on [them/us]."  It might depend on you of course!

If you search with google I think you'll probably find the github page
for pytube and can open an issue there perhaps.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pytube problem

2020-04-15 Thread Souvik Dutta
If this is a homework assignment then you cannot do anything about it not
running. You should say that to your teacher. After all you did not make
the module!!

Souvik flutter dev

On Wed, Apr 15, 2020, 5:41 PM Abhi Bajpai 
wrote:

> Respected sir or mam..
> I am facing issue related to pytube there is always problem with youtube
> module please look into this and try to solve it... I have to submit
> project.. and now all depends on you.
>
> Sent from Mail for
> Windows 10
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Detect dotted (broken) lines only in an image using OpenCV

2020-04-15 Thread Souvik Dutta
You cannot attach any image in this list.

Souvik flutter dev

On Thu, Apr 16, 2020, 5:10 AM Edu Py  wrote:

> I am trying to learn techniques on image feature detection.
>
> I have managed to detect horizontal line(unbroken/continuous), however I
> am having trouble detecting all the dotted/broken lines in an image.
>
> Here is my test image, as you can see there are dotted lines and some
> text/boxes etc.
>
>
> my code is below:
>
> import cv2
> import numpy as np
>
> img=cv2.imread('test.jpg')
> img=functions.image_resize(img,1000,1000) #function from a script to
> resize image to fit my screen
> imgGray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
> imgEdges=cv2.Canny(imgGray,100,250)
> imgLines= cv2.HoughLinesP(imgEdges,2,np.pi/100,60, minLineLength = 10,
> maxLineGap = 100)
> for x1,y1,x2,y2 in imgLines[0]:
> cv2.line(img,(x1,y1),(x2,y2),(0,255,0),2)
>
> cv2.imshow('Final Image with dotted Lines detected',img)
>
> My output image is below. As you can see I only managed to detect the last
> dotted line. I have played around with the parameters rho,theta,min/max
> line but no luck.
>
> Any advice is greatly appreciated :)
>
> For the original link - which has the images
>
> https://stackoverflow.com/questions/61239652/detect-dotted-broken-lines-only-in-an-image-using-opencv
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Detect dotted (broken) lines only in an image using OpenCV

2020-04-15 Thread Souvik Dutta
As much as I know you will have to have a lot of traning images to make the
complete set. Try doing that.

Souvik flutter dev

On Thu, Apr 16, 2020, 5:10 AM Edu Py  wrote:

> I am trying to learn techniques on image feature detection.
>
> I have managed to detect horizontal line(unbroken/continuous), however I
> am having trouble detecting all the dotted/broken lines in an image.
>
> Here is my test image, as you can see there are dotted lines and some
> text/boxes etc.
>
>
> my code is below:
>
> import cv2
> import numpy as np
>
> img=cv2.imread('test.jpg')
> img=functions.image_resize(img,1000,1000) #function from a script to
> resize image to fit my screen
> imgGray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
> imgEdges=cv2.Canny(imgGray,100,250)
> imgLines= cv2.HoughLinesP(imgEdges,2,np.pi/100,60, minLineLength = 10,
> maxLineGap = 100)
> for x1,y1,x2,y2 in imgLines[0]:
> cv2.line(img,(x1,y1),(x2,y2),(0,255,0),2)
>
> cv2.imshow('Final Image with dotted Lines detected',img)
>
> My output image is below. As you can see I only managed to detect the last
> dotted line. I have played around with the parameters rho,theta,min/max
> line but no luck.
>
> Any advice is greatly appreciated :)
>
> For the original link - which has the images
>
> https://stackoverflow.com/questions/61239652/detect-dotted-broken-lines-only-in-an-image-using-opencv
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pytube problem

2020-04-15 Thread Souvik Dutta
Or install the setuptools by using pip install setuptools.

On Thu, Apr 16, 2020, 7:44 AM Souvik Dutta  wrote:

> If this is a homework assignment then you cannot do anything about it not
> running. You should say that to your teacher. After all you did not make
> the module!!
>
> Souvik flutter dev
>
> On Wed, Apr 15, 2020, 5:41 PM Abhi Bajpai 
> wrote:
>
>> Respected sir or mam..
>> I am facing issue related to pytube there is always problem with youtube
>> module please look into this and try to solve it... I have to submit
>> project.. and now all depends on you.
>>
>> Sent from Mail for
>> Windows 10
>>
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pytube problem

2020-04-15 Thread Grant Edwards
On 2020-04-15, Abhi Bajpai  wrote:
> Respected sir or mam..

> I am facing issue related to pytube there is always problem with
> youtube module please look into this and try to solve it... I have
> to submit project.. and now all depends on you.

Oh dear.  If all depends on me, you're in trouble.  OTOH, the
message was addressed to "respected sir or maam", so that probably
lets me off the hook...

--
Grant



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


Re: Helping Windows first time users

2020-04-15 Thread DL Neil via Python-list

On 16/04/20 3:34 PM, Dennis Lee Bieber wrote:

On Wed, 15 Apr 2020 19:23:43 +0100, Barry Scott 
declaimed the following:


I post some suggestion to improve the Python installer for Windows
to better sign post users on the next steps.

https://mail.python.org/archives/list/python-id...@python.org/message/TKHID7PMKN5TK5QDQ2BL3G45FYAJNYJX/

It also seems like we could do with drafting the text of a helpful
reply to help the Windows first time users. This would help folks that
reply to the Windows first time users to have a quick way to reply
without drafting the text a reply every time.

What are your thoughts on the installer changes and reply text?


No other Windows installers that I know of provide information on how
to use the installed application. Anyone installing software should realize
that the installer file itself is just that, an installer, and not be used
in attempts to run the installed application, they should look elsewhere
for the application itself.

I would also note that there are MANY Python installers for Windows:
Python.org, ActiveState, Anaconda, Enthought, and even (for Win10) the M$
"app store" has one. Are you proposing that all these sources need to make
changes to their distributions?



@Barry's observation is that many first-time Python-on-Windows users 
seem to fail at the first click. (I have also voiced similar concerns 
'here')



As mentioned, I don't pay the regular 'MSFT-tax'. However, many use 
MS-Windows because that's what they've been given, or must use, at their 
work. I have read articles which suggest that MS-Windows has improved to 
the point of making a good/better dev.platform. Whether *I* agree, or 
not, is of no import in this conversation.



If one downloads other Win-installer installed software, what happens? 
Is Python's Win-download following the same, expected, pattern?

If not, why not?
Why does the installer not delete itself after (successful) 
installation? ie why are users left a situation where (what is actually) 
re-installation is the most obvious 'next thing to do'?



What about installing a menu-item (or whatever they call those Win-10 
home-screen 'boxes'), and that it either:

- launches Idle as a dev.env, or
- opens a 'DOS box' and fires-up Python from the cmdLN

Either would at-least allow neophytes to get-started. Neither would 
affect established users, who dive straight into their IDE-of-choice.


As for other distributions: what they do is their business. Literally! 
After all, (in thought) one man's baldachin is another man's canopy...



Meantime, we cut-down on so many of the essentially repetitive 'noise' 
questions on this list. Perhaps more importantly, it removes the 
temptation to assume that the tenth such enquiry this-week, has come 
from the same person as the other nine, and thus to respond bluntly, 
impolitely, or in an other than encouraging fashion. (see also the 
Python Foundation's several diversity, inclusion, and other principles)

--
Regards =dn
--
https://mail.python.org/mailman/listinfo/python-list


Re: Helping Windows first time users

2020-04-15 Thread joseph pareti
FWIW, here is my experience on Windows 10.

I had some troubles with python on Windows 10. Most of the issues were
presumably due to having multiple python versions on the same PC, and also
relying on 'miniconda3' which was kind of inherited from an older
experiment.

At some point, to recover from a system crash I had to re-install Windows
10, and after that I installed the full suite of Anaconda products. Things
improved a lot. Besides Python and Jupyter notebook, i find Spyder very
useful as an IDE, and everything seems to be running smoothly. On top of
that I also installed PyTorch 1.4: I am currently training a neural network
which takes more than 20 hours. The only annoying thing was the
occasional automatic reboot during keyboard inactivity which I then
disabled at the "Windows Update" menu.

Am Mi., 15. Apr. 2020 um 21:06 Uhr schrieb Barry Scott <
ba...@barrys-emacs.org>:

> I post some suggestion to improve the Python installer for Windows
> to better sign post users on the next steps.
>
>
> https://mail.python.org/archives/list/python-id...@python.org/message/TKHID7PMKN5TK5QDQ2BL3G45FYAJNYJX/
>
> It also seems like we could do with drafting the text of a helpful
> reply to help the Windows first time users. This would help folks that
> reply to the Windows first time users to have a quick way to reply
> without drafting the text a reply every time.
>
> What are your thoughts on the installer changes and reply text?
>
> Barry
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>


-- 
Regards,
Joseph Pareti - Artificial Intelligence consultant
Joseph Pareti's AI Consulting Services
https://www.joepareti54-ai.com/
cell +49 1520 1600 209
cell +39 339 797 0644
-- 
https://mail.python.org/mailman/listinfo/python-list