[BangPypers] Reading registry keys

2011-12-22 Thread Nitin Kumar
Hi All,

I am in learning phase to handle registry keys and manipulate it.
I guess we can use winreg as well as win32com for the same purpose.

can anyone please tell me the difference in their usage.

-- 
Nitin K
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Reading registry keys

2011-12-22 Thread Noufal Ibrahim
Nitin Kumar  writes:

> Hi All,
>
> I am in learning phase to handle registry keys and manipulate it.
> I guess we can use winreg as well as win32com for the same purpose.
>
> can anyone please tell me the difference in their usage.

winreg is a part of the standard library on windows that allows you to
access the registry. I haven't used it but if registry manipulation
was what I wanted to do and this worked, I would use this. 

win32com is a more general 3rd party module that gives you access to
native windows libraries from within Python. Sort of a windows only
ctypes-lite. I've used it a little to access some GUI functions.

-- 
~noufal
http://nibrahim.net.in

Monotheism is a gift from the gods.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[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 worker process from the Pool has executed the
job.

Regards,
Rahul
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] colored o/p

2011-12-22 Thread Senthil Kumaran
> Nitin Kumar  writes:
> 
> > I am trying to format o/p (colored bold string) on console. say IDLE or
> > python command prompt using python modules.

urwid is a library which can handle those for you. Give a try! It is
very close to what ncurses can be used for.

HTH,
Senthil

___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] colored o/p

2011-12-22 Thread kracekumar ramaraju
Hi

I have achieved same using colorma.
-- 
*
Thanks & Regards

"Talk is cheap, show me the code" -- Linus Torvalds
kracekumar
www.kracekumar.com
*
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] Auto Login to Website and Capturing more details

2011-12-22 Thread Nikunj Badjatya
Hi All,

I am trying to use Python power in my daily life.
Do you have Airtel Broadband Connection ? YES / NO ? In either case..read
on. !
I am trying to write a script which will automatically login to Airtel page
https://ebpp.airtelworld.com/cares/wps/myportal
Then go to "account information ->  -> View Unbilled
Information"
And prints the details of unbilled information.

Can anyone guide me on this.? How to start etc.
The site is definitely javascript based ( Please correct if I am wrong! )


Note:
( I want this because we, myself and my flatmates have a "limited data
plan" and after reaching that limit the speed decreases. :P
I checked with Airtel guys and they said they dnt give daily usage alerts
to customers. You have to login everyday and check. ! And so this script
plan. )
I will later add this script in cron job to send mail everyday to all users
of my broadband.

Thanks,
Nikunj



--
*7*Switch off as you go |*q*Recycle always | P Save Paper - Save Trees | Go
Green
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Auto Login to Website and Capturing more details

2011-12-22 Thread Noufal Ibrahim
Nikunj Badjatya  writes:

> Hi All,
>
> I am trying to use Python power in my daily life.
> Do you have Airtel Broadband Connection ? YES / NO ? In either case..read
> on. !
> I am trying to write a script which will automatically login to Airtel page
> https://ebpp.airtelworld.com/cares/wps/myportal
> Then go to "account information ->  -> View Unbilled
> Information"
> And prints the details of unbilled information.
>
> Can anyone guide me on this.? How to start etc.
> The site is definitely javascript based ( Please correct if I am
> wrong! )

You're probably right. People just love to use JS to make their sites
"Web 2.0" these days but it's something we screen scrapers have to deal
with. 

Here are my comments from a quick examination using Firebug (which is
something you should have handy to investigate stuff like this). 

The login attempt POSTs your data to 
https://ebpp.airtelworld.com/pkmslogin.form

which returns a secure cookie that should probably be sent in subsequent
requests to handle your session. 

This is probably the first thing you need to do. The Python stdlib can
handle this using urllib2 and cookielib. I've managed something like
this here https://gist.github.com/3811b566df4005a012c7 which you can use
as a starting point. 

After this, you have a session. Now you should be able to GET the URL
you want directly and parse it for the information you need.


[...]


-- 
~noufal
http://nibrahim.net.in

Evil isn't all bad.
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Auto Login to Website and Capturing more details

2011-12-22 Thread Saager Mhatre
On Thu, Dec 22, 2011 at 10:27 PM, Noufal Ibrahim  wrote:

> [snip]
>

>
The Python stdlib can handle this using urllib2 and cookielib. I've managed
> something like this here https://gist.github.com/3811b566df4005a012c7which 
> you can use as a starting point.
>
> After this, you have a session. Now you should be able to GET the URL you
> want directly and parse it for the information you need.
>

Wouldn't something like mechanize
simplify all this?

- d
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers


[BangPypers] PyCon 2012 News - Tutorials, Talks, and Tickets

2011-12-22 Thread Brian Curtin

We are now 75 days away from PyCon 2012 in Santa Clara—it’s hard to think about 
how quickly time has flown since PyCon 2011! We’ve lined up some great keynote 
and plenary speakers, announced the tutorial and talk selections, opened ticket 
sales, and have expanded financial aid opportunities. The community and our 
amazing array of sponsors have helped us break several records already, so we 
hope you’re as excited about PyCon 2012 as we are. The conference runs March 
7-15 at the Santa Clara Convention Center in Santa Clara, CA.

The keynote speakers include Y Combinator investor Paul Graham and Mozilla’s 
Head of Developer Engagement, Stormy Peters. Both of them bring interesting 
experience to the table, and they’re both captivating speakers. Speaking of 
captivating, Dave Beazley was announced on the plenary track, with more to be 
added in the coming weeks. Guido—our Benevolent Dictator For Life—will also be 
joining the line up!

With 483 tutorial, talk, and poster proposals submitted this year, the program 
committee had their hands full paring that list down to 95 talks, 32 tutorials, 
and 36 posters (which we’re still accepting). In the little time since we made 
these announcements we’ve heard a lot of excitement. You can see the tutorial 
selections at https://us.pycon.org/2012/schedule/lists/tutorials/, with talks 
available at https://us.pycon.org/2012/schedule/lists/talks/.

Tickets are now available with early bird rates available until January 10, 
2012 at https://us.pycon.org/2012/registration. Tutorial and admission prices 
continue unchanged; if you’ve been following along the last few years, these 
rates are the same as they have been for several years. Our team’s dedication 
to keeping PyCon cost-effective, community driven, and grassroots continues 
thank to the hard work and support of the team and sponsors 
(https://us.pycon.org/2012/sponsors/).

If financial assistance would make PyCon a possibility for you, we encourage 
you to apply to this year’s expanded assistance program. With a deadline of 
January 7, 2012 (extended from January 2) and a new web-based application, the 
financial aid committee aims to make the trip, lodging, and a ticket a 
possibility for everyone. Thanks to a new partnership with the PyLadies 
organization, we’re able to provide grants to women in the community who are 
interested in experiencing the conference. For full details see 
https://us.pycon.org/2012/assistance.

For more information about PyCon 2012, see our site at 
https://us.pycon.org/2012/. We also publish news on our blog: 
http://pycon.blogspot.com/.

Jesse Noller - Chairman
jnol...@python.org

Brian Curtin - Publicity Coordinator
br...@python.org
___
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers