Re: Trouble sending / receiving compressed data (using zlib) as HTTP POST to server (in django)

2009-10-05 Thread subeen
ncode({'uid': uid, 'reqid': rid, 'data': data}) usock = opener.open(url, params) resp = usock.read() usock.close() ... regards, Subeen. -- http://mail.python.org/mailman/listinfo/python-list

Trouble sending / receiving compressed data (using zlib) as HTTP POST to server (in django)

2009-10-03 Thread subeen
o get over? thanks, Subeen. http://love-python.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Learning Python

2008-09-06 Thread subeen
On Sep 6, 3:17 pm, James Pilling <[EMAIL PROTECTED]> wrote: > Hi im currently starting to learn python in sixth form at school any tips? > Just pickup a good book and make sure you code all the examples and exercises yourself, even if it seems easy. Have fun with Python! regards,

Re: Not necessarily related to python Web Crawlers

2008-07-06 Thread subeen
t; > Thx You can check my python blog. There are some tips and codes on crawlers. http://love-python.blogspot.com/ regards, Subeen http://love-python.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Using Python to run SSH commands on a remote server

2008-06-23 Thread subeen
tive ssh (so that your script doesn't need to enter password), look at: http://speed-dev.blogspot.com/2008/06/non-interactive-ssh-in-linux.html regards, Subeen. -- http://mail.python.org/mailman/listinfo/python-list

Re: Web Crawler - Python or Perl?

2008-06-22 Thread subeen
= 300 # seconds socket.setdefaulttimeout(timeout) regards, Subeen. http://love-python.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Web Crawler - Python or Perl?

2008-06-09 Thread subeen
On Jun 10, 12:15 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > subeen wrote: > > can use urllib2 module and/or beautiful soup for developing crawler > > Not if you care about a) speed and/or b) memory efficiency. > > http://blog.ianbicking.org/2008/03/30/python-html-par

Re: Web Crawler - Python or Perl?

2008-06-09 Thread subeen
nize or LWP modules. Both languages have good support for regular expressions. Perl is slightly faster I have heard, though I don't find the difference myself. Both are compatible with *nix. For writing a good crawler, language is not important, it's the technology which is important. regards,

Re: How to send a POST request?

2008-06-06 Thread subeen
that urllib2 handles POSTs too. > > > kynn > > > -- > > NOTE: In my address everything before the first period is backwards; > > and the last period, and everything after it, should be discarded. > > -- > >http://mail.python.org/mailman/listinfo/python-list check this link for http post: http://love-python.blogspot.com/2008/04/get-content-html-source-of-url-by-http.html regards, Subeen -- http://mail.python.org/mailman/listinfo/python-list

Re: Keep a script running in the background

2008-06-03 Thread subeen
alculated data > every time the user needs it via the main program. > > I won't be working with an UI, hope that can be made easily in Python > somehow. > > Cheers, > > Guillermo You can try this command: nohup python script.py & regards, Subeen. http://love-python

Re: python blogs

2008-06-02 Thread subeen
ks very much, but the extension says it's written in PHP! > > > > > Sincerely yours, > > ~pyblog A separate place for python blog - the idea is good. I also think that python blog will help python to be more popular. You can also take a look at my blog: http://love-python.

Re: How do *you* use Python in non-GUI work?

2008-05-18 Thread subeen
files and XML. > - Manage files for build processes. > - Automating processes (e.g. checkout, builds, FTP). > > Wish I had some reasons to make a GUI application in Python. > > -- > Kam-Hung Soh http://kamhungsoh.com/blog";>Software Salariman I also haven't used GUI in

Re: How to set proxy for a python script to run

2008-04-18 Thread subeen
On Apr 18, 12:31 pm, Adam <[EMAIL PROTECTED]> wrote: > Hi, everyone, I am using /usr/share/system-config-language/ > language_gui.py in Python. > For some reason I have to bypass the firewall using a proxy. I read > the urllib reference and set http_proxy="my proxy". But it didn't > work. Is there

Re: Running a python program as main...

2008-03-26 Thread subeen
t; way that the command line will automatically associate the extension > with the program? (If so, he didn't mention this in his book). You have to set the path in your run time environment. regards, Subeen. http://love-python.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Delete hidden files on unix

2008-03-03 Thread subeen
ormatik > Technische Universität Münchenhttp://mips.gsf.de/staff/pagel Another way is to execute the linux command directly :) Check here: http://love-python.blogspot.com/2008/02/execute-linux-commands-in-python.html regards, subeen. http://love-python.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Book Recomendations

2008-03-01 Thread subeen
s on those as well. > > Thanks > > Ira I have found that 'Dive into Python' is a good book for people who have experience with other languages. It's available free here: http://www.diveintopython.org/ regards, Subeen http://love-python.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: rstrip error python2.4.3 not in 2.5.1?

2008-02-28 Thread subeen
rstrip() works fine in python 2.4.3. May be the problem lies in somewhere else. I tried it in FC6 with Python 2.4.3: >>> url = "abc.com\n" >>> url.rstrip() 'abc.com' regards, Subeen. http://love-python.blogspot.com/ On Feb 29, 2:30 am, dirkheld <[EMAIL

Re: buliding log files

2008-02-26 Thread subeen
It provides facility of system log of UN*X like systems. This tutorial will also help: http://www.onlamp.com/pub/a/python/2005/06/02/logging.html regards, Subeen http://love-python.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: most loved template engine on python is?

2008-02-24 Thread subeen
On Feb 25, 1:01 am, Tamer Higazi <[EMAIL PROTECTED]> wrote: > > Question: > Which is the most loved template engine for python? > I am learning MAKO and I think it's good. But can't tell that it's the best as I didn't try others. :) regards, Subeen. htt

Re: Equivalent of system()?

2008-02-23 Thread subeen
This link may help: http://love-python.blogspot.com/2008/02/execute-linux-commands-in-python.html On Feb 23, 10:44 am, Max <[EMAIL PROTECTED]> wrote: > Is there a Python equivalent of C++'s system()? > > TIA -- http://mail.python.org/mailman/listinfo/python-list

Re: global variables: to be or not to be

2008-02-22 Thread subeen
Another way to avoid using global variables is to return more than one values from the function. Here is an example that may help you to understand it: def foo(a, b, c): a += c b += c return a, b a = 5 b = 10 c = 2 print a, b a, b = foo(a, b, c) print a, b regards, Subeen. http

Re: newbie in python

2008-02-21 Thread subeen
Dive into Python is a very good book but it's for people who have experience in other languages. I liked the book. Whatever book you read, please take a look at the Python Tutorial: http://docs.python.org/tut/tut.html, it will help. regards, Subeen. http://love-python.blogspot.com/ On F

Re: is this data structure build-in or I'll have to write my own class?

2008-02-20 Thread subeen
I think you should go for 'dictionary' that is a built-in data structure of Python. regards, Subeen http://love-python.blogspot.com/ On Feb 20, 7:32 pm, "Jorge Vargas" <[EMAIL PROTECTED]> wrote: > 2008/2/20 Jarek Zgoda <[EMAIL PROTECTED]>:> Jorge Vargas

Re: firefox cache & Python

2008-02-20 Thread subeen
Searching for FF automation but still no luck. Any other idea on how to locate the cache directory and then read the directory ? regards, Subeen http://love-python.blogspot.com/ On Feb 20, 3:20 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > > Search f

firefox cache & Python

2008-02-19 Thread subeen
mehow save the page in a file and parse it. But how to save the page without human intervention (pressing ctrl+s) :) ? Hope I could make it clear what I am trying to do... Any clue? regards, Subeen. http://love-python.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: ROUNDING???

2008-02-18 Thread subeen
You can use the round() function. And if you want to print, use %0.2f regards, Subeen. http://love-python.blogspot.com/ On Feb 19, 9:36 am, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > katie smith <[EMAIL PROTECTED]> wrote: > > > > >i

Re: Regular Expression for Prime Numbers (or How I came to fail at them, and love the bomb)

2008-02-13 Thread subeen
hmm... interesting here is another way you can find prime numbers http://love-python.blogspot.com/2008/02/find-prime-number-upto-100-nums-range2.html On Feb 13, 9:31 pm, [EMAIL PROTECTED] wrote: > I was reading up on this site [http://www.noulakaz.net/weblog/ > 2007/03/18/a-regular-expression-t

Re: Is there a web visitor counter available in Python ...

2008-02-12 Thread subeen
your website. Regards, Subeen. On Feb 12, 11:37 am, "W. Watson" <[EMAIL PROTECTED]> wrote: > PHP. Well, that's a new one on me. Google gave me some idea of what it's > about, and I found some code on how to do it. It requires yet another > "programming l

Re: regarding html source code

2008-02-11 Thread subeen
Another way: import urllib2 usock = urllib2.urlopen('http://abc.com') data = usock.read() usock.close() print data On Feb 12, 12:05 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Hi, > > shashank jain top-posted: > > > > > On Feb 11, 2008 11:15 PM, Stefan Behnel <[EMAIL PROTECTED]> wrote: >

Useful site for beginners

2008-02-10 Thread subeen
This website can be helpful for Python newbies: http://love-python.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: 5 queens

2007-12-22 Thread subeen
such script? If anyone is > interested to help I can show what I've done so far. Try to generate the next permutation and check if it's a valid solution. Need to use recursion for this. regards, Subeen. -- http://mail.python.org/mailman/listinfo/python-list

Re: C# and Python

2007-08-23 Thread subeen
python > interpreter "/path/to/python /path/to/quicksort.py". Make quicksort.py > write to a file the result. After the quicksort.py finishes, read the > file from your normal C# app. > > Cheers. Hi, what's the C# function to call python interpreter? regards, Subeen. -- http://mail.python.org/mailman/listinfo/python-list

Re: C# and Python

2007-08-21 Thread subeen
On Aug 21, 7:24 pm, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 8/21/07, Ant <[EMAIL PROTECTED]> wrote: > > > On Aug 21, 11:01 am, subeen <[EMAIL PROTECTED]> wrote: > > > Hi, > > ... > > > But I want to write the GUI and number gen

C# and Python

2007-08-21 Thread subeen
quicksort.py will be called and it will sort the numbers. regards, Subeen -- http://mail.python.org/mailman/listinfo/python-list