Re: [Tutor] Executing a command from a specific directory

2009-09-17 Thread Lie Ryan
Ansuman Dash wrote: I am downloading files using various command (because files are different) meant for a executable. What is "various commands"? Are you using wget/curl or similar command-line downloader programs? Or are you using a python-based script (that uses urllib)? Or are you using a

Re: [Tutor] Executing a command from a specific directory

2009-09-17 Thread Ansuman Dash
I am downloading files using various command (because files are different) meant for a executable. So I have created event driven program to download these files one by one. But some files are very huge so I want to know how can I synchronize it with my code. That means I want to make my code wai

[Tutor] PyCon 2010 (Atlanta) Call For Tutorials

2009-09-17 Thread Greg Lindstrom
The period to submit proposals for PyCon 2010 in Atlanta is open until October 18th. Tutorial are held the two days prior to the main conference and feature 3-hour classes led by fellow Python developers and enthusiasts *just like you*. Any topic relating to Python is allowed and the organizers e

Re: [Tutor] html color coding: where to start

2009-09-17 Thread Kent Johnson
2009/9/17 Emad Nawfal (عماد نوفل) : > Hi Tutors, > I want to color-code the different parts of the word in a morphologically > complex natural language. The file I have looks like this, where the fisrt > column is the word, and the  second is the composite part of speech tag. For > example, Al is a

Re: [Tutor] Simple Program

2009-09-17 Thread Alan Gauld
"Corey Richardson" wrote I'm going to be making a simple program, that is a few books like "A is for...", "B is for...", but it will be many built into one, Sorry, I don't understand? sort of define(word) command, some sort of a find(word) command, and a few others. That's fine, although

Re: [Tutor] On slicing

2009-09-17 Thread george fragos
2009/9/17 Rich Lovely : > 2009/9/17 george fragos : >>  If numbers=[1,2,3,4,5,6,7,8,9,10] and since "...any time the >> leftmost index in a slice comes later in the seqence than the second >> one... the result is always an empty sequence", why the slice >> numbers[10:0:-2] produces the sequence [10

[Tutor] Simple Program

2009-09-17 Thread Corey Richardson
I'm going to be making a simple program, that is a few books like "A is for...", "B is for...", but it will be many built into one, with a some sort of define(word) command, some sort of a find(word) command, and a few others. Looking for people to contribute, and make this a community thing, m

Re: [Tutor] Still Trying to Understand GAE

2009-09-17 Thread ad...@gg-lab.net
Yes Kent, i'm not worrying about it, i was just trying to find the reason why they're doing so. Anyway, i'm a newbye, but the GAE Evinronment is very very difficult to understand. The only thing is thas in common with the real python is the sintax. Thankyou again 2009/9/17 Kent Johnson : > On Th

Re: [Tutor] html color coding: where to start

2009-09-17 Thread عماد نوفل
2009/9/17 bob gailer > Emad Nawfal (عماد نوفل) wrote: > >> Hi Tutors, >> I want to color-code the different parts of the word in a morphologically >> complex natural language. The file I have looks like this, where the fisrt >> column is the word, and the second is the composite part of speech t

Re: [Tutor] Using the time module to extract a semi-random number

2009-09-17 Thread Alan Gauld
"Patrick Sabin" wrote import random number = random.randint(0,59) The latter looks clearer to me. Me too, but if the object is to get the learner using the time module it doesn't help! :-) But if the object is really to get a random number then its much better... Alan G. __

Re: [Tutor] max min value in array

2009-09-17 Thread Rich Lovely
2009/9/17 Kent Johnson : > On Thu, Sep 17, 2009 at 11:01 AM, steve wrote: >> On 09/17/2009 06:04 PM, Kent Johnson wrote: >>> >>> On Thu, Sep 17, 2009 at 8:06 AM, Rich Lovely >>>  wrote:  2009/9/17 Rayon: > >  I need to find the max and min value from some floats in a array: >>> >

Re: [Tutor] html color coding: where to start

2009-09-17 Thread bob gailer
Emad Nawfal (عماد نوفل) wrote: Hi Tutors, I want to color-code the different parts of the word in a morphologically complex natural language. The file I have looks like this, where the fisrt column is the word, and the second is the composite part of speech tag. For example, Al is a DETERMINE

Re: [Tutor] html color coding: where to start

2009-09-17 Thread Alan Gauld
"Emad Nawfal (عماد نوفل)" wrote column is the word, and the second is the composite part of speech tag. For example, Al is a DETERMINER, wlAy is a NOUN and At is a PLURAL NOUN SUFFIX Al+wlAy+AtDET+NOUN+NSUFF_FEM_PL Al+mtHd+pDET+ADJ+NSUFF_FEM_SG I'd create a dictionary wit

Re: [Tutor] html color coding: where to start

2009-09-17 Thread Kent Johnson
2009/9/17 Emad Nawfal (عماد نوفل) : > Hi Tutors, > I want to color-code the different parts of the word in a morphologically > complex natural language. The file I have looks like this, where the fisrt > column is the word, and the  second is the composite part of speech tag. For > example, Al is a

Re: [Tutor] max min value in array

2009-09-17 Thread Kent Johnson
On Thu, Sep 17, 2009 at 11:01 AM, steve wrote: > On 09/17/2009 06:04 PM, Kent Johnson wrote: >> >> On Thu, Sep 17, 2009 at 8:06 AM, Rich Lovely >>  wrote: >>> >>>  2009/9/17 Rayon:  I need to find the max and min value from some floats in a array: >> >>>  Depending on the size of the arr

Re: [Tutor] ImportError: cannot import name log

2009-09-17 Thread vishwajeet singh
On Thu, Sep 17, 2009 at 8:41 PM, steve wrote: > Hello Vishwajeet, > > On 09/16/2009 11:21 PM, vishwajeet singh wrote: > >> Hi, >> >> Below is the content of __init__.py >> >> import sys >> from django.core.signals import got_request_exception >> from . import log >> logger = log._get_logger() >>

[Tutor] html color coding: where to start

2009-09-17 Thread عماد نوفل
Hi Tutors, I want to color-code the different parts of the word in a morphologically complex natural language. The file I have looks like this, where the fisrt column is the word, and the second is the composite part of speech tag. For example, Al is a DETERMINER, wlAy is a NOUN and At is a PLURAL

Re: [Tutor] ImportError: cannot import name log

2009-09-17 Thread steve
Hello Vishwajeet, On 09/16/2009 11:21 PM, vishwajeet singh wrote: Hi, Below is the content of __init__.py import sys from django.core.signals import got_request_exception from . import log logger = log._get_logger() def got_request_exception_callback(sender, **kwargs): """Logging all unhandle

Re: [Tutor] Executing a command from a specific directory

2009-09-17 Thread Kent Johnson
On Thu, Sep 17, 2009 at 8:40 AM, Ansuman Dash wrote: > I am using same process for multiple file download. So I need to download > those one by one. > > Moreover some files are very huge (around 120 MB). So I need to make script > to wait before verifying the file is downloaded. I don't understan

Re: [Tutor] Still Trying to Understand GAE

2009-09-17 Thread Kent Johnson
On Thu, Sep 17, 2009 at 8:38 AM, ad...@gg-lab.net wrote: > Thankyou all, you're very precious for me. > > yeah it seems the development webserver (and the production one) are > importing modules in a non-standard way. > > I absolutely don't understand this choice. Why import everything > everytime

Re: [Tutor] Executing a command from a specific directory

2009-09-17 Thread Ansuman Dash
I am using same process for multiple file download. So I need to download those one by one. Moreover some files are very huge (around 120 MB). So I need to make script to wait before verifying the file is downloaded. Thanks AD On Thu, Sep 17, 2009 at 5:34 PM, Kent Johnson wrote: > On Thu, Sep

Re: [Tutor] Still Trying to Understand GAE

2009-09-17 Thread ad...@gg-lab.net
Thankyou all, you're very precious for me. yeah it seems the development webserver (and the production one) are importing modules in a non-standard way. I absolutely don't understand this choice. Why import everything everytime? Don't you think it makes scripts much more slow? Giorgio 2009/9/16

Re: [Tutor] max min value in array

2009-09-17 Thread Kent Johnson
On Thu, Sep 17, 2009 at 8:06 AM, Rich Lovely wrote: > 2009/9/17 Rayon : >> I need to find the max and min value from some floats in a array: > Depending on the size of the array, there's two methods:  Using the > max and min builtin functions, which will be faster for small arrays, > or hand-codi

Re: [Tutor] On slicing

2009-09-17 Thread Rich Lovely
2009/9/17 george fragos : >  If numbers=[1,2,3,4,5,6,7,8,9,10] and since "...any time the > leftmost index in a slice comes later in the seqence than the second > one... the result is always an empty sequence", why the slice > numbers[10:0:-2] produces the sequence [10,8,6,4,2] but not the > sequen

Re: [Tutor] Parsing html tables and using numpy for subsequent processing

2009-09-17 Thread David Kim
> > Gerard wrote: > Not very pretty, but I imagine there are very few pretty examples of > this kind of thing. I'll add more comments...honest. Nothing obviously > wrong with your code to my eyes. > Many thanks gerard, appreciate you looking it over. I'll take a look at the link you posted as well

Re: [Tutor] max min value in array

2009-09-17 Thread Rich Lovely
2009/9/17 Rayon : > I need to find the max and min value from some floats in a array: > > ___ > Tutor maillist  -  tu...@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > > Depending on the size

Re: [Tutor] max min value in array

2009-09-17 Thread Kent Johnson
On Thu, Sep 17, 2009 at 7:37 AM, Rayon wrote: > I need to find the max and min value from some floats in a array: Did you try the min() and max() functions? Kent ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: htt

Re: [Tutor] Executing a command from a specific directory

2009-09-17 Thread Kent Johnson
On Thu, Sep 17, 2009 at 5:47 AM, Ansuman Dash wrote: > Hi, > > I modified my code little bit and it is working fine now, > > = >     if os.access("C:/Python25/Own.log", os.F_OK): >     f = open("C:/Python25/Own.log") >     time.sleep(30)

[Tutor] On slicing

2009-09-17 Thread george fragos
If numbers=[1,2,3,4,5,6,7,8,9,10] and since "...any time the leftmost index in a slice comes later in the seqence than the second one... the result is always an empty sequence", why the slice numbers[10:0:-2] produces the sequence [10,8,6,4,2] but not the sequence []?

[Tutor] max min value in array

2009-09-17 Thread Rayon
I need to find the max and min value from some floats in a array: ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Executing a command from a specific directory

2009-09-17 Thread Ansuman Dash
Hi, I modified my code little bit and it is working fine now, = if os.access("C:/Python25/Own.log", os.F_OK): f = open("C:/Python25/Own.log") time.sleep(30) try: line = f.readlines() a = string

Re: [Tutor] Using the time module to extract a semi-random number

2009-09-17 Thread Patrick Sabin
Laurii wrote: Hello all, I am currently reading through the Tutorial for Non-Programers by Josh Cogliati. I have had great success until now. The exercise to modify a number guessing program from a fixed number "number = 78" to using the time module and use the seconds at the time the prog