I have some python 2 code:
> >> >
> >> > def decode(key, string):
> >> >decoded_chars = []
> >> >string = base64.urlsafe_b64decode(string)
> >> >for i in range(len(string)):
> >> >key_c = key[i
On 2019-08-09 19:21, Larry Martell wrote:
On Fri, Aug 9, 2019 at 12:23 PM Chris Angelico wrote:
On Sat, Aug 10, 2019 at 2:09 AM Larry Martell wrote:
>
> I have some python 2 code:
>
> def decode(key, string):
>decoded_chars = []
> string = base64.urlsaf
On Fri, Aug 9, 2019 at 12:23 PM Chris Angelico wrote:
>
> On Sat, Aug 10, 2019 at 2:09 AM Larry Martell wrote:
> >
> > I have some python 2 code:
> >
> > def decode(key, string):
> >decoded_chars = []
> >string = base64.urlsafe_b64de
On 2019-08-09 17:06, Larry Martell wrote:
I have some python 2 code:
def decode(key, string):
decoded_chars = []
string = base64.urlsafe_b64decode(string)
for i in range(len(string)):
key_c = key[i % len(key)]
encoded_c = chr(abs(ord(string[i
On Sat, Aug 10, 2019 at 2:09 AM Larry Martell wrote:
>
> I have some python 2 code:
>
> def decode(key, string):
>decoded_chars = []
> string = base64.urlsafe_b64decode(string)
>for i in range(len(string)):
>key_c = key[i % len(key)]
>
I have some python 2 code:
def decode(key, string):
decoded_chars = []
string = base64.urlsafe_b64decode(string)
for i in range(len(string)):
key_c = key[i % len(key)]
encoded_c = chr(abs(ord(string[i]) - ord(key_c) % 256
>
>> >> > Hola a todos, tengo un problema al decodificar el contenido de una
>> >> > variable base64.
>> >> >
>> >> > De esta manera lo hago:
>> >> >
>> >> > cfdi = base64.b64decode(inv.l10n_mx_edi_cfdi)
>>
ificar el contenido de una
> >> > variable base64.
> >> >
> >> > De esta manera lo hago:
> >> >
> >> > cfdi = base64.b64decode(inv.l10n_mx_edi_cfdi)
> >> >
> >> >
> >> >
> >> > Al momento
angiielovee...@gmail.com wrote:
> El lunes, 4 de marzo de 2019, 11:07:40 (UTC-6), Peter Otten escribió:
>> Angie GL wrote:
>>
>> > Hola a todos, tengo un problema al decodificar el contenido de una
>> > variable base64.
>> >
>> > De esta
El lunes, 4 de marzo de 2019, 11:07:40 (UTC-6), Peter Otten escribió:
> Angie GL wrote:
>
> > Hola a todos, tengo un problema al decodificar el contenido de una
> > variable base64.
> >
> > De esta manera lo hago:
> >
> > cfdi = base64.b64decode(i
Angie GL wrote:
> Hola a todos, tengo un problema al decodificar el contenido de una
> variable base64.
>
> De esta manera lo hago:
>
> cfdi = base64.b64decode(inv.l10n_mx_edi_cfdi)
>
>
>
> Al momento de decodificar el resultado que me envía es esto:
>
>
Hola a todos, tengo un problema al decodificar el contenido de una variable
base64.
De esta manera lo hago:
cfdi = base64.b64decode(inv.l10n_mx_edi_cfdi)
Al momento de decodificar el resultado que me envía es esto:
b'\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n'
Algu
follow their interpretation. The RFC is a network protocol, Python
is a programming language, and our libraries can do whatever makes sense
for *programming*. And the people who migrated the Python 2 base64 lib to
Python 3 thought that it made more sense to have the functions operate on
bytes an
On Mon, Jun 13, 2016, at 19:12, Gregory Ewing wrote:
> They could maybe be made a bit cheaper still by arranging
> some way for a bytes object and an ascii-only str object
> to share underlying storage.
While we're at it, why not allow bytes to share storage with FSR latin-1
strings and the cached
Chris Angelico wrote:
Maybe what Python needs is an "ascii" type that's a subclass of both
str and bytes, and requires that the contents be <0x80. It is text, so
it can be combined with text strings; but it is also bytes, so when
you combine it with bytes strings, it'll behave as most people expe
Michael Torrie wrote:
On 06/12/2016 11:16 PM, Steven D'Aprano wrote:
Squirt it down a wire as bytes? Almost certainly.
Sometimes yes. But not always.
And even when the ultimate destination is a wire, a Python
programmer is more likely to be accessing the wire through
some high-level interf
ext. That's the whole point of base64!
Maybe what Python needs is an "ascii" type that's a subclass of both
str and bytes, and requires that the contents be <0x80. It is text, so
it can be combined with text strings; but it is also bytes, so when
you combine it with byte
On 06/12/2016 11:16 PM, Steven D'Aprano wrote:
> "Safe to transmit in text protocols" surely should mean "any Unicode code
> point", since all of Unicode is text. What's so special about the base64
> ones?
>
> Well, that depends on your context. For s
On Mon, Jun 13, 2016, at 06:35, Steven D'Aprano wrote:
> But this is a Python forum, and Python 3 is a language that tries
> very, very hard to keep a clean separation between bytes and text,
Yes, but that doesn't mean that you're right about which side of that
divide bas
onger the case, and hasn't
been for, well to be honest it was *never* the case that 0x48 unambiguously
meant 'H', and it is certainly not the case now.
The bottom line is that critical use-cases for base64 involve transmitting
bytes, not writing arbitrary Unicode, and that's w
Random832 :
> base64 characters are *characters*, not *bytes*
Ok, I ran into the same surprise just two days ago. But is this a big
deal?
Marko
--
https://mail.python.org/mailman/listinfo/python-list
ou could write it to a file. If the file is opened in binary mode,
> you have to encode the Unicode string to bytes before you can write
> it. If the file is opened in text mode, Python will accept your
> Unicode string and encode it for you, which could introduce non-
> base64 charact
On Mon, 13 Jun 2016 01:20 pm, Random832 wrote:
> On Sun, Jun 12, 2016, at 22:22, Steven D'Aprano wrote:
>> That's because base64 is a bytes-to-bytes transformation. It has
>> nothing to do with unicode encodings.
>
> Nonsense. base64 is a binary-to-text encodin
On Sun, Jun 12, 2016, at 22:22, Steven D'Aprano wrote:
> That's because base64 is a bytes-to-bytes transformation. It has
> nothing to do with unicode encodings.
Nonsense. base64 is a binary-to-text encoding scheme. The output range
is specifically chosen to be safe to transmit i
On Mon, 13 Jun 2016 04:56 am, Marcin Rak wrote:
> Hi to everyone.
>
> Let's say I have some binary data, be it whatever, in the 'data' variable.
> After calling the following line
>
> b64_encoded_data = base64.b64encode(data)
>
> my b64_encoded_data v
Marcin Rak :
> b64_encoded_data = base64.b64encode(data)
>
> my b64_encoded_data variables holds, would you believe it, a string as
> bytes!.
It doesn't much matter one way or another. The logic is that whenever
you encode objects, you typically want the output as bytes. However
Hi to everyone.
Let's say I have some binary data, be it whatever, in the 'data' variable.
After calling the following line
b64_encoded_data = base64.b64encode(data)
my b64_encoded_data variables holds, would you believe it, a string as bytes!.
That is, the b64_encoded_data
conn = engine.connect()
encoded = base64.b64encode(getbody)
binary_string = binascii.a2b_base64(encoded)
puresql = sqla.text("INSERT INTO friends(name) VALUES(:binary_string)")
conn.execute(puresql,binary_string = binary_string)
first
getbody trans to base64
then
Joseph L. Casale wrote:
> I had some time today, so I attempted to open the ldif files in binary mode
> to simply
> work with the raw byte strings but the moment the first entry was parsed,
> parse()
> stumbled on a character in the first entries dict and passed a dn of None for
> the last half?
> Note that all modules in python-ldap up to 2.4.10 including module 'ldif'
> expect raw byte strings to be passed as arguments. It seems to me you're
> passing a Unicode object in the entry dictionary which will fail in case an
> attribute value contains NON-ASCII chars.
Yup, I was.
> python-lda
site-packages\ldif.py", line 142, in
> _unparseAttrTypeandValue
> self._unfoldLDIFLine('::
> '.join([attr_type,base64.encodestring(attr_value).replace('\n','')]))
> File "C:\Python27\lib\base64.py", line 315, in encodestring
> pieces.app
Python27\lib\site-packages\ldif.py", line 142, in
> _unparseAttrTypeandValue
> self._unfoldLDIFLine('::
> '.join([attr_type,base64.encodestring(attr_value).replace('\n','')]))
> File "C:\Python27\lib\base64.py", line 315, in encodestri
n't have much control on the data in
the directory and I do know that DN's have non ascii characters unique to the
> I wonder what the string really is. At least the base64-encoding you provided
> before decodes as UTF-8 but I'm not sure whether it's the right sequence
Joseph L. Casale wrote:
>> I'm not sure what exactly you're asking for.
>> Especially "is not being interpreted as a string requiring base64 encoding"
>> is
>> written without giving the right context.
>>
>> So I'm just guessing that th
> I'm not sure what exactly you're asking for.
> Especially "is not being interpreted as a string requiring base64 encoding" is
> written without giving the right context.
>
> So I'm just guessing that this might be the usual misunderstandings with use
&
Joseph L. Casale wrote:
>> Can you give an example of the code you have?
>
> I actually just overrode the regex used by the method in the LDIFWriter class
> to be far more broad
> about what it interprets as a safe string.
Are you sure that you fully understood RFC 2849 before doing this?
Which
Joseph L. Casale wrote:
> I have some data I am working with that is not being interpreted as a string
> requiring
> base64 encoding when sent to the ldif module for output.
>
> The base64 string parsed is ZGV0XDMzMTB3YmJccGc= and the raw string is
> det\3310wbb\p
> Can you give an example of the code you have?
I actually just overrode the regex used by the method in the LDIFWriter class
to be far more broad
about what it interprets as a safe string. I really need to properly handle
reading, manipulating and
writing non ascii data to solve this...
Shame
Can you give an example of the code you have?
> From: jcas...@activenetwerx.com
> To: python-list@python.org
> Subject: Ldap module and base64 oncoding
> Date: Fri, 24 May 2013 21:00:01 +
>
> I have some data I am working with
I have some data I am working with that is not being interpreted as a string
requiring
base64 encoding when sent to the ldif module for output.
The base64 string parsed is ZGV0XDMzMTB3YmJccGc= and the raw string is
det\3310wbb\pg.
I'll admit my understanding of the handling requirements o
Not long ago, my friend resignation of the company. He left a few app's in
php, some of those files are hashed with base64 code, he told me that those
files handle http request on the server and some security rules. Because
i'm migrating all these applications on django. I do not r
Terry Reedy wrote:
On 2/28/2011 3:51 PM, Ethan Furman wrote:
The deprecation warning has gone away in 3.2,
No, still there:
def encodestring(s):
"""Legacy alias of encodebytes()."""
import warnings
warnings.warn("encodestring() is a deprecated alias, use
encodebytes()",
On 2/28/2011 3:51 PM, Ethan Furman wrote:
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
--> import base64
--> base64.encodestring(b
On 2011-02-28 15:51:32 -0500, Ethan Furman said:
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
--> import base64
--> bas
Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
--> import base64
--> base64.encodestring(b'this is a test')
__main__:1: Deprec
Hi,
I have encrypted signed smime message with xml file.
Messages are constructed:
1) xml file is embedded to MIME message as attacment
(Content-Disposition: attachment;).
2) over whole content MIME message is signed by PKCS#7 and encoded Base64.
3) This message is encrypted by public key.
I
On May 12, 4:20 am, Maarten wrote:
> On May 12, 6:04 am, Leo Jay wrote:
>
> > I'd like to encode a string in base64, but I found a inconsistent of
> > two methods:
>
> > >>> 'aaa'.encode('base64')
> > 'YWFh\n'
> >
On May 12, 6:04 am, Leo Jay wrote:
> I'd like to encode a string in base64, but I found a inconsistent of
> two methods:
>
> >>> 'aaa'.encode('base64')
> 'YWFh\n'
> >>> import base64
> >>> base64.b64encode('a
I'd like to encode a string in base64, but I found a inconsistent of
two methods:
>>> 'aaa'.encode('base64')
'YWFh\n'
>>> import base64
>>> base64.b64encode('aaa')
'YWFh'
>>>
as you can see, the res
En Fri, 31 Jul 2009 18:58:43 -0300, bfrederi
escribió:
So what if I used a different encoding that isn't ASCII? Like UTF-8?
Would that give me lengths that are multiples of 4 based on how the
characters are represented? Or would I still need to pad with '='?
It doesn
bfrederi wrote:
So what if I used a different encoding that isn't ASCII? Like UTF-8?
Would that give me lengths that are multiples of 4 based on how the
characters are represented? Or would I still need to pad with '='?
I think that when it says Base-64 it's talking about the byte values
used f
So what if I used a different encoding that isn't ASCII? Like UTF-8?
Would that give me lengths that are multiples of 4 based on how the
characters are represented? Or would I still need to pad with '='?
--
http://mail.python.org/mailman/listinfo/python-list
Max Erickson wrote:
MRAB wrote:
Brandon Fredericks wrote:
I did a search within this group, but couldn't find any
information on this.
I am sending base64 encoded data as the content over http using
urllib2 urlopen. When I receive the data and attempt to decode
it, I get an "
MRAB wrote:
> Brandon Fredericks wrote:
>> I did a search within this group, but couldn't find any
>> information on this.
>>
>> I am sending base64 encoded data as the content over http using
>> urllib2 urlopen. When I receive the data and attempt to dec
Brandon Fredericks wrote:
I did a search within this group, but couldn't find any information on
this.
I am sending base64 encoded data as the content over http using
urllib2 urlopen. When I receive the data and attempt to decode it, I
get an "Incorrect Padding" error. Is there
Brandon Fredericks wrote:
> I did a search within this group, but couldn't find any information on
> this.
>
> I am sending base64 encoded data as the content over http using
> urllib2 urlopen. When I receive the data and attempt to decode it, I
> get an "Incorrec
I did a search within this group, but couldn't find any information on
this.
I am sending base64 encoded data as the content over http using
urllib2 urlopen. When I receive the data and attempt to decode it, I
get an "Incorrect Padding" error. Is there a simple way to fix this?
In message , John
Machin wrote:
> What a long journey: parse xml, base64 decode, gunzip,
> and you're still not home; next stop is struct.unpack ...
Binary data in an XML file?? Were these the same folks who worked on OOXML,
by any chance?
--
http://mail.python.org/mailman/list
Niels Egberts wrote:
On Sat, Jun 13, 2009 at 4:38 AM, John Machin wrote:
...
And thanks for the tip on struct.unpack I managed to get a list of
integers to work with.
You might make do with array.fromstring (perhaps using .byteswap
afterwards) to get your numbers if you are talking more than a
On Sat, Jun 13, 2009 at 4:38 AM, John Machin wrote:
> | >>> guff[:100]
> | '\x1b\x00\x00\x00\x1b\x00\x00\x00\x1b\x00\x00\x00 [snip]
>
> What a long journey: parse xml, base64 decode, gunzip,
> and you're still not home; next stop is struct.unpack ...
>
>
Niels Egberts gmail.com> writes:
> zlib.error: Error -3 while decompressing data: incorrect header check
>
> How can I solve this?
The link you quoted says "you need to first base64 decode
the string, then gunzip the resulting data" ... so gunzip it:
| >>> s0 =
I'm creating a game in python and I want to a level editor called
'tiled'. It ouputs a .xml file with base64-gzipped information. Then
every 4 bytes represents a number. See the following link:
http://www.mapeditor.org/wiki/Examining_the_map_format
To start I tried:
code =
b
Hello,
I'm writing a rss2mbox program as a first python project. I'm using
feedparser,
mailbox and email.* modules. I have a problem. The produced MIME-
message (see below)
seems right, as far as I know, but the base64-encoded part isn't
decoded in the MUAs.
I've tried cone
yang michael wrote:
I use base64 module on python3.0
like:
import base64
b="hello world"
a=base64.b64encode(b)
print(a)
but when i run it,it catch a error:
Traceback (most recent call last):
File "/home/jackie-yang/yd5m19/pythonstudy/test.py", line 4, in
a=base64
yang michael wrote:
I use base64 module on python3.0
like:
import base64
b="hello world"
Try:
b = b"hello world"
instead.
a=base64.b64encode(b)
print(a)
but when i run it,it catch a error:
Traceback (most recent call last):
File "/home/jackie-yang/yd5m19/p
I use base64 module on python3.0
like:
import base64
b="hello world"
a=base64.b64encode(b)
print(a)
but when i run it,it catch a error:
Traceback (most recent call last):
File "/home/jackie-yang/yd5m19/pythonstudy/test.py", line 4, in
a=base64.b64encode(b)
File "
[EMAIL PROTECTED] schrieb:
> my code:
> −
> import base64
> def deflashget(st):
> if st.startswith('Flashget://'):
> return base64.decodestring(st[len('Flashget://'):])[10:-10]
> elif st.st
On 12月3日, 上午3时26分, "Jerry Hill" <[EMAIL PROTECTED]> wrote:
> On Tue, Dec 2, 2008 at 2:08 PM, <[EMAIL PROTECTED]> wrote:
> >>>>print base64.__file__
> > /usr/lib/python2.5/base64.pyc
>
> That looks fine, and matches what I have on my linux box.
On Tue, Dec 2, 2008 at 2:08 PM, <[EMAIL PROTECTED]> wrote:
>>>>print base64.__file__
> /usr/lib/python2.5/base64.pyc
That looks fine, and matches what I have on my linux box. Your code
works fine for me when I run it, so I'm out of ideas.
--
Jerry
--
http://mail.p
On 12月3日, 上午1时50分, "Jerry Hill" <[EMAIL PROTECTED]> wrote:
> 2008/12/2 <[EMAIL PROTECTED]>:
>
> > it's run ,Eric gave me error,the error is "'module'objecthasno
> >attribute'decodestring'",
>
> Do you have your own
2008/12/2 <[EMAIL PROTECTED]>:
> it's run ,Eric gave me error,the error is "'module' object has no
> attribute 'decodestring'",
Do you have your own base64.py (or base64.pyc) that's shadowing the
standard module base64? Try this:
>>
my code:
−
import base64
def deflashget(st):
if st.startswith('Flashget://'):
return base64.decodestring(st[len('Flashget://'):])[10:-10]
elif st.startswith('http://') or st.startswith('ftp://')
, the output has
> >> 4*(n+1) chars right padded with 2 or 1 "=" chars.
> >> If your input has 3n chars, the output won't have any "="
>
> > Thanks. But I'm not sure i get it. What is n?
>
> (Any nonnegative integer...)
> I mean: For base64
t;>
>> Only at the end. The encoded string has 4*n chars when the input string
>> has 3*n chars; when the input length is 3*n+1 or 3*n+2, the output has
>> 4*(n+1) chars right padded with 2 or 1 "=" chars.
>> If your input has 3n chars, the output won't have
On Mar 28, 12:09 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
wrote:
> En Fri, 28 Mar 2008 10:54:49 -0300, Clodoaldo <[EMAIL PROTECTED]>
> escribió:
>
>
>
> > I'm using a md5 hash encoded with base64.urlsafe_b64encode as a
> > parameter of
En Fri, 28 Mar 2008 10:54:49 -0300, Clodoaldo <[EMAIL PROTECTED]>
escribió:
> I'm using a md5 hash encoded with base64.urlsafe_b64encode as a
> parameter of a URL used to confirm a registration in a site. It has
> been working great.
>
> The url is like this:
>
&g
I'm using a md5 hash encoded with base64.urlsafe_b64encode as a
parameter of a URL used to confirm a registration in a site. It has
been working great.
The url is like this:
http://example.com/ce?i=878&h=kTfWSUaby5sBu9bIfoR87Q==
Now i need to match that URL in a certain text and i real
Hi all,
I need to send a file to a server using xmlrpc api. The receiver must get
file data in base64 type, and what I do is:
openfilename=tkFileDialog.askopenfilename(filetypes=[("all files", "*")])
f=open(tlocald.get(),'r')
functionsend(xmlrpclib.Binary(f
=". If it
>> still doesn't work, then you might be out of luck.
>
>This seems to work in some cases, but not all. Whats the deal with
>this adding of "="? Is there an implementation error in python, or are
>other implemenations of base64 more robust then they have
out of luck.
This seems to work in some cases, but not all. Whats the deal with
this adding of "="? Is there an implementation error in python, or are
other implemenations of base64 more robust then they have to be?
Christoph
--
http://mail.python.org/mailman/listinfo/python-list
decode the image and save it to a
>database:
>
>try:
> imagedec = base64.b64decode(imageenc)
> imagehash = md5.new(imagedec).hexdigest()
> dbcurs.execute()
>except TypeError, e:
> print "Error '%s' in Message %s" % (e, dbrow[1])
> print im
Hello everybody,
I am using a python script to extract images from email messages. This
works fine for some messages, but not all attached images can be
decoded. I use the following code to decode the image and save it to a
database:
try:
imagedec = base64.b64decode(imageenc)
imagehash = md5
pycraze <[EMAIL PROTECTED]> wrote:
>
>int base641_decodestring(char* pcstr,int size,char** ppcdest)
>{
> unsigned char cin[4] = {""};
> unsigned char cout[3] = {""};
> unsigned char cv = 0;
> int ni = 0;
> int nlen = 0;
> char* cptr = pcstr;
> *ppcdest = malloc(sizeof(ch
"pycraze" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
| Hi ,
|
| I am currently trying to implement base64 encoding and decoding
| scheme in C . Python has a module , base64 , that will do the
| encoding and decoding with ease . I am aware of OpenSSL having supp
pycraze wrote:
> Hi ,
>
> I am currently trying to implement base64 encoding and decoding
> scheme in C . Python has a module , base64 , that will do the
> encoding and decoding with ease . I am aware of OpenSSL having support
> for base64 encoding and decoding , but
Hi ,
I am currently trying to implement base64 encoding and decoding
scheme in C . Python has a module , base64 , that will do the
encoding and decoding with ease . I am aware of OpenSSL having support
for base64 encoding and decoding , but i will have to now implement
both in C without using
EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote:
> Duncan Booth wrote:
>> However, the decoded text looks as though it is utf16 encoded so it
>> should be written as binary. i.e. the output mode should be "wb".
>
> Thanks for the "wb" tip that works (see bellow). I guess it is
> experience based
ell that it was utf16 encoded?
> Simpler than using the base64 module you can just use the base64 codec.
> This will decode a string to a byte sequence and you can then decode that
> to get the unicode string:
>
> with file("hebrew.b64","r") as f:
>text = f.
EuGeNe Van den Bulke <[EMAIL PROTECTED]> wrote:
> >>> import base64
> >>> base64.decode(file("hebrew.b64","r"),file("hebrew.lang","w"))
>
> It runs but the result is not correct: some of the lines in hebrew.lang
> a
Hi,
I am trying to convert the file hebrew.b64 attached into hebrew.lang
(text file usable by Inline Search <http://www.ieforge.com/InlineSearch>
for localization purposes.
>>> import base64
>>> base64.decode(file("hebrew.b64","r"),file("
e value labeled 'Shared key' is the 44
> characters within the quotes:
> '6lfg2JWdrIR4qkejML0e3YtN4XevHvqowDCDu6XQEFc='
I doubt it. That is a base64 encoded value, not the value itself.
<>
> My interpretation of the first example is this: when you use an
the 44
characters within the quotes:
'6lfg2JWdrIR4qkejML0e3YtN4XevHvqowDCDu6XQEFc='
and the value labeled 'Base64 Message Hash' is the 44 characters within
the quotes:
'KF7GkfXkgXFNOgeRud58Oqx2equmKACAwzqQHZnZx9A='
In the second example, the value labeled 'Shared key' is the 44
character
Roland Rickborn wrote:
> Wo ist der Fehler und was muss ich machen, damit das Icon
> angezeigt wird?
I'm sorry that I can't help you, but you'll probably get more
answers if you write again in English (this is comp.lang.python).
Grüße,
Björn
--
BOFH excuse #126:
it has Intel Inside
--
htt
Hallo zusammen,
in meine Anwendung ist ein Bild eingebettet und oben in der Leiste soll
ein Icon erscheinen.
Ausserdem will ich nur _eine_ Datei ausgeben, also ohne zusärtliche
Bild-Dateien etc.
Dazu habe ich das Bild in base64 codiert und als String im Skript
gespeichert, siehe unten. Beim
Russell Warren wrote:
> How can you tell what objects support the buffer interface? Is
> anything visible at the python level, or do you need to dig into the C
> source?
At the C level, there is a function for testing:
int PyObject_CheckReadBuffer(PyObject* o)
http://docs.python.org/dev/api/abs
After some digging around it appears there is not a tonne of
documentation on buffer objects, although they are clearly core and
ancient... been sifting through some hits circa 1999, long before my
python introduction.
What I can find says that buffer is deprecated (Python in a Nutshell),
or non-e
> Many functions that operate on strings also accept buffer objects as
> parameters,
> this seems also be the case for the base64.encodestring function. ctypes
> objects
> support the buffer interface.
>
> So, base64.b64encode(buffer(ctypes_instance)) should work efficien
Russell Warren schrieb:
> I've got a case where I want to convert binary blocks of data (various
> ctypes objects) to base64 strings.
>
> The conversion calls in the base64 module expect strings as input, so
> right now I'm converting the binary blocks to strings fir
I've got a case where I want to convert binary blocks of data (various
ctypes objects) to base64 strings.
The conversion calls in the base64 module expect strings as input, so
right now I'm converting the binary blocks to strings first, then
converting the resulting string to base64.
nd is splitting up words and splitting at a
pacific caricature, I can not see how you split after a number of
caricatures
...START..
from Tkinter import *
from base64 i
1 - 100 of 119 matches
Mail list logo