8 Replies - 1046 Views - Last Post: 19 January 2010 - 04:56 PM Rate Topic: ----- 1 Votes

#1 eamonm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-January 10

Would Python be a good fit for this

Post icon  Posted 02 January 2010 - 09:32 AM

First off I'm a n00b (do you spell it with O or 0). I hope I'm following proper posting etiquette, first time post for me.

I'm looking to learn a programming language that is flexible, works cross platform. I have past programming experience but have been out of it for about 12 years. Been more of a tools user as opposed doing programming.

With the research I've done it looks like Python would be a good fit. I'm thinking of various uses but here is one initiative - the question I have is would python be a good fit for it?

We have a legacy system that I can produce a basic flat file from. I want to process the flat file in both a batch processing mode and a online interactive mode. The functionality I'm looking for is:

Step 1: Process x number of flat files. I would like the program to suck in the flat files and display the information in a graphical front end. I would like the user to look at the information and then enter some miscellaneous information based on what they see. Basically the user would be entering comments and analysis based on the information they see.

Step 2: In the above step there would be 4 users each with the same copy of the flat file. Once all the users have made their comments there would be a second step where the four files would be processed together and some of the original data plus the comments/analysis of the four users would be taken in and formatted into a single flat file that I would ultimately like to be formatted into a PDF document. Each PDF document would be matched up to 1-4 emails (which would be on the master flat file) and then would be emailed out.

I'm not terribly worried about scalability since this application would be used in pockets of users (4) would only be used a couple of times of year, and the number of flat files to process by each user would be in the 100-150 range.

I'm guessing that the batch emailing is somthing that would be done with an email application and is therefore outside the scope of Python.

Is something that Python can do?

Please let me know if any additional clarification is needed.

Thank you!

Is This A Good Question/Topic? 0
  • +

Replies To: Would Python be a good fit for this

#2 David W  Icon User is offline

  • DIC supporter
  • member icon

Reputation: 281
  • View blog
  • Posts: 1,788
  • Joined: 20-September 08

Re: Would Python be a good fit for this

Posted 02 January 2010 - 03:04 PM

Go for it ... I've read that you could also include sending e-mail.
Was This Post Helpful? 0
  • +
  • -

#3 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4424
  • View blog
  • Posts: 12,293
  • Joined: 18-April 07

Re: Would Python be a good fit for this

Posted 02 January 2010 - 03:58 PM

Well from what I know of Python you can certainly do everything you are talking about, but as for being a perfect fit? Well... I think perhaps something like Java might be a serious contender in this and I will tell you why...

1) Python is an interpreted language. This means it isn't compiled and thus runs as it is being read for execution. This means it is a bit slower than say a compiled language like Java. This itself isn't usually a problem, but it could be a factor if your processing of these files are a bit lengthy. You say "x" number of flat files, so that performance hit might be a problem later depending on the number of files. If we are talking 5 or less files, it may not be an issue... again depending on what kind of manipulations you are doing on the file. Java will be faster since it is compiled.

2) You mention a web component. Python is still a bit new in the web arena and it does have frameworks you can use for the web. I have never actually used them, but keep in mind that this may take a bit of extra time to learn both Python and choose a web framework that will work for your situation. Java on the other hand can make things like Java applets and servlets with no huge learning curve.

3) You mentioned a graphical component. Again, Python can do this, but keep in mind that Java's 2D and 3D graphical libraries are already well tested and robust. They are also well documented and included as part of the standard development kit (SDK). Bring this across in the form of an applet and you can bring some rich graphic abilities to the web dynamically.

Now Python is a great language and one I am seriously looking into myself, but to me much of what you are talking about screams Java applet or similar design. Plus being a compiled language and such, it might offer you greater performance over Python for handling some complex file manipulation. Take a look at Java, but know that both should be able to handle the job.

:)
Was This Post Helpful? 0
  • +
  • -

#4 Oler1s  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1395
  • View blog
  • Posts: 3,884
  • Joined: 04-June 09

Re: Would Python be a good fit for this

Posted 02 January 2010 - 05:24 PM

Let me correct some of what Martyr2 is saying.

Quote

Python is an interpreted language. This means it isn't compiled and thus runs as it is being read for execution. This means it is a bit slower than say a compiled language like Java.
Python can be run directly through the interpreter, but commonly you create an independent script or module and bytecompile it. By the way, Java is also bytecompiled.

Quote

You mention a web component. Python is still a bit new in the web arena
If by a bit new, one means a number of established and noteable frameworks and usage in the real world, yeah, I guess it's pretty new. Python is very well established.

Quote

Java on the other hand can make things like Java applets and servlets with no huge learning curve.
Really? The EE stack has no huge learning curve, but Python does?
Was This Post Helpful? 0
  • +
  • -

#5 cam888  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 64
  • Joined: 20-February 09

Re: Would Python be a good fit for this

Posted 03 January 2010 - 11:47 AM

You could always use php, which was built for the web, but also works very well for desktop applications, which it has improved greatly with in the past few years.

Although admittedly python is generally considered faster...
Was This Post Helpful? 0
  • +
  • -

#6 SpeedisaVirus  Icon User is offline

  • Baller
  • member icon

Reputation: 114
  • View blog
  • Posts: 855
  • Joined: 06-October 08

Re: Would Python be a good fit for this

Posted 03 January 2010 - 12:38 PM

View PostOler1s, on 2 Jan, 2010 - 04:24 PM, said:

Python can be run directly through the interpreter, but commonly you create an independent script or module and bytecompile it. By the way, Java is also bytecompiled.


But Java has a JIT compiler which compiles to machine code. Compiled python does not have this and still, most certainly runs slower. There is a JIT for Python though I don't know how effective it is in comparison to the JVM JIT. I doubt its on par since Java runs almost as fast as C++ in most situations

Jython may be a bridge if you wanted it. Python syntax and benefits while giving access to Java libraries, runs on the JVM, and is supposed to be about equal in performance to Python.

This post has been edited by SpeedisaVirus: 03 January 2010 - 12:49 PM

Was This Post Helpful? 0
  • +
  • -

#7 David W  Icon User is offline

  • DIC supporter
  • member icon

Reputation: 281
  • View blog
  • Posts: 1,788
  • Joined: 20-September 08

Re: Would Python be a good fit for this

Posted 03 January 2010 - 12:54 PM

If you are reading and writing files, that will be the 'limiting weak link' - so Python is great for reading/writing files - even very large files. Best of all, you can quickly write some code and try it out. Python is quite user friendly to learn and to use.
Was This Post Helpful? 0
  • +
  • -

#8 eamonm  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 02-January 10

Re: Would Python be a good fit for this

Posted 08 January 2010 - 07:03 PM

Thanks for the comments!
Was This Post Helpful? 0
  • +
  • -

#9 programble  Icon User is offline

  • (cons :dic :head)

Reputation: 49
  • View blog
  • Posts: 1,315
  • Joined: 21-February 09

Re: Would Python be a good fit for this

Posted 19 January 2010 - 04:56 PM

You could use any programming language for this. Programming languages (turing complete ones) can do anything by definition. Heck, you could code it in Befunge or Brainfuck if you wanted to.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1