Am 04.09.2008, 15:27 Uhr, schrieb Mike Driscoll <[EMAIL PROTECTED]>:
On Sep 4, 8:25 am, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote:
Hi,
for scripts that take arguments, I would like to remove the trailing
slash if it's present.
Is there something else than:
a='/usr/local/lib/'
if a[-1] == '/
On Sep 4, 6:32 am, "Francesco Guerrieri" <[EMAIL PROTECTED]>
wrote:
> On Thu, Sep 4, 2008 at 3:25 PM, Mathieu Prevot <[EMAIL PROTECTED]> wrote:
> > Hi,
>
> > for scripts that take arguments, I would like to remove the trailing
> > slash if it's present.
>
> > Is there something else than:
>
> > a='
On Thu, Sep 4, 2008 at 3:25 PM, Mathieu Prevot <[EMAIL PROTECTED]> wrote:
> Hi,
>
> for scripts that take arguments, I would like to remove the trailing
> slash if it's present.
>
> Is there something else than:
>
> a='/usr/local/lib/'
> if a[-1] == '/':
> a = list(a)
> a.pop()
> ''.join(a)
>
>
2008/9/4 Mathieu Prevot <[EMAIL PROTECTED]>:
> Hi,
>
> for scripts that take arguments, I would like to remove the trailing
> slash if it's present.
>
> Is there something else than:
>
> a='/usr/local/lib/'
> if a[-1] == '/':
> a = list(a)
> a.pop()
> ''.join(a)
A dummy
a.rstrip('/')
Sorry fo
On Sep 4, 8:25 am, "Mathieu Prevot" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> for scripts that take arguments, I would like to remove the trailing
> slash if it's present.
>
> Is there something else than:
>
> a='/usr/local/lib/'
> if a[-1] == '/':
> a = list(a)
> a.pop()
> ''.join(a)
>
> Thanks,
Hi,
for scripts that take arguments, I would like to remove the trailing
slash if it's present.
Is there something else than:
a='/usr/local/lib/'
if a[-1] == '/':
a = list(a)
a.pop()
''.join(a)
Thanks,
Mathieu
--
http://mail.python.org/mailman/listinfo/python-list