॥ स्वक्ष ॥

Ir al contenido | Ir al menú | Ir a Buscar

Tag - Python

Registro de entradas

2012 Diciembre 16 [domingo]

Happy Pandas

I've always wanted to attend a scientific Foss hacking session in Python and last Sunday, I made that idea come true. So how do you even begin to describe a fantastic Sunday that got over even before it started. Well, that was how it felt in retrospect...  :-)

Having kick-started the Pydata-Pandas workshop-sprint, it was annoying to catch a viral bug the week before the sprint-workshop one is  organizing - talk about increasing the stress levels. The cold weather did add to my discomfort, but could not dent my enthusiasm - I was organising my first event on a whim, at short notice in a new city (country?) where I hardly knew anyone, not to mention it was at the start of the Holiday Season! See what I mean about having perfect timing ... gee, what was I thinking!?!

Aahz announced it on the Pythonsprints site and soon enough Sunday dawned bright and shiny. I reached the Pivotal Labs Manhattan office to find Asheesh calmly sprawled on the ground calmly munching on croissants and sipping Java (err..coffee). We had planned to come in a little earlier incase someone needed installation help. I had not eaten any breakfast but I was more stressed than hungry as this was the first event I was organizing in an alien country. I declined the yummy snacks and nervously wondered if Chang would show up?; ... will all the people who registered show up?; ... this was the Sunday before the Christmas week and maybe everyone may decide to sleep-in or go off on a holiday; would Saturday have been a better choice, or maybe we should not have kept it free - what if nobody came despite registering, what if ....   oh, well..the monkey-mind was hard at work :-P

Disastrous thoughts were stronger than the currents of the Niagara, when Chang and Emily made their appearance and I managed to make small conversation as the stress ebbed away. Things were sunnier when JT arrived and opened the doors, leaving me with less time to indulge my monkey-mind. We all got busy setting up the space for the event, arranged the tables and chairs, checked if enough power-points were available, checked the video camera, set up the name tags, did a recce of the adjoining kitchen.

Pivotal Labs has the nicest open kitchen, well-stocked with a variety of snacks, fruits, nuts and a large variety of drinks that cater to all taste buds. I hate carbonated sugary drinks and artificial flavouring which restricts my choice to drinking H2O, but to my surprise there was coconut water. Now if you liked your pint of beer while coding, the PL kitchen had that too. A big shout-out (Thank You :)) in gratitude to Pivotal Labs for being the most gracious host an organizer could ask for!

Back to the tiny tasks bits, I got a print out of Chang's presentation so he could have his notes handy during the workshop. The machine was a Mac, so ipython files would not work. The solution was a PDF. When you are organising an event like this there may be small miniscule things that can hold up your event so you would need to plan and budget time for them. Someday I shall collate my thoughts on 'how to organise small events' like workshops and sprints in a new blog entry.

A little past 10 AM, I introduced Chang She to the assembled attendees, and Chang kick-started the Pandas workshop by walking us through the Pandas data structures for 1-dimensional, 2-dimensional and 3-dimensional data. He moved on to DataFrame components and indexing, accessing data via files and Databases, Broadcasting and some basic Statistical computations. 

It was not all theory, as all the participants were following and experimenting on their laptops, in part, thanks to Asheesh's excellent "Laptop setup guide", enabling attendees to come with configured machines, making it easier to get going with Pandas. They worked on the small tasks and exercises that Chang gave out as the session progressed.

Soon it was lunch time and Asheesh being in-charge of the food (and the finances), did an awesome job of keeping us well-fed - we had Vegitarian wraps, Egg wraps and Hummus wraps, and Salads. That was the first meal of the day for me and over lunch I got to know a nice group of interesting people; with the conversation meandering around scientific programming with Python, Julia and R-language, different programming environments, our offices, work, etc..

Small talk and big lunch over, it was now time to Sprint - not literally, just the mental hacking kind! Chang split us up into small groups of 2-3 people and it was very exciting to see the attendees pored over their machines, trying to tackle Pandas bugs.  Working in small groups of 2 (or 3) people meant Chang could walk around and talk to each group to help and guide them. He was ably aided by Asheesh who also went around helping other sprinters, answering questions, etc...

I was neck deep in the Pandas code and a flash went off - looked up to see Asheesh behind the lens. Reminded me that I had totally forgotten to click pictures. Having organized multiple workshops over the last few years, Asheesh was an experienced pro unlike the rookie (me) organizing her first event. Pictures speak a thousand words:
[0] https://plus.google.com/photos/113578342347990591936/albums/5823492237517007505?authkey=CIC53t-xnYGVZQ
[1] http://www.flickr.com/photos/paulproteus/sets/72157632277350121/detail/


The sprint went on till evening, when finally at 1745 hours, Pivotal Labs had to ask us to leave. Yeah, we had so much fun that they had to tell us it was time to go home !

For those who love numbers, enjoy these statistics. We had 31 registrations (Capped at 30, but we had a waiting list that accommodated the cancellations.) and 18 people attended the Pandas Workshop-Sprint, with 7 female hackers, which makes it a cool 39% female attendees :-))  Infact, three female researchers had to opt out due to other obligations during the holiday season. The most amazing email was from a person who missed the registration by a few minutes, wanting to drop by on Sunday morning hoping for last minute cancellations. _That_ was the kind of response I would have expected for a talk, never for a Sprint!

Ofcourse, this entire event would not have been possible without our generous sponsors. A huge Thank you to:
* Chang She for conducting the workshop.
* Pivotal Labs, our generous host for the day -Thanks JT for spending an entire Sunday with us.
* The Python Software Foundation, whose generous grant for "Breakfast+Lunch and Asheesh's travel from Boston", kept us fueled and
on track all day.
* O'reilly Media, who gave all attendees a free E-book copy of Wes McKinney's "Pandas for Data Analysis", including a 40% discount on the
print copy of Wes's book.

Thank You Everyone !


2012 Diciembre 4 [martes]

Announcing the Pandas Workshop Sprint

Positively thrilled to announce the one-day hands-on intensive Pandas workshop and sprint for new contributors with Chang She - a Pandas core-dev leading the sprint.  Its 4 am'ish and I just finished spamming a few mailing lists, IRC channels and thought I'll write a blog-post if I must be energetically expensive.

You can find the workshop details on the wiki: https://github.com/svaksha/PyData-Workshop-Sprint/wiki/2012-NYC but here is a short "how did it happen in a week recap". Last month, I had attended a day-long "Introduction to JavaScript" by JohnResig, and I enjoyed it. Later, I met some PyLadies and on the train ride home, I felt that we needed to have a proper workshop, core-dev in attendance, leading us along the way.

Given that there was a PyData conference in NY a few weeks ago, this was the place to be at, so I pinged the diversity list for speakers, and of course IRC - The response was phenomenal and unbelievable - People went out of their way to make my wish come true - they tweeted, emailed, chatted on IRC, gave me advice, introduced me to core-devs, volunteered for the event, pinged friends for hosting space, encouraged me to write to the PSF/sprints funding, ... and on and on.

I have so many people to thank that there will be a longer blog post, post the event  ...yeah, the list is long but maybe if I get started now (and my apologies if I have missed your name  ... feel free to gently lart me, its 4AM and I am sleep deprived :)) ...  Alphabetically-ordered XXXL THANK YOU'S to: Aahz, Asheesh, Brian, Carl, Chang, David, Diana, Jesse, Josh Knowles, Krissy, Meghan, Sheila, Steve, Wes.


2012 Noviembre 17 [sábado]

Pycon Canada 2012 in Toronto

import pycon
from pycommunity import AwesomePeople

canada = pycon.path.abspath(pycon.path.dirname(__file__))
README = open(pycon.path.join(canada, 'README.rst')).read()
__version__ = '0.01'

requires = [
    'diana',
    'daniel',
    'david',
    'kay',
'micheal',
    'nicola',
    'taavi',
    ]

Patches welcome!

Last weekend, at this moment, I was giving a technical talk at Pycon Canada, my first. Right now, I am still wallowing in the fun and warmth of friendships (some old, some new) that thawed the cold Canadian weather. It was the most mentally simulating, energy-packed experience I've had.  Oh, wait...I say that about all the PyCon conferences I attend - Well, this is my second PyCon but the first speaking gig, and it has, as before, been about meeting some of the smartest people and having the most intellectually simulating discussions with them, learning from them and having a whale of a time. Wish all my weekends were this much fUn! The Python community is known for just that - their fabulously fantastic community, which attracted me to the language (no, I love the syntax too) and has kept me hooked.

Thanks to the change in climate (thanks Sandy!), I had a migrane that got worse on the plane ride on Friday morning and I was much happier landing in a slightly warmer and dry climate in Toronto. Enjoyed the shortest ferry ride of my life and reached the Metropolitan Hotel by 2pm to find the Google goodie-bags waiting for us at the hotel room - such a nice surprise, thanks Google!  Went for a long walk in the afternoon - its a relief to be able to walk around and see the city and its inhabitants without men bumping into you, or tripping yourself over jutting stones on the sidewalk (erm...whenever Indian roads have a sidewalk), the calmness of being able to stop and click pictures without worrying about someone "accidentally" (it always is, isnt it?) feeling you up while you were just standing there admiring a monument ........ Oh, well... never mind, you get the picture!

Later that evening, there was a casual mixer event enabling attendees, speakers and some awesome sponsors (one of them being Google, whose Diversity grant made this conference a reality for me) to register, hang out, and chat before the conference, with food and drinks at the venue bar open to all... and oh, we ate some yummy cake. Mixers before your conference is a smart way to avoid the rush and long lines that will queue up to register on the morning of your conference, a nightmare if you are short on volunteers.

I managed to reach the venue thanks to Suzanne (who I randomly stopped on the road to ask for directions, instead she ended up dropping me off till the venue - its amazing how one meets kind souls), met Laura at the registration desk who saw that every attendee had their badges and tags. Nicola introduced me to Sheila, who suddenly morphed into a real person instead of an email address with a picture attached to it. In a global distributed space knit via bits and bytes, our identities are unequivocally tied to an email, twitter, G+/FB account now.

Met more interesting people and had the longest discussion with Mark Eichin and his friend Laura, on a range of technical topics, mobile technology, languages, and not excluding the mandatory talk about the DFSG and licenses in FOSS - talking legalese is the most important thing when you meet a DD (j/k). After the party, I returned to the room, met Laren, another diversity grant recipient room-sharing with me. By now, the pounding in my head was worse and the pain would not let me sleep, so I kept re-editing my slides till I was tired enough to sleep.

On Saturday morning - Day One of the conference, Laren and me walked over to the venue and I went of into the Green Room where all the speakers were pampered with food, some space to sit and work with you laptop, more food, chat with other speakers while having even more food, but I had no taste buds so I took three Advil's and gave my first technical talk.  That done, I was free to go and watch talks but instead I went off to be a volunteer - this is the easiest way to make friends with some really cool people within the community who welcome and appreciate your contribution and efforts. Its also very humbling to see the PyConCA board members and speakers who volunteered to carry in the lunch boxes the caterer had dropped off.

Post lunch, I attended the "Numerical and Scientific Computing with Python" tutorial by David, listened some great speakers, spoke to more people, had interesting discussions on NLP and linguistics with Mike and DWF, and before I knew it, it was the end of the day, which means more food - snacks and drinks were available at the bar. Did I mention that Pycon-CA pampers you with food and drinks all through the day. At every break, there was something to munch on. Every where I looked there were food boxes, fruits / salad boxes, cookies, coffee, tea, drinks, water bottles, cakes, tacos, samosas (I noticed that those ran out really quickly as compared to the salads which is not surprising), strawberry and chocolate, juice, .... ummm..ok, you get the picture. You were very well-fed and taken care of. At one point I counted the number of laptops Vs. the food boxes on the table. Guess which was outnumbered!?

Sunday morning, being the second and final day of the conference, I attended talks on Graph databases in Python and Persona (identity/privacy, which is important to me) and later, Greg Wilson and a bunch of speakers in the green room had an interesting conversation on education and knowledge (or the lack thereof) in the current education system, what role do Universities and schools have to play within the system - are they redundant with their monolithic rigid structures, MOOC's, their pro's and cons, and how the internet and technology is changing the education system, whether sites like Udacity and Coursera (did you know that their business model allows them to sell your personal details to publishers like McGraw Hill and their ilk, who have apparently signed on the dotted line) are imparting knowledge to their users and learners at the risk of their privacy? Where exactly is creativity, mental development, critical thought, knowledge and learning today? That was more food for thought than the food around the table. Post lunch, I morphed into a Runner - yeah, its that person who runs behind each speaker! Katie and me were deputed to the Main hall speakers and got to see all the talks, including lightning talks, ending with Fernando's (not-to-be-missed) closing keynote.
Videos:
No matter how hard you try, you cannot attend every fantastic talk out there. When Carl sent across the video link to me, I was stunned by the excellent production quality. The first thought that crossed my mind was "Wow, that is a second career right there" and sure enough it is - these excellent videos are brought to you by nextdayvideo.com :

* Taavi showing you how pandas get a workout
* Elizabeth Leddy rocking the Main Hall
* Did you Test today?
* No conference is complete without a talk on "BigData"
* Brandon Rhodes on why he thinks Python is beautiful (a must see if you are a beginner to Python)

Wow, this post has gotten too long. Among all the things, I admire the organizational abilities of the board the most. The conference had awesome sponsors too, one of them being Google, whose Diversity grant made it possible for me to attend the event. Initially, when my talk was accepted, I had planned book the bus tickets in advance so that I could stretch the grant money to enable me to attend both the days of the conference. When I mentioned this to Diana, she worked her magic, enabling me to cover my flight bookings and also the hotel stay within the grant. Amazing team! Kudos to the PyCon-Canada team.

2010 Octubre 9 [sábado]

PyDojo-20101008

As per the schedule, we had the first dojo meet at CIS yesterday. Met Satish Kumar while searching for the CIS office and a helpful biker who cursed google-maps actually guided us there as we were both relying on the wrong geo-location plots on Google-maps (openstreetmap someone?)...as if the city's whimsical penchant for one-way roads was not irritating enough. There is an interesting anecdote --the biker who guided us there took us to the exact building and i asked him how he knew the place when 'CIS' didnt strike a memory chord. He promptly replied that there was a foreigner (he used the term 'white') who worked at CIS whom he has seen around town. Ah! There is something about finding your way around Indian roads, something to be said about the human touch that google-maps or other tech gadgets cannot compete with.

The CIS staff were very helpful and Royson immediately arranged refreshments and we both started off discussing what the dojo was all about -- many dojo participants around the world were nice enough to have a discussion on how they did things, what worked and didnt -- so it being the first day we had time to discuss how to structure it or not to have a structure at all, etc... In the middle of this discussion NigelB and Akshay Gandhi walked in and the discussion veered to the RHCE course he had joined. Later Nigel showed us the git graph he was working on. We had a longish discussion on git, bug trackers, communities and it was 8.45pm when we left, but not before planning to meet next week to work on nltk at 7pm same place. Join us!

I'm was multi-tasking --listening to a IE9 product pitch for html5/css3, while typing this entry, so any errors and missing information can be attributed to the much tortured greycells. </excuse>

2010 Septiembre 30 [jueves]

Weekly Python-Dojo at Bangalore

In an IRC discussion this week, I suggested we kick-start a weekly python-dojo meet-up in Bangalore. Sunil Abraham of CIS was kind enough to donate their office space and even offered to sponsor the java (pun unintended). Thanks Sunil/CIS.

So here's the plan for weekly python-dojo sessions in Bangalore,

WHAT: Weekly python-dojo sessions in Bangalore which is inspired by dojorio (english translation) meetups in Brazil where they apply the "small acts manifesto". The idea is to create a friendly atmosphere which encourages "beginners" (...and experts and everyone in between) to share and learn with the community. Please bring your laptops/netbooks etc.. as the dojo will be hands-on where we will work on small problems that exist in FLOSS software which automatically helps us learn a lot more about our system. Folks that dont have laptops are also welcome -- atm, we cant provide machines to work on but you can watch others, ask questions, learn, and later try it out at home.

WHO can participate: ANYONE. Absolutely anyone can walk in and participate at the venue. There is no registration fee or cost (except your time and travel costs perhaps?). There is no agenda either -- please note that the environment would be similar to that of an unconference. There is no formal teaching involved. We are all learners here and you are free to ask any python-related question.

WHERE: The Centre for Internet and Society (google map link)
No. 194, 2nd 'C' Cross, Domlur 2nd Stage, Bangalore 560 071

WHEN: 7pm-8pm every Friday. We start from next week, 08Oct2010.

So if you are interested in python, dont hesitate to join us for the weekly dojo sessions and do spread the word -- dent/tweet, blog and mail your friends about the weekly dojo meetups.

PS: If anyone (women in particular) feels the evening timings are rather late for traveling please feel free to suggest a more convenient day (sat/sun?) and time <-- its not set in stone and suggestions are welcome.

2010 Septiembre 25 [sábado]

PyCon-IN-2010

Kinda sad to see all the effort put into a complete community volunteer-driven event almost come to a standstill under the shadow of local communal politics -- the Ayodhya verdict. Given that I missed last years even for personal reasons, it seemed the Ayodhya verdict would be the roadblock this year. Not.

Today, David Goodger kicked off the second Pycon-India 2010 in Bangalore with his keynote speech while briefly dwelling on his Indian 'adventure' -- no seat-belts in the autorickshaw!? The auditorium hall echoed with laughter!  Then it was a series of talks on python 2to3, multicore programming, and many more talks .... The only irritating part during one talk was one audience member interrupting the speaker to discuss the topic/ask questions. Probably this resulted in the speaker not getting enough time to finish his talk and demo the code completely. In a 30-min talk it would be a lot nicer if the audience restricted their questions to the last few minutes *after* the speaker completes the talk.

Another interesting talk was the screen scraping talk but I'll return to my lazyshell under the pretext that the videos will probably be uploaded online in a few days. Else, you could just attend the second day of pycon coz the nicest part was good 'ol networking, old friends, meeting new ones and the barcamp style corridor chats with people. Considering that the attendees were almost 500+, the inpycon team really pulled off a community event quite successfully! Now I gotta get some sleep if I need to make it for tomorrows event!



2010 Septiembre 24 [viernes]

CFP - PyCon 2011

Call for proposals -- PyCon 2011 -- http://us.pycon.org/2011/

Proposal Due date: November 1st, 2010

PyCon is back! With a rocking new website, a great location and more Python hackers and luminaries under one roof than you could possibly shake a stick at. We've also added an "Extreme" talk track this year - no introduction, no fluff - only the pure technical meat!

PyCon 2011 will be held March 9th through the 17th, 2011 in Atlanta, Georgia. (Home of some of the best southern food you can possibly find on Earth!) The PyCon conference days will be March 11-13, preceded by two tutorial days (March 9-10), and followed by four days of development sprints (March 14-17).

PyCon 2011 is looking for proposals for the formal presentation tracks (this includes "extreme talks"). A request for proposals for poster sessions and tutorials will come separately.

Want to showcase your skills as a Python Hacker? Want to have hundreds of people see your talk on the subject of your choice? Have some hot button issue you think the community needs to address, or have some package, code or project you simply love talking about? Want to launch your master plan to take over the world with Python?

PyCon is your platform for getting the word out and teaching something new to hundreds of people, face to face.

In the past, PyCon has had a broad range of presentations, from reports on academic and commercial projects, tutorials on a broad range of subjects, and case studies. All conference speakers are volunteers and come from a myriad of backgrounds: some are new speakers, some have been speaking for years. Everyone is welcome, so bring your passion and your code! We've had some incredible past PyCons, and we're looking to you to help us top them!

Online proposal submission is open now! Proposals  will be accepted through November 10th, with acceptance notifications coming out by January 20th. To get started, please see:    <http://us.pycon.org/2011/speaker/>

For videos of talks from previous years - check out:   <http://python.mirocommunity.org/category/conferences>

For more information on "Extreme Talks" see:   <http://us.pycon.org/2011/speaker/extreme/>

We look forward to seeing you in Atlanta!

Please also note - registration for PyCon 2011 will also be capped at a maximum of 1,500 delegates, including speakers. When registration opens (soon), you're going to want to make sure you register early! Speakers with accepted talks will have a guaranteed slot.

Important Dates:
  * November 1st, 2010: Talk proposals due.
  * December 15th, 2010: Acceptance emails sent.
  * January 19th, 2010: Early bird registration closes.
  * March 9-10th, 2011: Tutorial days at PyCon.
  * March 11-13th, 2011: PyCon main conference.
  * March 14-17th, 2011: PyCon sprints days.

Contact Emails:
  Van Lindberg (Conference Chair) - van@python.org
  Jesse Noller (Co-Chair) - jnoller@python.org
  PyCon Organizers list: pycon-organizers@python.org

2010 Julio 25 [domingo]

Selenium RC and Python client

Selenium is quite a famous testing tool and has a lot of documentation so I wont bother to repeat stuff from there, rather just focus on the bits where I feel the documentation could improve.

STEP#0.  After downloading selenium remote-control change to the directory where you extracted it. {Btw, to install selenium on your local machine, download selenium from here.}

~$ cd selenium-remote-control-1.0.3/
~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar selenium-server.jar
09:03:05.618 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:05.638 INFO - OS: Linux 2.6.24-28-generic i386
09:03:05.722 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:06.304 INFO - RemoteWebDriver instances should connect to: http://192.168.1.5:4444/wd/hub
09:03:06.307 INFO - Version Jetty/5.1.x
09:03:06.311 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:06.324 INFO - Started HttpContext[/selenium-server,/selenium-server]
09:03:06.324 INFO - Started HttpContext[/,/]
09:03:06.381 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:06.382 INFO - Started HttpContext[/wd,/wd]
09:03:06.399 INFO - Started SocketListener on 0.0.0.0:4444
09:03:06.400 INFO - Started org.openqa.jetty.jetty.Server@228a02

I wanted to run the python script from the console and each time it would stop here and I'd be waiting and nothing would happen.....How do I run the script without a command prompt. So then, I'd interrupt it with 'ctrl C' to get a  "09:03:17.439 INFO - Shutting down...12:39:08.573 INFO - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=4444]

That "shutting down" message was odd -- how would you run a process if it was shutting down? What the logs above dont say is "The selenium server must be running so keep that process open. Open ANOTHER terminal window and run your python script there". The documentation didnt explicitly mention that localhost must keep the server running in the background-- Its one of the most basic client-server concepts but when you are running stuff on localhost, your client and server are one and the same. Being explicit with this trivia in the documentation would have helped me not waste hundreds of hours searching the selenium website and reading irrelevant blogs which google threw up, irc, emails, etc... So, in TerminalOne,


:~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar selenium-server.jar
09:03:05.618 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:05.638 INFO - OS: Linux 2.6.24-28-generic i386
09:03:05.722 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:06.304 INFO - RemoteWebDriver instances should connect to: http://192.168.1.5:4444/wd/hub
09:03:06.307 INFO - Version Jetty/5.1.x
09:03:06.311 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:06.324 INFO - Started HttpContext[/selenium-server,/selenium-server]
09:03:06.324 INFO - Started HttpContext[/,/]
09:03:06.381 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:06.382 INFO - Started HttpContext[/wd,/wd]
09:03:06.399 INFO - Started SocketListener on 0.0.0.0:4444
09:03:06.400 INFO - Started org.openqa.jetty.jetty.Server@228a02
09:03:17.439 INFO - Shutting down...
mom@drga:~/selenium-remote-control-1.0.3/selenium-server-1.0.3$ sudo java -jar selenium-server.jar
09:03:36.248 INFO - Java: Sun Microsystems Inc. 1.6.0_0-b11
09:03:36.252 INFO - OS: Linux 2.6.24-28-generic i386
09:03:36.270 INFO - v2.0 [a2], with Core v2.0 [a2]
09:03:36.486 INFO - RemoteWebDriver instances should connect to: http://192.168.1.5:4444/wd/hub
09:03:36.489 INFO - Version Jetty/5.1.x
09:03:36.491 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
09:03:36.493 INFO - Started HttpContext[/selenium-server,/selenium-server]
09:03:36.493 INFO - Started HttpContext[/,/]
09:03:36.523 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@12d15a9
09:03:36.523 INFO - Started HttpContext[/wd,/wd]
09:03:36.533 INFO - Started SocketListener on 0.0.0.0:4444
09:03:36.533 INFO - Started org.openqa.jetty.jetty.Server@228a02
09:04:30.236 INFO - Checking Resource aliases
09:04:30.260 INFO - Command request: getNewBrowserSession[*firefox, http://localhost:4444, ] on session null
09:04:30.283 INFO - creating new remote session
09:04:30.614 INFO - Allocated session 7cba6a7dadb243618c046ee7fb6c6bc9 for http://localhost:4444, launching...
09:04:30.778 INFO - Preparing Firefox profile...
09:04:34.676 INFO - Launching Firefox...
09:04:38.697 INFO - Got result: OK,7cba6a7dadb243618c046ee7fb6c6bc9 on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.715 INFO - Command request: open[/selenium-server/tests/html/test_click_page1.html, ] on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.854 INFO - Got result: XHR ERROR: URL = http://localhost:4444/selenium-server/tests/html/test_click_page1.html Response_Code = 404 Error_Message = Not+found on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.863 INFO - Command request: testComplete[, ] on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:04:38.863 INFO - Killing Firefox...
09:04:38.933 INFO - Got result: OK on session 7cba6a7dadb243618c046ee7fb6c6bc9
09:09:28.085 INFO - Command request: getNewBrowserSession[*firefox, http://www.irian.at, ] on session null
09:09:28.086 INFO - creating new remote session
09:09:28.088 INFO - Allocated session 97dec9f0b53545acbc9ca3624fc6cbd4 for http://www.irian.at, launching...
09:09:28.165 INFO - Preparing Firefox profile...
09:09:31.873 INFO - Launching Firefox...
09:09:35.599 INFO - Got result: OK,97dec9f0b53545acbc9ca3624fc6cbd4 on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:35.604 INFO - Command request: open[http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html, ] on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.698 INFO - Got result: XHR ERROR: URL = http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html Response_Code = 404 Error_Message = Not Found on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.707 INFO - Command request: testComplete[, ] on session 97dec9f0b53545acbc9ca3624fc6cbd4
09:09:41.707 INFO - Killing Firefox...
09:09:41.740 INFO - Got result: OK on session 97dec9f0b53545acbc9ca3624fc6cbd4
10:18:38.252 INFO - Command request: getNewBrowserSession[*firefox, http://www.google.com/, ] on session null
10:18:38.253 INFO - creating new remote session
10:18:38.254 INFO - Allocated session c4b9c7f35ea34d428b50f2f31a6181c2 for http://www.google.com/, launching...
10:18:38.322 INFO - Preparing Firefox profile...
10:18:41.921 INFO - Launching Firefox...
10:18:45.741 INFO - Got result: OK,c4b9c7f35ea34d428b50f2f31a6181c2 on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:45.800 INFO - Command request: open[http://www.google.com/, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.204 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.211 INFO - Command request: type[q, hello world] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.277 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.282 INFO - Command request: click[btnG, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.334 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:47.340 INFO - Command request: waitForPageToLoad[5000, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.359 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.365 INFO - Command request: getTitle[, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.411 INFO - Got result: OK,hello world - Google Search on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.416 INFO - Command request: testComplete[, ] on session c4b9c7f35ea34d428b50f2f31a6181c2
10:18:48.417 INFO - Killing Firefox...
10:18:48.434 INFO - Got result: OK on session c4b9c7f35ea34d428b50f2f31a6181c2


ALL this happens on TerminalOne, so keep that window open to check for the above while you are doing steps below.

STEP#1. In TerminalTwo, Change directory to the 'python-client' to run your scripts. Lets test the selenium.py script first. Btw, note that your bash file must contain the PYTHONPATH for all the directories that you run .py scripts from.

:~/selenium-remote-control-1.0.3$ ls
README.txt  selenium-php-client-driver-1.0.1  selenium-dotnet-client-driver-1.0.1  selenium-python-client-driver-1.0.1
selenium-java-client-driver-1.0.1  selenium-ruby-client-driver-1.0.1  selenium-perl-client-driver-1.0.1    selenium-server-1.0.3

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python selenium.py

If it returns silently (read, No errors), it means your selenium server is working.

STEP#2
. Try testing another script, test_google.py or test_default_server.py

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ ls
doc    test_ajax_jsf.py  test_google.py~    selenium.py  test_ajax_jsf.pyc  test_google.pyc selenium.pyc                     test_default_server.py   test_i18n.py  selenium_test_suite_headless.py  test_default_server.pyc  test_i18n.pyc
selenium_test_suite.py  test_google.py

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python test_default_server.py
Using selenium server at localhost:4444
E
======================================================================
ERROR: testLinks (__main__.TestDefaultServer)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_default_server.py", line 36, in testLinks
    selenium.open("/selenium-server/tests/html/test_click_page1.html")
  File "/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py", line 764, in open
    self.do_command("open", [url,])
  File "/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py", line 215, in do_command
    raise Exception, data
Exception: XHR ERROR: URL = http://localhost:4444/selenium-server/tests/html/test_click_page1.html Response_Code = 404 Error_Message = Not+found

----------------------------------------------------------------------
Ran 1 test in 8.852s

FAILED (errors=1)

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python test_ajax_jsf.py
Using selenium server at localhost:4444
E
======================================================================
ERROR: testKeyPress (__main__.TestAjaxJSF)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_ajax_jsf.py", line 39, in testKeyPress
    selenium.open("http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html")
  File "/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py", line 764, in open
    self.do_command("open", [url,])
  File "/home/me/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1/selenium.py", line 215, in do_command
    raise Exception, data
Exception: XHR ERROR: URL = http://www.irian.at/selenium-server/tests/html/ajax/ajax_autocompleter2_test.html Response_Code = 404 Error_Message = Not Found

----------------------------------------------------------------------
Ran 1 test in 13.663s

FAILED (errors=1)

:~/selenium-remote-control-1.0.3/selenium-python-client-driver-1.0.1$ python test_google.py
.
----------------------------------------------------------------------
Ran 1 test in 10.190s

OK

When you are running the above scripts you would see Selenium throw a browser with messages but this is too fast and disappears. In the second terminal,   run your scripts from the directory you've stored them in.

 

2010 Julio 14 [miércoles]

meld it


All *nix machines have the feature allowing you to compare two files --often useful to do a quick 'cmp' or 'diff' on the cli for a file comparision --a good feature for a small script file or documents. However, if you want to compare chunks of code, between two versions, then the readability isnt optimal.

Meld to the rescue!

Meld is a visual diff and merge tool which allows you to compare two or three files located in different directory paths on your local machine and edit them. It allows comparison of upto three folders.

I love useful software written in Python using the PyGTK toolkit. Meld has been packaged for Ubuntu and "sudo apt-get-install meld" would install this small utility which can be accessed via: Application >Programming >Meld Diff Viewer.

Its that simple.

- página 1 de 3