Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: √ ∞ ≠ ≤ ≥ ≈ ⇒ ∈ Δ θ ∴ ∑ ∫ π -




Not registered yet?

Post a reply

Go back

Write your message and submit
:) :| :( :D :o ;) :/ :P :lol: :mad: :rolleyes: :cool: | :dizzy :eek :kiss :roflol :rolleyes :shame :down :up :touched :sleep :wave :swear :tongue :what :faint :dunno

Go back

Topic review (newest first)

2012-09-07 12:46:11

I think you can
There are a lot of GUI modules in Python
E.g, Tkinter

2010-03-21 15:43:56

When I use Python, I use IDLE or PyScripter. I don't compile my code, so I guess I'm using a scripted language.

I look forward to someday learning Java, but I simply don't have the time right now. But if I don't have to learn it to use Jython, I can jump right into no problem.

What are typical "needs" of a compiled/scripted language?

2010-03-17 12:05:52

Am I going to have to learn Java to use Jython?

Have to?  No.  But knowing more can never hurt, only help.  You will however have to familiarize yourself with using Jython, which is not the same as learning Java.

How do I figure out which implementation of Python I'm using?

When you go to run python code, what is the name of the program you need to load up first?

how do I use the right one? And how will that change what I'm doing?

The "right" one depends on your needs.  Java is fairly easy to learn and quick to make GUIs.  This is one reason I would recommend Jython.  Start here to use it.  I can offer at least some assistance, but their mailing list would probably be more helpful (use the "users" one).

As for changing what you are doing, there are two large paradigms when it comes to programming (there are others, mind you).  Each of these are not the whole story, but the bigger picture is here:

1. Code -> Compile -> Assembly code -> Assemble -> Machine code -> Run on computer.
2. Code -> Run interpreter -> Load code -> Run on computer

The first is called a "compiled" language, the second a "scripted" language.  The compiled code needs no external programs to run (most of the time...), while scripted code must be run using a program.

2010-03-17 10:45:10

Calccrypto: I don't understand your question. I use IDLE to write my programs (and more recently PyScriptor). Make no mistake, I have no idea what I'm doing, I'm doing this for fun.

Ricky: Wow, that's a whole bunch of techno-lingo, but at least I have a starting place. Am I going to have to learn Java to use Jython? How do I figure out which implementation of Python I'm using? IF I'm using the wrong implementation of Python, how do I use the right one? And how will that change what I'm doing?

2010-03-16 13:34:19

calccrypto, you got a half of what he is asking.

There are two parts to making a program look like something "I might download off the internet":

1. Run natively (i.e. an executable)
2. Graphic user interface (GUI)

For the first, it all depends upon which implementation of Python you are using.  If you are using it as a scripting language (e.g. the implementation CPython), then the short answer is: No.   Scripting languages, by definition, require an interpreter to run the code.  This is what I believe you're doing.

But Python is also implemented as a compiled language: you compile code into an executable that you can then run on the machine itself.  Jython is one example of such an implementation.  It actually takes Python code, compiles it into Java byte code, and then you can use that on a machine.  If you go this route, then you can actually use Java GUI libraries to make a GUI.

For the second, you need an external library to interact with the operating system's graphical API.  For Python, check out this site.

2010-03-16 13:14:38

i think what you are asking for is a complier. python complies programs when you import them, but you still need python to run them. you can try "cx_freeze" to compile your programs (and add an icon pic), but they still need python to run them. i dont think you cant simply make an app or something and expect it to run on someone else's computer. ive tried, but nothing works, so far

and why do you need IDLE? cant you just run the scripts in cmd or double clicking the file?

2010-03-15 11:25:28

I've been using Python for a while now (and loving it) but I want to take my programs to the next level. Bear with while I try to explain myself, I've never taken a programming class, so I don't know how to explain myself properly.

I think what I'm asking about is a GUI, but I'm not sure. I want my programs to be usable by someone without that person having to open up the Python IDE (PyScripter or IDLE in my case) and run the code. I want my program to look like something I might download off the internet (like GraphCalc or Gimp, but not so fancy).

So my questions are:
1. Am I making myself clear?
2. Is this what a GUI is?
3. Can I do this using only Freeware (I'm a poor, simple, college student)
4. Can anyone help me get going on this?


Board footer

Powered by FluxBB