[BangPypers] python for parsing

2010-05-23 Thread Rahul R
Hello everyone , I am new to this community . recently i attended a python workshop in my college and got a lot mesmerised by the language so finally decided to port my mini project which i have partially written using LEX and Yacc into python. i would be glad if you could provide me some valuable

Re: [BangPypers] python for parsing

2010-05-23 Thread Rahul R
On Mon, May 24, 2010 at 12:00 AM, Dhananjay Nene wrote: > On Mon, May 24, 2010 at 12:51 AM, Rahul R wrote: > > > Hello everyone , > > I am new to this community . recently i attended a python workshop in my > > college and got a lot mesmerised by the language so finally

Re: [BangPypers] python for parsing

2010-05-23 Thread Rahul R
ou are trying to create an abstraction above the HTML+JS > etc. > Have you looked at pyjamas pyjs.org ? > Though GWT uses java for the same thing. > > On Mon, May 24, 2010 at 2:02 AM, Rahul R wrote: > > > On Mon, May 24, 2010 at 12:00 AM, Dhananjay Nene > > wrote: > &

Re: [BangPypers] Tcp/ip server client program

2010-05-28 Thread Rahul R
welll i did try a client server program in TCP/IP , from http://www.jroller.com/RickHigh/entry/notes_on_creating_a_socket this tutorial . It helped me a lot , i hope it would help u too. On Fri, May 28, 2010 at 7:26 AM, Senthil Kumaran wrote: > On Thu, May 27, 2010 at 11:46:36PM +0900, murugado

Re: [BangPypers] 2D plotting libraries.

2010-06-04 Thread Rahul R
On Fri, Jun 4, 2010 at 5:22 PM, Noufal Ibrahim wrote: > On Fri, Jun 4, 2010 at 6:49 PM, Shiv Shankar wrote: > > > The whole ode thing I've prepared for the > >> pycon in Singapore is an attempt. > > http://github.com/nibrahim/Devious-machinations > > Let me see how well it's received. If it's g

[BangPypers] python with c bindings

2010-06-15 Thread Rahul R
well recently i learned about handling shell scripts inside c files . well i was wondering since python is also scripting language can i bind the python script inside a "C" file and then run it.well on the front it may look like normal compilation of c program, but in the backend i guess the pytho

Re: [BangPypers] python with c bindings

2010-06-15 Thread Rahul R
On Tue, Jun 15, 2010 at 11:24 AM, kunal ghosh wrote: > On Tue, Jun 15, 2010 at 12:45 PM, Rahul R wrote: > > > well recently i learned about handling shell scripts inside c files . > well > > i was wondering since python is also scripting language can i bind the > >

Re: [BangPypers] python with c bindings

2010-06-15 Thread Rahul R
On Tue, Jun 15, 2010 at 6:03 PM, Noufal Ibrahim wrote: > On Tue, Jun 15, 2010 at 9:11 PM, Rahul R wrote: > [..] > > i rather prefer running it as a script binding into a "C" (if thats > possible > > , well that certainly works for sh scripts i dont know wh

Re: [BangPypers] June meet up

2010-06-24 Thread Rahul R
On Thu, Jun 24, 2010 at 10:49 AM, Noufal Ibrahim wrote: > On Tue, Jun 22, 2010 at 11:13 AM, Abhishek Mishra > wrote: > > +1 for the apac talk, I and a friend would definitely be interested. > > That's 3 people including me. Anyone else? > > What about the venue? We could ask TW but I'd prefer do

[BangPypers] python program to fetch input data in complete bit format

2010-07-07 Thread Rahul R
--- Rahul R Under Grad Student Computer Science Sir MVIT Bangalore Email : rahul8...@gmail.com Site : www.rahulr.110mb.com Blog : <http://www.rahulr.blog.co.uk>www.rahulr.blog.co.uk --- Google Talk: rahul8...@gmail.com [image: Linkedin]

Re: [BangPypers] python program to fetch input data in complete bit format

2010-07-07 Thread Rahul R
On Thu, Jul 8, 2010 at 1:24 AM, Noufal Ibrahim wrote: > Rahul R writes: > > > i was wondering if there is a way to fetch the raw data of any file i > > input for example if i accept a text file or a video file (particualr > > large video files ). i could fetch the the e

[BangPypers] catching exceptions from SimpleHTTPServer

2010-07-20 Thread Rahul R
how to catch exceptions from the simpleHTTPServer . ( srry if this sounds ridiculous ) the below is a small code snippet for a basic webserver . every time whenever there is a HTTP GET/POST request i can see the feedback in the terminal . how do i catch those feedbacks ? code snippet: http://cod

Re: [BangPypers] catching exceptions from SimpleHTTPServer

2010-07-20 Thread Rahul R
> > > --- browser.py 2010-07-20 22:51:33.0 +0530 > +++ browser-new.py 2010-07-20 22:55:20.0 +0530 > @@ -18,4 +18,10 @@ > > sa = httpd.socket.getsockname() > print "Serving HTTP on", sa[0], "port", sa[1], "..." > -httpd.serve_forev

Re: [BangPypers] July meetup

2010-07-21 Thread Rahul R
On Wed, Jul 21, 2010 at 1:10 PM, Noufal Ibrahim wrote: > > Hello everyone, >We'll need atleast a mini meetup in July atleast to collect > registration money from offline registrants. > >How's this Sunday look? > > Thanks. > i would be delighted to come . this would be my first me

[BangPypers] diffrerence between lambda function and ordinary one

2010-08-06 Thread Rahul R
i was writing some basic code . for understanding lambda functions , but couldnt understand the difference between a lambda function and an ordinary function. for example >>>def f (x): return x**2 ... >>> print f(8) >>> 64 >>> g = lambda x: x**2 >>> >>> print g(8) >>> 64 wats a need for using la

[BangPypers] In Multiprocess module how to find which worker process is executing the job

2011-12-22 Thread Rahul R
I was wondering , if there is a way to find out which process among the Pool has executed a particular job submitted. For example , def start_exe(): ##Does some task ### if __name__ == '__main__': p = Pool(5) result = p.apply_async(start_exe) print result.get() how do i find out , which w

Re: [BangPypers] Python script to limit access to Internet...

2012-06-27 Thread Rahul R
Use Squid Proxy sever --Rahul On Wed, Jun 27, 2012 at 1:34 PM, Vishal wrote: > Hello, > > I would like to limit internet access at my home, for some computers. > Basically for a given time during the day (read schedule), I wish that the > a given computer should not be able to access the inter

Re: [BangPypers] [ANNOUNCEMENT] Retask, a Task Queue implementation for human beings

2012-07-04 Thread Rahul R
hey , i was checking out ReTask , its a nice tool to have. But i am just curious how is it different from using Redis with its python client. If i am not wrong , redis natively supports pub-sub model. Thanks, Rahul On Wed, Jul 4, 2012 at 10:15 PM, Kushal Das wrote: > Hi all, > > I am happy t

Re: [BangPypers] Executing Commands using sudo

2012-11-15 Thread Rahul R
$pip install sh (http://amoffat.github.com/sh/) pretty much does everything u asked for. http://amoffat.github.com/sh/tutorials/2-interacting_with_processes.html --Rahul On Thu, Nov 15, 2012 at 10:01 PM, Vid wrote: > On Thu, Nov 15, 2012 at 6:49 AM, davidsnt wrote: > > Hello Team, > > > > I

Re: [BangPypers] Minutes of the usergroup meeting - 24-11-2012

2012-11-26 Thread Rahul R
I would love to take up the opportunity to manage the website. --Rahul On Mon, Nov 26, 2012 at 11:15 PM, Anand Chitipothu wrote: > On Mon, Nov 26, 2012 at 7:05 PM, Noufal Ibrahim > wrote: > > kracekumar ramaraju writes: > > > > > > [...] > > > >> Since we have are hosting wiki and planet, how

Re: [BangPypers] Question on Pattern Matching and Regular Expression

2013-01-07 Thread Rahul R
Hey David, Assuming , its not a continuous stream of data being written to file all the time. you could do something like this https://gist.github.com/4477268 . you can enhance it and make it more pythonic. :) Thanks, Rahul On Mon, Jan 7, 2013 at 5:02 PM, davidsnt wrote: > No this file ch

[BangPypers] Reorder Dictionary Size in python

2013-04-17 Thread Rahul R
Hey Guys, Is it possible to forcibly reorder the python dictionary after "n" number of inserts and deletions. As far as i know, python dictionary performs lazy deletes. Thus , even if the data is deleted, python has a dummy data their in order to preserve consistency. The python dictionary keeps

Re: [BangPypers] Reorder Dictionary Size in python

2013-04-17 Thread Rahul R
ou are seeing some order by chance. > > If you need order, then use OrderedDict from collections module (new in > Python 2.7). > > Anand > > > On Wed, Apr 17, 2013 at 9:00 PM, Rahul R wrote: > > > Hey Guys, > > > > Is it possible to forcibly reorder the py

Re: [BangPypers] Reorder Dictionary Size in python

2013-04-17 Thread Rahul R
ere a way to forcibly reduce the dictionary size ? ./Rahul On Wed, Apr 17, 2013 at 9:23 PM, Ramdas S wrote: > On Wed, Apr 17, 2013 at 9:22 PM, Rahul R wrote: > > > Ahh , sorry If i wasnt clear the first time. I dint mean reorder the data > > in dictionary. I meant resize the d

Re: [BangPypers] Reorder Dictionary Size in python

2013-04-17 Thread Rahul R
I dont intent to pre optimize things , I am rather driven by curiosity on how one could do that. Thanks, ./Rahul On Thu, Apr 18, 2013 at 5:53 AM, Anand Chitipothu wrote: > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > As far as i know, python performs a lazy deletion of v

Re: [BangPypers] Reorder Dictionary Size in python

2013-04-17 Thread Rahul R
helps. > >>> import gc > >>> gc.collect() > I have not tried it out myself, though. > > Regards, > Abdul Muneer > > -- > Follow me on Twitter: @abdulmuneer <http://twitter.com/#%21/abdulmuneer> > > > On Thu, Apr 18, 2013 at 5:53 AM, Anand

Re: [BangPypers] Reorder Dictionary Size in python

2013-04-18 Thread Rahul R
> the stackoverflow link that Anand shared earlier could help. > > Regards, > Harish > > > On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni > wrote: > > > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > > > As far as i know, python performs a

Re: [BangPypers] Reorder Dictionary Size in python

2013-04-18 Thread Rahul R
Hey Hrishikesk, So are you saying, if i run gc.collect() in my program I will get rid of all the dummy variables in the dictionary ? Thanks, ./Rahul On Thu, Apr 18, 2013 at 12:06 PM, Hrishikesh Kulkarni wrote: > On Wed, Apr 17, 2013 at 9:30 PM, Rahul R wrote: > > > As far as i

Re: [BangPypers] Reorder Dictionary Size in python

2013-04-18 Thread Rahul R
and old_keys are marked by decref not > the dummy. I wouldnt worry about dummy keys so much. btw checkout > dictresize > which is called during insert/set which does resize the dict. When? that > would be a good learning exercise. > > > > On Thu, Apr 18, 2013 at 2:09 PM

Re: [BangPypers] Need help for python coding

2013-04-18 Thread Rahul R
os.path.realpath(__filename__) that should do the trick. ./Rahul On Thu, Apr 18, 2013 at 6:15 PM, Kamalakar gs wrote: > HI all, > I have a query that i have doc which is read through python.But instead of > giving path and filename > in the coding.I want to manipulate it like "python has to