Hi all.
I hope I don’t bother anyone with this thread. I’ve already started to learn programming, but I’ve recently moved from Windows to openSUSE. I’m learning mainly C++, but I also have took a look at Python.
On Windows I used Dev-C++ (haven’t tried Micrososft Visual C++ yet…) and downloaded Python from its website to write code and compile. On openSUSE (with YaST) I noted it has by default installed Python interpreter, and I installed gcc-c++, so both interpreters are installed. But now I don’t know exactly how can I implement code and compile, and I have already a few C++ and Python source codes. Should I write in a text editor like Kwrite and compile it in some way? Or should I look for some GUI or kind of?
After a small research I found an app named Eclipse was popular for this stuff. What do you think? Thank you.
EDIT: with Python I’m interested in generating a .py file, which is an executable Python script, IIRC.
Welcome,
since you already mentioned eclipse: You can use it for python and c++
programming. When it comes to eclipse I recommend that you do not use the
eclipse which you can install with yast but download the eclipse directly
from eclipse.org and install that - it is more up to date and it is
therefore easier to install the plugins you need for c++ and python
development.
The items you have to search for are cdt (for c/c++) and pydev (for python).
There are good explanations on the web howto install them in eclipse (if you
can’t find it report back here).
–
openSUSE 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.5 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | KDE 4.5 | Quadro FX
3600M | 4GB Ram
Thanks for the answer, I think I’ll give it a try. Just for curiosity, is there also a way to compile using text editor like Kwrite, or is it better to use a GUI like Eclipse? Thank you.
F style wrote:
> Just for curiosity,
> is there also a way to compile using text editor like Kwrite, or is it
> better to use a GUI like Eclipse? Thank you.
i think maybe you do not understand the word “compile”…compile is a
process which converts human readable text into machine
language…neither Kwrite nor any other “text editor” can do that…
you can write programs into Kwrite and then compile them with a
compiler…
–
DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
I feel annoyed that I can’t put my wide range of languages on stupid
Facebook. For example, I speak Sarcasm, fluently spoken and written,
and Various Forms of Geek…
Sorry, my bad. Thanks. I think what I meant is if there’s a way to write code in Kwrite or text editor and then use the corresponding compiler to compile and run (works on Windows). Or if it’s really better to use a GUI like Eclipse.
F style wrote:
> I think what I meant is if there’s a way to write
> code in Kwrite or text editor and then use the corresponding compiler to
> compile and run (works on Windows).
of course that is possible (most anything possible in Windows is
possible in Linux, except easily catching a virus, or key logger or or
or or getting turned into a spambot)…
> Or if it’s really better to use a GUI like Eclipse.
better? Kwrite is better than having a finger cut off…and, a full up
programming environment is better for some, than others…
try both and see which you like the best–THAT is the beauty of Linux,
you get to choose…and, it cost you nothing to try each, and many
other possibilities…
well, it cost time…
and, there are probably 20 other text editors besides Kwrite…try
them all…some are more easily used for development than others…be
sure and look at emacs, it is a whiz…
–
DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]
I feel annoyed that I can’t put my wide range of languages on stupid
Facebook. For example, I speak Sarcasm, fluently spoken and written,
and Various Forms of Geek…
Thanks for answer. A last question, once having wrote the C++/Python code, how can I call C++/Python compilers to compile, run, and generate executables? I think it should all be done in console… Hope I’ve not mistaken something else. Thanks.
If it is better or not to use an IDE with a GUI depends on personal
preferences and the size of the project and the programming skills.
Of course it is possible to do even large projects with an editor (do not
use kwrite but kate which is the editor in kde, I do a lot of things myself
with kate when writing in script languages like octave or bash).
When someone is new to programming (I do not know if this is the case here
and if the new is only meant for linux) I recommend to only use a editor o
choice (with syntax highlighting) and the command line tools to compile (or
interpret).
It has a good effect for learning things.
Later switch to an IDE (it has its own learning curve) to enhance the
productivity.
–
openSUSE 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.5 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | KDE 4.5 | Quadro FX
3600M | 4GB Ram
Well, I have a specific doubt about Python. What I’m trying to do now is getting to work a Python script from an app called StarDict. Since this script is not in its corresponding directory, but seemingly it used to be in some previous versions, I looked for its source code (I cannot create my own script for this app yet…): bgl2stardict.py - stardictproject - Project Hosting on Google Code.
I was still a bit clueless about compiling on openSUSE, so what I did was paste the code in a Kwrite file and saving it with a .py extension. It asked me about a UTF-8 thing, but I was able to save. I moved the .py file to the directory the other .py scripts are. According to the app site, StarDict Babylon Dictionaries – 星际译王的巴比伦词库, it should be used like ./(nameofscript).py, but I try and I get a message: access denied.
I know I may be completely lost about all this, and need some guidance. Can you help me? Thank you.