[Geany-Users] Help: python output console closing immedialtly

Rajendra Prasad fa02.mme at xxxxx
Thu Apr 2 05:58:50 UTC 2015


Dear Matthew,

    Thank you very much for your interest in my problem. I am adding a few
screen shots, which I feel can explain better and the code is attached to
the mail. I am just a beginner.

When I install geany and run the program immediately after installation,
every thing goes smooth. no prompting and nothing. I can get error message
if there are any errors and others. If it does not contain any error, I
will get output and at the end I used to get "press any key to
continue.............." message

*From the second session onwards, like once I quit the IDE and start it, *when
the code is executed, cmd.exe will be executed. Then user access control
window pops up asking whether you would like to allow execution of
python.exe

if the code is free of errors, the output will be displayed and the
python.exe will wait there as I have added raw_input() at the end of the
program. I will press some button. Then python.exe window closes and I will
be left with cmd.exe window showing "press any key to continue........."
just like shown in the figure 2.



If the code consists of errors, then I will end up like this as shown in
the figure below. Even, I can not find what are these errors in the code.


​
​

  Thank you.

On Thu, Apr 2, 2015 at 10:44 AM, Matthew Brush <mbrush at codebrainz.ca> wrote:

> On 15-04-02 12:50 AM, Rajendra Prasad wrote:
>
>> Hi!
>>
>>      I am using *geany 1.24* with *python 2.7* on *windows7*.
>> *Problem:* When i execute the python program immediately after
>> installation, It running good with out any problem. But if I execute after
>> closing the Geany at least once, it first opens the windows command
>> window,
>> then asks permission to execute python. Then the program executes and two
>>
>
> When you say "asks permissions" do you mean that Windows UAC where the
> screen goes dark and a dialog window opens to ask to elevate permissions?
>
>  windows will be opened. One of it will close so fast that I can not read
>> anything from it. the second window shows the message press enter to
>> continue...........
>>
>>      When I have added, raw_input() at the end of the program, the first
>> window stood still on successful execution of the program only, but not in
>> the other instances.
>>
>>     I tried in interne to find solution. But I am not able to trace what
>> has
>> to be done.
>>
>>
> It's not exactly clear to me what the problem is. Could you explain what
> you expect to happen, and if possible attach (or pastebin) the script
> you're running?
>
> Cheers,
> Matthew Brush
>
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/users/attachments/20150402/516c87bc/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: set2.png
Type: image/png
Size: 243289 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20150402/516c87bc/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: set1.png
Type: image/png
Size: 285578 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20150402/516c87bc/attachment-0003.png>
-------------- next part --------------
#this programme claculates the time required for the egg to be boiled
from math import pi,log
def egg_fun(M,to,ty):
	den=1.038
	c=3.7
	k=5.4e-3
	tw=100
	t=((M**2*den)/(4*pi/3)**2)**(1.0/3)*(c/(k*pi**2))*log(0.76*(to-tw)/(ty-tw))
	return t
	
t0=[4,25]
m=[47,67]
for t in t0:
	for M in m:
		print 'the time required to boil',M,'g. eggs from',t,'dC is',egg_fun(M,t,70)
raw_input()


More information about the Users mailing list