run subprocess in separate window
Hi, I am trying to create GUI launcher of several applications using Python and Tkinter. Currently when using subprocess.Popen("mycommand") all output goes to the stdout of my launcher. For some command line applications I need to launch them so that their output goes into the separate "terminal" window. How can I make it? Thanks, Radek -- http://mail.python.org/mailman/listinfo/python-list
Re: run subprocess in separate window
Hello, as you can see, I tried subprocess methods. But could not find the right call. Radek [EMAIL PROTECTED] wrote: > Radek a écrit : > > > Hi, > > > > I am trying to create GUI launcher of several applications using Python > > and Tkinter. > > > > Currently when using subprocess.Popen("mycommand") all output goes to > > the stdout of my launcher. > > > > For some command line applications I need to launch them so that their > > output goes into the separate "terminal" window. > > > > How can I make it? > > > > Thanks, > > > > Radek > > Hello, have a look at the subprocess module, it might help you get to > what you want. -- http://mail.python.org/mailman/listinfo/python-list
fetch html page via isa proxy
Hi, I have been trying several days to get the html page of www.python.org when behind the corporate MS isa proxy. I have tried setting http_proxy environment, played with proxy openers, use ntlm proxy server all without success. I can get the page using Firefox and IE with proxy settings. As the last resort I started to play with pywin32 win32inet, but even the test_win32inet.py does not get there. Any advice? Or better working example? Thanks a lot, Radek -- http://mail.python.org/mailman/listinfo/python-list
Re: fetch html page via isa proxy
> So you have already tried NTLM Authorization Proxy > Server?http://ntlmaps.sourceforge.net/ > This used to work fine for me but that was at least 3-4 years ago. Actually NTLM proxy server works for most intranet addresses. Not for the outside Internet ones, though. Radek -- http://mail.python.org/mailman/listinfo/python-list
HTTPServer and SSL
Hello, some people recommend following implementation of a simple HTTP server that supports SSL: Handler = http.server.BaseHTTPRequestHandlerhttpd = http.server.HTTPServer(("", 4443), Handler) httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True) httpd.serve_forever() I wonder whether this usage is *supported* or not. The documentation is not explicit about whether the httpd.socket attribute can be safely reassigned. Also there were some questions regarding a simple HTTPS server on this list already and none of the answerers mentioned this approach. Also there used to be a HTTPSServer in the test suite of Python 2.7 in 2014 that did a similar thing but in the "get_request" method but it isn't there anymore. So, is there a *supported* way of combining http.server.HTTPServer and ssl? Best regards -- Radek -- https://mail.python.org/mailman/listinfo/python-list
Re: Pylint prefers list comprehension over filter...
2016-05-07 21:17 GMT+02:00 Christopher Reimer : > On 5/5/2016 6:37 PM, Stephen Hansen wrote: > >> On Thu, May 5, 2016, at 06:26 PM, Christopher Reimer wrote: >> >>> Which is one is correct (Pythonic)? Or does it matter? >>> >> First, pylint is somewhat opinionated, and its default options shouldn't >> be taken as gospel. There's no correct: filter is fine. >> > > Since the code I'm working on is resume fodder (i.e., "Yes, I code in > Python! Check out my chess engine code on GitHub!"), I want it to be as > Pythonic and PEP8-compliant as possible. That includes scoring 10/10 with > pylint. Never know when an asshat hiring manager would reject my resume out > of hand because my code fell short with pylint. > > For my purposes, I'm using the list comprehension over filter to keep > pylint happy. > > > Thank you, > > Chris R. > -- > https://mail.python.org/mailman/listinfo/python-list > Don't forget that you can also place a pylintrc file (with some reasonable comments) into the repository or use the other means to disable selected rules -- https://mail.python.org/mailman/listinfo/python-list
Re: Quote of the day
2016-05-17 9:50 GMT+02:00 Steven D'Aprano < steve+comp.lang.pyt...@pearwood.info>: > Overhead in the office today: > > > "I don't have time to learn an existing library - much faster to make my > own > mistakes!" > > > > -- > Steve > > -- > https://mail.python.org/mailman/listinfo/python-list > *THUMBS UP* At least they are aware of that "own mistakes" part... Not like my employer... -- https://mail.python.org/mailman/listinfo/python-list
Shear image (numpy.ndarray)
Hi, I am looking for some function that would shear my 2D numpy.ndarray array. Since the numpy (probably) does not provide such a functionality (numpy.roll does not do what I need), I hope the PIL might do the trick. Google give me page that says: 'This function (im.transform) can be used to scale, translate, rotate, and shear the original image.', however I was not able to get it work. So could anybody give me a hand how to use it (or how to shear the image in different way)? The input array is 2D (NxM) type numpy.float32. Thanks Radek -- http://mail.python.org/mailman/listinfo/python-list
Re: Shear image (numpy.ndarray)
Yes, I already find that scipy.ndimage.interpolation.affine_transform will solve this (but thank you Robert anyway!). Just for others (if somebody will find this thread): The 'matrix' parameter is transformation matrix for shear transformation. For more detailes see: http://en.wikipedia.org/wiki/Shear_matrix Radek -- http://mail.python.org/mailman/listinfo/python-list
Re: What editor shall I use?
> What editor shall I use if my Python script must contain utf-8 > characters? > I use XP vim :-) > Thank you for reply > l.b. not for all :-) -- http://mail.python.org/mailman/listinfo/python-list