Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106317 > unrolled thread
| Started by | "Loop.IO" <thisisink01@gmail.com> |
|---|---|
| First post | 2016-04-02 14:59 -0700 |
| Last post | 2016-04-03 07:45 -0700 |
| Articles | 10 on this page of 30 — 8 participants |
Back to article view | Back to comp.lang.python
[Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-02 14:59 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong BartC <bc@freeuk.com> - 2016-04-02 23:08 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Ned Batchelder <ned@nedbatchelder.com> - 2016-04-02 15:16 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong BartC <bc@freeuk.com> - 2016-04-02 23:27 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-02 15:31 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong BartC <bc@freeuk.com> - 2016-04-03 01:12 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-04-03 01:38 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 12:52 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 07:41 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong BartC <bc@freeuk.com> - 2016-04-03 16:11 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Rustom Mody <rustompmody@gmail.com> - 2016-04-03 08:25 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong BartC <bc@freeuk.com> - 2016-04-03 17:04 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 12:31 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 12:36 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Michael Selik <michael.selik@gmail.com> - 2016-04-03 19:46 +0000
Re: [Beginner] - Hanging in the code, can't figure out what's wrong BartC <bc@freeuk.com> - 2016-04-03 21:21 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 14:07 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Erik <python@lucidity.plus.com> - 2016-04-03 20:46 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 12:54 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Erik <python@lucidity.plus.com> - 2016-04-03 21:15 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 13:25 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Erik <python@lucidity.plus.com> - 2016-04-03 22:26 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 14:49 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Erik <python@lucidity.plus.com> - 2016-04-03 23:07 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Ben Finney <ben+python@benfinney.id.au> - 2016-04-05 06:49 +1000
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Michael Selik <michael.selik@gmail.com> - 2016-04-02 22:37 +0000
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-04-03 01:11 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-02 15:23 -0700
Re: [Beginner] - Hanging in the code, can't figure out what's wrong Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-04-03 01:08 +0100
Re: [Beginner] - Hanging in the code, can't figure out what's wrong "Loop.IO" <thisisink01@gmail.com> - 2016-04-03 07:45 -0700
Page 2 of 2 — ← Prev page 1 [2]
| From | "Loop.IO" <thisisink01@gmail.com> |
|---|---|
| Date | 2016-04-03 13:25 -0700 |
| Message-ID | <6d022206-5f4d-4ac9-be50-76ce74ef48c0@googlegroups.com> |
| In reply to | #106404 |
On Sunday, April 3, 2016 at 9:15:22 PM UTC+1, Erik wrote: > On 03/04/16 20:54, Loop.IO wrote: > > The original post said what did happen, the code runs and hangs on > > the create file, and once i press Enter it then finishes and creates > > the file, not sure how you missed that but thanks > > Yes, I read your original post. That was days ago. > > The comment I was replying to was you telling BartC that what he had > suggested "didn't work" (with no further information). > > Please pay attention to the context of the email you are responding to. > > E. Erik It was a syntax error. But sure, thanks. The problem has been rectified, I used the r as suggested by Mark. I've now been able to get the file created and write the code in the file, thanks for everyones replies.
[toc] | [prev] | [next] | [standalone]
| From | Erik <python@lucidity.plus.com> |
|---|---|
| Date | 2016-04-03 22:26 +0100 |
| Message-ID | <mailman.415.1459718820.28225.python-list@python.org> |
| In reply to | #106406 |
Loop.IO: On 03/04/16 21:25, Loop.IO wrote: > On Sunday, April 3, 2016 at 9:15:22 PM UTC+1, Erik wrote: >> On 03/04/16 20:54, Loop.IO wrote: >>> The original post said what did happen, the code runs and hangs on >>> the create file, and once i press Enter it then finishes and creates >>> the file, not sure how you missed that but thanks >> >> Yes, I read your original post. That was days ago. >> >> The comment I was replying to was you telling BartC that what he had >> suggested "didn't work" (with no further information). >> >> Please pay attention to the context of the email you are responding to. >> >> E. > > Erik > > It was a syntax error. But sure, thanks. So, you reply to my advisory on how to report your problem by saying that your original post said what did happen. Your original post said: "the code runs and hangs on the create file, and once i press Enter it then finishes and creates the file" But it turns out that "It was a syntax error". If it was a syntax error, them how did the code run and "hang on the create file"? Don't try to sweep my suggestion (that you should describe your symptoms properly) under the carpet. It's a very important lesson to learn for people trying to report bugs/issues. E.
[toc] | [prev] | [next] | [standalone]
| From | "Loop.IO" <thisisink01@gmail.com> |
|---|---|
| Date | 2016-04-03 14:49 -0700 |
| Message-ID | <1d02705b-00aa-4882-a54d-9bb1c162ce29@googlegroups.com> |
| In reply to | #106412 |
On Sunday, April 3, 2016 at 10:27:16 PM UTC+1, Erik wrote: > Loop.IO: > > On 03/04/16 21:25, Loop.IO wrote: > > On Sunday, April 3, 2016 at 9:15:22 PM UTC+1, Erik wrote: > >> On 03/04/16 20:54, Loop.IO wrote: > >>> The original post said what did happen, the code runs and hangs on > >>> the create file, and once i press Enter it then finishes and creates > >>> the file, not sure how you missed that but thanks > >> > >> Yes, I read your original post. That was days ago. > >> > >> The comment I was replying to was you telling BartC that what he had > >> suggested "didn't work" (with no further information). > >> > >> Please pay attention to the context of the email you are responding to. > >> > >> E. > > > > Erik > > > > It was a syntax error. But sure, thanks. > > So, you reply to my advisory on how to report your problem by saying > that your original post said what did happen. Your original post said: > > "the code runs and hangs on the create file, and once i press Enter it > then finishes and creates the file" > > But it turns out that "It was a syntax error". > > If it was a syntax error, them how did the code run and "hang on the > create file"? > > Don't try to sweep my suggestion (that you should describe your symptoms > properly) under the carpet. It's a very important lesson to learn for > people trying to report bugs/issues. > > E. I think you've misunderstood chap My initial issue didn't have a syntax error, it just hung in the code until I pressed Enter/Return. I then tried Bartc's solution when I changed my code, which I then replied "it doesn't work", which as you pointed out was unhelpful. You now seem to be on some sort of rampage as I've already recognised that it was short, and said I got a syntax error upon attempting the new code that Bartc provided. I then said thanks to you for pointing it out, if you want to call that sweeping it under the carpet, then so be it, but the issue was resolved. That's really the end of the matter, whether you're fishing for some sort of recognition or brownie points I don't know, but try relaxing and taking a step back; the issue is resolved, I'm moving on with the program, I appreciate the replies from everyone (including you) so chill.
[toc] | [prev] | [next] | [standalone]
| From | Erik <python@lucidity.plus.com> |
|---|---|
| Date | 2016-04-03 23:07 +0100 |
| Message-ID | <mailman.418.1459721255.28225.python-list@python.org> |
| In reply to | #106414 |
On 03/04/16 22:49, Loop.IO wrote: > You now seem to be on some sort of rampage I offered you some valuable advice. *plonk* E.
[toc] | [prev] | [next] | [standalone]
| From | Ben Finney <ben+python@benfinney.id.au> |
|---|---|
| Date | 2016-04-05 06:49 +1000 |
| Message-ID | <mailman.39.1459802960.32530.python-list@python.org> |
| In reply to | #106414 |
"Loop.IO" <thisisink01@gmail.com> writes: > You now seem to be on some sort of rampage You've mis-interpreted Erik's attempts to help. Somehow the requests for details have made you defensive; I'm not sure why. Erik certainly was not being hostile to you. Hopefully you can take a more dispassionate position when you ask the volunteers here for help next time. -- \ “Education is learning what you didn't even know you didn't | `\ know.” —Daniel J. Boorstin, historian, 1914–2004 | _o__) | Ben Finney
[toc] | [prev] | [next] | [standalone]
| From | Michael Selik <michael.selik@gmail.com> |
|---|---|
| Date | 2016-04-02 22:37 +0000 |
| Message-ID | <mailman.378.1459636671.28225.python-list@python.org> |
| In reply to | #106322 |
I might be overlooking something, but raw_input (Python 2) and input
(Python 3) won't return the input from sys.stdin until you type ENTER. Or
did I misunderstand the question?
On Sat, Apr 2, 2016 at 6:30 PM BartC <bc@freeuk.com> wrote:
> On 02/04/2016 23:16, Ned Batchelder wrote:
> > On Saturday, April 2, 2016 at 6:09:13 PM UTC-4, 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
> >
> > That line of code will prompt the user:
> >
> > C:\Documents\PythonCoding\
> >
> > then the user enters ABC<enter>:
> >
> > C:\Documents\PythonCoding\ABC
> >
> > and raw_input returns "ABC", so name becomes "ABClaunch2.bat".
>
> Yes, of course. I ran the code and picked up the wrong line even though
> I printed out 'name'!
>
> But, it does look as though that path is supposed to form part of the
> resulting filename.
>
> --
> Bartc
> --
> https://mail.python.org/mailman/listinfo/python-list
>
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2016-04-03 01:11 +0100 |
| Message-ID | <mailman.384.1459642506.28225.python-list@python.org> |
| In reply to | #106322 |
On 02/04/2016 23:37, Michael Selik wrote:
> I might be overlooking something, but raw_input (Python 2) and input
> (Python 3) won't return the input from sys.stdin until you type ENTER. Or
> did I misunderstand the question?
>
> On Sat, Apr 2, 2016 at 6:30 PM BartC <bc@freeuk.com> wrote:
>
>> On 02/04/2016 23:16, Ned Batchelder wrote:
>>> On Saturday, April 2, 2016 at 6:09:13 PM UTC-4, 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
>>>
>>> That line of code will prompt the user:
>>>
>>> C:\Documents\PythonCoding\
>>>
>>> then the user enters ABC<enter>:
>>>
>>> C:\Documents\PythonCoding\ABC
>>>
>>> and raw_input returns "ABC", so name becomes "ABClaunch2.bat".
>>
>> Yes, of course. I ran the code and picked up the wrong line even though
>> I printed out 'name'!
>>
>> But, it does look as though that path is supposed to form part of the
>> resulting filename.
>>
>> --
>> Bartc
>> --
>> https://mail.python.org/mailman/listinfo/python-list
>>
BartC is renowned for knowing nothing about Python by his own
admittance, and would you please not top post on the list.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | "Loop.IO" <thisisink01@gmail.com> |
|---|---|
| Date | 2016-04-02 15:23 -0700 |
| Message-ID | <18604420-d8ee-485a-96ef-bbda9a590201@googlegroups.com> |
| In reply to | #106319 |
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
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2016-04-03 01:08 +0100 |
| Message-ID | <mailman.383.1459642125.28225.python-list@python.org> |
| In reply to | #106321 |
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
[toc] | [prev] | [next] | [standalone]
| From | "Loop.IO" <thisisink01@gmail.com> |
|---|---|
| Date | 2016-04-03 07:45 -0700 |
| Message-ID | <d8537764-01d7-4149-9f75-481f099758c9@googlegroups.com> |
| In reply to | #106330 |
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
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.python
csiph-web