Application Distribution using Embeddable Zip on Windows

2020-06-17 Thread Palash Bauri
I am developing a parser with PLY and was hoping to distribute it to users.
Ofcourse there're plenty of Ways to build a executable of an Python script
such as PyInstaller , Py2Exe and some others, but they have their problems
, one of them which is their output distribution size is huge, a simple
"hello world" program would even cost user 30 to 50+ megabytes of storage.
Distributing on Linux is not that much of hassle with snap packages or even
Appimages. But on windows it's a mess.

But Python Embeddable Zip seems promising to me, it's very lightweight.

But the thing is I couldn't figure out how to build a "launcher" (As
mentioned here -> https://docs.python.org/3/using/windows.html) for my
application?

Any help or suggestions would be very much appreciated.

~Palash Bauri
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Application Distribution using Embeddable Zip on Windows

2020-06-17 Thread Chris Angelico
On Wed, Jun 17, 2020 at 5:00 PM Palash Bauri  wrote:
>
> I am developing a parser with PLY and was hoping to distribute it to users.
> Ofcourse there're plenty of Ways to build a executable of an Python script
> such as PyInstaller , Py2Exe and some others, but they have their problems
> , one of them which is their output distribution size is huge, a simple
> "hello world" program would even cost user 30 to 50+ megabytes of storage.
> Distributing on Linux is not that much of hassle with snap packages or even
> Appimages. But on windows it's a mess.
>
> But Python Embeddable Zip seems promising to me, it's very lightweight.
>
> But the thing is I couldn't figure out how to build a "launcher" (As
> mentioned here -> https://docs.python.org/3/using/windows.html) for my
> application?
>
> Any help or suggestions would be very much appreciated.
>

Try creating a .pyz file using the zipapp module:

https://docs.python.org/3/library/zipapp.html

It should 'just work', out of the box.

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


Re: Application Distribution using Embeddable Zip on Windows

2020-06-17 Thread Palash Bauri
> Try creating a .pyz file using the zipapp module:

> https://docs.python.org/3/library/zipapp.html

> It should 'just work', out of the box.

> ChrisA

But I will still need to build a launcher or put a Python Interpreter
at users' path in order to run .pyz files.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Application Distribution using Embeddable Zip on Windows

2020-06-17 Thread Chris Angelico
On Wed, Jun 17, 2020 at 9:09 PM Palash Bauri  wrote:
>
> > Try creating a .pyz file using the zipapp module:
>
> > https://docs.python.org/3/library/zipapp.html
>
> > It should 'just work', out of the box.
>
> > ChrisA
>
> But I will still need to build a launcher or put a Python Interpreter
> at users' path in order to run .pyz files.

Putting a Python interpreter onto the users' systems is the job of
python.org and/or the Windows app store. You should just have to worry
about your own app.

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


Re: Application Distribution using Embeddable Zip on Windows

2020-06-17 Thread Palash Bauri
Well , in some cases that is true, but in my program's case that's not
true as it's targetting not-so-much tech savvy users. I would like to
make an compact plug-and-play solution.

And , I think using Python Embeddable zip and a custom launcher will
be more suitable for my program.

On 6/17/20, Chris Angelico  wrote:
> On Wed, Jun 17, 2020 at 9:09 PM Palash Bauri 
> wrote:
>>
>> > Try creating a .pyz file using the zipapp module:
>>
>> > https://docs.python.org/3/library/zipapp.html
>>
>> > It should 'just work', out of the box.
>>
>> > ChrisA
>>
>> But I will still need to build a launcher or put a Python Interpreter
>> at users' path in order to run .pyz files.
>
> Putting a Python interpreter onto the users' systems is the job of
> python.org and/or the Windows app store. You should just have to worry
> about your own app.
>
> ChrisA
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Application Distribution using Embeddable Zip on Windows

2020-06-17 Thread Palash Bauri
Well, that crossed my mind earlier, but as my program is a text parser and
has it's own input & output source filetype, it should have those filetypes
associated with the program. Just using an MSI installer will not do that
trick.


~Palash Bauri

On Wed, 17 Jun 2020, 7:18 pm Shakil Khan,  wrote:

> How about writing a windows MSI installer and wrapping Python and your
> script together in the MSI.
>
> $hakil
>
> > On Jun 17, 2020, at 6:44 AM, Palash Bauri 
> wrote:
> >
> > Well , in some cases that is true, but in my program's case that's not
> > true as it's targetting not-so-much tech savvy users. I would like to
> > make an compact plug-and-play solution.
> >
> > And , I think using Python Embeddable zip and a custom launcher will
> > be more suitable for my program.
> >
> > On 6/17/20, Chris Angelico  wrote:
> >> On Wed, Jun 17, 2020 at 9:09 PM Palash Bauri 
> >> wrote:
> >>>
>  Try creating a .pyz file using the zipapp module:
> >>>
>  https://docs.python.org/3/library/zipapp.html
> >>>
>  It should 'just work', out of the box.
> >>>
>  ChrisA
> >>>
> >>> But I will still need to build a launcher or put a Python Interpreter
> >>> at users' path in order to run .pyz files.
> >>
> >> Putting a Python interpreter onto the users' systems is the job of
> >> python.org and/or the Windows app store. You should just have to worry
> >> about your own app.
> >>
> >> ChrisA
> >> --
> >> 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: Application Distribution using Embeddable Zip on Windows

2020-06-17 Thread Palash Bauri
Well , I didn't know that single scripts can be used to associate
filetypes. I will test it out.

Currently I'm doing an experiment with Embeddable distribution , Writing a
launcher with rust. I have no idea what's the efficient or correct way to
do it. Let's hope for the best.
I think they should've explained how to write an Launcher or even an
example code in the docs.

I will have your solution as an backup option.


~Palash Bauri

On Wed, 17 Jun 2020, 8:30 pm Shakil Khan,  wrote:

> May be I have not understood your requirement.
> But let me put what I understood and how can it be achieved.
>
> Requirement:-
> There is a file in system called as  abc.pal, this file when double
> clicked produces a file called as abc.parsed
>
> Solution:
> 1) Pack the MSI and Python Binary in MSI
> 2) Unpack and install the MSI and as part of it install the Python in
> standard Path and update the PATH
> 3) Associate the file type *.pal to open with your application say
> Palash_parser.py
> 4) When the file abc.pal is double-clicked the associated application is
> Palash_parser.py.
> The application Palash_parser.py can run without any issues as the Python
> is already installed and in Path and produces abc.parsed
>
> Sorry if this is not what you intended.
> Good luck then.
>
> $hakil
>
> On Jun 17, 2020, at 7:48 AM, Palash Bauri  wrote:
>
> Well, that crossed my mind earlier, but as my program is a text parser and
> has it's own input & output source filetype, it should have those filetypes
> associated with the program. Just using an MSI installer will not do that
> trick.
>
>
> ~Palash Bauri
>
> On Wed, 17 Jun 2020, 7:18 pm Shakil Khan,  wrote:
>
>> How about writing a windows MSI installer and wrapping Python and your
>> script together in the MSI.
>>
>> $hakil
>>
>> > On Jun 17, 2020, at 6:44 AM, Palash Bauri 
>> wrote:
>> >
>> > Well , in some cases that is true, but in my program's case that's not
>> > true as it's targetting not-so-much tech savvy users. I would like to
>> > make an compact plug-and-play solution.
>> >
>> > And , I think using Python Embeddable zip and a custom launcher will
>> > be more suitable for my program.
>> >
>> > On 6/17/20, Chris Angelico  wrote:
>> >> On Wed, Jun 17, 2020 at 9:09 PM Palash Bauri 
>> >> wrote:
>> >>>
>>  Try creating a .pyz file using the zipapp module:
>> >>>
>>  https://docs.python.org/3/library/zipapp.html
>> >>>
>>  It should 'just work', out of the box.
>> >>>
>>  ChrisA
>> >>>
>> >>> But I will still need to build a launcher or put a Python Interpreter
>> >>> at users' path in order to run .pyz files.
>> >>
>> >> Putting a Python interpreter onto the users' systems is the job of
>> >> python.org and/or the Windows app store. You should just have to worry
>> >> about your own app.
>> >>
>> >> ChrisA
>> >> --
>> >> 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: Friday Finking: Beyond implementing Unicode

2020-06-17 Thread Terry Reedy

On 6/16/2020 7:45 PM, DL Neil via Python-list wrote:

On 13/06/20 4:47 AM, Terry Reedy wrote:
There was a recent thread on python-ideas discussing this.  It started 
with arrow characters.  There have been others.


Am pleased to hear that it's neither 'new' nor 'way out there'...


The idea has been rejected multiple times, which puts you in good 
company (in a sense).


Am not subscribed to that list. Went looking for its archives, but 
failed - there's no "ideas" on 
(https://mail.python.org/mailman/listinfo). Please send a pointer...


Try mailman3.
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Archive link on page.

--
Terry Jan Reedy


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


Re: Python Curses Programming HowTo -reviewers?

2020-06-17 Thread Alan Gauld via Python-list
On 16/06/2020 16:38, Alan Gauld via Python-list wrote:
> This is now available as a PDF and I'd be interested in review comments.

Just to add that I can send a zip of the code files too.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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


uninstallation issue

2020-06-17 Thread [email protected]
   My python 3.8 version is not getting uninstall in my system.

   Please solve this problem.

    

   Thanks for you concern.

    

   Sent from [1]Mail for Windows 10

    

References

   Visible links
   1. https://go.microsoft.com/fwlink/?LinkId=550986
-- 
https://mail.python.org/mailman/listinfo/python-list


Property for dataclass field with default value

2020-06-17 Thread Ivan Ivanyuk
Hello All,

I have some trouble using @dataclass together with @property decorator
or property() function.

>From the documentation and PEP is seems that the intended behaviour of
@dataclass is to be the same as normal __init__() that sets instance
variables.

But it seems that when using @property decorator some parts work
differently when relying on default values. I'm using Pyhton 3.8.3 for
this.

Using the code:

from dataclasses import dataclass

@dataclass
class Container:
x: int = 30

@property
def x(self) -> int:
return self._x

@x.setter
def x(self, z: int):
if z > 1:
self._x = z
else:
raise ValueError
c= Container(x=10)
print(c)
c= Container()
print(c)

output is:

Container(x=10)
Traceback (most recent call last):
  File 
"/Users/ivanivanyuk/Documents/Shared/repos/bitbucket/evbox/g5plus-automated-testing/dataclass_example.py",
line 18, in 
c= Container()
  File "", line 3, in __init__
  File 
"/Users/ivanivanyuk/Documents/Shared/repos/bitbucket/evbox/g5plus-automated-testing/dataclass_example.py",
line 13, in x
if z > 1:
TypeError: '>' not supported between instances of 'property' and 'int'

Code with __init__() being inserted that should be roughly the same as
generated by the @dataclass decorator:

@dataclass
class Container:
x: int = 30

def __init__(self, x:int = 30):
self.x = x

@property
def x(self) -> int:
return self._x

@x.setter
def x(self, z: int):
if z > 1:
self._x = z
else:
raise ValueError

c= Container(x=10)
print(c)
c= Container()
print(c)

output is:
Container(x=10)
Container(x=30)

As far as I can see, this happens because actual __init__() generated
by the @dataclass decorator looks like:

def __init__(self, x:int = ):
self.x = x

I came up with a really convoluted way to work around it (just for
fun, as this clearly defies the idea of dataclasses as a way to
decrease boilerplate code):

from dataclasses import dataclass, field

def set_property():
Container.x = property(Container.get_x, Container.set_x)
return 30

@dataclass
class Container:
x: int = field(default_factory=set_property)

def get_x(self) -> int:
return self._x

def set_x(self, z: int):
if z > 1:
self._x = z
else:
raise ValueError

c= Container(x=10)
print(c)
c= Container()
print(c)

output is:
Container(x=10)
Container(x=30)

So, what I'm missing here? Is there some way to use field() or
decorators to make property just work the same as in non-decorated
class?

Best regards,
Ivan Ivanyuk
-- 
https://mail.python.org/mailman/listinfo/python-list


Problems with python383.dll

2020-06-17 Thread Manuel Fernandez - Università

Dear Sirs,
I tried to install the software Python 3.8.3 (32 bit), but after it 
finished and I tried to start it, there appeared a message in which it 
was written that it couldn't find the file python383.dll and stopped.

What can I do? Do you have this file so that I can insert it manually.
I thank you for your help.
Best wishes,
Manuel Fernandez


--

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


Re: Aw: Python Curses Programming HowTo -reviewers?

2020-06-17 Thread Alan Gauld via Python-list
On 16/06/2020 19:34, Karsten Hilbert wrote:
>> I therefore took it on myself to do a translation of the Linux
>> Documentation Project's "Curses HowTo" by Pradeep Padala into Python.
>>
>> This is now available as a PDF and I'd be interested in review comments.
> 
> I'd be interested in having a look, generally.
> 
> Will this be available somewhere ?

Eventually, on my web site.
After the next round of corrections.

I'll send the PDF and zip via direct mail.


BTW I have enough reviewers now, Thanks everyone!


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


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


Re: uninstallation issue

2020-06-17 Thread Souvik Dutta
Before you uninstall right click on idle and find the location where python
is installed. Probably it would be under C:\\Programe files\\python. And
then uninstall python. After that you will see that some folders where
deleted but others where not. Delete the others and you will have
uninstalled python.

On Thu, Jun 18, 2020, 4:06 AM [email protected] <
[email protected]> wrote:

>My python 3.8 version is not getting uninstall in my system.
>
>Please solve this problem.
>
>
>
>Thanks for you concern.
>
>
>
>Sent from [1]Mail for Windows 10
>
>
>
> References
>
>Visible links
>1. https://go.microsoft.com/fwlink/?LinkId=550986
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Problems with python383.dll

2020-06-17 Thread Michael Torrie
On 6/16/20 11:18 AM, Manuel Fernandez - Università wrote:
> Dear Sirs,
> I tried to install the software Python 3.8.3 (32 bit), but after it 
> finished and I tried to start it, there appeared a message in which it 
> was written that it couldn't find the file python383.dll and stopped.
> What can I do? Do you have this file so that I can insert it manually.
> I thank you for your help.
> Best wishes,
> Manuel Fernandez

Which version of Windows?  32-bit or 64-bit? Where did you download the
installer from?  How did you try to start it? Normally python is a
command-line tool, so you run it from a command prompt, not from the
start menu.  Read through this page and see if it helps at all:
https://docs.python.org/3/using/windows.html
-- 
https://mail.python.org/mailman/listinfo/python-list


[RELEASE] Python 3.7.8rc1 and 3.6.11rc1 are now available for testing

2020-06-17 Thread Ned Deily
Details here:

https://discuss.python.org/t/python-3-7-8rc1-and-3-6-11rc1-are-now-available-for-testing/4467


https://www.python.org/downloads/release/python-378rc1/
https://www.python.org/downloads/release/python-3611rc1/

--
  Ned Deily
  [email protected] -- []

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