Jump to content


Check out our Community Blogs

v0id

Member Since 09 Apr 2007
Offline Last Active Aug 26 2011 09:07 AM
-----

#467335 Replace all strings with vi

Posted by v0id on 15 February 2008 - 09:45 AM

This works in Vim, but I think it'll work in Vi too.
:%s/DEPAR/DEPARTMENT/g

  • 1


#423551 What new language should I try to learn?

Posted by v0id on 08 January 2009 - 11:03 PM

I have only very little experience with Haskell and Forth, but I loved Common Lisp back when I was programming. It has so many possibilities, and that the code is beautiful to look at is just a bonus!
  • -1


#404460 free compiler

Posted by v0id on 08 November 2008 - 12:28 AM

You should read the stickies in the C/C++ forum. In the resources-thread you can find a long list of different compilers. You can find the thread here: http://forum.codecal...-resources.html
  • 1


#373864 Simple list question

Posted by v0id on 15 August 2008 - 04:28 AM

This will give you an idea of how to do it. Note that I'm not going to make it for you, because like you said, you will solve it yourself.
myList = []
for x in range(0, 5):
    myList.append(raw_input("Enter: "))
print sorted(myList)

  • -1


#372054 Python resources

Posted by v0id on 05 August 2008 - 11:30 PM

Remember to check the global FAQ, and also the Python FAQ before you're posting any threads or posts.

This is a thread containing different resources for the Python programmer.

If you have anything to add, please send me a PM.



Implementations
  • CPython (Cross-platform; Free; Open-source) (Official)
  • Jython (Cross-platform; Free; Open-source)
  • IronPython (Windows; Free; Closed-source)
  • PyPy (Cross-platform; Free; Open-source)


Debuggers
  • Winpdb (Cross-platform; Free; Open-source)
  • Pydb (*nix; Free; Open-source)


Integrated Development Environments
  • PyDev (Cross-platform; Free; Open-source)
  • Wing IDE (Cross-platform; Non-free; Closed-source)
  • Eric (Windows/*nix; Free; Open-source)
  • BlackAdder (Windows/Linux; Non-free; Closed-source)
  • Boa Constructor (Cross-platform; Free; Open-source)


Rapid Application Developments


Good online learning guides


Reference and documentation


Major libraries
  • wxPython (GUI; Cross-platform; Free; Open-source)
  • PyGTK (GUI; Cross-platform; Free; Open-source)
  • pyFLTK (GUI; Cross-platform; Free; Open-source)
  • PyQt (GUI; Cross-platform; Free; Open-source)
  • pyJUCE (GUI; Cross-platform; Free; Open-source)
  • CherryPy (Webdevelopment; Cross-platform; Free; Open-source)
  • MySQL-Python (Database; Cross-platform; Free; Open-source)
  • Cheetah (Template; Cross-platform; Free; Open-source)
  • Django (Webdevelopment; Cross-platform; Free; Open-source)


Other FAQ's than this

  • 4


#372053 Python frequently asked questions

Posted by v0id on 05 August 2008 - 11:30 PM

Before posting make sure to read the FAQ, and be sure to follow its rules as well.

This thread is meant as another FAQ which is specialized in this forum, the Python forum, particular, and the language itself. If you read this before creating a thread or a post you may avoid asking already frequently asked questions.



I want to learn Python, what do I do?
Python is an interpreted language. This means that your sourcecode will not be compiled into machine code, like C++ and many other languages, but it will be interpreted by a program: an interpreter. There is many implementations of Python, but the official one is called CPython, and is also simply known as the official Python.
This is the basic tool every Python programmer needs in order to get started programming. Other tools include debuggers for debugging and IDEs for easily management of sourcecode and interpreting.
When you have the tools you need, you only need to learn the language. This can be done in multiple ways. One can learn a lot completely free directly from the internet, and from this knowledge achieved from the internet being able to create beautiful applications. If you however don't mind paying some cash, or need in-depth information, one of the best choices is to get your hands on a book. Books will normally go more into details, than most websites will.
The best choice is to join a programming-class or course. In this way you'll be able to ask your teacher the questions you have on mind, and try out new stuff in a positive environment


Is this tool better than that tool?
This is mostly a matter of taste. Different people prefer different tools: maybe because it's faster; maybe because it's easier to use; maybe because it looks good; etc. So, if you're asking such question you must be prepared to get many different replies, which all states different things.
Investigating and collecting information about different tools is a better solution. In that way you learn about the different tools, and you also find out whether they fit you or not. If you finally end up with two or maybe three tools, and cannot choose, then you can go to the forums and ask us for our opinion. In that way you will get specific replies to the tools you're considering, and not some tools you don't even know about.



You can find a list of tools, books, websites, and other general resources for Python in the Python resource thread.
  • 2


#371901 C/C++ Frequently Asked Questions

Posted by v0id on 05 August 2008 - 09:02 AM

Before posting make sure to read the board guidelines, and be sure to follow its rules as well.

This thread is meant as another FAQ which is specialized in this forum, the C/C++ forum in particular. If you read this before creating a thread or a post you may avoid asking already frequently asked questions.

I want to learn C/C++, what do I do?
Both C and C++ are so-called compiled languages. That means that programs written in C or C++ will be translated directly into machine code, which can be read directly by your operating system. This translation consists of three steps: compiling, assembling and linking.

The..

compiling process is where the source code is translated in to the assembly language by a compiler. This assembly language can then consist of commands specific to the target processor and architecture.

assembling process is where the new assembly code is translated in to machine code by an assembler. This code is stripped of most data that is not required to run the program (comments, notes, formatting) and is formed as a string of bytes, each byte representing part of, one, or more than one command for the target processor.

linking process is where external libraries are linked in to or included in the program, depending on if it's a dynamic or static library, using a linker. This results in an executable wrapper that the host operating system can initiate the assembled machine code with or a means for another executable to use its functionality by function name rather than byte sequence.


Which tools? tool chains? do I need debuggers?
There are many tools for every C/C++ programmer, and some that can greatly aid in application development. These tools are usually more specialized in specific tasks, such as a profiler for optimization where function calls are logged in real time, a debugger to find memory or application state issues for debugging, or an IDE (integrated development environment) for graphical management of source code and a front-end to compiling processes in one package.

Each one of these are not critical to programming in C, however can be invaluable and worth the effort to learn when you are programming a serious application.

There must be something more than online tutorials.. am I just stuck?
When you have the tools you need to learn the language, such as a compiler toolchain containing all that is necessary to compile, assemble and link, you will need to choose a path of learning.

This can be done in multiple ways. One can learn a lot directly from the internet and the programs on it (such as on SourceForge), and this knowledge can be incorporated in to your own programming, if you understand how it works. If you do not mind investing some money, or need in-depth information and references, a well thought choice is to get your hands on a programming book. Well-reviewed books are often the most appropriate learning material for serious students of programming and build correct coding habits.

Another ambitious choice is to join a programming class or course, either online or at a local institution. In this method you will be able to get feedback and support in a personalised manner, have a structured environment instead of jumping from page to page online, and try out new learning methods in a positive class environment.

Teachers of programming often wind their way on forums such as this too, and so advise found can be a good supplement to a well structured class.


How do I make a driver? ...
... and other questions alike can be impossible for us to answer directly if you are not providing some information about your (operating) system. You must always keep in mind that all systems are different in some manner to a level which may not be apparent to you, and the same code may not work on all systems nor may some suggestions.

This goes for many other so-called platform-dependent questions. If you are not sure whether it's a platform-dependent question, then give us the information you think is necessary (mingw instead of gcc for example, visual studio on a 64 bit system when working with pointers, ...) You are on the secure side, and you do not have to worry about whether users know what you are talking about and do not have to guess giving blanket suggestions.

The search feature is an important too. There are multiple "How do I create an operating system?" threads for example which can be found. Our site strives to index content in a searchable manner with tagging, and is to be used for your benefit.


Is it okay to use conio.h, linux.h or similar? ...
... and questions alike regarding platform-dependent libraries are not really questions for us, but more for yourself. You must consider whether you will use a platform-dependent library or not. The advantage of platform-dependent libraries is that it may have more specialized functionality for your system, or environment, than a platform-independent library, and thus will you have more possibilities. The disadvantage is obviously that platform-dependent libraries do only run on the system or environment it was designed for, so it may not run on other systems. You should especially keep this in mind if you are thinking about making commercial applications.

There is no reason to stop yourself from programming when you find yourself using platform dependent calls, as long as you understand the scope of your project and how you can use alternatives if you are faced with such a situation where you are not able to use them.


Is this tool better than that tool?
This is mostly a matter of taste. Different people prefer different tools. Maybe because it is faster, maybe because it's easier to use, maybe because it looks good, you will see a lot of varying opinions online. If you are asking such a broad question you will end up in the situation similar to researching the tools yourself.

Investigating and collecting information about different tools is a more rewarding solution in that you learn how to use different tools and find out whether they fit your ability and you or not. If you finally end up with two or maybe three tools, and cannot choose, then it is easier to ask for a specific recommendation or experience another user has had based on your specific needs rather than something very general.

The programmer learns to pick up and drop many things during their career.

Is C too old?
You may find people recommending to stay away from C, however it still remains a fundamental language for system programming and can teach you invaluable insights in to how memory management and security come in to play.

C code maps directly in to machine instructions for almost every processor or microcontroller architecture, and can produce minimal and efficient code without the need of existing software to run it. C is a great alternative to coding directly in assembly, however does not provide the programmer with modern tools such as object oriented programming or handled memory on strings or object allocations.

Are the languages being updated at all?
C and C++ as languages are not set in stone, new revisions to provide modernisation are coming by committee or from necessity. Great time will be involved in finalising and integrating the language in to the programming culture or businesses, however looking in to future revisions of standards is important.

Recent standards are given in the form of C(++)(revision by year) and may have incremented after the time of this post.

C11 (2011):

Wikipedia link: http://en.wikipedia....ndard_revision)


What standards do we use now for C?

Usually: C99 (1999)


C++11 (formerly C++0x, for 200x) (2011):

Wikipedia link: http://en.wikipedia.org/wiki/C%2B%2B11


What standards do we use now for C++?

Usually: C++98 or C++03 (1998, 2003)


Some historical versions which should be known to you for use in spotting old code:

K&R C: http://en.wikipedia..../wiki/K&R_C#KRC

ANSI/ISO C: http://en.wikipedia....NSI_C_and_ISO_C

(Note: ANSI and ISO C are outdated C89 (1989) era standards)


Tool/Book Resources:
You can find a list of tools, books, websites, and other general resources for C/C++ in the C/C++ resource thread.
  • 4


#370003 bad word filter

Posted by v0id on 30 July 2008 - 08:49 AM

Your function filter does not return anything, make it return $message; after the foreach.
  • 1


#369607 One to hundred in 100 different ways

Posted by v0id on 30 July 2008 - 01:53 AM

Haha, yes, we owned you for quite a while. ;)

Note that the "hard" way in Danish is the old way of counting. Like I showed, in the same post as the hard way, the Danish system is like the French one now, and apparently also like the old Maltese one, TcM was talking about.

The numbers from one to nineteen seem to have their own names, like in English (English: one, two, three, ...; Danish: en/et, to, tre, ...; Maltese: wieħed, tnejn, tlieta, ...; French: un, deux, trois, ...) Next, each of the tens have their own names too (English: thirty, forty, fifty, ...; Danish: tredive, fyrre, halvtres, ...; Maltese: tlettin, erbgħin, ħamsin, ...; French: trente, quarante, cinquante, ...) The numbers from twenty to hundred are then represented like: ones (and) tens, where and is included in Danish, but not in French, and I don't know about the and in Maltese. When you get to the numbers above hundred it is represented like: hundreds (and) ones (and) tens. The same goes for and as before.

So, Danish (has the ands):
3: Tre (literally: three)
33: Treogtredive (literally: three and thirty)
333: Trehunredeogtreogtredive (literally: three hundred and three and thirty)

And, Maltese (has maybe the ands, TcM can clear this up, he's native):
3: Tlieta (literally: three)
33: Tlieta (u?) ħamsin (literally: three (and?) thirty)
333: Tlieta mija (u?) tlieta (u?) ħamsin (literally: three hundred (and?) three (and?) thirty)

And, French (has not the ands):
3: Trois (literally: three)
33: Trente-trois (literally: three-thirty)
333: Trois cent trente-trois (literally: three hundred three-thirty)

So the systems are pretty identical, the only major difference is the and-word. Danish has it, French has not, and Maltese has maybe? Could you check the Maltese translations I made, TcM, and could you, marvex89, check if the Norwegian system applies to the system of Danish, French and Maltese?
  • 1


#368859 How do/did you spend/spent your summer vacation?

Posted by v0id on 29 July 2008 - 05:52 AM

You shall look forward to Alanya, Xav!
It's a wonderful place, and the Kleopatra beach (where you're going to swim) is absolutely wonderful. You shall go to the city if you can. There's always life, 24/7, and if you have the chance you shall go to the local markets as well. Hiring a taxi-driver for your family is a good idea if you are going on any trips. You can rent a taxi-driver (illegal) for an entire day for only about £53. They'll drive you around to the local places, like orange-farms, nice local restaurants, beautiful sights, and so on (without all the tourists you find in the city). You can also make them wait for you, if you're going into museums or anything alike. When you come out again, they will still be there.
  • 1


#367351 Want to create a standalone database windows app

Posted by v0id on 25 July 2008 - 04:38 AM

There's various ways to save data. You can use text-files (plain, XML, etc.), databases, registry keys, and so on. Text-files and registry keys are probably the most optimal solutions, because the user of the program will need to have a database installed in order to run your program, if it used a database.

What do you think fits you the best?
  • 1


#367337 C/C++ FAQ: Read this before you post!

Posted by v0id on 25 July 2008 - 04:00 AM

This is a list of frequently asked questions here on CodeCall. If you have suggestions, corrections, new questions or answers to the list, or anything else, please send a PM to me.

The list does not need to be read from top to bottom, so you can easily jump to the question you're searching for without reading the previous questions. Use your browser's search functionalities to search for specific keywords.
Each question will be in bold text, and beneath the question there'll be some text with italics. This text in italics is a list of contributors to the current question. If you want to get your name in this text as well, you can send me a PM with whatever corrections you think it needs, like I also stated above. And at last, all the normal text beneath texts in bold and italics is the actual answer. Important keywords are marked, again, with italics. Bold text may also occur in lists.


How do I get started programming in C or C++?
(Contributors: v0id -- Last update: July 25th, 2008)
Both C and C++ are so-called compiled languages. That means that programs written in C or C++ will be translated directly into machine code, which can be read directly by your operating system. This translation consists of three steps: compiling, assembling and linking. The compiling process is where the sourcecode is translated into the Assembly programming language by a compiler. The assembling process is where the new Assembly code is translated into machine code by an assembler. The last process, the linking process, is where external libraries are linked onto or included in the program, depending on if it's a dynamic or static library, using a linker.
Other important tools for C/C++ programmers include profilers, debuggers, and editors (maybe even IDEs and RADs).


Which compiler shall I use?
(Contributors: v0id -- Last update: July 25th, 2008)
Choosing a compiler can be hard as there's many of them, and it seems like they all do the same. That's not all true. It's true that there's many compilers, but it's not true that they all do exactly the same. Some compilers do support both C and C++, some do not; some follows the standards, some do not; some has extra functionality besides the standards, some have not; some are fast, some are not; some are free, some are not; and so it goes.

This is an incomplete list of compilers:


Which assembler shall I use?
(Contributors: v0id, MeTh0Dz|Reb0rn -- Last update: July 25th, 2008)
Choosing an assembler can be hard as there's many of them, and it seems like they all do the same. That's not all true. It's true that there's many assemblers, but it's not true that they all do exactly the same. Some assemblers do use Intel syntax, some do not; some are fast, some are not; some are free, some are not; and so it goes.
Most compilers (or rather, compiler packages) include an assembler as default, so one does usually not need to pick an assembler oneself.

This is an incomplete list of assemblers:
  • A(3)86 (Intel syntax; DOS/Windows; Free; Closed-source)
  • FASM (Intel syntax; DOS/Windows/*nix; Free; Open-source)
  • GAS (AT&T syntax; Cross-platform; Free; Open-source)
  • HLA (Own syntax; Windows/*nix/Mac OS X; Free; Closed-source)
  • NASM (Intel syntax; DOS/Windows/*nix/Mac OS; Free; Open-source)
  • YASM (Intel/AT&T syntax; DOS/Windows; Free; Open-source)
  • TASM (Intel syntax; DOS/Windows; Non-free; Closed-source)
  • MASM (Intel syntax; DOS/Windows; Free; Closed-source)
  • MASM32 (Intel syntax; Windows; Free; Closed-source)


Which linker shall I use?
(Contributors: v0id -- Last update: July 25th, 2008)
Choosing a linker can be hard as there's many of them, and it seems like they all do the same. That's not all true. It's true that there's many linkers, but it's not true that they all do exactly the same. Some linkers are fast, some are not; some are free, some are not; and so it goes.
Most compilers or assemblers (or rather, compiler packages or assembler packages) include a linker as default, so one does usually not need to pick a linker oneself.

This is an incomplete list of linkers:
  • LD (Cross-platform; Free; Open-source)
  • GoLink (Windows; Free; Closed-source)


Which profiler shall I use?
(Contributors: v0id -- Last update: July 25th, 2008)
Choosing a profiler can be hard as there's many of them, and it seems like they all do the same. That's not all true. It's true that there's many profilers, but it's not true that they all do exactly the same. Some profilers are fast, some are not; some are free, some are not; some support different kinds of analysis, some do not; and so it goes.

This is an incomplete list of profilers:
  • gprof (Cross-platform; Free; Open-source)


Which debugger shall I use?
(Contributors: v0id, MeTh0Dz|Reb0rn -- Last update: July 25th, 2008)
Choosing a debugger can be hard as there's many of them, and it seems like they all do the same. That's not all true. It's true that there's many debuggers, but it's not true that they all do exactly the same. Some debuggers are fast, some are not; some are free, some are not; some support different kinds of analysis, some do not; some have a GUI, some have not; and so it goes.

This is an incomplete list of debuggers:
  • GDB (Cross-platform; Free; Open-source)
  • OllyDbg (Windows; Free; Closed-source)
  • TVD (*nix/Mac OS X; Non-free; Closed-source)
  • WinDbg (Windows; Non-free; Closed-source)
  • SoftIce (Windows; Non-free, Closed-source)
  • KGDB (Linux; Free; Open-source)


Which IDE (Integrated Development Editor) shall I use?
(Contributors: v0id, MeTh0Dz|Reb0rn, WingedPanther -- Last update: July 26th, 2008)
Choosing an IDE can be hard as there's many of them, and it seems like they all do the same. That's not all true. It's true that there's many IDEs, but it's not true that they all do exactly the same. Some IDEs are fast, some are not; some are free, some are not; some have syntax highlighting, some have not; and so it goes.

This is an incomplete list of IDEs:
  • Visual C++ (Own compiler; Windows; Free; Closed-source)
  • Dev-C++ (Optional; Windows; Free; Open-source)
  • Code::Blocks (Optional; Cross-platform; Free; Open-source)
  • Quincy 2005 (Optional; Windows; Free; Open-source)


Which RAD (Rapid Application Development) shall I use?
(Contributors: v0id -- Last update: July 25th, 2008)
Choosing a RAD can be hard as there's many of them, and it seems like they all do the same. That's not all true. It's true that there's many RADs, but it's not true that they all do exactly the same. Some RADs are fast, some are not; some are free, some are not; some have syntax highlighting, some have not; and so it goes.

This is an incomplete list of RADs:
  • wxDev-C++ (wxWidgets; Windows; Free; Open-source)


Do I need other tools than compilers, assemblers, linkers, etc.?
(Contributors: v0id, MeTh0Dz|Reb0rn -- Last update: July 25th, 2008)
Besides all these basic tools, there's other more specialized tools for the C/C++ programmers, for various purposes. These will be listed here, as they don't really fit in anywhere else. If you don't know what they're good for, and don't understand the short description, then you don't have to care about these - they're really only for specialized tasks.

This is an incomplete list of miscellaneous tools:
  • DrvInst (Driver insertion; Windows; Non-free; Closed-source)


I want to try out some libraries, what are some of the most known?
(Contributors: v0id, MeTh0Dz|Reb0rn, WingedPanther -- Last update: July 26th, 2008)
There's tons of libraries for C and C++. This is a collection of some of the major and mature ones.

This is an incomplete list of major libraries:
  • wxWidgets (GUI; Cross-platform; Free; Open-source)
  • GTK+ (GUI; Cross-platform; Free; Open-source)
  • FLTK (GUI; Cross-platform; Free; Open-source)
  • Qt (GUI; Cross-platform; Free; Open-source)
  • JUCE (GUI, Media; Cross-platform; Free; Open-source)
  • WinPcap (Networking; Windows; Free; Closed-source)
  • Boost++ (General-purpose; Cross-platform; Free; Open-source)


Where can I find information about particular functions?
(Contributors: v0id -- Last update: July 25th, 2008)
There's many places around on the internet where you are able to find information about particular functions. Some operating systems do even allow you to check functionality for functions, like Linux and its man-pages (if the man-pages are installed for the functions, of course).

This is an incomplete list of references for standard C/C++ functions:

If you're looking for specific functions which are parts of libraries, or similar, you'll need to use the manuals or references for the given library.

This is an incomplete list of references and manuals for different libraries:


Static- and dynamic libraries?
(Contributors: v0id -- Last update: July 25th, 2008)
When you're using external libraries or creating one yourself, you must choose whether it shall be a static- or a dynamic library. It does matter which one you pick, as they work differently when they get attached to your program.
A static library becomes a part of your program; literally a part. So when you link your program with a static library all the functionality will go right into your program. A dynamic library will not become a part of your program. It will stay as an external part, but your program can use its functionality through the linking. A disadvantage of dynamic libraries is that the user may loose the dynamic library. Without the dynamic library the program will not be able to work. There's also both dis- and advantages of static libraries. The disadvantage is that the executable file will increase in size, as the static library will become a part of it. The advantage is that the user can not loose the library, as it's not an external file.


My sourcecode won't compile, what do I do?
(Contributors: v0id, WingedPanther -- Last update: July 26th, 2008)
This question is not as straightforward as it may sound. The problem can be caused by multiple things. The two things that it most likely to be is either an error in your sourcecode, or problems with your programming environment. Many people do not realize that the problem may be located in their programming environment. So, if you're not getting any error-messages from your compiler, or if it's all silent, it's about time to look into your environment.
This also mean that your problem no longer is a general programming language; now the problem lies in your programming environment. So instead of making a question on C/C++, you shall make a question in a more general forum, or better go to the forum of the particular environment, as they're most likely better to help you out.
If, on the other side, it was just an error in your code you shall read the message you get, and if you don't understand it, create a thread in our forum, and we'll be happy to help you out.


What does this and that mean?
(Contributors: v0id -- Last update: July 25th, 2008)
This is an incomplete list of the many terms in the world of C and C++:
  • Assembler: A tool that translate a given Assembly code into machine code.
  • CLI: Command Line Interface. On Windows the commandline, on *nix and Mac OS X, the terminal.
  • Compiler: A tool that translate a given C or C++ code into the Assembly programming language.
  • GUI: Graphical User Interface. A user interface for the user which consists of graphical components.
  • IDE: Integrated Development Editor. A specialized editor which automatically compile the C or C++ code.
  • Linker: A tool that links external libraries to your program.
  • RAD: Rapid Application Development. A specialized editor where you can design a GUI, like in a normal application for graphics, like Photoshop or GIMP.
  • Sourcecode: The actual C or C++ code, later to be compiled.
  • TUI: Text User Interface. Like a GUI, but where the graphics are made of characters (sometimes even with colors).


My question is not answered here, what do I do?
(Contributors: v0id -- Last update: July 25th, 2008)
If your question is not answered in this FAQ, you should check out our forum, and see if your question has been asked before. If not, then I suggest you to create a new thread with your question, and our helpful members will do the best they can to answer your question.

You can find our C/C++ forum here:

Another option is to check out some of the other FAQs which can be found around on the internet. There's lots of them, so you'll just have to find the right one.

This is an incomplete list of other C/C++ FAQs:


A last note
This FAQ is not done, in fact it's only a beginning. I will continue to add new questions and answers, so stay tuned!
  • 2


#365502 C++ system() not working!!?!? (Cygwin bash shell?)

Posted by v0id on 20 July 2008 - 11:06 PM

sh is actually the Bourne Shell, and later replaced by the Thompson Shell, and now is bash normally used, which is the Bourne-Again Shell, referring to the "Bourne" in the Bourne Shell, as "born".

Why do you use Cygwin anyway? It seems like you're normally not using it besides for programming. I would remove/uninstall it, and install a package called MingW instead. MingW is a port of the GNU Compiler Collection (GCC) and does only include the necessary stuff for programming like a compiler, assembler, linker, debugger, etc.
  • 1


#364748 How to use python's capabilities w/ other languages?

Posted by v0id on 17 July 2008 - 06:31 AM

I haven't yet seen any project mixing Python and Java, and I don't think it's possible using the official implementation of Python - but I wouldn't be surprised if someone had done some tweaking to get it working. Python has an official API for C, so if you could live with C (and eventually, C++) it would be fairly easy for you to get started.

Another alternative is Jython, though it isn't exactly what you're looking for. Jython is an unofficial implementation of the Python language written in Java. It means that Python will run on every platform supporting Java, and having Jython. As Jython is written in Java, I'm pretty sure that you will be able to mix the two languages, though I've never been working with Jython myself.

Good luck!
  • 1


#359306 One to hundred in 100 different ways

Posted by v0id on 13 June 2008 - 05:13 AM

Python using Cheetah.

#051
from Cheetah.Template import Template
print Template("#for $number in $list\n$number\n#end for",
               searchList=[{"list": range(1, 101)}])

  • 1




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download