From sajuptpm at gmail.com Thu Oct 6 06:54:06 2011 From: sajuptpm at gmail.com (Saju M) Date: Thu, 6 Oct 2011 10:24:06 +0530 Subject: [Ncr-Python.in] selenium pyvirtualdisplay script on remote server Message-ID: Hi friends, selenium pyvirtualdisplay script on remote server Here the isuue is i can't find the "li" element. that is because that element is out of display, so i adjust scroll bar or do focus around that area to get that element via find_element_by_id("loc_opt") I already tested with scroll bar and focus and its working finw in my laptop. But when i run this script on Remote Server, it can't find that element.?????? Note: Here i am using pyvirtualdisplay, Xvfb and Xephyr, because server don't have Xserver. Its also working fine with pyvirtualdisplay in my laptop. but the issue is in Remote Server. Has anyone faced this problem before ? Please suggest a solution. class Search: def __init__(self): """ """ self.display = Display(visible=0, size=(800, 600)) self.display.start() self.url ='http://www.google.com' self.search_url = None self.driver = webdriver().Firefox() def search(self, search_query, search_location=None): """ """ if search_query: self.search_url = "%s/search?q=%s" %(self.url, search_query) print "\nURL : ", self.search_url self.driver.get(self.search_url) self.submit_search() #self.driver.execute_script("window.scrollBy(0,200)") self.driver.execute_script("document.getElementById('tbpi').focus();") more_search_tools_link = self.driver.find_element_by_id("tbpi") more_search_tools_link.click() self.driver.execute_script("window.scrollBy(0,200)") loc_li = self.driver.find_element_by_id("loc_opt") From richnusgeeks at gmail.com Tue Oct 11 04:07:00 2011 From: richnusgeeks at gmail.com (Ankur Sharma) Date: Tue, 11 Oct 2011 07:37:00 +0530 Subject: [Ncr-Python.in] hands on tutorial for Tweaking Terminals/Bash and Console mode GUIs Message-ID: Hi All, Here are the links to read online / download the print article published in Linux for You magazine to hack into Terminals and Console mode GUIs. http://bit.ly/oGZLmZ http://bit.ly/o3vL5M -- Regards, Ankur -------------------------------------------------------- RichNusGeeks Creatives where technologies meet creativity www.richnusgeeks.com www.richnusgeeks.wordpress.com -------------------------------------------------------- IMPORTANT NOTICE: This message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by email and delete the message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From navkapil at gmail.com Sat Oct 15 13:17:22 2011 From: navkapil at gmail.com (Kapil Gupta) Date: Sat, 15 Oct 2011 16:47:22 +0530 Subject: [Ncr-Python.in] Can somebody clarify on this problem while loading libsvm.dll Message-ID: Hi, Need your help in understanding the below dump at python prompt Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "F:\libsvm-3.0\python\libsvr_real_world.py", line 1, in from svm import * File "F:\libsvm-3.0\python\svm.py", line 14, in libsvm = CDLL('../windows/system32/libsvm.dll') File "C:\Python27\lib\ctypes\__init__.py", line 353, in __init__ self._handle = _dlopen(self._name, mode) WindowsError: [Error 126] The specified module could not be found -- Regards Kapil ~ -------------- next part -------------- An HTML attachment was scrubbed... URL: From noufal at gmail.com Sat Oct 15 13:26:20 2011 From: noufal at gmail.com (Noufal Ibrahim) Date: Sat, 15 Oct 2011 16:56:20 +0530 Subject: [Ncr-Python.in] Can somebody clarify on this problem while loading libsvm.dll In-Reply-To: (Kapil Gupta's message of "Sat, 15 Oct 2011 16:47:22 +0530") References: Message-ID: <87y5wmjy1v.fsf@sanitarium.localdomain> Kapil Gupta writes: > Hi, > Need your help in understanding the below dump at python prompt > > > > > Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)] on > win32 > Type "copyright", "credits" or "license()" for more information. >>>> ================================ RESTART > ================================ >>>> > > Traceback (most recent call last): > File "F:\libsvm-3.0\python\libsvr_real_world.py", line 1, in > from svm import * > File "F:\libsvm-3.0\python\svm.py", line 14, in > libsvm = CDLL('../windows/system32/libsvm.dll') > File "C:\Python27\lib\ctypes\__init__.py", line 353, in __init__ > self._handle = _dlopen(self._name, mode) What's the value of self._name here? The error is probably due to a bad filename. -- ~noufal http://nibrahim.net.in This report is filled with omissions. From asif.jamadar at rezayat.net Thu Oct 20 21:00:53 2011 From: asif.jamadar at rezayat.net (Asif Jamadar) Date: Thu, 20 Oct 2011 19:00:53 +0000 Subject: [Ncr-Python.in] Generate Dynamic lists Message-ID: So I'm trying to generate dynamic choices for django form. Here i'm usig formset concept (CODE is mentioned below) Suppose i have list called criteria_list = ['education', 'know how', 'managerial', 'interpersonal', ] now i need to generate choices as follows list1 = [('education', 1), ('education', 2), ('education', 3), (''education' , 4) , ('know how', 1) ('know ho', 2), ('know ho', 3), ('know ho', 4)] list2 = [('education', 1), ('education', 2), ('education', 3), (''education' , 4) , ('managerial', 1) ('managerial', 2), ('managerial', 3), ('managerial', 4)] list3 = [('education', 1), ('education', 2), ('education', 3), (''education' , 4) , ('interpersonal', 1) ('interpersonal', 2), ('interpersonal', 3), ('interpersonal', 4)] list4 = [('know how', 1), ('know how', 2), ('know how ', 3), ('know how' , 4) , ('managerial', 1) ('managerial', 2), ('managerial', 3), ('managerial', 4)] list5 = [('know how', 1), ('know how', 2), ('know how ', 3), ('know how' , 4) , ('interpersonal', 1) ('interpersonal', 2), ('interpersonal', 3), ('interpersonal', 4)] list6= [('managerial', 1), ('managerial', 2), ('managerial ', 3), ('managerial' , 4) , ('interpersonal', 1) ('interpersonal', 2), ('interpersonal', 3), ('interpersonal', 4)] How can i achive this in python? The above all eachh list become the choices for each form. Suppose i have formset of 6 forms. Then how can i assign above dynamic generates list to the choice field of each form. I tried by using this following code but no luck view.py def evaluation(request): evaluation_formset = formset_factory(EvaluationForm, formset=BaseEvaluationFormset, extra=6) if request.POST: formset = evaluation_formset(request.POST) ##validation and save else: formset = evaluation_formset() render_to_response(formset) forms.py class EvaluationForm(forms.Form): value = forms.ChoiceField(widget=forms.RadioSelect(renderer=HorizontalRadioRenderer)) class BaseEvaluationFormSet(BaseFormSet): def __init__(self, *args, **kwargs): super(BaseEvaluationFormSet, self).__init__(*args, **kwargs) for form_index, form in enumerate(self.forms): form.fields["value"].choices = self.choice_method(form_index) def choice_method(self, form_index): list = [] item_list = [] criteria_list = [] criteria_length = len(sub_criterias)-1 for criteria_index in range(criteria_length): counter = 1 if criteria_index == form_index: for j in range(criteria_length-counter): x = 1 for i in range(6): criteria_list.append((sub_criterias[criteria_index], sub_criterias[criteria_index])) item_list.append((sub_criterias[criteria_index+ 1], sub_criterias[criteria_index+1])) list = criteria_list +item_list counter = counter + 1 if x != criteria_length: x = x + 1 return list -------------- next part -------------- An HTML attachment was scrubbed... URL: From parth at fossee.in Thu Oct 20 22:10:36 2011 From: parth at fossee.in (Parth Buch) Date: Fri, 21 Oct 2011 01:40:36 +0530 Subject: [Ncr-Python.in] SciPy India 2011 Call for Presentations In-Reply-To: References: Message-ID: =============================== SciPy 2011 India Call for Papers =============================== The third `SciPy India Conference `_ will be held from December 4th through the 7th at the `Indian Institute of Technology, Bombay (IITB) `_ in Mumbai, Maharashtra India. At this conference, novel applications and breakthroughs made in the pursuit of science using Python are presented. Attended by leading figures from both academia and industry, it is an excellent opportunity to experience the cutting edge of scientific software development. The conference is followed by two days of tutorials and a code sprint, during which community experts provide training on several scientific Python packages. We invite you to take part by submitting a talk abstract on the conference website at: http://scipy.in Talk/Paper Submission --------------------- We solicit talks and accompanying papers (either formal academic or magazine-style articles) that discuss topics regarding scientific computing using Python, including applications, teaching, development and research. We welcome contributions from academia as well as industry. Keynote Speaker --------------- Eric Jones will deliver the keynote address this year. Eric has a broad background in engineering and software development and leads Enthought's product engineering and software design. Prior to co-founding Enthought, Eric worked with numerical electromagnetics and genetic optimization in the Department of Electrical Engineering at Duke University. He has taught numerous courses on the use of Python for scientific computing and serves as a member of the Python Software Foundation. He holds M.S. and Ph.D. degrees from Duke University in electrical engineering and a B.S.E. in mechanical engineering from Baylor University. Eric was the Keynote Speaker at SciPy US 2011. Important Dates --------------- October 26, 2011, Wednesday: Abstracts Due October 31, 2011, Monday: Schedule announced November 21, 2011, Monday: Proceedings paper submission due December 4-5, 2011, Sunday-Monday: Conference December 6-7 2011, Tuesday-Wednesday: Tutorials/Sprints Registration ---------------- Registration now open. Register on or before 31th October 2011 and avail early bird discount Organizers ---------- * Jarrod Millman, Neuroscience Institute, UC Berkeley, USA (Conference Co-Chair) * Prabhu Ramachandran, Department of Aerospace Engineering, IIT Bombay, India (Conference Co-Chair) * FOSSEE Team --------------- Follow us on http://twitter.com/scipydotin Like us on http://facebook.com/scipydotin2011 ---------------------------------------- Regards Parth buch - FOSSEE Team Research Assistant FOSSEE Project IIT Bombay http://fossee.in -------------- next part -------------- An HTML attachment was scrubbed... URL: