[Tutor] for a given file, how to find file size?

2007-10-02 Thread Kamal
would appreciate any pointers.

-- 
Thanks,
Kamal
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] for a given file, how to find file size?

2007-10-02 Thread Kamal
never mind found my answer here

http://docs.python.org/lib/os-file-dir.html


On 10/2/07, Kamal <[EMAIL PROTECTED]> wrote:
>
> would appreciate any pointers.
>
> --
> Thanks,
> Kamal




-- 
Thanks,
Kamal
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] for a given file, how to find file size?

2007-10-03 Thread Kamal
Thanks Jason and Kent for the responses.

On 10/3/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
> Kamal wrote:
> > never mind found my answer here
> >
> > http://docs.python.org/lib/os-file-dir.html
>
> os.path.getsize() also works.
>
> Kent
>


-- 
Thanks,
Kamal
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Timers in Python

2007-10-03 Thread Kamal
hello everyone,

Is there a method in Python which does what
setInterval('someFunction()',5000) does in Javascript.

Basically, I want to call functionOne() every x minutes, and wondering
whats the best way to do it.
-- 
Thanks,
Kamal
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Timers in Python

2007-10-15 Thread Kamal
Thanks everyone for the useful feedback.

On 10/4/07, Noufal Ibrahim <[EMAIL PROTECTED]> wrote:
>
> Kent Johnson wrote:
> > Kamal wrote:
> >> hello everyone,
> >>
> >> Is there a method in Python which does what
> >> setInterval('someFunction()',5000) does in Javascript.
> >>
> >> Basically, I want to call functionOne() every x minutes, and wondering
> >> whats the best way to do it.
>
> You can also look at the sched module that comes with the standard
> distribution.
>
>
>
>
> --
> ~noufal
> http://nibrahim.net.in/
> _______
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>



-- 
Thanks,
Kamal
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Error connecting to MySQL from Python script

2008-01-24 Thread Kamal
I have the MySQL Server (5.0.51) running on Windows XP machine, when I try
to connect to this server with a Python script, it gives the below error.
Wondering why is it happening?

_mysql_exceptions.Operational
Error: (1251, 'Client does not support authentication protocol requested by
server; consider upgrading MySQL client')

-- 
Thanks,
Kamal
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor


[Tutor] looking for ways to get diff between two txt files

2008-05-14 Thread Kamal
Hi,

I would really appreciate if someone help to find a way to calculate
delta (diff) between two similar text files. I have looked at difflib
and found related script at this site
http://www.java2s.com/Code/Python/Utility/Printfilediffsincontextunifiedorndiffformats.htm

Is there a simple way to just get delta between two files? e.g. I have
below two files and the delta between these two files is in
diff_output.txt

file1.txt
hello world

file2.txt
hello world
hello python

diff_output.txt
hello python

-- 
Thanks,
Kamal
___
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor