-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 18.02.2012 14:00, Bináris wrote:
> 
> 2012/2/18 Dr. Trigon <[email protected]
> <mailto:[email protected]>>
> 
> 
> Meanwhile I just can tell you how I handle that - I use a script
> that sets (sys.argv[1:]) to the value I want.
> 
> Could you show me an example, how do you mean that?

https://fisheye.toolserver.org/browse/drtrigon/pywikipedia/bot_control.py?hb=true#to273

and then later in the used bot scripts 'pywikibot.handleArgs()' is
called to extract them.

> Another question to me (when lookin at '_decodeArg') is; have you
> tried to add another encoding there? To me it seems as your console
> has to use another one in order to be able to handle Cyrillic
> letters. I think we have ti fix '_decodeArg'.
> 
> Well, this is not about Cyrillic; Cyrillic was just the first
> reason to begin to deal with the question. I don't know how to set
> the consol to Cyrillic under a Hungarian Windows 7, and how to keep
> my own caharcters meanwhile, too. Is that possible at all?
> 
> The trick I want to do is to write a Python script that uses other 
> scripts. All my Python scripts are encoded as Unicode without BOM, 
> that's safe and uniform. From that point I have to pass Hungarian
> (or even German) letters as Unicode.

The script mentioned above 'bot_control.py' does exactly that. It is
the script that gets called from e.g. cronjob and then executes the
given bot script in order. I wrote this basically because of timing
since I wanted to be sure the first bot was done before running the
second. But be warned the code is somehow ugly... ;) This is also
because it implements additional things like 'logging' module for log
and others which should be implemented in pywikipedia instead of patched
together with a "dirty" script... (as mentioned earlier on this list
by others)
But I would be happy if we could adopt it to fit your needs too.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8/qOQACgkQAXWvBxzBrDBTBACgwrlXbROO6EHWsZlPdi1I0nx/
afQAoKFGbF1vrSxB1DKuNFhTJOa6xTOc
=Z+XS
-----END PGP SIGNATURE-----

_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to