[Beginner] - Hanging in the code, can't figure out what's wrong

Loop.IO thisisink01 at gmail.com
Sun Apr 3 10:45:02 EDT 2016


On Sunday, April 3, 2016 at 1:08:59 AM UTC+1, Mark Lawrence wrote:
> 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

Hi Mark

Basically I want the program to do the search, which it does fine, then create the batch file then close.

What I will be doing once thats fixed is then adding a write to the batch file some lines of code, which im already testing and seems to work fine, its just the having to press enter to create the file and then close the program



More information about the Python-list mailing list