Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #16  
Old October 13th, 2003, 10:50 AM
irishtek irishtek is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Tucson AZ
Posts: 29 irishtek User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to irishtek Send a message via AIM to irishtek Send a message via Yahoo to irishtek
I've recently taken an art appreciation course at the local college and as a final project we had to try 'art' something of our choosing.

I decided to write a small program that converts files into an image.

It's very simple, but it was hard coded for the class. It can be easily modified - I was just going for 'quick'.

As an example of this program it can take the 64 page news.txt file that comes with python and convert it into a bmp (black and white dots) and this image would print out on just a little over one page. It's a fun program to play with... and you can modify it to change the way the image is created without much work.

The current program does not take into consideration upper/lowercase letters or special symbols (ones that can't be directly accessed from the keyboard).

So if you'd like the current program, I don't have time right now to make modifications, you can e-mail me for it or send me an instant message... my information is in my profile. Just remember the following:

1) There are 2 programs one to convert a file to a bitmap and the other to convert the bitmap to a text file.

2) It's hard coded to convert test.txt to test.bmp
and vice versa. So one of these files must be in the directory depending on which program you are running, or you need to modify the programs.

3) The size of the image is dependent on the size of the file... therefore the image size won't be larger than the size of the text document.

4) It only encrypts certain characters... and ingnores case.. which means when decrypted it will be all lowercase and special characters lost.

5) This program was written to perform a task and was not written with much versatility. However, it should not take long to make it versatile, it was something simple and just for fun. So you can have fun with it.

And of course - if you have questions ask...

Reply With Quote
  #17  
Old October 23rd, 2003, 09:59 PM
TheBlackMamba TheBlackMamba is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 25 TheBlackMamba User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to TheBlackMamba Send a message via Yahoo to TheBlackMamba
Lightbulb PySimpleCrypt

Here is a new interface to the Python Cryptography Toolkit I wrote. It's pretty good. Here it is if anyone wants it.

Current version: 2.0
Now on PyPI: http://www.python.org/pypi?:action=...ypt&version=2.0

Notes: Documentation and examples included. RSA fixed.
Attached Files
File Type: gz psc20.tar.gz (17.3 KB, 409 views)

Last edited by TheBlackMamba : November 3rd, 2003 at 07:25 PM.

Reply With Quote
  #18  
Old October 31st, 2003, 06:22 AM
lazy_yogi lazy_yogi is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2003
Posts: 325 lazy_yogi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 58 m 36 sec
Reputation Power: 6
just a simple note TlacMamba,
instad of

if type(Key) != type(""):
&nbsp;&nbsp;&nbsp;&nbsp;raise TypeError, "Key must be a string"

you could use:

if not isinstance(Key):
&nbsp;&nbsp;&nbsp;&nbsp;raise TypeError, "Key must be a string"

It's a function specifically for checking types of an object. Just thought u might like to know
Nice code btw .. aint python nice =P
Eli

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Encryption


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT