Re: where to download md5.py?

2005-11-02 Thread robert . dowell
So when you type this into an interactive session:
>>> import sha
>>> help(sha)

You get an error?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Filepath string manipulation help

2005-11-02 Thread robert . dowell
import os
print os.path.basename(filepath)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Filepath string manipulation help

2005-11-04 Thread robert . dowell
I just assumed he had heard of me and knew better than to take my
advice. :-)

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: debugger

2005-11-08 Thread robert . dowell

Benji York wrote:
> mclaugb wrote:
> > Is there a decent debugger to use with IDL?  I have briefly about "PDB" but
> > this looks pretty limited in features and difficult to use.
>
> You might like Winpdb:
> http://www.digitalpeers.com/pythondebugger/
> --
> Benji York

Not Found

The requested URL /pythondebugger/-- was not found on this server.
Apache/2.0.52 (Red Hat) Server at www.digitalpeers.com Port 80

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: debugger

2005-11-08 Thread robert . dowell

Benji York wrote:
> [EMAIL PROTECTED] wrote:
> > Benji York wrote:
> >>You might like Winpdb:
> >>http://www.digitalpeers.com/pythondebugger/
> >
> > Not Found
> >
> > The requested URL /pythondebugger/-- was not found on this server.
> > Apache/2.0.52 (Red Hat) Server at www.digitalpeers.com Port 80
>
>  Works for me.
> --
> Benji York

Yeah, for some reason my browser was appending /-- to the link. I
figured that out (little slow today) and pulled my post.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PIL-> Tkinter

2005-11-09 Thread robert . dowell
I have an app that I wrote to move images from a camera/portable media
to an archive directory. It is using TKInter and PIL to display each
jpg as it is transfered. I can email you the code if you would like.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: PIL-> Tkinter

2005-11-09 Thread robert . dowell
I'm having issues with gmail at work but I will try to email it from
home tonight.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Stopping Execution

2005-11-10 Thread robert . dowell
import sys
sys.exit

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: How to find the type ...

2005-12-09 Thread robert . dowell
>>> thisisastring = "1"
>>> thisisanint = 1
>>> type(thisisastring)

>>> type(thisisanint)

>>> thisisastring = int(thisisastring)
>>> thisisanint = str(thisisanint)
>>> type(thisisastring)

>>> type(thisisanint)

>>>

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Retrieving Filename from Path

2005-08-31 Thread robert . dowell
>>> import os.path
>>> help(os.path)
Help on module ntpath:

NAME
ntpath - Common pathname manipulations, WindowsNT/95 version.

FILE
c:\data\utils\python24\lib\ntpath.py

DESCRIPTION
Instead of importing this module directly, import os and refer to
this
module as os.path.

FUNCTIONS
abspath(path)
Return the absolute version of a path

basename(p)
Returns the final component of a pathname

commonprefix(m)
Given a list of pathnames, returns the longest common leading
component

dirname(p)
Returns the directory component of a pathname

exists(path)
Test whether a path exists

expanduser(path)
Expand ~ and ~user constructs.

If user or $HOME is unknown, do nothing.

expandvars(path)
Expand shell variables of form $var and ${var}.

Unknown variables are left unchanged.

getatime(filename)
Return the last access time of a file, reported by os.stat()

getctime(filename)
Return the creation time of a file, reported by os.stat().

getmtime(filename)
Return the last modification time of a file, reported by
os.stat()

getsize(filename)
Return the size of a file, reported by os.stat()

isabs(s)
Test whether a path is absolute

isdir(path)
Test whether a path is a directory

isfile(path)
Test whether a path is a regular file

islink(path)
Test for symbolic link.  On WindowsNT/95 always returns false

ismount(path)
Test whether a path is a mount point (defined as root of drive)

join(a, *p)
Join two or more pathname components, inserting "\" as needed

normcase(s)
Normalize case of pathname.

Makes all characters lowercase and all slashes into
backslashes.

normpath(path)
Normalize path, eliminating double slashes, etc.

realpath = abspath(path)
Return the absolute version of a path

split(p)
Split a pathname.

Return tuple (head, tail) where tail is everything after the
final slash.
Either part may be empty.

splitdrive(p)
Split a pathname into drive and path specifiers. Returns a
2-tuple
"(drive,path)";  either part may be empty

splitext(p)
Split the extension from a pathname.

Extension is everything from the last dot to the end.
Return (root, ext), either part may be empty.

splitunc(p)
Split a pathname into UNC mount point and relative path
specifiers.

Return a 2-tuple (unc, rest); either part may be empty.
If unc is not empty, it has the form '//host/mount' (or similar
using backslashes).  unc+rest is always the input path.
Paths containing drive letters never have an UNC part.

walk(top, func, arg)
Directory tree walk with callback function.

For each directory in the directory tree rooted at top
(including top
itself, but excluding '.' and '..'), call func(arg, dirname,
fnames).
dirname is the name of the directory, and fnames a list of the
names of
the files and subdirectories in dirname (excluding '.' and
'..').  func
may modify the fnames list in-place (e.g. via del or slice
assignment),
and walk will only recurse into the subdirectories whose names
remain in
fnames; this can be used to implement a filter, or to impose a
specific
order of visiting.  No semantics are defined for, or required
of, arg,
beyond that arg is always passed to func.  It can be used,
e.g., to pass
a filename pattern, or a mutable object designed to accumulate
statistics.  Passing None for arg is common.

DATA
__all__ = ['normcase', 'isabs', 'join', 'splitdrive', 'split',
'splite...
altsep = '/'
curdir = '.'
defpath = r'.;C:\bin'
devnull = 'nul'
extsep = '.'
pardir = '..'
pathsep = ';'
sep = r'\'
supports_unicode_filenames = True




Rob Cowie wrote:
> Hi,
>
> Given a string representing the path to a file, what is the best way to
> get at the filename? Does the OS module provide a function to parse the
> path? or is it acceptable to split the string using '/' as delimiters
> and get the last 'word'. The reason I'm not entirely happy with that
> method is that it is platform specific. I would prefer to use a built
> in method if possible.
> 
> Cheers,
> 
> Rob Cowie

-- 
http://mail.python.org/mailman/listinfo/python-list