text
stringlengths
226
34.5k
Selenium (Python): How to insert value on a hidden input? Question: I'm using Selenium's WebDriver and coding in Python. There's a hidden input field in which I'm trying to insert a specific date value. The field originally produces a calendar, from which a user can select an appropriate date, but that seems like a mo...
Retrieving comments using python libclang Question: In the following header file I'd like to get the corresponding `+reflect` comment to the class and member variable: #ifndef __HEADER_FOO #define __HEADER_FOO //+reflect class Foo { public: private: int m_...
What does the `as` command do in Python 3.x? Question: I've seen it many times but never understood what the `as` command does in Python 3.x. Can you explain it in plain English? Answer: It's not a command per se, it's a keyword used as part of the [`with` statement](http://docs.python.org/2/reference/compound_stmts....
How to pull info from a string and output it? Question: I have to create a game where the computer picks a random word and the player has to guess that word. The computer tells the player how many letters are in the word. Then the player gets five chances to ask if a letter is in the word. The computer can only respond...
Can literals in Python be overridden? Question: Couldn't find a way to phrase the title better, feel free to correct. I'm pretty new to Python, currently experimenting with the language.. I've noticed that all built-ins types cannot be extended with other members.. I'd like for example to add an `each` method to the `...
Finding the mode and frequency of items in a Python list Question: How would you find the mode and frequency of items in a Python list? This is what I have so for: elif user_option == 7: for score in scores_list: count = scores_list.count(score) print ("mode(s), occuring"...
How to load data in Python for which data is stored as a customized class Question: I have a question with loading data in Python. Basically, I defined all Classes I need in a file called "utility.py". and I have one data file "result.data" which stores results in form of a specific class called "Solution" which is de...
Can pip (or setuptools, distribute etc...) list the license used by each installed package? Question: I'm trying to audit a Python project with a large number of dependencies and while I can manually look up each project's homepage/license terms, it seems like most OSS packages should already contain the license name a...
Error: [only length-1 arrays can be converted to Python scalars] when changing variable order Question: Dear Stackoverflow Community, I am very new to Python and to programming in general, so please don't get mad when I don't get your answers and ask again. I am trying to fit a curve to experimental data with scipy.o...
What does [^.]* mean in regular expression? Question: I'm trying to get 482.75 from the following text: `<span id="yfs_l84_aapl">482.75</span>` The regex I used is: `regex = '<span id="yfs_l84_[^.]*">(.+?)</span>'` and it worked. But the thing that I do not understand is why [^.]* can match aapl here? My understandin...
Call oracle stored procedure with cursor output parameter from python script Question: I am trying to call a oracle stored procedure with 2 in and 1 out parameter from python script. The problem I am having is passing a cursor out-parameter. The Oracle stored procedure is essentially: PROCEDURE ci_lac...
Launching a cmd window with commands using python script? Question: How do I launch a cmd window and input the commands i specify into the cmd for windows using a python script? For example , the script will launch the cmd and input the following : runas /username:Admin control Then cmd will then prompt the user for ...
Prevent CSS/other resource download in PhantomJS/Selenium driven by Python Question: I'm trying to speed up Selenium/PhantomJS webscraper in Python by preventing download of CSS/other resources. All I need to download is img src and alt tags. I've found this code: page.onResourceRequested = function(requ...
Python Decorator Self-firing Question: I am fairly new to Python and have been learning about decorators. After messing around with Flask, I am trying to write some code that simulates their route handler/decorators, just to understand how decorators (with arguments) work. In the code below, the route decorator seems ...
Import statement: Config file Python Question: I'm maintaining a dictionary and that is loaded inside the config file. The dictionary is loaded from a JSON file. **In config.py** name_dict = json.load(open(dict_file)) I'm importing this config file in several other scripts(file1.py, file2.py,...,f...
Python Fabric Git Pull Merge Message Question: I've got **Python Fabric** running nicely, however **I have one problem**. When doing `$ fab deploy` I always get a **Merge popup** Please enter a commit message to explain why this merge is necessary, especially if it merges an updated upstream into a t...
Not able to import getpass in python Question: I have a requirement to input username and password from the console. For the password I am using password = getpass.getpass('Enter password') I have used `import getpass` But getting ImportError : no module named getpass Also trie...
TypeError: 'Undefined' object is not iterable? Question: The following is the mako template I have created <%inherit file="/openerp/controllers/templates/base_dispatch.mako"/> <%def name="header()"> <title>${_("Otp")}</title> <script type="text/javascript">alert("OTP PAGE");</script> ...
Trying to run KIVY, for the first time Question: I'm trying to run kivy for the first time. Im using a default program. from kivy.app import App from kivy.uix.widget import Widget class PongGame(Widget): pass class PongApp(App): def build(self): ...
Create name value pairs in python Question: I have a python script that has the following output stored in a variable called jvmData: Stats name=jvmRuntimeModule, type=jvmRuntimeModule# { name=HeapSize, ID=1, description=The total memory (in KBytes) in the Java virtual machine run time., unit=KIL...
Python dealing with months and years in arrays Question: newbie question, I have three arrays, one with years, one with months and one with my data. The years array has which year the data occurs in, but as the data is collected monthly, I have a lot of repeat years, eg `[1996,1997,...,1997,1998,...,1998,1999 etc]` ...
Python-Twitter script works at home and not at University. Deadline REALLY soon Question: I've written quite a simple python script that pulls in tweets and turns on a GPIO if a filter is matched. I've tried it at home and it works really well, however, on the University network it seems not to be able to connect to tw...
Fast peak-finding and centroiding in python Question: I am trying to develop a fast algorithm in python for finding peaks in an image and then finding the centroid of those peaks. I have written the following code using the scipy.ndimage.label and ndimage.find_objects for locating the objects. This seems to be the bott...
easy_install virtualenvwrapper error in CentOS 5.8 64bit Question: Installed Python 2.6.1 (with /opt prefix), setuptools 0.6c9, and virtualenv onto CentOS 5.8 64bit.(I was mostly following the instructions from here: <http://bda.ath.cx/blog/2009/04/08/installing-python-26-in-centos-5-or- rhel5/comment-page-1/#comment-1...
Django app missing after import? Question: I'm working on a django project using win7 with aptana3/pydev . I have a project called mytest and I'm trying to import an app called 'django-mailbox' into my project (<http://django- mailbox.readthedocs.org/en/latest/topics/installation.html>) Following the directions I perf...
Jquery ajax with google app engine post method Question: Just trying to learn using ajax with appengine,started with the post method,but it does not work. This is my HTML Code for the page <html> <head> <title> Hello </title> <script src="http://ajax.googleapis.com/ajax/libs/jque...
Django: ImproperlyConfigured: The SECRET_KEY setting must not be empty Question: I am trying to set up multiple setting files (development, production, ..) that include some base settings. Cannot succeed though. When I try to run `./manage.py runserver` I am getting the following error: (cb)clime@den /sr...
TypeError: '_csv.reader' object has no attribute '__getitem__' // getting columns? Question: I'm trying to open a .csv file and put each column in different list: import csv CSV = csv.reader(open("AAPL.csv","rb")) column1 = CSV[0] column2 = CSV[1] column3 = CSV[2] column4 = CSV[2] ...
Python - Formatting specific data within text files Question: I have a number of log files I need extract and format data. some of these log files are very big with over 10,000 lines. can anyone suggest a code sample to help me read a text file, remove unwanted lines, then edit the remaining lines into a particular fo...
numpy unique strange behaviour Question: according to the official numpy.unique documentation (<http://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html>) return_index=True should allow me to recover the first occurrences of elements in an array. However, this does not work for this simple example: ...
Importing a class into another class in Python Question: as I'm still learning python I came up to a problem. Why does this work: class SomeOtherClass(object): def __init__(self): self.number = 10 print(self.number) def increase(self): self.number...
python itertools: Using cycle with islice Question: Question: I have the code below. I want to know why does it not matter whether or not I include the line with the comment in the code below. #!/usr/bin/env python from itertools import * import time cc = cycle([ iter([1,2,3]), iter([4]...
Python object encapsulation security Question: I have a question, and my decision in choosing Python as a possible language for a bigger project depends on the answer - which I cannot come up with myself: We all know that Python has no _real_ object encapsulation, so there is nothing like "private" properties of an ob...
Setting python path for WinPython to use f2py Question: I installed the Winpython distribution on my copy of Windows 7. Launching iPython consoles and other items from the distribution from within the folder it copied to works fine. I'd like to use the f2py module from numpy to be able to call Fortran subroutines from...
Unit test in aptana studio 3 Question: How do you run a Unit test on your class creation in aptana studio 3 on a python format class. I am wondering if I am supposed to add something to my code or is there a function in aptana studio that does it for you. Answer: Aptana Studio does not have a special test mode like P...
Regular Expressions using Substitution to convert numbers Question: I'm a Python beginner, so keep in mind my regex skills are level -122. I need to convert a string with text containing `file1` to `file01`, but not convert `file10` to `file010`. My program is wrong, but this is the closest I can get, I've tried doze...
twisted reactor.spawnProcess get stdout w/o bufffering on windows Question: I'm running an external process and I need to get the stdout immediately so I can push it to a textview, on GNU/Linux I can use "usePTY=True" to get the stdout by line, unfortunately usePTY is not available on windows. I'm fairly new to twiste...
Getting error when running the Django server on my Mac 10.8.5 Question: I am trying to setup Python/Django/Mysql on my Mac but I keep getting the following error when I run this command in terminal Python manage.py runserver The error I get is Marks-MacBook-Air:FirstBlog mmillar$ pyt...
How to create Excel or Windows Msg Box using COM in Python? Question: Is there a way to get pywin32 to generate a VBA-style MsgBox in Excel, if not, perhaps the Windows equivalent? I tried: from win32com.client import Dispatch excel = Dispatch('Excel.Application') excel.MsgBox('foo') but i...
Input to process using Python Question: I have a command (Say foo) that I normally run from terminal like so: user@computer$ foo enter the string: *(here I enter some string)* RESULT OF THE COMMAND WITH THE GIVEN INPUT I know beforehand what input I need to give. So, how do I au...
Scrape internal links with Beautiful soup Question: I have written a python code to fetch the web-page corresponding to a given url, and parses all the links on that page into a repository of links. Next, it fetches the contents of any of the url from the repository just created, parses the links from this new content ...
Python TypeError: iteration over non-sequence on simple list Question: import os test = os.system("ls /etc/init.d/ | grep jboss- | grep -vw jboss-") for row in test: print row For some reason this gives the TypeError: iteration over non-sequence error on this. When I do a print test wit...
Deduction of Integer Math (Order of Operations) Question: I'm working in Python at the moment, and I'm coming to a problem I don't know where to grab straws. Forgive me if this is covered in some initial Algorithm CS class somewhere, my background is really in Economics. I'm working with financial data, and I know the ...
Follow the keyboard selection in Ubuntu preferably by Python Question: I am doing automation of my application. To do this at one point I need to move my mouse to selected item. I shall select the item with my keyboard and mouse will move accordingly to that point. Is there any code for doing this in Ubuntu 12.04 and 1...
Read value from web page using python Question: I am trying to read a value in a html page into a variable in a python script. I have already figured out a way of downloading the page to a local file using urllib and could extract the value with a bash script but would like to try it in Python. import ur...
my RAM gets full and PC crashes when i execute my python script . Question: I wrote a simple script in python . It's a talking battery monitor , inspired from IronMan Jarvis . Now the problem is that , the code runs perfectly but the RAM keeps getting full when the code is running . Finally when the RAM gets full , the...
How to set an optional argument from python in terminal? Question: I have a program that takes one input but can also take another optional argument if the user wants. How can I implement this optional argument? I am importing sys library to get the first arguement like this word_input = sys.argv[1] ...
Problems using Metakit for Python on Windows Question: I'm having problems trying to use Metakit for Python on Windows. It always report this error: Traceback (most recent call last): File "<pyshell#86>", line 1, in <module> import metakit File "C:\Python27\lib\site-packages\metakit.p...
Integer Gui input for button command in Python 2.7 Question: I have a very simple GUI I am trying to make in which I have a single entry, and a single button. I would like to enter a number in the entry, and then use that number as a variable in the command that my button initiates. For example, if you enter a 2 and m...
How to run two loops at the same time in python Question: How can i run a loop within a loop in python to make points in a simple word game import random WORDS = ("python", "jumble", "easy", "difficult", "answer", "xylophone", "truck", "doom", "mayonase", "flying", "magic", "mine", "bugle") play ...
Select all in a tkinter Listbox Question: I am creating a `Listbox` using Tkinter and Python. I want to make a Button for `select all`, but I can't find any info regarding selecting elements using code. self.l = Listbox(self, height=12, selectmode=MULTIPLE) self.selectAll=Button(self, text="select ...
Flexible UNIX command line interface with Python Question: I was wondering how to create a flexible CLI interface with Python. So far I have come up with the following: $ cat cat.py #!/usr/bin/env python from sys import stdin from fileinput import input from argparse import ArgumentP...
Using Counter() in Python to build histogram? Question: I saw on another question that I could use `Counter()` to count the number of occurrences in a set of strings. So if I have `['A','B','A','C','A','A']` I get `Counter({'A':3,'B':1,'C':1})`. But now, how can I use that information to build a histogram for example? ...
How to use the resource module to measure the running time of a function? Question: I want to measure the CPU running time and wall clock running time of functions using Python code. The resource module was suggested here: [How to measure CPU running time and wall clock running time of a function, separately, as Pytho...
Does Queue.get block main? Question: I know that `Queue.get()` method in python is a blocking function. I need to know if I implemented this function inside the main, waiting for an object set by a thread, does this means that all the main will be blocked. For instance, if the main contains functions for transmitter a...
Why calculations of eigenvectors of a 2 by 2 matrix with numpy crashes my Python session? Question: I try to do the following: import numpy as np from numpy import linalg as la w, v = la.eig(np.array([[1, -1], [1, 1]])) As a result I have a crash of the python session with the following mes...
Remote executing of program via xterm run using paramiko python ssh library Question: Flow of the program is: 1. Connect to OpenSSH server on Linux machine using Paramiko library 2. Open X11 session 3. Run xterm executable 4. Run some other program (e.g. Firefox) by typing executable name in the terminal and r...
Unknown command: 'collectstatic' Django 1.7 Question: I want do static files. I use Django 1.7 and Python 2.7.5 and openshift hosting. When I try to run: `python manage.py collectstatic` I get: Unknown command: 'collectstatic' Type 'manage.py help' for usage. In my settings.py: ......
TypeError: unhashable type: 'list' (a few frames into program) Question: So as my first project in python outside of Code Academy, I decided to make a basic molecular dynamics simulator on pygame. It works fine for a while, but as soon as electrons start to move too fast, and strip all the other electrons off their ato...
sl4a python make a Toast for android phone Question: I wrote only this 3 lines in python using [SL4A](http://code.google.com/p/android-scripting/): import android droid = android.Android() droid.makeToast(u"ascc4r") When this code runs, I get the following error: ...
Python 'shelve' that writes itself to disk after each operation Question: I'm doing a project in Python that involves a lot of interactive work with a persistent dictionary. If I weren't doing interactive development, I could use contextlib.closing and be fairly confident that the shelf would get written to disk eventu...
Python coding - list index out of range Question: lots of code up here ... if c==excelfiles[1]: b ==excelfiles[1] wb = xlrd.open_workbook(a) wb.sheet_names() sh = wb.sheet_by_index(0) for rownum in range(sh.nrows): print sh.row_values(rownum) ...
More elegant/Pythonic way of printing elements of tuple? Question: I have a function which returns a large set of integer values as a tuple. For example: def solution(): return 1, 2, 3, 4 #etc. I want to elegantly print the solution without the tuple representation. (i.e. parentheses around...
Python: Print using ascii codes Question: I'm a beginner in python and I'm having a problem in this program: Here's the NodeList first: class Node: def __init__(self,initdata): self.data = initdata self.next = None def getData(self): return self.d...
Getting different result in different runs with multithreading Question: why when the code executed, the result different every time? i tried to follow how the code is executed, and i confused, i feel this is not sense. and the result appear randomly every time #!/usr/bin/python import Queue ...
Python, OpenCV: classify gender using ORB features and KNN Question: **Task:** Classify images of human faces as female or male. Training images with labels are available, obtain the test image from webcam. **Using:** Python 2.7, OpenCV 2.4.4 I am using ORB to extract features from a grayscale image which I hope to u...
Python logging root handler does not capture all Question: I've got an issue with a root logger which I expected to work as a catch-all logger for anything that doesn't match other places. It's not working as I expected however. Here's a simplified logging configuration I use: [loggers] keys = root, ...
Python BeautifulSoup Ampersand issue Mac vs. Linux Ubuntu Question: I've read that BeautifulSoup has problems with ampersands (&) which are not strictly correct in HTML but still interpreted correctly by most browsers. However weirdly I'm getting different behaviour on a Mac system and on a Ubuntu system, both using bs...
Downloading PDF's with Webdriver Question: I am trying to download pdfs with selenium webdriver with python bindings on OS X 10.8. I actually need the pdf file, not just check if it the download link works. As I understand it, I need to set the firefox profile to download the pdf content type, rather than 'preview' wh...
Seeming discrepancy in shutil.disk_usage() Question: Hello StackOverflow folks, Longtime reader, first time poster. Hopefully I've got all the info here to make a useful question. I am using the shutil.disk_usage() function to find the current disk usage of a particular path (amount available, used, etc.). As far as I...
python + opencv "dll load failed" Question: I'm trying to install opencv on my machine as explained in the book: "Packtpub OpenCV Computer Vision with Python Apr 2013" It says that in order to run kinect you need to compile openCV with some stuff in it, so I downloaded openCV .exe that extracts to a 3.2gb folder and p...
Generating a random email using python 3.2 Question: I would like to generate a 64 letter for a random email. There are a few restriction so as to follow the email syntax. But I am not sure why doesnt my output display anything. Is there something wrong with my if statement? import random y=" " f...
Conflicting versions of python in ubuntu Question: So i had python 2.7.2 on my server and i needed to update it to python 2.7.3. So i've tried to remove the 2.7.2 version and then install the new one using the sources. I wasn't able to remove the 2.7.2 version cause the system uses it to run crucial services on server,...
Python lxml and parsing a subtree Question: I've got a xml which looks like this: <root> <foo> <a></a> <b></b> <c></c> </foo> <bars> <bar> <one>interesting</one> <two>interesting</two> <three>interesting</three> </bar> <bar> <one>interesting</one> <...
TCL in Python: can't find package Question: I am trying to run a TCL script from python. There is a very specific TCL package embedded in some software I am using and I need to tell the python interpreter (or TKinter ?) where this package is. Here is what I have tried so far. >>> import Tkinter >>> r...
How to convert occurence matrix to co-occurence matrix in Python Question: I asked this question here: [How to convert occurence matrix to co-occurence matrix](http://stackoverflow.com/questions/19253300/how-to-convert-occurence- matrix-to-co-occurence-matrix) I realized that my data is so big that it is not possible ...
tab delimited to csv Question: I am able to get this to output my MYSQL command which I have removed for security, however I keep getting an error when I try and write this tab delimited output to a CSV. Any help to boost the Python rookie would be appreciated. #!/usr/bin/pytho import sys, csv im...
Unintented multithreading in python (scikit-learn) Question: I'm using mixture submodule of sklearn module for Gaussian Mixture Model... When I run my code on a multicore system, it uses multiple cores even though I do not ask for it in the code. Is this a default behavior? And more important, how can I disable it? Th...
How i should store simple objects using python and redis? Question: Lets suppose that I have a lot of(hundreds) _big_ python dictionaries. Pickled file size is about 2Mb. I want to draw chart using data from this dictionaries so i have to load them all. What is the most efficent (at first speed, at second memory) way t...
How to solve UnicodeDecodeError in mezzanine? Question: I am using mezzanine cms. When I scrap the data from the blogspot I got this error blog_id: sanavitastudio Traceback (most recent call last): File "/home/nyros/hs/git_br/2013/Oct-9/healersource/apps/blog_hs/forms.py", line 226, in save ...
UnicodeDecodeError: 'ascii' codec can't decode byte 0xec in position Question: When I am programming in Ubuntu with python2.7 and MySQLdb, I had an error when I use other languages in python. English only doesn't make this error. Traceback (most recent call last): File "crawl.py", line 242,...
Cannot print alt and az using pyephem in function Question: I'm working on building a simple python program for a class which will run on a Raspberry Pi and an Arduino to direct a telescope. I had started to learn python some time ago, and I'm having trouble getting my functions to work properly. Right now, I have this...
How function is getting called without defining in python Question: Here is the program: import sys def IndexSearchString(): ''' This function search a string in a password file through index and gives the result. :return: none :return type: none ...
google app engine python hello world application not displaying any thing on the localhost:8080 Question: I ran the following hello world code in python but localhost:8080 doesnot print anything i'm using ubuntu 12.04 localhost:8080 shows a blank page helloworld.py import webapp2 class M...
How to open a file on mac OSX 10.8.2 in python Question: I am writing a python code on eclipse and want to open a file that is present in Downloads folder. I am using MAC OSX 10.8.2. I tried with `f=os.path.expanduser("~/Downloads/DeletingDocs.txt")` and also with ss=subprocess.Popen("~/Downloads/Deletin...
Why aren't my tables available during Django unitests? Question: When I try to run my unittests, I'm getting an error that says a table is not available in the database. My tests were running fine a day ago, and a brainstorm around what I've changed since then isn't bringing to mind anything that gets close to causing ...
Stepping through date in Python Question: Let's say I have a starting date of `datetime(2007, 2, 15)`. I want to step this date in a loop so that it's advanced to the 1st and 15th of each month. So `datetime(2007, 2, 15)` would step to `datetime(2007, 3, 1)`. In the next iteration, it would step to `datetime(2007, 3...
Selenium - Drag and Drop Question: I am looking to automate the dropping of a file from the desktop to the page using Firefox as the browser, and Selenium on Python for automation. Here is the code for the drag-and-drop on the page: <div id="dropbox">...</div> <script type="text/javascript"> ... ...
Python TkInter Button Command Return Question: I'm having trouble returning a variable from a TkInter button command. This here is my code: class trip_calculator: def gui(self): returned_values = {} def open_file_dialog(): returned_values['f...
trouble installing pycurl on mac 10.8.5 Question: I really have trouble installing pycurl on the mac of my girlfriend, I managed to do it on my own but I did not remember which command brought the success. Everything I tried on her mac wont't work. I looked up every answer I could find on how to install pycurl, nothin...
Python: Dynamically Update Array Cells from Parent Program Question: I previously asked a question about updating a single value in a parallel process from a parent program. Great answers to this can be found at [Python: Update Local Variable in a Parallel Process from Parent Program](http://stackoverflow.com/questions...
Python3 Qt unicode file name problems Question: Similar to [QDir and QDirIterator ignore files with non-ASCII filenames](http://stackoverflow.com/questions/1641994/qdir-and-qdiriterator- ignore-files-with-non-ascii-filenames) and [UnicodeEncodeError: 'latin-1' codec can't encode character](http://stackoverflow.com/q...
Save EACH regex match to a new txt file (batch)? Question: I basically need a program/script that will search a file for regex matches and then save each match to a newly created text file (ie. match_01.txt, match_02.txt, match_03.txt, etc.). NB: it must support multiline matching! **EDIT :** This is what I tried usi...
Python SetCursorPos error? Or online game cause it? Question: The code works perfectly with no errors until I unminimize the game.After a lot of tries to locate why SetCursorPos doesnt work , I understoud that it did not have a problem with the cords , but it refuses to move to the location when its on the window of th...
how can I get the gap colum in python? Question: the log format is like that 100 0 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 And I write python code, def read_data(filename, se...
ImportError: No module named redis Question: I have installed redis using `sudo apt-get install redis-server` command but I am receiving this error when I run my Python program: `ImportError: No module named redis` Any idea what's going wrong or if I should install any other package as well? I am using Ubuntu 13.04 an...
wxpython panel size and titles Question: When I apply the following code, the second panel is showed over the first one. I would like to know how I can get the two panels without overlapping and with the appropriate size of the window (frame). I would also like to know if there is any suitable way to draw some kind of ...
packaging with numpy and test suite Question: # Introduction Disclaimer: I'm very new to python packaging with distutils. So far I've just stashed everything into modules, and packages manually and developed on top of that. I never wrote a `setup.py` file before. I have a Fortran module that I want to use in my pytho...
Python match a string with regex Question: I need a python regular expression to check if a word is present in a string. The string is separated by commas, potentially. So for example, line = 'This,is,a,sample,string' I want to search based on "sample", this would return true. I am crappy with reg...
Using python ctypes invoke gtk_builder Question: my python code is: gtk = CDLL('/usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so') builder = gtk.gtk_builder_new() print gtk.gtk_builder_add_from_file(builder, './mainui.glade', None) I tested the c code, it works. But with python ctype, the result...