Pyscript does not show any output at all

1,281 views
Skip to first unread message

zinc

unread,
Sep 17, 2013, 2:46:00 PM9/17/13
to pyscr...@googlegroups.com
Hi,

I just installed pyscripter on my window machine. When I type a simple program just to check it out, I there is not output at the bottom of the tool or anywhere else. 

Does anybody know how I can fix it?

I type for example:

x = 2
type(x)

and then I click on "run", it runs, but I get no response.

Even 2 + 2 gets me no response.

Please, help.
tt.JPG

Andy Milne

unread,
Sep 17, 2013, 2:52:03 PM9/17/13
to pyscr...@googlegroups.com
Try:

print x
--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+...@googlegroups.com.
To post to this group, send email to pyscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyscripter.
For more options, visit https://groups.google.com/groups/opt_out.


--
Sent from Gmail Mobile

BBands

unread,
Sep 17, 2013, 3:45:55 PM9/17/13
to PyScripter Group
I'm guessing that you might be new to Python as well as PyScripter. If
that is the case, let me recommend Guido's excellent intro:

http://docs.python.org/3/tutorial/

Enjoy,

John

Colin J. Williams

unread,
Sep 17, 2013, 6:47:07 PM9/17/13
to pyscr...@googlegroups.com
"When I type a simple program just to check it out, ...".

Did you do the typing in the Interpreter panel?

Colin W

zinc

unread,
Sep 17, 2013, 7:17:00 PM9/17/13
to pyscr...@googlegroups.com
Hi,

Thanks for helping. There is something I just found out. I am beginning to think some of these errors might be related to firewall? I was now able to get some output. By the way, my python install is version 3.1. So, print x is rejected right away. I was able to get the right output with Print("x")

Now, two questions for you. Why should I install version 2.7... as opposed to using the 3.1 I have installed?

secondly, 

x = 10
type(x) 

is a good synthax that should tell me that x is of the integer type. But, I am not getting that correct output still. Any suggestions?

On Tuesday, September 17, 2013 2:52:03 PM UTC-4, andy wrote:
Try:

print x

On Tuesday, September 17, 2013, zinc wrote:
Hi,

I just installed pyscripter on my window machine. When I type a simple program just to check it out, I there is not output at the bottom of the tool or anywhere else. 

Does anybody know how I can fix it?

I type for example:

x = 2
type(x)

and then I click on "run", it runs, but I get no response.

Even 2 + 2 gets me no response.

Please, help.

--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+unsubscribe@googlegroups.com.

To post to this group, send email to pyscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyscripter.
For more options, visit https://groups.google.com/groups/opt_out.

zinc

unread,
Sep 17, 2013, 7:21:39 PM9/17/13
to pyscr...@googlegroups.com
I am not sure what panel I should call it. Its the bigger panel on top as you can see from my first post(please help by looking at it). It was not on the small horizontal panel below where the output shows. However, here is what I found after I got home, Hi,

Thanks for helping. There is something I just found out. I am beginning to think some of these errors might be related to firewall? I was now able to get some output. By the way, my python install is version 3.1. So, print x is rejected right away. I was able to get the right output with Print("x")

Now, two questions for you. Why should I install version 2.7... as opposed to using the 3.1 I have installed?

secondly, 

x = 10
type(x) 

is a good synthax that should tell me that x is of the integer type. But, I am not getting that correct output still. Any suggestions?

zinc

unread,
Sep 17, 2013, 7:25:03 PM9/17/13
to pyscr...@googlegroups.com
This code on the interpreter panel and result:
>>> x =10
>>> type(x)
<class 'int'>
>>>

The same code on the big panel on top (pyscript - module1 ?)
x = 5
type(x)

When I ran it, i got nothing like above output.

On Tuesday, September 17, 2013 6:47:07 PM UTC-4, cjw wrote:

Andy Milne

unread,
Sep 17, 2013, 7:25:42 PM9/17/13
to pyscr...@googlegroups.com
2.7 has more supported libraries. 

if you want x to be an integer then try:
x= int(10)


--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+...@googlegroups.com.

zinc

unread,
Sep 17, 2013, 7:27:46 PM9/17/13
to pyscr...@googlegroups.com
2 + 3 //gives me no response when I type it on the main screen ( pyscript - module 1 screen?

but I get 5 when I type that on the interpreter screen:

>>> 2 + 3
5
>>>

On Tuesday, September 17, 2013 2:52:03 PM UTC-4, andy wrote:
Try:

print x

On Tuesday, September 17, 2013, zinc wrote:
Hi,

I just installed pyscripter on my window machine. When I type a simple program just to check it out, I there is not output at the bottom of the tool or anywhere else. 

Does anybody know how I can fix it?

I type for example:

x = 2
type(x)

and then I click on "run", it runs, but I get no response.

Even 2 + 2 gets me no response.

Please, help.

--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+unsubscribe@googlegroups.com.

To post to this group, send email to pyscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/pyscripter.
For more options, visit https://groups.google.com/groups/opt_out.

zinc

unread,
Sep 17, 2013, 7:30:54 PM9/17/13
to pyscr...@googlegroups.com
No, but is that not already understood to be int by python? That's why that code should print out what it is as I showed in my example here:
>>> x =10 #input
>>> type(x) #input
<class 'int'> #output

Andy Milne

unread,
Sep 17, 2013, 7:35:54 PM9/17/13
to pyscr...@googlegroups.com
save your python to a file called say foo.py

now run foo.py:
python foo.py

See that running the code in pyscripter is just like running your python file. It'll output what you tell it to output.

The python interpreter does something different. It evaluates your python and prints the evaluation - almost as if it is inserting a print statement for you (more or less) on each line.




To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+...@googlegroups.com.

Andy Milne

unread,
Sep 17, 2013, 7:47:40 PM9/17/13
to pyscr...@googlegroups.com
I never try to second guess what underlying type python uses. Python uses the duck mentality: If foo quacks like a duck then treat it like a duck, but don't expect type(foo)==duck to evaluate to True

type(x) is just a function that returns the type of x. There is no output from that function. If you want python to output stuff then use print. If you want to see what type x is in pyscripter then put a break point on the type(x) line, launch the program using "shift+F9" and then look at the  variables tab.


Colin J. Williams

unread,
Sep 17, 2013, 7:58:51 PM9/17/13
to pyscr...@googlegroups.com
Print("x") => print("x")  ?

Colin  W.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+...@googlegroups.com.

Colin J. Williams

unread,
Sep 17, 2013, 8:04:47 PM9/17/13
to pyscr...@googlegroups.com
The Interpreter panel is one of the panels selectable at the bottom of the screen.

You are using Python 3.1 I believe.   If so, print is a function, not a statement, as it was in Python 2.

Thus, use print (object to be printed), for example print('now is the time")

Colin W.

zinc

unread,
Sep 17, 2013, 9:23:15 PM9/17/13
to pyscr...@googlegroups.com
That works for the interpreter panel. I think I'm figuring out what's going on with this thing. The main panel seems to hate those same print statement for some reason. I guess because of __main() thing? I think I'm going to uninstall 3.1 anyway. Most of the tutorials online seems to be using 2.7.4 or 5 or so.

zinc

unread,
Sep 17, 2013, 9:24:05 PM9/17/13
to pyscr...@googlegroups.com
works, but with mixed result. Ok if I do that on main screen without the __main() being there. Otherwise, it complains.

Colin J. Williams

unread,
Sep 18, 2013, 7:30:24 AM9/18/13
to pyscr...@googlegroups.com
Zinc,

In Python 3.1, you shouldn't be thinking of a print statement, it has become a function.  This has nothing to do with any __main() thing.

Better to go to with Python 3.3 and learn the language, it's only slightly different from Python 2, it's the future.

Colin W.

Colin J. Williams

unread,
Sep 18, 2013, 7:34:34 AM9/18/13
to pyscr...@googlegroups.com
Zinc,

The main screen is for the program you are composing.  Enter your statements there, save them and then press F9 to execute them,

The result should appear in the interpreter panel.

Colin W.

kevotheclone

unread,
Sep 24, 2013, 1:18:15 PM9/24/13
to pyscr...@googlegroups.com
zinc, try writing your code in the main() function and use the print function to output your results:
 
#!/usr/bin/env python
 
def main():
    x = 5
    print(type(5))
 

if __name__ == '__main__':

    main()
 
 
 
 

Colin J. Williams

unread,
Sep 24, 2013, 2:35:56 PM9/24/13
to pyscr...@googlegroups.com
On 24/09/2013 1:18 PM, kevotheclone wrote:
def main():
    x = 5
    print(type(5))
 

if __name__ == '__main__':

    main()
Looks OK to me:

*** Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32. ***
*** Remote Python engine  is active ***
>>>
*** Remote Interpreter Reinitialized  ***
>>>
[Dbg]>>>
<type 'int'>

>>>
Colin W.
Message has been deleted

jennifer cook

unread,
Oct 8, 2013, 8:30:43 PM10/8/13
to pyscr...@googlegroups.com

Try using  print() method 
x = 2
    type(x)
print(x)
#also use print() to display the output of 2+2
 print(2+2)
Message has been deleted

Colin J. Williams

unread,
Oct 9, 2013, 10:03:47 AM10/9/13
to pyscr...@googlegroups.com
Jennifer,

The Interpreter box is probably best used for the sort of experimenting you are doing.

Storing a small module and then executing it is the longer way.

Colin W.

On 08/10/2013 8:59 PM, jj4 wrote:
--
Reply all
Reply to author
Forward
0 new messages