grailbrowser now running under python 2.5 (probably above too)

Stephen Hansen me+list/python at ixokai.io
Sun Jul 11 20:31:09 EDT 2010


On 7/11/10 5:01 PM, rantingrick wrote:
> On Jul 11, 11:57 am, Stephen Hansen <me+list/pyt... at ixokai.io> wrote:
>> On 7/11/10 9:31 AM, Thomas Jollans wrote:
>>> trying to
>>> support both UNIX and Windows is NOT a good idea.
>>
>> And you can't lump the Mac in with "UNIX" here, even though it really is
>> UNIX at the foundation, because there's some very fundamental
>> differences between HFS+ (and some other details that are higher level)
>> and more traditional unix FS's. Not to mention that the Mac FS situation
>> is slightly schitzo since it has two very different ways at looking and
>> treating the files, the posix way and the Foundation way... and users
>> think more in terms of the latter, usually. At least less sophisticated
>> users.
> 
> 
> Sure you can! Have you ever heard of a *rare* module by the name of
> "os"? Yes i know *nobody* uses it but it works nonetheless!

Uh, "os" is beyond inadequate. Even shutil is severely lacking. For the
most basic operations, Python's provided tools basically work only in
very simple cases -- but only those simple cases -- and a file manager
would be an utter failure if it had those limitations.

See the big red box on top of the docs:
http://docs.python.org/library/shutil.html

Copying a file without the resource fork on a mac, *can* result in
essential data being lost (This is less common then it used to be). As
simple a task as chown/chmod for posix systems to take ownership of a
file and make it only readable by you is actually a *deeply* complex
task with the win32api. Check out
http://mail.python.org/pipermail/python-win32/2004-July/002111.html for
just an example of what it /looks/ like.

That's not even getting into the nitty-gritty details, like how Mac's
are *usually* case-insensitive, windows is always, linux is almost
always not, and yet some power users go out of their way to enable
case-sensitivity on mac filesystems (which has a tendency to break all
kinds of things).

Oh, and a LOT of the filesystem-details and how you could go around
handling them on a mac is *very* dependant on just what version of OSX
you have. It changes a lot.

>> You can't do a cross-platform file manager without either doing a huge
>> amount of work exposing each platform separately-- essentially getting
>> separate codebases for each-- or doing a least common denominator
>> situation, at which point I boggle: why the hell did you bother to begin
>> with? Even Finder is better then that, let alone windows' Explorer.
> 
> Nothing is worse than InternetExploder\Exploder, nothing! And whats
> wrong with seperate code bases, it's three modules and a startup
> script...
> 
> if sys.platform == 'win32':
>     import fm32
> elif sys.platform == 'darwin':
>     import fmdarwin
> elif sys.platform == 'nix':
>     import fmnix
> 
> We just recently had a discussion about CONDITIONALS Stephen have you
> forgotten already?

You underestimate the significance of the differences and how that would
impact the resulting user interface; have you actually implemented
anything which targeted the big three OS's and did non-trivial file
operations? I have: just dealing with permissions and network shares and
other details is actually a pain in the ass. And in the end, there's
plenty of Explorer/Finder replacements out there which do their job
splendidly. And I assume not everyone on linux loves nautilus and uses it :P


>> (*): I do not argue that a non-default file manager on an OS might be a
>> great thing.
> 
> Now you're talking!

Selective quoting to make it sound like I'm agreeing in some way with
you = jerkoff move.

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100711/5b0ec162/attachment.sig>


More information about the Python-list mailing list