114
votes
9answers
4k views
Seeking clarification on apparent contradictions regarding weakly typed languages
I think I understand strong typing, but every time I look for examples for what is weak typing I end up finding examples of programming languages that simply coerce/convert types automatically.
For ...
57
votes
4answers
14k views
Does python have an equivalent to Java Class.forName()?
I have the need to take a string argument and create a class in python. In Java, I would use Class.forName().newInstance(). Is there an equivalent in python?
Thanks for the responses. To answer ...
52
votes
10answers
30k views
How can I download all emails with attachments from Gmail?
How do I connect to Gmail and determine which messages have attachments? I then want to download each attachment, printing out the Subject: and From: for each message as I process it.
109
votes
13answers
53k views
Choosing Java vs Python on Google App Engine
Currently Google App Engine supports both Python & Java. Java support is less mature. However, Java seems to have a longer list of libraries and especially support for Java bytecode regardless of ...
42
votes
7answers
10k views
Which programming languages can I use on Android Dalvik?
In theory, Dalvik executes any virtual machine byte code, created for example with the compilers of
AspectJ
ColdFusion
Clojure
Groovy
JavaFX Script
JRuby
Jython
Rhino
Scala
Are there already ...
58
votes
9answers
5k views
How to reliably guess the encoding between MacRoman, CP1252, Latin1, UTF-8, and ASCII
At work it seems like no week ever passes without some encoding-related conniption, calamity, or catastrophe. The problem usually derives from programmers who think they can reliably process a “text” ...
13
votes
5answers
16k views
XML instance generation from XML schema (xsd) [closed]
I was wondering if there's a way I can automate the generation of XML files from XSD schemas given that I have the data and the labels. I'd like to do this in python/java. It seems very possible, yet ...
84
votes
14answers
42k views
What CMS runs on Google App Engine?
Is it possible to deploy any CMS (Content Management System) using Google App Engine? Wikipedia lists 4 Python CMSes and one of them is Django based.
Do you know any way to make any of them to work ...
34
votes
7answers
13k views
Compiled vs. Interpreted Languages
I'm trying to get a better understanding of the difference. I've found a lot of explanations online, but they tend towards the abstract differences rather than the practical implications.
Most of my ...
17
votes
7answers
7k views
Java Python Integration
I have a Java app that needs to integrate with a 3rd party library. The library is written in Python, and I don't have any say over that. I'm trying to figure out the best way to integrate with it. ...
35
votes
9answers
3k views
Why is it “Easier to ask forgiveness than permission” in python, but not in Java? [closed]
It seems that this is accepted as perfectly good code in the python community:
def is_integer(input):
try:
return x % 1 == 0
except TypeError:
return False
On the other ...
7
votes
4answers
9k views
Calling Python in Java?
I am wondering if it is possible to call python functions from java code using jython, or is it only for calling java code from python?
3
votes
2answers
2k views
Java raw audio output
Just wondering if there is a library in Java like the module PyAudiere in Python, that simply allows you to create tones and play them, like this sample Python code:
device = audiere.open_device()
...
41
votes
35answers
14k views
Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language?
I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for ...
24
votes
5answers
18k views
Calling Java from Python
What is the best way to call java from python?
(jython and RPC are not an option for me).
I've heard of JCC: http://pypi.python.org/pypi/JCC/1.9
a C++ code generator for calling Java from C++/Python
...