|
dougdrums posted:So I was (not now, earlier) and programming and thinking about the finally statement. Is there any god drat reason for the finally statement? The only situation I see using finally in is if I didn't want to put a catch statement after a try which is a horrible practice anyways. And even if I did want to do that, couldn't I just use catch { } instead? It's used in Python for the same reasons other people stated: code:
Newer versions of Python have a nicer syntax for that: code:
|
# ¿ Mar 2, 2008 17:51 |
|
|
# ¿ Apr 29, 2024 05:18 |
|
I normally run "sudo python setup.py install" when I install Mercurial. I don't know if the Makefile differs, but the local site-packages directory is in /Library/Python/2.5/site-packages/ on 10.5, and I believe it lives inside the Python.framework folder on 2.4.
|
# ¿ Mar 5, 2008 18:27 |
|
outlier posted:Maybe this is less of a programming question and more of a programming tool or programmer question but: can anyone suggest alternatives to Trac? Trac's pretty amazing, I can't imagine why you'd want to throw away such a great piece of software. Are you trying to use MySQL or PostgreSQL with it? It's really meant to be used with SQLite, and there really isn't any good reason not to use SQLite, and that's painless to set up. If you are using SQLite, make sure the user running Trac has read/write permissions to the Trac instance folder and the database file. Beyond that, there isn't really much that could go wrong with the database.
|
# ¿ Mar 30, 2008 23:04 |
|
JoeNotCharles posted:Absolutely - both wxPython and PyQT are fantastic GUI frameworks (I prefer PyQT). Google will find you lots of good stuff. Have you implemented any applications that bundle either framework? I downloaded wxPython's OS X framework and the disk image is around 33 MB. I don't know what that says about how much space it occupies in frozen form, but it definitely turned me off to messing around with it initially. I'd be curious to see if PyQt is any easier or harder to bundle with a frozen Python application.
|
# ¿ May 14, 2008 04:20 |
|
jonnii posted:I've monkeyed around with the repository uri and nothing i try seems to work. pumpqin.com is in the hosts file pointing to 127.0.0.1. Any ideas? A lot of programs don't support specifying SSH port numbers, and I don't think OpenSSH even supports it that way (it has a command line flag for it). I usually just sidestep the issue entirely and add a Host entry to my SSH config. You'll need the config wherever you're running ssh or ssh-based utilities (it sounds like you'll need it on more than one machine in this case). Add something like this to ~/.ssh/config: code:
|
# ¿ May 17, 2008 00:55 |
|
checkeredshawn posted:The files are stored in an array in the script, and I'd like to diff all of them to see if any of the results differ, and then output which DNS servers gave different results. Just choose one file as a base file and diff each of the other files against the base one individually. This will tell you if there any overall differences, but I'm not sure what you're actually trying to accomplish here. If you're trying to verify that your DNS records haven't changed, it might be better to actually compare the results against known good output (which would then be your base file). As far as how that would look in bash, I'd use a for loop to iterate over the array (excluding the base file) and run diff -q on each file against the base file. You could build up results in a temporary file/buffer, or just have the program exit when when one of the diffs returns any output.
|
# ¿ Jul 2, 2008 23:05 |
|
Plastic Jesus posted:I meant that there's no reason to use anything other than Terminal.app Terminal.app doesn't do mouse reporting, which is definitely a huge reason not to use it. It's also pretty spartan feature-wise. The only thing it has going over the only other native terminal emulator, iTerm, is that it's much faster and less buggy. It really is a matter of preference. Terminal.app isn't leagues ahead of everything else or anything like that.
|
# ¿ Jul 10, 2008 06:05 |
|
You can use TerminalColours to customize the color scheme. If you want mouse reporting, I'm working on MouseTerm which implements it for Terminal.app. So far it only does mouse wheel scrolling, but it does simulated scrolling in fullscreen applications as well (like gnome-terminal).
|
# ¿ Jul 10, 2008 16:08 |
|
|
# ¿ Apr 29, 2024 05:18 |
|
The objects aren't being "swapped", you're just changing what objects the names a, b, c, and d refer to. If you use a temporary variable for whatever reason, you're just creating an extra reference, not a copy of the object.
|
# ¿ Aug 24, 2008 04:21 |