KIO.NetRC

KDE 4.2 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)
QString | extract (self, QString a0, QString a1, int a2)
bool | lookup (self, KUrl url, KIO.NetRC.AutoLogin login, bool userealnetrc=0, QString type=QString(), KIO.NetRC.LookUpMode mode=KIO.NetRC.LookUpMode(KIO.NetRC.exactOnly)|KIO.NetRC.defaultOnly)
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
| ) |  |  |

QString extract | ( | self, |
|  | QString | a0,
|  | QString | a1,
|  | int | a2
| ) |  |  |

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

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.

KIO.NetRC self | ( |  | ) |

## 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 |