Sunday, April 17, 2011

Modification in the Application code :- Python Byte-Code(.pyc)

Not amused but its a weird experience that the python byte-code(.pyc) which I generated on my system refused to work properly on other systems.Their is nothing wrong in it . When a python compiler generates the byte-code it optimizes the source-code suitable for further execution.However it is easy to take the byte-code in any platform and it'll work well.A Java programmer will think that once I've created the byte-code I can move the code anywhere and in any system and it'll work but this is not true with python byte-code(.pyc). (.pyc) is very different from (.class).Python byte-code is not compatible between python releases(eg:- Python2.x is not compatible with any of python-3.x release).Also, some of the modules like multiprocessing are not well supported in windows operating system , therefore a code or byte-code using these module will not work properly on windows operating system. This is one of the reason that it will also create problems while porting to other platforms.
However as some of the bugs are reported here is a quick solution to those.
  • Bug 1. IOError: [Errno 2] No such file or directory: '/home/sachin/LDM/a9c97fa678f4a067bccf15a8befb27358d72de8b7b202693ed1d174c/Uinfo' .Submitted by Arihant (Sachin).
  • Bug 2. ZeroDivisionError: integer division or modulo by zero .Submitted by blunderboy & pankajbankanitjsr.

Now the solution.
  • As per the Bug 1 is concerned.I didn't really get it. This part of code is working well. This code has been checked on Fedora , Ubuntu & Mandriva.It is working very well.However if you still having problem create "a9c97fa678f4a067bccf15a8befb27358d72de8b7b202693ed1d174c" folder at the installation directory inside LDM folder.Also create a Uinfo file in this newly created folder.

  • Now on the report of Bug 2 problem was traced back to TabWidget.py.Download TabWidget.py from here.In this file go to line number 148 and replace self.setCellWidget(row,2,self.getLabel(str((100*dL)/int(obj.length))+'%',str(100*dL/int(obj.length)))) line with

    if int(obj.length) == 0 :
      self.setCellWidget(row,2,self.getLabel(str(0)+'%',str(0)))
    else :
     self.setCellWidget(row,2,self.getLabel(str((100*dL)/int(obj.length))+'%',str(100*dL/int(obj.length))))


    Remember Indentation matters in python.So , do proper indentation while updation.Now after you have updated the code , replace the TabWidget.pyc in your LDM installation with TabWidget.py.
    Note :- If you get the updated code at line-148 of TabWidget.py that means it has already been updated.So , put it in place of TabWidget.pyc and it'll work.
One important thing is that many people keep on asking the installation procedure for LDM.To them

READ INSTRUCTIONS IN INSTALL.TXT & README OF DOWNLOAD

Thank you all for posting bugs.Keep posting bugs as soon as you get it.

Wednesday, March 30, 2011

Release of Prototype-I

It has been quite a long time till I've visited my blog. It seems like documenting took more time that building code. But this is not true in this case. Finally the day has come when the concept below &LDM is floating free in the e-space. Anyone from anywhere can download & enjoy the strength of it. Although it is not complete yet powerful enough to blow your mind. Their are Lot of think to do , a lot of work & in this small life one can't get all of the knowledge around him. Thank god I realized it on time. I started documentation work 2 days ago & it took almost 3 hrs of daily to complete the entire documentation. Now the good news is that I'm done with a very bad documentation of the code but still basic functionality will be quite clear to understand.Now you can get source code of it from here and if you are only interested in using this application you can get it from here . All the necessary information is available with the package.
With this post I'ld like to point out some of the things that are not yet implemented and future modification will have those features :-
  • Site grabber
  • FTP & RTMP support
  • A browser plugin for LDM
  • Reconfiguration of dLoadInformation module(Process XML file for download information)
  • Queuing & time scheduling of downloads
  • A robust download routine 
I had tried very well to clarify the installation process through README.txt & INSTALL.txt available through install package. Still , I'm in doubt that someone can get confused. Visit this link in case anyone get stuck to the installation :-
Installation Instruction
This is 1.0 release of &LDM with all it's good features.With upgrades in future it'll be a fully functional application for your linux desktop.As code is freely available to everyone this gives everyone the equal opportunity to try their hand on it.Everyone can contribute & make it a full-fledge app.Now you can start using &LDM & in case of any query either you can directly mail to me or ask me through this blog. I hope to get all the genuine questions & I'll try my best to solve them.

Wednesday, February 16, 2011

Completion of Prototype-1 of '&LDM'

It was quite a busy time in last 7 days.Each time I made an update in the code , I have seen a new problem.This made me feel that even if each individual module is working flawlessly , it is not necessary that when integrated they will work flawlessly.Apart from this one major problem that couldn't let the code complete was the portion of code that runs individual downloads and their communication , even if I make them communicate through IPC or shared variables and locks etc their was still a time lag in communication that has created multiple critical regions in the programme. 
Their is nothing like pre-build weapon in any programming language that can save you from getting your hand dirty while working with parallel processes.Their is very famous quote "A distributed process is one in which the failure of a computer you didn't even know existed can render your own computer unusable."-lamport,leslie and when you love something you try your best to make it flawless.I tried the same.Till date prototype-1 is complete ( You can see the demo at ) and major part of work is still ahead.This prototype is just a feel of '&LDM' but had solved a major problem of work.Hope everyone will like it.It is just impossible to understand and modify the source code of '&LDM' without proper documentation , which is being done right now.As soon as documentation complete I'll share it through my blog.You can either subscribe to this blog or '&LDM' mailing list to be up-to-date to the development and get all the latest version of '&LDM'.

Love Freedom Love OpenSource

Thursday, February 3, 2011

My View of OpenSource and LDM

I had somewhat good day on 3rd of feb.Yesterday I had a very nice talk with robinanil.Knowing that he works in a money making organisation , I asked him about the importance of OpenSource for his company and he replied like I had just asked some stupid question to him.He said "what OpenSource means for our organisation !!! " and for a moment he was silent.Then suddenly he said OpenSource means a lot to our organization.Although it's not a part of our regular job but I , my friend and  almost  each of us is working in some OpenSource project.It was nice to know that even if those people have a very nice job in a billion dollar organization they are working for OpenSource.
OpenSource is not just learning , trying new idea.It's about human knowledge that belongs to the world.Working in OpenSource doesn't only mean that one should work in some bigger OpenSource project .Whatever knowledge you have that you think may be beneficial to the world, share it to the world.Let the world know , how you've done it.Let other people add their idea in it ,re-share it and enjoy the freedom.
Now is the time to talk something about LDM.Although , I'm not sure but I'm very optimistic this time that I'll be able to out with it's first small working module by 14th feb.Last night when I modified it's older implementation with a new method , I received an extraordinary response.After replacing the entire threads with individual processes , it grew exponentially in speed.Just at 4 partition of download , speed exponentially increased to 500KBPS. I'm trying to increase the number of partitioned downloads and some works in GUI field is still left.14th feb release might not be a complete working LDM but yeah it'll be a small working module and if everything goes all right soon , we all will be enjoying a fully functional LDM in Linux.We have just moved out LDM code group from google codegroup to facebook group and registered our project repository to github from where you all can have the code and enjoy the freedom.Wish everyone will enjoy it.Soon , I'll let you know more about it and I'll also forward the important links through my blog.Have a nice day.


Tuesday, January 25, 2011

Today Starting work on Linux Download Manager

Today is holiday and I don't wanna screw anything.I had plans to start study DSY,RPC,Algorithms and blah-blah , but in the morning things changed.A new work took over my thoughts.Last time when I started work on it , it took 8 hectic hours of mine but what I get in return happiness and satisfaction.It's fun making change.
Right now , I'm supposed to be on republic day celebration but instead I'm sitting in my room with the door locked from outside working on this new module.People think that if we celebrate repulic day and listen to the stupid speech we'll show more patrotism than others.It's not a topic in which one can win a debate.
However ,with this increasing development I'm quite sure that I'll be able to come out with first working module of LDM till 14th feb.It's an OpenSource project named Linux Download Manager based on IDM.Currently , I'm running a simple piece of code written in python with a little low-level work in 'C' with which I'm now able to download any youtube link and fetch data from any of the http servers that provides download facility.Speed haven't analyzed yet , but yeah it downloads faster than youtube can buffer.By the way , I needed something to relax out of this hectic work.Thanks to the google for it's blogging facility for free.I'ld like to blog about all the future updates about LDM and any development , so that I won't be required to mail anyone.Moreover this blog is about me that has started with this republic and my work on LDM.
In my own way , I love you my nation for whatever it is.



Forget not to suscribe & Comments are welcome.