Re: [Tutor] Need help in making this code more pythonic

2009-07-26 Thread ammar azif
Sorry I forgot to attach the code file. Here it is. --- On Sun, 7/26/09, ammar azif wrote: From: ammar azif Subject: [Tutor] Need help in making this code more pythonic To: tutor@python.org Date: Sunday, July 26, 2009, 6:23 AM Hello, I need some suggestions on how to make this code pythonic

[Tutor] Need help in making this code more pythonic

2009-07-26 Thread ammar azif
Hello, I need some suggestions on how to make this code pythonic. The program basically runs a simulation of an object that moves on a 2D plane. The object keeps on moving from its current coordinate to  randomly picked adjacent coordinates with the object is not allowed to move move to a previ

Re: [Tutor] Puzzled

2008-08-29 Thread ammar azif
d To: [EMAIL PROTECTED] Cc: tutor@python.org Date: Friday, August 29, 2008, 4:41 PM On Fri, Aug 29, 2008 at 5:13 PM, ammar azif <[EMAIL PROTECTED]> wrote: > I wrote a python program that used time() function from the time module to > retrieve time in seconds since Epoch. After the val

[Tutor] Puzzled

2008-08-29 Thread ammar azif
I wrote a python program that used time() function from the time module to retrieve time in seconds since Epoch. After the value was retrieved which I checked is a float by using type(),  the value was then written into a file in binary format. Then another C program that I wrote opened the file

[Tutor] My experience on web.py

2008-08-04 Thread ammar azif
Hi, I am writing this to tell my experience on web.py. Two weeks ago, I was looking for a python web framework that is simple, straight-forward, easy to use and powerful at the same time. Django  stood out as the most popular when I googled. I tried to use django but I found that the framework

Re: [Tutor] Program launcher in taskbar

2008-07-13 Thread ammar azif
Hi, I am running ubuntu as my development platform but the application is targeted for windows machine. Is there any platform dependent library that can help me do this? --- On Sun, 7/13/08, Michiel Overtoom <[EMAIL PROTECTED]> wrote: From: Michiel Overtoom <[EMAIL PROTECTED]> Subject: Re: [Tut

[Tutor] Program launcher in taskbar

2008-07-13 Thread ammar azif
Hi, Is is possible to place my program icon in the system tray portion of the taskbar(like instant messaging applications)? The program will be launched by clicking on the icon. How to do this in python and which module should I use? ___ Tutor

[Tutor] Launching default web browsers.

2008-07-11 Thread ammar azif
Hi, I am going to develop an application that will launch the user's computer default web browser pointing to a URL. How to do this in python and which library should I use? Also, my development platform is Linux but the application is targeted to run in Windows platform. Is there any major pla

[Tutor] Document Control System

2008-01-14 Thread ammar azif
Hello, Is python suitable in developing web based document control system ? I was thinking of using python and mysql to create such system. Users can download latest document as well as upload drafts. Is this possible or i should use PHP instead? - Be a

[Tutor] scope/namespaces

2007-04-24 Thread ammar azif
Something in python disturbs me , when i write a for loop, i am able to access the variable declared in that loop after the loop finishes which i am not able to do in languages like c/c++ or java. Is it different in python? - Ahhh...imagining that irresi

Re: [Tutor] help on raw_input()

2007-04-14 Thread ammar azif
Thanks the encode method really helps. Alan Gauld <[EMAIL PROTECTED]> wrote: "ammar azif" wrote > Actually i wanted to write a http client using just he low level > socket module. I won;t ask why! But the httplib module probably does what you want just in case you dod

Re: [Tutor] help on raw_input()

2007-04-14 Thread ammar azif
t is 'GET /index.html HTTP/1.0\\r\\nHost: somehost\\r\\n\\r\\n' is there any easy way other than modify this string ? Perhaps regular expression? Alan Gauld <[EMAIL PROTECTED]> wrote: "ammar azif" wrote > i wanted to get a string from raw_input like this > >

[Tutor] help on raw_input()

2007-04-14 Thread ammar azif
Hi, i wanted to get a string from raw_input like this raw_input('>') > \n\nsomestring but the problem is raw input will return the string '\\n\\nsomestring' My question is Are there any function to convert back those string to '\n\nsomestring' ? Thanks --

[Tutor] Tkinter-Button class

2007-03-18 Thread ammar azif
Hi, Thanks for the help guys. I have tried gui programming using Tkinter and use the Button class which accepts the command argument which is a function object. The question is how to send arguments if the function accepts arguments. - Get your own web a

[Tutor] Is generator function reusable?

2007-03-17 Thread ammar azif
Lets say a generator function instance is created and has finished its iteration. Can that instance be reused again? can it accept anymore values? or we should discard it and create a new generator instance. Thanks - Need Mail bonding? Go to the Yahoo! Mail Q&A

[Tutor] Built-in function to check a character is ASCII character?

2007-03-16 Thread ammar azif
Is there any Built-in function to check whether a character is an ASCII character? I am trying to learn event driven programming in python. Heres my code: while 1: key=msvcrt.getch() if key==255: continue else: print "the key is ", key But the output is:- the key

[Tutor] convert hex number to decimal

2007-03-16 Thread ammar azif
HI, Is there any built-in function to convert a hex number to a decimal number? - Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.___ Tutor maillist - Tutor@python.org http://mail

[Tutor] Is generator function similar to multi threading?

2007-03-15 Thread ammar azif
Is generator function similar to multi threading? - Don't be flakey. Get Yahoo! Mail for Mobile and always stay connected to friends.___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tuto