Today's News

1st Oct 2007
30th Sep 2007
29th Sep 2007

Get Linux in South Africa Pretoria on DVD or CD, SUSE, OpenSuse, Fedora, Mandriva, Knoppix, Mandrake, Debian, DamnSmall, DSL, Gentoo, Slackware, SimplyMepis, Monoppix, FreeBSD, Trustix, Comodo, Smoothwall, Gibraltar, IPCop, OpenCD, Ubuntu, Kubuntu, Redhat, CentOS, Whitebox, PCLinuxOS, Xandros, Vector, Scientific, OpenOffice, Vector, Foresight, Asterisk
 
News Alert


Linux and Open Source News for 30th September 2007

Open Source

previous    Distro Watch    next


  popularitypopularity

Source: LinuxTracker.org

Category: Musix Size: 693.96 MB Status: 1 seeders and 14 leechers Added: 2007-09-30 18:01:11


  popularitypopularity

Source: LinuxTracker.org

Category: Mandriva Size: 699.99 MB Status: 2 seeders and 8 leechers Added: 2007-09-30 16:17:39


  popularity

Source: LinuxTracker.org

Category: Mandriva Size: 699.37 MB Status: 2 seeders and 10 leechers Added: 2007-09-30 15:05:37


  popularitypopularity

Source: redflag

Red Flag Linux 6.0 "Desktop", a Chinese distribution based on the recently announced Asianux 3.0, has been released. As with any past releases, Red Flag Linux 6.0 continues to focus on providing an easy-to-use desktop that resembles the Windows user interface as much as possible and includes a .



previous    Linux Today News Service    next


  popularitypopularitypopularity

Source: Linux Today

Linux.com: "One of the most welcome additions to OpenOffice.org 2.3 is a new export filter that allows you to save Writer documents as MediaWiki-formatted pages "


  popularitypopularitypopularitypopularity

Source: Linux Today

HowtoForge: "In this article I will show how to install and configure BlockHosts on a Debian Etch system "


  popularitypopularitypopularitypopularity

Source: Linux Today

WarpedVisions: "I find myself more productive on a Linux system, though, because of a few very simple differences "


  popularitypopularitypopularitypopularitypopularitypopularitypopularitypopularitypopularity

Source: Linux Today

Foogazi: "It's no secret that tech-savvy computer users typically become the go-to guy for all technical help in their circles "


  popularitypopularitypopularitypopularity

Source: Linux Today

LinuxDevices: "The iPAC-5010 is powered by a 180MHz ARM9 core, and comes with Linux and a GNU toolchain "


  popularitypopularitypopularitypopularity

Source: Linux Today

Linux.com: "Songbird is a cross-platform, Mozilla-based music player with high ambitions "


  popularitypopularitypopularitypopularitypopularitypopularitypopularitypopularitypopularity

Source: Linux Today

KernelTrap: "'If you have the ability to use chroot() you are root. If you are root you can walk happily out of any chroot by a thousand other means,' Alan Cox explained during a thread that suggested chroot was broken in Linux "


  popularitypopularitypopularity

Source: Linux Today

developerWorks: "NITF is an open, public standard defined and supported by the International Press Telecommunications Council, and is widely used by some of the world's largest news agencies "



previous    News for nerds, stuff that matters    next


  popularitypopularitypopularitypopularity

Source: Slashdot: Linux

An anonymous reader writes "A project called OpenChange is working to develop an open source client library for Microsoft Exchange. They are heavily dependent on Samba code for the underlying protocol support and have been forced to move to GPLv3 once Samba moved. This has gotten in the way of legally adding support to other software such as KDE, which is unwilling or unable to go GPLv3." It sounds like all the developers involved expect the GPLv2/GPLv3 issues to be resolved in time.Read more of this story at Slashdot.


  popularitypopularitypopularitypopularity

Source: Slashdot: Linux

Jasper Bryant-Greene writes "Although a tzdata release that includes New Zealand's recent DST changes (2007f) has been out for some time, Debian are refusing to push the update from testing into the current stable distribution, codenamed Etch, on the basis that 'it's not a security bug.' This means that unless New Zealand sysadmins install the package manually, pull the package from testing, or alter the timezone to 'GMT-13' manually, all systems running Debian Etch in New Zealand currently have the incorrect time, as DST went into effect this morning. As one of the last comments in the bug report says, 'even Microsoft are not this silly.' The final comment (at this writing), from madcoder, says 'The package sits in volatile for months. Please take your troll elsewhere.'"Read more of this story at Slashdot.



previous    The O'Reilly Network ONLamp Articles and Weblogs    next


  popularitypopularitypopularitypopularity

Source: ONLamp.com

The copy module provides functions for duplicating objects using shallow or deep copy semantics.

Module: copyPurpose: Duplicate objects.Python Version: 1.4Description:The copy module includes 2 functions, copy() and deepcopy(), for duplicating existing objects.Shallow Copies:The shallow copy created by copy() is a new container populated with references to the contents of the original object. For example, a new list is constructed and the elements of the original list are appended to it.import copyclass MyClass: def __init__(self, name): self.name = name def __cmp__(self, other): return cmp(self.name, other.name)a = MyClass('a')l = [ a ]dup = copy.copy(l)print 'l :', lprint 'dup:', dupprint 'dup is l:', (dup is l)print 'dup == l:', (dup == l)print 'dup[0] is l[0]:', (dup[0] is l[0])print 'dup[0] == l[0]:', (dup[0] == l[0])For a shallow copy, the MyClass instance is not duplicated so the reference in the dup list is to the same object that is in the l list.$ python copy_shallow.pyl : []dup: []dup is l: Falsedup == l: Truedup[0] is l[0]: Truedup[0] == l[0]: TrueDeep Copies:The deep copy created by deepcopy() is a new container populated with copies of the contents of the original object. For example, a new list is constructed and the elements of the original list are copied, then the copies are appended to the new list.By replacing the call to copy() with deepcopy(), the difference becomes apparent.dup = copy.deepcopy(l)Notice that the first element of the list is no longer the same object reference, but the two objects still evaluate as being equal.$ python copy_deep.pyl : []dup: []dup is l: Falsedup == l: Truedup[0] is l[0]: Falsedup[0] == l[0]: TrueControlling Copy Behavior:It is possible to control how copies are made using the __copy__ and __deepcopy__ hooks.__copy__() is called without any arguments and should return a shallow copy of the object.__deepcopy__() is called with a memo dictionary, and should return a deep copy of the object. Any member attributes which need to be deep-copied should be passed to copy.deepcopy(), along with the memo dictionary, to control for recursion (see below).This example illustrates how the methods are called:import copyclass MyClass: def __init__(self, name): self.name = name def __cmp__(self, other): return cmp(self.name, other.name) def __copy__(self): print '__copy__()' return MyClass(self.name) def __deepcopy__(self, memo): print '__deepcopy__(%s)' % str(memo) return MyClass(copy.deepcopy(self.name, memo))a = MyClass('a')sc = copy.copy(a)dc = copy.deepcopy(a)$ python copy_hooks.py__copy__()__deepcopy__({})Recursion in Deep Copy:To avoid problems with duplicating recursive data structures, deepcopy() uses a dictionary to track objects which have already been copied. This dictionary is passed to the __deepcopy__() method so it can be used there as well.This example shows how an interconnected data structure such as a Digraph might assist with protecting against recursion by implementing a __deepcopy__() method. This particular example is just for illustration purposes, since the default implementation of deepcopy() already handles the recursion cases correctly.First some basic directed graph methods. A graph can be initialized with a name and a list of existing nodes to which it is connected. The addConnection() method is used to set up bi-directional connections. It is also used by the deepcopy operator.import copyimport pprintclass Graph: def __init__(self, name, connections): self.name = name self.connections = connections def addConnection(self, other): self.connections.append(other) def __repr__(self): return '%s) id=%s' % (self.name, id(self))The __deepcopy__() method prints messages to show how it is called, and manages the memo dictionary contents as needed. Instead of copying the connection list wholesale, it creates a new list and appends copies of the individual connections to it. That ensures that the memo dictionary is updated as each new node is duplicated, and avoids recursion issues or extra copies of nodes. As before, it returns the copied object when it is done. def __deepcopy__(self, memo): print print repr(self) not_there = [] existing = memo.get(self, not_there) if existing is not not_there: print ' ALREADY COPIED TO', repr(existing) return existing pprint.pprint(memo, indent=4, width=40) dup = Graph(copy.deepcopy(self.name, memo), []) print ' COPYING TO', repr(dup) memo[self] = dup for c in self.connections: dup.addConnection(copy.deepcopy(c, memo)) return dupNext we can set up a graph with a nodes root, a, and b. The edges are a-root, b-a, b-root, root-a, root-b.root = Graph('root', [])a = Graph('a', [root])b = Graph('b', [a, root])root.addConnection(a)root.addConnection(b)dup = copy.deepcopy(root)When the root node is copied, we see:$ python copy_recursion.py{} COPYING TO { : , 488896: 'root', 497392: ['root']} COPYING TO ALREADY COPIED TO { : , : , 237120: 'a', 488896: 'root', 497392: [ 'root', 'a', , ], 508592: , 510512: } COPYING TO Notice that the second time the root node is encountered, while the a node is being copied, the recursion is detected and the existing copy is used instead of a new one.References:Python Module of the Week HomeDownload Sample CodeTechnorati Tags:python, PyMOTW



Updated: Mon Oct 1 23:55:04 2007


OrderWeb Software CC
Contact Us