Re[2]: MIME(?)-decoding in QT

2004-02-20 Thread Alexander Leschinsky
Hello dAniel,

   On Fri, 20 Feb 2004 19:04:15 +0100 (20.02.2004 23:04 my local time)
   you wrote about "MIME(?)-decoding in QT"
   at least in part:

dh> What's KB? Knowledge Base?
Yes

dh>  which?
http://www.ritlabs.com/kb/


-- 
Best regards,
 Alexander





http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote:

>> Is it possible to convert %20 back to space or any other special chars
>> to its "real value"?
C> Python.

C> --8<---cut here---start->8---
C> %_tbvar="Peter%%20Palmreuther"

C> %Py("
C> import urllib

C> quoted_string = tb.macro(r'%%_tbvar')
C> print urllib.unquote(quoted_string)
C> ")
C> --8<---cut here---end--->8---

Installed Python now, but having a last issue.. the %Py macro seems to
make up a new line.

I have this:
->8
%SETPATTREGEXP="(?:msgid:|Message-ID:\s+)?(?:|$)(?:.*from=(.*?)&)?"%-
%REGEXPBLINDMATCH="%ClipBoard"%-
%IF:%SUBPATT="2"<>'':#%-
%Py("%-
import urllib
quoted_string = tb.macro(r'%%SUBPATT=2')
print urllib.unquote(quoted_string)
")%-
%__%IF:'%_lang'='deutsch':" schrieb in":"%-
%__ wrote in"# %-

->8

and btw: how would I give a TB macro the result of urllib.unquote?
As Python should be straight forward I tried
tb.macro(r'%%_author') = urllib.unquote(quoted_string)
but no luck..


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: MIME(?)-decoding in QT

2004-02-20 Thread Alexander Leschinsky
Hello dAniel,

   On Fri, 20 Feb 2004 18:16:07 +0100 (20.02.2004 22:16 my local time)
   you wrote about "MIME(?)-decoding in QT"
   at least in part:

dh> I hope it works with the cygwin version?!
You can use pure-Windows build
-- 
Best regards,
 Alexander





http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 18:55:01 +0100 Carsten Thönges wrote:

>> Now I'm just installing Python. I hope it works with the cygwin
>> version?! We'll see..
C> I bet it won't work.

You won.. :)

C> But the native Windows version is OK. You should also look for a
C> good editor as the provided editor »Idle« is not very good (SPE,
C> Boa Constructor, Emacs, ...)

I'll use my beloved JEdit for that..


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: MIME(?)-decoding in QT

2004-02-20 Thread Alexander Leschinsky
Hello dAniel,

   On Fri, 20 Feb 2004 18:04:55 +0100 (20.02.2004 22:04 my local time)
   you wrote about "MIME(?)-decoding in QT"
   at least in part:

dh> do you mean %StrReplace?
Yes

dh> That would probably be bad to setup..
Not in case of one replacement, full URL-encode will _be_ big headache
-- 
Best regards,
 Alexander





http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: MIME(?)-decoding in QT

2004-02-20 Thread Alexander Leschinsky
Hello Carsten,

   On Fri, 20 Feb 2004 17:16:55 +0100 (20.02.2004 21:16 my local time)
   you wrote about "MIME(?)-decoding in QT"
   at least in part:

CT> Not with that plug-in.
But I'll add Pascal, Basic, C and JavaScript into AnotherMacros
(separate interpretators will _not_ needed and Scripting Host _not_
used). Probably I'll add Python, if I'll be able to write language
definition.
-- 
Best regards,
 Alexander





http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 22:17:00 +0500 Alexander Leschinsky wrote:

CT>> Python.
A> And plugin for executing Python scripts (mentioned in KB)

What's KB? Knowledge Base? which?


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 18:16:07 +0100 I wrote:

d> Now I'm just installing Python. I hope it works with the cygwin
d> version?! We'll see..

It does not.. the plugin requires python23.dll and shuts TB down if
it's not found.

So I will have to install windows binaries, but that can wait.

Thanks anyway.


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread Carsten Thönges
* dAniel hAhler <[EMAIL PROTECTED]> writes:
> on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote:

>>> Is it possible to convert %20 back to space or any other special chars
>>> to its "real value"?
>> Python.

> I was sure you would come up with that.. :)

> Now I'm just installing Python. I hope it works with the cygwin
> version?! We'll see..

I bet it won't work. But the native Windows version is OK. You
should also look for a good editor as the provided editor »Idle« is
not very good (SPE, Boa Constructor, Emacs, ...)

>> quoted_string = tb.macro(r'%%_tbvar')

> what's the 'r' for?

It declares the string as a »raw string« (you don't need it, it's
rather superfluous in this case).

Carsten
-- 




http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: MIME(?)-decoding in QT

2004-02-20 Thread Alexander Leschinsky
Hello Carsten,

   On Fri, 20 Feb 2004 16:37:44 +0100 (20.02.2004 20:37 my local time)
   you wrote about "MIME(?)-decoding in QT"
   at least in part:

CT> Python.
And plugin for executing Python scripts (mentioned in KB)
-- 
Best regards,
 Alexander





http://www.silverstones.com/thebat/TBUDLInfo.html


Re[2]: MIME(?)-decoding in QT

2004-02-20 Thread Alexander Leschinsky
Hello Peter,

   On Fri, 20 Feb 2004 15:08:05 +0100 (20.02.2004 19:08 my local time)
   you wrote about "MIME(?)-decoding in QT"
   at least in part:

PP> But which one? 
Namely:

%StrReplace(text, find, replace)
find - "%20"
replace - " "

Well, anyway - URLDECODE (and URLENCODE)  added into TODO for
AnotherMacros :-), because  replace a set of char in current state will
require a lot of nested calls STRREPLACE
-- 
Best regards,
 Alexander





http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 18:24:04 +0500 Alexander Leschinsky wrote:

dh>> Any suggestions please? :)
A> Macro from MyMacros

do you mean %StrReplace?
That would probably be bad to setup..


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread dAniel hAhler
Hello bats,

on Fri, 20. Feb 2004 at 16:37:44 +0100 Carsten Thönges wrote:

>> Is it possible to convert %20 back to space or any other special chars
>> to its "real value"?
C> Python.

I was sure you would come up with that.. :)

Now I'm just installing Python. I hope it works with the cygwin
version?! We'll see..

C> --8<---cut here---start->8---
C> %_tbvar="Peter%%20Palmreuther"

C> %Py("
C> import urllib

C> quoted_string = tb.macro(r'%%_tbvar')

what's the 'r' for?

C> print urllib.unquote(quoted_string)

simple.. :)


-- 
shinE!
http://www.thequod.de ICQ#152282665
GnuPG/PGP key: http://thequod.de/danielhahler.asc

Using The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1
with POPFile 0.20.1 and avast Jan2004 (4.1.342)




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread Foster, Graham
Hello Carsten
>>   Can other languages be used too?

Carsten> Not with that plug-in. Any why should they? Python is a wonderful
Carsten> language.
So is Ruby ;)

Regards
 Graham





--
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
Jersey, USA 08889), and/or its affiliates (which may be known outside the
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan as
Banyu) that may be confidential, proprietary copyrighted and/or legally
privileged. It is intended solely for the use of the individual or entity
named on this message.  If you are not the intended recipient, and have
received this message in error, please notify us immediately by reply e-mail
and then delete it from your system.
--



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread Carsten Thönges
* "Foster, Graham" <[EMAIL PROTECTED]> writes:

> Python!!!??? I've clearly not been paying attention. When did TB!
> become scriptable in Python??. Its its an extension - where do I get
> it. 

See  and take a look at the
thread around

,
| From: [EMAIL PROTECTED]
| Subject: Re: TBPyxie (was: SmartBat's Evaluate Function and Order of Operations)
| To: [EMAIL PROTECTED]
| Date: Thu Feb 05 19:47:14 2004 +0100
| Message-ID: <[EMAIL PROTECTED]>
`

>   Can other languages be used too?

Not with that plug-in. Any why should they? Python is a wonderful
language.

Carsten
-- 




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread Foster, Graham
Hello Carsten
Carsten> Python.
Python!!!??? I've clearly not been paying attention. When did TB!
become scriptable in Python??. Its its an extension - where do I get
it. Can other languages be used too?

Regards
 Graham




--
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
Jersey, USA 08889), and/or its affiliates (which may be known outside the
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan as
Banyu) that may be confidential, proprietary copyrighted and/or legally
privileged. It is intended solely for the use of the individual or entity
named on this message.  If you are not the intended recipient, and have
received this message in error, please notify us immediately by reply e-mail
and then delete it from your system.
--



http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread Carsten Thönges
* dAniel hAhler <[EMAIL PROTECTED]> writes:

> The problem is, that the Name is MIME(?) encoded, like this:
> Peter%20Palmreuther

> Is it possible to convert %20 back to space or any other special chars
> to its "real value"?

Python.

--8<---cut here---start->8---
%_tbvar="Peter%%20Palmreuther"

%Py("
import urllib

quoted_string = tb.macro(r'%%_tbvar')
print urllib.unquote(quoted_string)
")
--8<---cut here---end--->8---

Carsten
-- 




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread Peter Palmreuther
Hello Alexander,

On Friday, February 20, 2004 at 2:24:04 PM you [AL] wrote (at least in
part):

dh>> Any suggestions please? :)
AL> Macro from MyMacros

But which one? I've not seen a 'URLDecode' macro there ... Which one
would be a replacement then?
-- 
Regards
Peter Palmreuther
(The Bat! v2.04.4 on Windows XP 5.1 Build 2600 Service Pack 1)

Ummm U Ug... I rule and you don't.




http://www.silverstones.com/thebat/TBUDLInfo.html


Re: MIME(?)-decoding in QT

2004-02-20 Thread Alexander Leschinsky
Hello dAniel,

   On Fri, 20 Feb 2004 01:08:13 +0100 (20.02.2004 05:08 my local time)
   you wrote about "MIME(?)-decoding in QT"
   at least in part:

dh> Any suggestions please? :)
Macro from MyMacros
-- 
Best regards,
 Alexander





http://www.silverstones.com/thebat/TBUDLInfo.html