Python - PyScriptor - Loop

Hi there,

I am new to Python.

While running : PyScripter.exe --PYTHON27

I've made the following mistake.  I did the following while loop:

x=0
while (x<5):
   print x
   x = 1 + 1

And therefore, I am getting a endless loop, running at the speed of light!

Without pressing the stop button, I closed PyScriptor.

Now, I cannot open pyscriptor with the following switch: PyScripter.exe" --PYTHON27

Actually, when I start PyScripter.exe" --PYTHON27, it takes 25% of my processor and never opens, as if it automatically starts that loop again, but I have no stop button.

I restarted my computer; same problem.

Please note that I can successfully run "PyScriptor.exe" without switches; which its interpreter uses Python v3.4.3.

Maybe my understanding of this issue is wrong.

Can you please help?

Thanks,
Rene
LVL 10
ReneGeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark BradyPrincipal Data EngineerCommented:
I'm not sure what is wrong with your program but I can tell you there is nothing wrong with you While loop. It works as expected. There must be another issue somewhere. If all else fails, uninstall and re-install it and that should fix it.
ReneGeAuthor Commented:
Hi Mark,

As you can see in my loop, it's an enless loop with not much instructions.

Is it possible that it somehow non-stop loops somewhere when I start PyScripter?

I un-installed, rebooted and re-installed the software.

The problem is still the same :(

Do you have any other ideas?

Cheers
Walter RitzelSenior Software EngineerCommented:
try

x = x +1 instead of x = 1+1

x = 1+1 will be always 2 which will never be greater or equal to 5.
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

ReneGeAuthor Commented:
Hey Walter,

Thanks for contributing.

My question is not about the formula itself.

Because I had a synaptic lapse of judgement, I put "1" instead of "x".

Like you said, it will never reach 5 and therefore, endlessy loop.

My problem here, is that since then, I an unable to run PyScripter.exe --PYTHON27

Any ideas?

Thanks,
Rene
Mark BradyPrincipal Data EngineerCommented:
My bad. I didn't notice you had x=1+1 sorry
Walter RitzelSenior Software EngineerCommented:
If you are still having this issue, I have one suggestion: clean up the any cache folder this application can have. Maybe this folder was preserved by the uninstaller, so when you have installed again. it continues to try to open whatever task was being executed last time.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ReneGeAuthor Commented:
@Mark
No worries :)

@Walter:
Did all that! Still same issue.  I guess I'll stop wasting our time on this and just use PyCharm for practicing Python v2.7

Thanks and cheers,
Rene
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.