Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98173

Re: Python PNG Viewer(Browser Based)

Newsgroups comp.lang.python
Date 2015-11-03 08:25 -0800
References <9c24559b-17a4-41fc-80a2-9258fd84c9f1@googlegroups.com>
Message-ID <5732e5a4-23d4-43df-8af7-41be14ab37dc@googlegroups.com> (permalink)
Subject Re: Python PNG Viewer(Browser Based)
From marco.nawijn@colosso.nl

Show all headers | View raw


On Tuesday, November 3, 2015 at 12:55:09 PM UTC+1, Arshpreet Singh wrote:
> Hello Everyone,
> 
> I am looking for Browser-based PNG file viewer written in
> Python.(Flask framework preferably)
> 
> Following project(Flask-Based) provides many things(File manager as
> well as file viewer)  but it does not support PNG files.
> 
> https://github.com/vmi356/filemanager
> 
> Any idea if I have to write my own browser based PNG viewer from
> scratch(Using PIL or other required library)
> 
> On the other side if I have to write only Desktop-based only two lines
> are enough to do many things:
> 
> Like,
> 
> from PIL import Image
> f = Image.open("file.png").show()
> 
> 
> But I am not getting right sense that how to make possible using Python+Flask.
> 
> Hope I am able to tell my problem?

Well, if you only want to open the PNG file in the webbrowser
(in contrast of serving them over the internet), you can do it
in two lines too:

import webbrowser
webbrowser.open('file.png')

But this is probably not what you want.

M.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Python PNG Viewer(Browser Based) Arshpreet Singh <arsh840@gmail.com> - 2015-11-03 03:54 -0800
  Re: Python PNG Viewer(Browser Based) Chris Warrick <kwpolska@gmail.com> - 2015-11-03 17:01 +0100
    Re: Python PNG Viewer(Browser Based) Arshpreet Singh <arsh840@gmail.com> - 2015-11-03 22:27 -0800
      Re: Python PNG Viewer(Browser Based) Ben Finney <ben+python@benfinney.id.au> - 2015-11-04 18:23 +1100
  Re: Python PNG Viewer(Browser Based) marco.nawijn@colosso.nl - 2015-11-03 08:25 -0800

csiph-web