Changes between Version 20 and Version 21 of FrequentlyAskedQuestions


Ignore:
Timestamp:
09/26/08 12:08:25 (13 years ago)
Author:
Thijs Triemstra
Comment:

cosmetic update

Legend:

Unmodified
Added
Removed
Modified
  • FrequentlyAskedQuestions

    v20 v21  
    1919=== I have a problem getting Twisted. ===
    2020
    21 Did you check the HOWTO collection? There are so many documents there that they might overwhelm you... try starting from the index, reading through the overviews and seeing if there seems to be a chapter which explains what you need to. You can try reading the !PostScript or PDF formatted books, inside the distribution. And, remember, the source will be with you... always.
     21Did you check the [wiki:Documentation HOWTO collection]? There are so many documents there that they might overwhelm you... try starting from the index, reading through the overviews and seeing if there seems to be a chapter which explains what you need to. You can try reading the !PostScript or PDF formatted books, inside the distribution. And, remember, the source will be with you... always.
    2222
    2323=== Why are there so many parts and subprojects? Isn't Twisted just Twisted? ===
     
    4747=== I run mktap (from site-packages/twisted/scripts/mktap.py) and nothing happens! ===
    4848
    49 Don't run scripts out of {{{site-packages}}}. The Windows installer should install executable scripts to someplace like {{{C:\Python22\scripts\}}}, *nix installers put them in {{{$PREFIX/bin}}}, which should be in your {{{$PATH}}}.
     49Don't run scripts out of {{{site-packages}}}. The Windows installer should install executable scripts to someplace like {{{C:\Python25\scripts\}}}, *nix installers put them in {{{$PREFIX/bin}}}, which should be in your {{{$PATH}}}.
    5050
    5151=== Why do the Debian packages for Alphas and Release Candidates have weird versions containing old version numbers? ===
     
    6161=== Why am I getting !ImportErrors for Twisted subpackages on my 64bit installation of RedHat/Fedora/CentOS? ===
    6262
    63 Red Hat and derived Linux distributions arrange to have certain Python libraries installed in `/usr/lib/` and other parts installed in `/usr/lib64/`.  This is problematic for Twisted, since it results in some of Twisted being installed in one directory and the rest installed in another.  Python will load a package from only one directory.  You can override this default behavior when you install Twisted by supplying the `--install-lib` parameter when running Twisted's `setup.py`.
     63Red Hat and derived Linux distributions arrange to have certain Python libraries installed in {{{/usr/lib/}}} and other parts installed in {{{/usr/lib64/}}}.  This is problematic for Twisted, since it results in some of Twisted being installed in one directory and the rest installed in another.  Python will load a package from only one directory.  You can override this default behavior when you install Twisted by supplying the {{{--install-lib}}} parameter when running Twisted's {{{setup.py}}}.
    6464
    6565== Core Twisted ==
     
    7171=== How can I access self.factory from my Protocol's !__init!__? ===
    7272
    73 You can't. A Protocol doesn't have a Factory when it is created. Instead, you should probably be doing that in your Protocol's connectionMade method.
    74 
    75 Similarly you shouldn't be doing real work, like connecting to databases, in a Factory's !__init!__ either. Instead, do that in startFactory.
     73You can't. A {{{Protocol}}} doesn't have a {{{Factory}}} when it is created. Instead, you should probably be doing that in your Protocol's {{{connectionMade}}} method.
     74
     75Similarly you shouldn't be doing real work, like connecting to databases, in a Factory's {{{__init__}}} either. Instead, do that in {{{startFactory}}}.
    7676
    7777See [http://twistedmatrix.com/projects/core/documentation/howto/servers.html Writing Servers] and [http://twistedmatrix.com/projects/core/documentation/howto/clients.html Writing Clients] for more details.
     
    174174It really depends on what your program is doing, but the most common cause is this: it is firing -- but it's an error, not a success, and you have forgotten to add an [http://twistedmatrix.com/projects/core/documentation/howto/glossary.html#errback errback], so nothing happens. Always add errbacks!
    175175
    176 The reason Deferred can't automatically show your errors is because a Deferred can still have callbacks and errbacks added to it even after a result is available -- so we have no reasonable place to put a logging call that wouldn't result in spurious tracebacks that are handled later on. There is a facility for printing tracebacks when the Deferreds are garbage collected -- call defer.setDebugging(True) to enable it.
     176The reason Deferred can't automatically show your errors is because a Deferred can still have callbacks and errbacks added to it even after a result is available -- so we have no reasonable place to put a logging call that wouldn't result in spurious tracebacks that are handled later on. There is a facility for printing tracebacks when the Deferreds are garbage collected -- call {{{defer.setDebugging(True)}}} to enable it.
    177177
    178178=== Why does it take a long time for data I send with `transport.write` to arrive at the other side of the connection? ===