KDE 4.6 PyKDE API Reference

- KDE's Python API

# NetRC Class Reference

`from PyKDE4.kio import *`

Namespace: KIO

## Detailed Description

A Singleton class that provides access to passwords stored in .netrc files for automatic login purposes. This is only meant to address backward compatibility with old automated ftp client style logins...

An interface to the ftp .netrc files

Author:
  Dawit Alemayehu <adawit@kde.org>

## Enumerations

LookUpModeFlag | { exactOnly, defaultOnly, presetOnly }

## Methods

| __init__ (self)
| __init__ (self, KIO.NetRC other)
bool | lookup (self, KUrl url, KIO.NetRC.AutoLogin login, bool userealnetrc, QString type, KIO.NetRC.LookUpMode mode)
int | openf (self, QString a0)
bool | parse (self, int a0)
| reload (self)

## Static Methods

KIO.NetRC | self ()

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | KIO.NetRC | other
| ) |  |  |

bool lookup | ( | self, |
|  | KUrl | url,
|  | KIO.NetRC.AutoLogin | login,
|  | bool | userealnetrc,
|  | QString | type,
|  | KIO.NetRC.LookUpMode | mode
| ) |  |  |

Looks up the login information for the given url.

Parameters:

  | url | the url whose login information will be checked
  | login | the login information will be writte here
  | userealnetrc | if true, use $HOME/.netrc fle
  | type | the type of the login. If null, the url's protocol will be taken
  | mode | the LookUpMode flags (ORed) for the query

int openf | ( | self, |
|  | QString | a0
| ) |  |  |

bool parse | ( | self, |
|  | int | a0
| ) |  |  |

reload | ( |  | self ) |

Reloads the auto login information.

## Static Method Documentation

KIO.NetRC self | ( |  | ) |

A reference to the instance of the class.

Returns:
  the class

## Enumeration Documentation

LookUpModeFlag

Specifies the mode to be used when searching for a matching automatic login info for a given site :

- exactOnly search entries with exact host name matches.
- defaultOnly search entries that are specified as "default".
- presetOnly search entries that are specified as "preset".

See also:
  lookup

Enumerator:

  exactOnly = 0x0002 |
  defaultOnly = 0x0004 |
  presetOnly = 0x0008 |