Re: While, If, Count Statements

2017-11-28 Thread Cai Gengyang
On Tuesday, November 28, 2017 at 6:09:17 AM UTC+8, Ned Batchelder wrote: > On 11/27/17 7:54 AM, Cai Gengyang wrote: > > Input : > > > > count = 0 > > > > if count < 5: > >print "Hello, I am an if statement and count is", count > > > > while count < 10: > >print "Hello, I am a while and coun

Re: How do I send keystrokes to a console window in Windows XP?

2017-11-28 Thread jglobocnik37
On Saturday, July 16, 2005 at 2:46:34 PM UTC+2, Benji York wrote: > googlegro...@garringer.net wrote: > > How do I use Python to send keystrokes to a console window in Windows > > XP? > > import win32com.client > > shell = win32com.client.Dispatch("WScript.Shell") > shell.AppActivate("Command Pro

Re: While, If, Count Statements

2017-11-28 Thread Frank Millman
"Cai Gengyang" wrote in message news:c2dfc9c4-3e16-480c-aebf-553081775...@googlegroups.com... Sure, so how would the code look like if I want the "if" statement to be nested inside the "while" loop Have you tried putting the 'if' statement inside the 'while' loop? If not, give it a shot and

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-28 Thread Paul Moore
On 27 November 2017 at 19:05, Paul Moore wrote: > On 27 November 2017 at 18:13, Skip Montanaro wrote: >>> If you have a Windows key, you can assign it to be >>> the Compose key. >> >> Would this be true on a machine running Windows? My work environment >> has me developing on Linux, with a Window

Re: Increasing the diversity of people who write Python

2017-11-28 Thread Tim Golden
On 28/11/2017 08:41, Paul Moore wrote: On 27 November 2017 at 19:05, Paul Moore wrote: On 27 November 2017 at 18:13, Skip Montanaro wrote: If you have a Windows key, you can assign it to be the Compose key. Would this be true on a machine running Windows? My work environment has me developi

python training in chennai & bangalore

2017-11-28 Thread rosebk1989
Besant Technologies Chennai & Bangalore you will be able to get vast experience by transforming your ideas into actual new application and software controls for the websites and the entire computing enterprise. To make it easier for you Besant Technologies at Chennai & Bangalore is visualizing a

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Chris Angelico
On Tue, Nov 28, 2017 at 5:04 PM, Marko Rauhamaa wrote: > Ian Kelly : > >> On Sat, Nov 25, 2017 at 7:10 AM, John Pote >> wrote: >>> The issue is that if I press a key on the keyboard the key is >>> immediately shown on the screen but then the shutdown() call blocks >>> until another TCP connectio

Re: Increasing the diversity of people who write Python (was: Benefits of unicode identifiers)

2017-11-28 Thread Thomas Jollans
On 2017-11-24 17:41, Skip Montanaro wrote: > Perhaps for my next computer I should choose a > non-ASCII keyboard option when configuring it. > > Skip > I'm quite fond of the US international keyboard layout. It lets you type most Latin-lettered languages with relative ease (including, obviously,

Re: nospam ** infinity?

2017-11-28 Thread Thomas Jollans
On 2017-11-28 02:14, Skip Montanaro wrote: >> I'm 99.5% certain it's not gate_news. > > A funny thing. All messages I have looked at so far with the "nospam" > thing have a Message-ID from binkp.net. (They are also all Usenet > posts.) For example: > > Newsgroups: comp.lang.python > Subject: Re:

Re: nospam ** infinity?

2017-11-28 Thread breamoreboy
On Tuesday, November 28, 2017 at 1:14:51 AM UTC, Skip Montanaro wrote: > > I'm 99.5% certain it's not gate_news. > > A funny thing. All messages I have looked at so far with the "nospam" > thing have a Message-ID from binkp.net. (They are also all Usenet > posts.) For example: > > Newsgroups: com

Re: nospam ** infinity?

2017-11-28 Thread Tim Golden
On 28/11/2017 10:17, Thomas Jollans wrote: On 2017-11-28 02:14, Skip Montanaro wrote: I'm 99.5% certain it's not gate_news. A funny thing. All messages I have looked at so far with the "nospam" thing have a Message-ID from binkp.net. (They are also all Usenet posts.) For example: Newsgroups:

Re: nospam ** infinity?

2017-11-28 Thread Peter Otten
Skip Montanaro wrote: >> I'm 99.5% certain it's not gate_news. > > A funny thing. All messages I have looked at so far with the "nospam" > thing have a Message-ID from binkp.net. (They are also all Usenet > posts.) For example: > > Newsgroups: comp.lang.python > Subject: Re: I have anaconda, but

Re: While, If, Count Statements

2017-11-28 Thread Cai Gengyang
On Tuesday, November 28, 2017 at 4:18:04 PM UTC+8, Frank Millman wrote: > "Cai Gengyang" wrote in message > news:c2dfc9c4-3e16-480c-aebf-553081775...@googlegroups.com... > > > Sure, so how would the code look like if I want the "if" statement to be > > nested inside the "while" loop > > Have y

Re: While, If, Count Statements

2017-11-28 Thread Frank Millman
"Cai Gengyang" wrote in message news:a8335d2c-1fb9-4ba9-b752-418d19e57...@googlegroups.com... On Tuesday, November 28, 2017 at 4:18:04 PM UTC+8, Frank Millman wrote: > "Cai Gengyang" wrote in message > news:c2dfc9c4-3e16-480c-aebf-553081775...@googlegroups.com... > > > Sure, so how would the c

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Nov 28, 2017 at 5:04 PM, Marko Rauhamaa wrote: >> Seems to be one of the fundamental multithreading issues: each thread >> is blocked on precisely one event. Asyncio is more flexible: you can >> multiplex on a number of events. > > Not really, no. Unless select() counts

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Chris Angelico
On Tue, Nov 28, 2017 at 11:52 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Tue, Nov 28, 2017 at 5:04 PM, Marko Rauhamaa wrote: >>> Seems to be one of the fundamental multithreading issues: each thread >>> is blocked on precisely one event. Asyncio is more flexible: you can >>> multiplex o

Re: While, If, Count Statements

2017-11-28 Thread Cai Gengyang
On Tuesday, November 28, 2017 at 8:12:09 PM UTC+8, Frank Millman wrote: > "Cai Gengyang" wrote in message > news:a8335d2c-1fb9-4ba9-b752-418d19e57...@googlegroups.com... > > > > On Tuesday, November 28, 2017 at 4:18:04 PM UTC+8, Frank Millman wrote: > > > "Cai Gengyang" wrote in message > > > ne

asyncio loop.call_soon()

2017-11-28 Thread ast
Hello Python's doc says about loop.call_soon(callback, *arg): Arrange for a callback to be called as soon as possible. The callback is called after call_soon() returns, when control returns to the event loop. But it doesn't seem to be true; see this program: import asyncio async def task_fu

Re: asyncio loop.call_soon()

2017-11-28 Thread Ian Kelly
On Tue, Nov 28, 2017 at 8:30 AM, ast wrote: > Hello > > Python's doc says about loop.call_soon(callback, *arg): > > Arrange for a callback to be called as soon as possible. The callback is > called after call_soon() returns, when control returns to the event loop. > > But it doesn't seem to be tru

Has anyone worked on docker with windows

2017-11-28 Thread Robert Clove
Hi, what am i trying to achieve is, container of windows with an application like slack on it. Does window container has an UI? Has anyone worked on it, is it feasible? -- https://mail.python.org/mailman/listinfo/python-list

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Marko Rauhamaa
Chris Angelico : > On Tue, Nov 28, 2017 at 11:52 PM, Marko Rauhamaa wrote: >> The original poster's problem seems to be caused by blocking APIs that >> cannot be multiplexed using select(). A good many Python facilities are >> the same way. >> >> Such blocknoxious APIs are at the core of the mult

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Chris Angelico
On Wed, Nov 29, 2017 at 4:22 AM, Marko Rauhamaa wrote: > I have solved the gethostbyname() problem by implementing the DNS > protocol myself (in Python). Do you respect /etc/nsswitch.conf? >> I don't understand why you keep insisting that asyncio and threads are >> somehow incompatible, > > Wher

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Nov 29, 2017 at 4:22 AM, Marko Rauhamaa wrote: >> I have solved the gethostbyname() problem by implementing the DNS >> protocol myself (in Python). > > Do you respect /etc/nsswitch.conf? No, but I don't need to. >>> I don't understand why you keep insisting that async

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Chris Angelico
On Wed, Nov 29, 2017 at 5:03 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Wed, Nov 29, 2017 at 4:22 AM, Marko Rauhamaa wrote: >>> I have solved the gethostbyname() problem by implementing the DNS >>> protocol myself (in Python). >> >> Do you respect /etc/nsswitch.conf? > > No, but I don't

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Nov 29, 2017 at 5:03 AM, Marko Rauhamaa wrote: >> Chris Angelico : >>> Do you respect /etc/nsswitch.conf? >> >> No, but I don't need to. > > Ah, right. Until the day you're wrestling with "why doesn't /etc/hosts > apply to this program". Yep, you totally don't need nssw

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Chris Angelico
On Wed, Nov 29, 2017 at 5:32 AM, Marko Rauhamaa wrote: > Chris Angelico : > >> On Wed, Nov 29, 2017 at 5:03 AM, Marko Rauhamaa wrote: >>> Chris Angelico : Do you respect /etc/nsswitch.conf? >>> >>> No, but I don't need to. >> >> Ah, right. Until the day you're wrestling with "why doesn't /et

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Marko Rauhamaa
Chris Angelico : > On Wed, Nov 29, 2017 at 5:32 AM, Marko Rauhamaa wrote: >> Don't you worry about my programs. > > Okay, but you can't claim that problems are solvable if you cheat them. What I'm saying is that there's no particular reason why glibc couldn't offer a solution. There *is* getaddri

Re: How to shut down a TCPServer serve_forever() loop?

2017-11-28 Thread Ian Kelly
On Tue, Nov 28, 2017 at 11:54 AM, Marko Rauhamaa wrote: > Chris Angelico : >> Would the OP have been trivially able to send a signal to the >> process? Yes. > >Python signal handlers are always executed in the main Python thread, >even if the signal was received in another thread. This mea

Re: asyncio loop.call_soon()

2017-11-28 Thread Terry Reedy
On 11/28/2017 11:02 AM, Ian Kelly wrote: On Tue, Nov 28, 2017 at 8:30 AM, ast wrote: Hello Python's doc says about loop.call_soon(callback, *arg): Arrange for a callback to be called as soon as possible. The callback is called after call_soon() returns, when control returns to the event loop.

Re: Pros and cons of Python sources?

2017-11-28 Thread Martin Schöön
Den 2017-11-27 skrev Cameron Simpson : > > But if the package is mainstream you're probably ok? You could just live with > it and do no more damage. > > Otherwise, look to see what python packages are installed which you think you > may have pipped, and reinstall those. But also, pip tends not to

Re: Pros and cons of Python sources?

2017-11-28 Thread Cameron Simpson
On 28Nov2017 21:23, Martin Schöön wrote: Den 2017-11-27 skrev Cameron Simpson : But if the package is mainstream you're probably ok? You could just live with it and do no more damage. Otherwise, look to see what python packages are installed which you think you may have pipped, and reinstall

Re: Increasing the diversity of people who write Python

2017-11-28 Thread Gregory Ewing
Chris Angelico wrote: Heh, you mean the term "Windows key"? It's not appropriate on keyboards that don't have an actual Windows logo on it. There are other names for it, but I figured the easiest way was to describe its location :D That doesn't work for all keyboards, though. The one I'm using

Re: Increasing the diversity of people who write Python

2017-11-28 Thread Chris Angelico
On Wed, Nov 29, 2017 at 3:44 PM, Gregory Ewing wrote: > Chris Angelico wrote: >> >> Heh, you mean the term "Windows key"? It's not appropriate on >> keyboards that don't have an actual Windows logo on it. There are >> other names for it, but I figured the easiest way was to describe its >> locatio

Re: Increasing the diversity of people who write Python

2017-11-28 Thread Christian Gollwitzer
Am 28.11.17 um 20:24 schrieb wxjmfa...@gmail.com: Le mardi 28 novembre 2017 04:44:51 UTC+1, Rustom Mody a écrit : ... Unicode codepoint names are (evidently) ALLCAPS-ASCII Are you sure ? ;-) ; Standard Unicode 10.0.0 ou ; Norme internationale ISO/CEI 10646:2017 ... 00FFLETTRE M

Re: Has anyone worked on docker with windows

2017-11-28 Thread Percival John Hackworth
On 28-Nov-2017, Robert Clove wrote (in article): > Hi, > > what am i trying to achieve is, container of windows with an application > like slack on it. > Does window container has an UI? > > Has anyone worked on it, is it feasible? AFAIK, docker is linux/CoreOS only. Ask docker.com this question.

Re: Has anyone worked on docker with windows

2017-11-28 Thread Robert Clove
i was also of the same opinion , but docker is available on windows too https://www.docker.com/docker-windows On Wed, Nov 29, 2017 at 12:22 PM, Percival John Hackworth wrote: > On 28-Nov-2017, Robert Clove wrote > (in article): > > > Hi, > > > > what am i trying to achieve is, container of wind

Re: Increasing the diversity of people who write Python

2017-11-28 Thread Marko Rauhamaa
Christian Gollwitzer : > Am 28.11.17 um 20:24 schrieb wxjmfa...@gmail.com: >> 00FF LETTRE MINUSCULE LATINE Y TRÉMA > > WTF is this? The character is correctly called > "LATIN SMALL LETTER Y WITH DIAERESIS". There is no non-ASCII character > in this description. Of course, if I translated the Unicod