Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Mark Lawrence Newsgroups: comp.lang.python Subject: Re: [Beginner] - Hanging in the code, can't figure out what's wrong Date: Sun, 3 Apr 2016 01:08:32 +0100 Lines: 48 Message-ID: References: <66afb6f1-ca2b-4f9b-a1ec-ed255fa3030f@googlegroups.com> <18604420-d8ee-485a-96ef-bbda9a590201@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de Mr12Ygsx7rh9cKvChRlipQ5oQ/hjHgVK+eqtkL6HHn0Q== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:: [': 0.03; 'from:addr:yahoo.co.uk': 0.05; 'test,': 0.05; 'subject:code': 0.07; 'created,': 0.09; 'pressing': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'python.': 0.11; 'file,': 0.15; '2016': 0.16; 'clues': 0.16; 'hangs.': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'return,': 0.16; 'wrote:': 0.16; 'typing': 0.18; 'language': 0.19; '>>>': 0.20; 'hey': 0.20; 'extension': 0.20; 'do.': 0.22; 'not,': 0.22; 'assuming': 0.22; 'lawrence': 0.22; 'trying': 0.22; 'skip:( 40': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'followed': 0.27; 'correct': 0.28; 'loads': 0.29; 'subject:what': 0.29; 'character': 0.29; 'tutorial': 0.29; "i'm": 0.30; 'code': 0.30; 'supposed': 0.31; 'knows': 0.32; 'language.': 0.32; 'point': 0.33; 'file': 0.34; 'add': 0.34; 'info': 0.34; 'quite': 0.35; 'asking': 0.35; 'but': 0.36; 'needed': 0.36; 'there': 0.36; 'to:addr:python-list': 0.36; 'received:org': 0.37; 'creation': 0.38; "won't": 0.38; 'someone': 0.38; 'subject:the': 0.39; 'to:addr:python.org': 0.40; 'where': 0.40; 'mark': 0.40; 'press': 0.61; 'charset:windows-1252': 0.62; 'skip:n 10': 0.62; 'saturday,': 0.63; 'more': 0.63; 'complete': 0.63; 'our': 0.64; 'here': 0.66; 'completed': 0.69; 'stated': 0.70; 'answer.': 0.72; 'skip:n 40': 0.72; 'online,': 0.83; 'pythonistas,': 0.84; 'abc': 0.91 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 80.234.189.93 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 In-Reply-To: <18604420-d8ee-485a-96ef-bbda9a590201@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:106330 On 02/04/2016 23:23, Loop.IO wrote: > On Saturday, April 2, 2016 at 11:09:13 PM UTC+1, BartC wrote: >> On 02/04/2016 22:59, Loop.IO wrote: >>> Hey >>> >>> So I built a keylogger using python as a test, got the code from the tutorial online, I want to improve on it to make it more automated, but the issue I'm having is it won't create the file until I press return, any clues where I'm going wrong? >>> >>> If I press return it makes the batch file, otherwise it just hangs. >> >>> name=raw_input ('C:\\Documents\\PythonCoding\\')+'launch2.bat' >> >> You're asking for a file name to be entered. So that if ABC is pressed, >> followed by Enter, it will use: >> >> C:\Documents\PythonCoding\ABClaunch2.bat >> >> Assuming that's the intention, then Enter is needed so that it knows >> when the user has completed typing the name. If not, then just use: >> >> name='C:\\Documents\\PythonCoding\\launch2.bat' >> >> (If you want a single character name, without pressing Enter, that's >> harder to do. Someone else will have to help.) >> >> -- >> Bartc > > Hey Bartc > > I don't quite understand what you mean? > > The file is just supposed to be created, I don't want to have to press "Enter" or "Return" for it to complete the file creation > > the info i followed to create the file advised I had to add the file name and extension on after like in the code > There is no point asking BartC about Python as he has repeatedly stated that he knows nothing about Python. OTOH there are loads of people here who do know Python, backwards, sideways and inside out. If you state precisely what you are trying to achieve then you will get the correct answer. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence