[Tutor] Updates to web tutor
Only just on topic but i'd like some help please... I've been doing some much needed maintenance to my web tutor. In particular I'm trying to move it from the (web)stone age of HTML3 and Frames to HTML5/CSS and provide a responsive/reactive design. Along the way I've also completely changed the styling to give it a more modern appearance(*). I'm now at the stage where some independent feedback would be useful so if anyone feels like trying out the new design I'd appreciate any feedback - especially on how it works on mobile devices of the Apple variety. The test site is: http://www.alan-g.me.uk/l2p2/ I've done the first 2 sections - up to the Error Handling topic. PS: There is very little changed in the actual content so far - just a few typos fixed and a couple of extra explanatory paragraphs I've been meaning to add for a while. Its really the web design that I'm working on just now. (*)The TOC will eventually be restyled to a block menu look but is just boring hyperlinks for now. Any feedback is appreciated. -- 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 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
[Tutor] input string to own console stdin
Hi. I've been searching on google about inputting to own stdin and press enter but so far i haven't found anything at all. so what im trying to do is the chatterbot function i got on python doesn't seem to accept string as an input and always wants a console input and Enter (the line -> response = bot.get_response(input string)) so instead, im finding a way to put the input to the stdin and automatically press enter. i have tried this [ https://stackoverflow.com/questions/8475290/how-do-i-write-to-a-python-subprocess-stdin ] but even it doesn't give me an syntax error, it did absolutely nothing. Please help. Thanks ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] input string to own console stdin
On 15/11/17 22:16, Eddio 0141 wrote: > Hi. > I've been searching on google about inputting to own stdin and press enter > but so far i haven't found anything at all. You need to give us a bit more context. This doesn't look like standard library stuff so which package are you using? (Is that what chatterbot is?) Also without seeing the code that doesn't work we can only make wild guesses about whats going wrong. One thing to consider is that if (as I assume) you are trying to talk to another process from Python you need to be sending your data on stdout for it to be read on the other process' stdin. You will also need to ensure that Pipes are switched on in subprocess and that your execution environment is piping your stdout to their stdin. eg you start chatterbot with something like: $ python myscript.py|chatterbot or $ chatterbot < python myscript.py But show us your code, it will make life easier for all of us. > i have tried this > [ > https://stackoverflow.com/questions/8475290/how-do-i-write-to-a-python-subprocess-stdin > ] > but even it doesn't give me an syntax error, it did absolutely nothing. See, even that question doesn't make sense, since you *read* from stdin not write to it. It sounds like a fundamental concepts kind of thing... -- 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 ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor