You Are Here:

Community: Developer Discussion Boards

#1 Old Need advice on project - 2008-11-03, 17:41

Join Date: Apr 2008
Posts: 8
zschneiderz
Offline
Registered User
Hello all

I'm currently working on a program that will read in the byte of a file and hash it. The program will write the hash values back to the same area or memory the file is stored. It is supposed to be a wiping program.

Some things that I would like to ask is :
- any functions/methods available to read the byte of a file?
- is it possible to use the OS read/write function for my program?

All help are greatly appreciated.
Reply With Quote

#2 Old Re: Need advice on project - 2008-11-03, 18:18

Join Date: Oct 2008
Posts: 11
Location: Turkey
Send a message via MSN to pys60tr
pys60tr
Offline
Registered User
use read object
same example
#create and write
f=open('e:\\a.txt','w')
f.write('hello world')
f.close()

f=open('e:\\a.txt','r')
a=f.read(5)#reading 5 bytes
print a
>>>hello
f.close()


www.python-s60.com
Turkish python
Reply With Quote

#3 Old Re: Need advice on project - 2008-11-03, 18:33

Join Date: Feb 2008
Posts: 743
Location: Belo Horizonte, Brazil
Send a message via Skype™ to Rafael T.
Rafael T.'s Avatar
Rafael T.
Offline
Forum Nokia Champion
Quote:
Originally Posted by pys60tr View Post
use read object
same example
#create and write
f=open('e:\\a.txt','w')
f.write('hello world')
f.close()

f=open('e:\\a.txt','r')
a=f.read(5)#reading 5 bytes
print a
>>>hello
f.close()
Hi pys60tr,

Thanks for posting the example!

Although, next time please use the code tag for posting codes



BR,

Rafael.
Reply With Quote

#4 Old Re: Need advice on project - 2008-11-03, 18:51

Join Date: Oct 2008
Posts: 11
Location: Turkey
Send a message via MSN to pys60tr
pys60tr
Offline
Registered User
I writing reply phone
thank you for warning


www.python-s60.com
Turkish python
Reply With Quote

#5 Old Re: Need advice on project - 2008-11-04, 11:03

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by zschneiderz View Post
Hello all

I'm currently working on a program that will read in the byte of a file and hash it. The program will write the hash values back to the same area or memory the file is stored. It is supposed to be a wiping program.

Some things that I would like to ask is :
- any functions/methods available to read the byte of a file?
- is it possible to use the OS read/write function for my program?

All help are greatly appreciated.
hi zschneiderz

you can also have a look at this link for more details and there are lots of examples at the wiki about file manipulations try to have a good search.

Enjoy Pythoning
Gaba88


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#6 Old Re: Need advice on project - 2008-11-08, 18:00

Join Date: Apr 2008
Posts: 8
zschneiderz
Offline
Registered User
thanks for the advice and the link

Another question i would like to ask is that if there is more crypto methods available on python. Cos i noticed there only 3 types available (MD5 and SHA). Possible to find standards like AES or DES?
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Error with makesis.exe and creating the .pkg file gramya87 Symbian Tools & SDKs 7 2007-10-10 14:53
[newbie here] Link error xitpu General Symbian C++ 3 2007-01-24 17:53
GoogleIt deepika.mangla General Symbian C++ 4 2007-01-08 02:07
Any SMS advice for a university project ColinM General Messaging 7 2004-01-07 20:52
Project help and advice. anujsaboo Mobile Java General 1 2003-10-08 14:04

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia