How to call external command in Python
I want to be able to call external command in Python. Thanks for your help! ...
I want to be able to call external command in Python. Thanks for your help! ...
I am a PHP dev looking to pickup a new language, I have tried and failed on C++ several times (possibly for my overall lack of interest). I've been hearing a lot about Python, and Ruby and my question is this: Which of these languages (Python, Ruby) should be easiest for someone with a background in PHP to learn? Update (6 months later)...
I know how to do this if I iterate through all of the characters in the string but I am looking for a more elegant method. Thanks ...
Have you considered using Django and found good reasons not to do so? ...
Ok, so i'm working on a regular expression to search out all the header information in a site. I've compiled the regular expression: regex = re.compile(r''' <h[0-9]>\s? (<a[ ]href="[A-Za-z0-9.]*">)?\s? [A-Za-z0-9.,:'"=/?;\s]*\s? [A-Za-z0-9.,:'"=/?;\s]? ''', re.X) when i run this in python reg ex. tester, it works out...
Suppose your boss told you to choose a Python web application framework, and you would be wedded to it for at least the next 3 years. What would you recommend? Ground rules: Python: Yes, required. (Ruby+ not an option for reasons irrelevant. Case closed.) Custom/Hybrid Setups: Sure... if they are defensible on technical grounds. Up...
I want to encrypt few files using python what is the best way i can use gpg but are there any standarad/famous python libraries? ...
I have an exe file generated with py2exe. In the setup.py I specify an icon to be embedded in the exe: windows=[{'script': 'my_script.py','icon_resources': [(0, 'my_icon.ico')], ... I tried loading the icon using: hinst = win32api.GetModuleHandle(None) hicon = win32gui.LoadImage(hinst, 0, win32con.IMAGE_ICON, 0, 0, win32con.LR_DEFAUL...
Hello I need to write code in python language for comparing the text of document uning fingerprint techniques. I do not know to take fingerprint of a document or to generate fingerprint of a document. Please if anyone know the method or have a source code for generating fingerprints of documents which is stored in bits form. please guid...
I'm a little confused about how the standard library will behave now that Python (from 3.0) is unicode-based. Will modules such as CGI and urllib use unicode strings or will they use the new 'bytes' type and just provide encoded data? ...
I'd like to integrate a Python IDLE-esque command prompt interface into an existing NI-CVI (LabWindows) application. I've tried to follow the Python.org discussions but seem to get lost in the details. Is there a resource out there for dummies like me? ...
Working with python interactively, it's sometimes necessary to display a result which is some arbitrarily complex data structure (like lists with embedded lists, etc.) The default way to display them is just one massive linear dump which just wraps over and over and you have to parse carefully to read it. Is there something that will ta...
I have a model class: class Person(db.Model): first_name = db.StringProperty(required=True) last_name = db.StringProperty(required=True) I have an instance of this class in p, and string s contains the value 'first_name'. I would like to do something like: print p[s] and p[s] = new_value Both of which result in a TypeError....
I'm interested in learning a web framework. The two big ones, as I gather, are Rails and Django. Which one is better/faster? Is one better designed or more logically consistent than the other? Is there another framework I should look into? How easy is it to set up and administer a Rails or Django server, and how easy is it to find a shar...
Looking for an open source library, for C++, Java, C# or Python, for reading the data from Quicken .qdf files. @Swati: Quicken .qif format is for transfer only and is not kept up to date by the application like the .qdf file is. ...
I've gotten to grips with the basics of Python and I've got a small holiday which I want to use some of to learn a little more Python. The problem is that I have no idea what to learn or where to start. I'm primarily web development but in this case I don't know how much difference it will make. ...
Fedora Core 9 seems to have FCGID instead of FastCGI as a pre-built, YUM-managed module. [I'd rather not have to maintain a module outside of YUM; so no manual builds for me or my sysadmins.] I'm trying to launch Django through the runfastcgi interface (per the FastCGI deployment docs). What I'm seeing is the resulting page written ...
I use to run $s =~ s/[^[:print:]]//g; on Perl to get rid of non printable characters. In Python there's no POSIX regex classes, and I can't write [:print:] having it mean what I want. I know of no way in Python to detect if a character is printable or not. What would you do? EDIT: It has to support Unicode characters as well. Th...
Based on "Split a string by spaces in Python", which uses shlex.split to split a string with quotes smartly, I would be interested in hearing about other common tasks solved by non-obvious standard library functions. If this turns into Module of The Week, that's fine too. ...
I am writing an editor using Scintilla. I am already using a lexer to do automatic syntax highlighting but now I'd like to mark search results. If I want to mark only one hit I can set the selection there but I'd like to mark (e.g. with yellow background) all the hits. I writing this in Perl but if you have suggestions in other languag...