Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > What do I need to know in order to write a web application in python?

Reply
Thread Tools

What do I need to know in order to write a web application in python?

 
 
ErichCart ErichCart
Guest
Posts: n/a
 
      03-04-2011
I am currently a Computer Science student, I can write in pascal, C,
and Java, and recently I learned about Python and fell in love with
it. I watched some python programming tutorials on youtube, and now I
can write some programs.
But what I really want to do is to make a website where people can
play real-time RISK game online with other players.

Can this be done in Python 3.2?
What do I need to know in order to make such a website? Which Python
modules will I need to use?
 
Reply With Quote
 
 
 
 
Corey Richardson
Guest
Posts: n/a
 
      03-04-2011
On 03/04/2011 03:08 PM, ErichCart ErichCart wrote:
> I am currently a Computer Science student, I can write in pascal, C,
> and Java, and recently I learned about Python and fell in love with
> it. I watched some python programming tutorials on youtube, and now I
> can write some programs.
> But what I really want to do is to make a website where people can
> play real-time RISK game online with other players.
>
> Can this be done in Python 3.2?
> What do I need to know in order to make such a website? Which Python
> modules will I need to use?


Real-time? As in viewing the same board like people would in real-life?
I would say that's a job for Java or Flash. You could pull off something
with Javascript and XMPP (bad choice? I don't know), in which case
Python would be on the server directing the game logic and sending the
proper messages to the players.

So look into XMPP (xmpppy or Twisted Words are your choices, I guess)
and learn up on Javascript.

That's my take on it, at least. I'm sure someone with more experience
could direct you more specifically.

Turn-based would be much easier.

--
Corey Richardson
 
Reply With Quote
 
 
 
 
ErichCart ErichCart
Guest
Posts: n/a
 
      03-04-2011
It is just that I want to better my python skills by doing this.

I have heard about Django, can't this be done with Django?
 
Reply With Quote
 
Corey Richardson
Guest
Posts: n/a
 
      03-04-2011
On 03/04/2011 03:34 PM, ErichCart ErichCart wrote:
> It is just that I want to better my python skills by doing this.
>
> I have heard about Django, can't this be done with Django?


As you described it? Absolutely not [1]. When thinking of Django, think
more of Ruby on Rails or something vaguely along the lines of PHP. If
you want to improve your Python skills, this is a poor project unless
you already have plenty of experience designing fairly complex systems
with many interoperating parts.

Take all the things you did in school for C etc. and implement them in
Python. That's a good start, so you're more familiar with the language
compared to the ones you currently know. And then you can try a web app
with Django, but I suggest Pyramid instead.

--
Corey Richardson

[1] - Well, kinda. You could have Django driving the back-end and maybe
use AJAX and have the client poll the server every second or so for a
change in the game state, but that'd be needlessly complex and
resource-consuming compared to other systems.
 
Reply With Quote
 
John Gordon
Guest
Posts: n/a
 
      03-04-2011
In <67a0332e-aa25-4bc6-a0b5-> ErichCart ErichCart <> writes:

> It is just that I want to better my python skills by doing this.


> I have heard about Django, can't this be done with Django?


Django does help with web content, but it doesn't (as far as I know) have
any way to do real-time.

Traditional web applications are not real-time. The user has to make a
choice and then click a Submit button in order to see results, which may
or may not be the way you want your game to operate.

Perhaps you could elaborate on what you meant by "real-time".

--
John Gordon A is for Amy, who fell down the stairs
B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

 
Reply With Quote
 
ErichCart ErichCart
Guest
Posts: n/a
 
      03-04-2011
By real-time, I mean that I want it to be similar to the way instant
online chess works. Something like here: instantchess.com, but for
RISK.

I thought about making such an application, and now that I want to
practice python I thought that perhaps it can be done with python.
Now after your answers it seems like a hard task not suitable for a
beginner.

But really, I just want to make something useful with python. All I
can do now, is console programs, and that doesn't seem very user
friendly.

In fact this doesn't necessary need to be web application. For example
I have a friend who uses Delphi, and he can create all sorts of
windows applications easily, like he can see the window on the screen
and he can place buttons, text fields, radio buttons etc. wherever he
wants and then program the actions of each element. I was able to do
the same with visual basic in one of my university classes.

What do I need to know in order to be able to do the same with python?
Which python modules/python development environments do I need to use?
 
Reply With Quote
 
Corey Richardson
Guest
Posts: n/a
 
      03-04-2011
On 03/04/2011 04:48 PM, ErichCart ErichCart wrote:
> In fact this doesn't necessary need to be web application. For example
> I have a friend who uses Delphi, and he can create all sorts of
> windows applications easily, like he can see the window on the screen
> and he can place buttons, text fields, radio buttons etc. wherever he
> wants and then program the actions of each element. I was able to do
> the same with visual basic in one of my university classes.
>
> What do I need to know in order to be able to do the same with python?
> Which python modules/python development environments do I need to use?


As far as I know, no tools exist to make developing desktop apps in
Python like there do VB. However I can recommend a few desktop toolkits.
Qt (pyqt or pyside) and Gtk (pygtk) seem to be popular, and I think
Pygui will be becoming popular as it becomes more complete / more
examples/tutorials using it become available. Tkinter is easy to use and
comes right in the standard library.

--
Corey Richardson
 
Reply With Quote
 
John Gordon
Guest
Posts: n/a
 
      03-04-2011
In <1b0d04db-c45d-481d-b19e-> ErichCart ErichCart <> writes:

> By real-time, I mean that I want it to be similar to the way instant
> online chess works. Something like here: instantchess.com, but for
> RISK.


That site appears to require a monthly fee, so it may not be a good
vehicle for demonstrating requirements to a broad audience.

> I thought about making such an application, and now that I want to
> practice python I thought that perhaps it can be done with python.
> Now after your answers it seems like a hard task not suitable for a
> beginner.


I would agree. Learning Python is enough of a task by itself; adding
website design *and* real-time interaction on top of that is probably
too much.

> What do I need to know in order to be able to do the same with python?
> Which python modules/python development environments do I need to use?


You might try learning Tkinter; it is python's standard GUI interface
package.

--
John Gordon A is for Amy, who fell down the stairs
B is for Basil, assaulted by bears
-- Edward Gorey, "The Gashlycrumb Tinies"

 
Reply With Quote
 
Paul Rubin
Guest
Posts: n/a
 
      03-05-2011
ErichCart ErichCart <> writes:
> By real-time, I mean that I want it to be similar to the way instant
> online chess works. Something like here: instantchess.com, but for
> RISK.


If you want to do that in a web browser, the main technique for it is
called AJAX and you'd write your application in Javascript. There are
some good libraries including jquery that can help. A little bit of web
surfing about AJAX and Jquery can find you more info. Another approach
is as a desktop GUI app with its own socket communications layer, but
that way seems to be going out of style as AJAX has gotten more
powerful. Finally you can write in Actionscript which runs in the
browser's Flash plug-in. I guess this is also popular (lots of Facebook
games use it) but I put it last because I hate Flash.
 
Reply With Quote
 
Grumman
Guest
Posts: n/a
 
      03-05-2011
On 3/4/2011 16:48, ErichCart ErichCart wrote:
>
> In fact this doesn't necessary need to be web application. For example
> I have a friend who uses Delphi, and he can create all sorts of
> windows applications easily, like he can see the window on the screen
> and he can place buttons, text fields, radio buttons etc. wherever he
> wants and then program the actions of each element. I was able to do
> the same with visual basic in one of my university classes.
>
> What do I need to know in order to be able to do the same with python?
> Which python modules/python development environments do I need to use?


You might want to look at: http://visualpython.org/


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to write Simple JAVA program to read and write from USB serialto use it with Arduino sahm Java 4 10-15-2012 06:24 PM
Help, I don't know how to do that:" Write a program using 'for' loopsfor high order matrices (n*m) in matlab Hemkesh Java 1 02-20-2009 03:09 PM
Re: how to open a file in some application using Tkinter i am usingTKINTER to create GUI application i want to know how to open a worddocument in open office or any other applicatio Fredrik Lundh Python 1 01-09-2008 10:40 AM
Need help for COM running from Web application, but not form .EXE application JeffQ888@gmail.com ASP .Net 1 05-23-2006 03:20 PM
I know, I know, I don't know Andries Perl Misc 3 04-23-2004 02:17 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57