Assume for a moment that one cannot use print (and thus enjoy the benefit of automatic encoding detection). So that leaves us with sys.stdout. However, sys.stdout is so dumb as to not do any sensible encoding.
Now one reads the Python wiki page PrintFails and goes to try out the following code:
$ python -c 'import sys, codecs, locale; ...
Hi,
Quicktime-, MPEG- or AIFF-files all seem to organize their data elements in chunks like this:
0x00 chunk 1 header (size as UInt32 + ID as 4-char-code)
0x08 chunk 1 data
...
0xA0 chunk 2 header
0xA8 chunk 2 data
...
and so on.
When reading a file like that, it's easy to skip to the chunk of interest, because each chunk declares it...
This is probably a stupid question, but how can I execute a shell command from my Cocoa app?
I have the command as a string "command", but can easily manipulate data as needed.
There is no need to get a returned output value.
...
Is there any hg functionality to mimic the "guess renames" command of TortoiseHG?
I really dig this one, however I am currently using MacOS and have Murky or the commandline interface available.
...
I am running a Java 32-bit app on Mac OS X Leopard via Web Start. I need to make sure the VM loads in 32-bit mode. How can I do this in the JNLP?
...
When I do this command :
sudo port clean py25-gtk
sudo port install py25-gtk
I get this error :
---> Computing dependencies for py25-gtk
---> Building getopt
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_getopt/w...
Is it possible to programatically ask Mac OS X not to turn on the screen saver while your application is active?
...
I have a program (specifically my entry for the SO DevDays Countdown app challenge) which relies on several dynamic libraries, namely libSDL, libSDL_ttf, and others. I have these libraries installed under /opt/local/lib via MacPorts, and many people won't have these installed (and some might have them installed, but not at that location...
I just installed git 1.6.4.4 after downloading a DMG package from here.
I now have /usr/local/git. But it isn't in my PATH. So I need to add it.
My question is, should I add just /usr/local/git/bin, or do I also need to add one or more of these other directories?
$ cd /usr/local/git/
$ ls -al
total 0
drwxr-xr-x 3 joefleen wheel 102...
Hi,
I've been searching the web for a couple of days and can't seem to find clear instructions on how to do this.
SQLite doesn't have math functions like, sine, cosine, etc.. I found a library that extends SQLite and adds these functions, but I can't figure out how to compile the library.
http://lhealy.livejournal.com/6306.html
I've ...
How do I view directories that begin with dot and how do I browse application directories in Netbeans?
I can't seem to view directories that begin with a "dot" through the open file dialog in Netbeans. Similarly, I can't browse any application directory e.g. File->Open File->"someapp.app". Attempting to browse "someapp.app" gives the er...
I am running OSX 10.6 Snow Leopard, have downloaded rhino1_7R2 and moved it to /usr/local/
I am aware however that (while this would prevent it from being altered by OS updates) this may not be the best location for it and imagine that it may need to be connected to the Java installation.
My intended use for Rhino is to run JavaScript ...
Hey guys
I'm a .NET web developer and just bought a new Mac.
I'm interested in developing, and debugging .NET in OSX, but I'm not interested in deploying to OSX. Although, in the future, I will be interested in deploying to Linux.
What are your experiences with Mono web development in OSX?
In particular, how does it compare in terms ...
Hello. Strange problem. Text fields in my flex simply do not work under Mac. Inputted characters do not appear within it. I do not have any specific font set (just _serif), so I don't thing it's font issue.
In what direction should I dig? Have anyone similar experience?
...
I'm trying to build some of our software, which was designed to run solely on Linux, on MacOS X. We are using CMake and I installed MacPorts so I could easily get CMake along with some of the third party libraries that we depend on.
Now the problem is that CMake doesn't appear to look for libraries from MacPorts by default so several of...
My app currently uses growl to send the occasional message to the user, which works great when I am developing it. But once it is run as a in production, as a system-level Launch Daemon under a different user, the growl messages no longer appear.
So, the question: Is it possible to send a growl message to another user on the same compu...
I'm trying to zip up my iPhone application for App Store distribution.
The distribution instructions suggest looking in the build log to check if the mobileprovision file was included, but I can't figure out how to show a build log.
Apple's instructions:
To confirm your build was successful, check for the following:
O...
Hi,
I'm a Windows (native, not .NET) programmer and I'd like to port an application to the Mac.
Actually, I believe it will be more of a rewrite, as the original depends on many activex controls.
As I have never used a Mac in my entire life, I'll need some guidance. O:-)
a) What book(s) would you recommend to make the move from Wi...
I am trying to build libdecodeqr on a mac. My c++ building and linking history is all on windows, so it's an exciting journey of discovery.
I have finally got to the point where I want to create the linked library. The command I am running is:
g++ -shared -o libdecodeqr.so.0.9.3 bitstream.o codedata.o container.o ecidecoder.o formati...
Ours is an open-source Mac application localized by volunteers. These volunteers will do their work on special localization builds of the software (with unstripped nibs), then send us the changes to integrate into the original xib and strings files.
The problem is that, while there is a way to integrate string changes without blowing aw...