Python and C++ questions

JC0133

Senior member
Nov 2, 2010
201
1
76
I am in a software engineering class working on a group project with a few other students.

I have been tasks with doing some things that are fairly new to me. I apologize if my questions are unclear. I am still trying to understand some of this stuff myself.

We are writing the code for this project in python or C++, not sure yet.

My questions are

1st. How do you create a library file in Python and C++?

2nd. How do you port your code over to a mobile device?

3rd and last. I will being dealing with social Networking data analysis or social data analysis(or something like that). I was told that Python and C++ will have libraries that have APIs that handle multiple tasks dealing with this type of data. Example Splitting the data into multiple segments and organizing the data?
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
> 2nd. How do you port your code over to a mobile device?

What are the device(s) and what are the needs?

Developing real apps for Android means Java, iStuff means Objective-C and iOS, Windows Phone means .NET and C# or C++. Just developing something that is usable on most phones and tablets could mean a server and HTML/CSS/JavaScript sent from your server application (no client / device app needed, use the browser).

What you need for the server application depends on your server type and what you're trying to do: PHP, Python, Java/Tomcat etc. for Linux, probably more .NET and C# or ASP if you're using a Windows server for some reason.
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
We are writing the code for this project in python or C++, not sure yet.

Lol. I would suggest either assembly language or Lisp.

My questions are 1st. How do you create a library file in Python and C++?

In Python (2.x) all methods and variables are exported (visible to importers) from every file. A module consists of one or more files in a directory with an __init__.py. The __init__ file can do some tricks to hide things, group things, etc., but that's basically it.

In C++ the output of the compilation process is binary executable code, so platform becomes an issue. A linkable library is not the same on linux as on Windows, for example. A very general statement might be: in C++ a module is a linked set of compiled object files, each of which contains one or more exported symbols. In reality a module in this case is basically the same as an executable, without the entry/exit preamble that an executable needs to be run from the command line, rather than linked to another program.
 

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
^ just to add to that, unless the assignment requires it you don't have to use a separate library to link to for your own code. If it's your code you can just have library.cpp and library.h files (or any other name) and agree that no one will modify them except the "library person."

If you need to link to external libraries, that depends on your platform. In Visual Studio you'd go to project settings and add .lib files to the linker settings.
 

JC0133

Senior member
Nov 2, 2010
201
1
76
Ok so what do I use to actually write python in? Like I use eclipse for Java, Visual Studio for C++.

NetworkX is the library I will use according to my professor. Has anybody ever used it before? Any good tutorials out there?
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
Ok so what do I use to actually write python in? Like I use eclipse for Java, Visual Studio for C++.

NetworkX is the library I will use according to my professor. Has anybody ever used it before? Any good tutorials out there?

There are a lot of choices. Many python programmers use ipython or just an editor at the command line. I use Sublime Text, which is an excellent editor with some IDE-like features. There is also PyCharm and a couple of other IDEs. Most of the IDEs (and Sublime) have costs associated with them. Sublime is $79.
 

postmortemIA

Diamond Member
Jul 11, 2006
7,721
40
91
Ok so what do I use to actually write python in? Like I use eclipse for Java, Visual Studio for C++.

NetworkX is the library I will use according to my professor. Has anybody ever used it before? Any good tutorials out there?
I use free PyDev plugin that provides Python development within Eclipse.

Eclipse actually has nice CDT plugin that also supports C/C++ (with gcc toolchain).
 
Last edited:

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
Ok so what do I use to actually write python in? Like I use eclipse for Java, Visual Studio for C++.

NetworkX is the library I will use according to my professor. Has anybody ever used it before? Any good tutorials out there?

For an IDE, that depends on what you like
Sublime Text I like and it has Python plug-ins. It works great for C++

I am taking a class on coursera.com for Python and they use a browser based IDE called CodeSkulptor and is usable at http://www.codeskulptor.org/

Now this is limited to certain libraries and it actually converts python to javascript behind the scenes so things don't always work the same as a real "Python" program would, but this is needed for the class I am taking.

There is a fun way to learn Python at: http://www.checkio.org/ It's in a video game format. It's addicting.

The coursera class Week 1 finishes on Sunday morning, I am not sure if you can still sign up...it's 9 weeks long and so far very good.


There is also another editor for many languages called Orion (http://www.eclipse.org/orion/) this leverages the cloud and makes collaberation very easy. I forgot to mention it above. You can actually save your code like CodeSkulptor and get a sharable URL to hand out to it. However; this does 'real Python' and other languages unlike CodeSkulptor.
 
Last edited:
Mar 1, 2007
30
0
0
C++ will allow you to create some modules once which can be used on all three mobile platforms. You will obviously need to do the UI in the platforms main language.
 
Last edited:
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |