Hello all,
I wrote a function to organize a list of sorted objects ( django blog
entries ); each object has a Python datetime attribute ( called
pub_date ). I am posting a message to the tutor mailing list to get
feedback regarding better ways to accomplish the same task. I have a
feeling I could u
Greetings,
I recently started learning Python and I have written a script that uses
a shelf on Mac OS X using Python 2.6. I recently attempted to move the
directory over to my Linux system, which also has Python 2.6 installed,
and run the script there.
The script works fine, but the shelf does n
Dave Angel wrote:
for byte0, byte1 in itertools.izip(packed_data,
itertools.cycle(packed_XorKey)):
decrypt.append(chr(ord(byte0) ^ ord(byte1)))
And of course that leads to:
decrypt = [chr(ord(byte0) ^ ord(byte1)) for byte0, byte1 in
itertools.izip(packed_data, itertools.cycle(packed_X
EncryptString="313B372C2E2C63362E2128"
>
>
>This is different to what I expected, it is a string of ascii bytes
>representing hex values.
>Is that the real format of your data? If so we need to split it into pairs and
>use
>int() to convert it. Or is your real data a string of bytes that happen
Ken,
Two recommendations.
1) Komodo Edit 5. Free edition available from Activestate.
www.activestate,com
2) Wing IDE 101 Free Edition from www.wingware.com
my favorite of the freely available IDE's.
Good luck,
Robert
On Sat, 2009-10-24 at 13:57 -0400, Ken G. wrote:
> I ju
Sweet nice tip I love this list. Thank you.
Mike
On Sat, Oct 24, 2009 at 7:40 PM, Dave Angel wrote:
> Tom Green wrote:
>
>> Thanks for your reply Dave. I am capturing the data off the network
>> (wireshark) and saving it in WinHex for testing. I am actually building a
>> socket to decrypt th
Tom Green wrote:
Thanks for your reply Dave. I am capturing the data off the network
(wireshark) and saving it in WinHex for testing. I am actually building a
socket to decrypt the data, so prior to implementing my logic in the socket,
I figured I would write the algorithm in a quick script. H
"Ken G." wrote
IDLE v2.6 but I was wondering if there is something better than IDLE.
I've been happy with WingIDE on Linux, fwiw. I'm still
a TextMate fanboy (if you use a Mac).
-kb
___
Tutor maillist - Tutor@python.org
To unsubscribe or change s
Thanks for your reply Dave. I am capturing the data off the network
(wireshark) and saving it in WinHex for testing. I am actually building a
socket to decrypt the data, so prior to implementing my logic in the socket,
I figured I would write the algorithm in a quick script. Here is what I
have
Tom Green wrote:
Alan,
Thanks for your response and hopefully I can clear things up. I apologize
for not being more clear.
I obtain the HEX encoded data from Winhex i.e. copy Hex values. The HEX
encode data is very large and I simply paste it into my Python script along
with the XOR key. The
Isn't it better to use
if __debug__:
I thought such an if statement always evaluated to False when the python
program was run in OPTIMIZED (-o) mode?
Cheers!!
Albert-Jan
~~
Before you criticize someone, walk a mile in their sho
This is what I have so far,
import struct
EncryptString="313B372C2E2C63362E2128"
XorKey="41424344"
key = struct.unpack("d", XorKey)
num_ints = len(EncryptString)/11
data = struct.unpack("%dd"% num_ints,EncryptString)
The above code generates an error the my string must be a string length of
16
"Ken G." wrote
IDLE v2.6 but I was wondering if there is something better than IDLE.
There is a wealth of options and a Google search on Python IDEs
will throw many up.
Some common recommendations:
PyDev on Eclipse (good if you already use Eclipse for say Java or C++)
Eric
SPE
Scipe/Notep
> Take the 4 byte XOR key. If I convert them to int with Base 16
> it takes the 4 and converts it to 0x34 when I in turn I actually need 0x41.
OK, thats because int is for converting strings. You need to use struct.unpack
to convert the 4 bytes into an int.
You also need to figure out how man
I just reinstalled Python v2.6.2 due to a computer crash. I reinstalled
IDLE v2.6 but I was wondering if there is something better than IDLE.
I am using Ubuntu 9.04 so they do have some limited choices available.
Thanks for your input.
Ken
___
Tuto
Alan,
Thanks for your response and hopefully I can clear things up. I apologize
for not being more clear.
I obtain the HEX encoded data from Winhex i.e. copy Hex values. The HEX
encode data is very large and I simply paste it into my Python script along
with the XOR key. The data is a string o
"Tom Green" wrote
wondering if there was someway in Python to indicate that the string is a
string of HEX values similar to Perl's pack.
You need to be very careful in your terminology here.
Is it "a string of hex values" ie a string representation of a hex
value or is it a string of bytes
Hello everyone,
First, I wanted to thank everyone in advance for your help and any feedback
is appreciated. Here is what I am trying to accomplish:
I have this encrypted data that was sent across the network. The decryption
is a simple XOR with a 16 byte key. I started writing a basic Python s
18 matches
Mail list logo