I have a user inputting two strings and then I want to check if there are any similar characters and if there is, get the position where the first similarity occurs, without using the find or index function.
Below is what I have so far but I doesn't fully work. With what I have so far, I'm able to find the similarities but Im not sure how to find…
I'm trying to get my app to install in /opt/[app_name] using setuptools. My app uses a namespace package.
To install I run
sudo python setup.py install --prefix=/opt/[app_name]/ --install-lib=/opt/[app_name]/ --install-scripts=/opt/[app_name]/
When I install it this was setuptools does not copy init.py in to my namespace package so when I come…
My application uses many Python libraries (Django, Twisted, xmlrpc). I cannot expect that the end user has the Python installed with all needed libraries.
I've created a fancy installer for my application using Inno Setup, but I don't think that it is a good solution to execute 5 other setup programs from my installer. It would be annoying to…
I would like to install Python 2.6 and mod_python on CentOS 5 (x64).
The system is delivered with old python 2.4 and I want the new one with minimal maintenance effort (compiling and having a different installation seams to be suboptimal solution).
Is there a solution for this, other than starting to recompile lots of packages? If not should…
I have been using the standard python that comes with OS X Lion (2.7.2) but I wanted to build a UCS-4 version to handle 4-byte unicode characters better.
I had already installed pip and packages like pytz, virtualenv and virtualenvwrapper, etc., and these are installed in /Library/Python/2.7/site-packages. My $PATH is…
For a while I've been getting this error while doing anything apt-get related:
Preparing to replace python-cairo 1.4.12-1.2 (using .../python-cairo_1.8.8-1+b1_i386.deb) ...
Traceback (most recent call last):
[...]
File "/usr/share/pycentral-data/pyversions.py", line 172, in default_version
raise ValueError,…
After some not so clever editing of the default Python version in Ubuntu, from 2.7 to 3.2, I ended up breaking my entire system. After my computer imploded and everything stopped working, I tried to revert back my changes (by linking /usr/bin/python2.7 to /usr/bin/python and changing the default version in…
If you were starting learning a new language today, for scripting and doing "various stuff" with it (from making useful programs to it being glue to several command line programs), would you go with Python or Perl (or some third option, although the battle usually comes to these two)?
I've never much used…
I am working on an export tool from Blender to Libgdx, exports like custom attributes and other information (Almost completed), this is a very cool tool that will speed up a lot your works, after I completed I will send to public to contribute forum, Export format is uses python's Standard Json module and…
I want to create a web/browser-based GUI for a command-line python application. The goal is to make use of HTML/JS technologies to create this GUI. As the application itself, it needs to run on Linux and Windows, and the interface will be accessible only from localhost (not exposed to internet). The GUI…
I recently asked a question on SO about Python web frameworks:
http://stackoverflow.com/questions/4909306/python-web-frameworks-vs-java-web-frameworks-how-is-web-development-in-python-do
I want to learn one just for fun but it also has to be able to help me deliver a proper working application.
I am…
Python uses duck-typing, rather than static type checking. But many of the same concerns ultimately apply: does an object have the desired methods and attributes? Do those attributes have valid, in-range values?
Whether you're writing constraints in code, or writing test cases, or validating user…
I am very proficient in Python (including Django), which I use for most tasks. I am also quite confident with C; I am maintaining small file system in userspace written in C. Yet when I am browsing job offers I see everywhere Java/C# and sometimes C++. I have coded profesionally in C++ for half a year…
I'm one of the developers of Ruby (CRuby). We are working on Ruby 2.0 release (planned to release 2012/Feb).
Python has "PEP302: New Import Hooks" (2003):
This PEP proposes to add a new set of import hooks that offer better customization of the Python import mechanism. Contrary to the current…
Being a newbie to coding, I read from this site that Perl is still as viable as it has been, while Python, quoted from someone else's post, is good but just "snake oil" (not sure what this refers to exactly though). So from the responses in that post, I got the gist that Perl is good and worthy to…
I need help.
I have a code which is passing a script into a DLL and initialize the instrument. But, one of the code unable to use in IronPython beside python 2.7 and 3.3
I have attached the code as below
enter code here
import ctypes
import time, sys…
When I have 2 views that fragment cache the same query BUT display them differently, there is only one fragment and they both display it the same way. Is there any way around this? For example...
#views/posts/list
- cache(@posts) do
- for p…
Hi,
I am planning to use Amazon EC2 host only for MemCache.My web application ll be residing on shared hosted server and will be communicating to Ec2 for querying Memcache. How would be the performance of this setup.
Regards,
Mugil.
Hi, I just want to delete cached data, but I have many keys, for example:
user_54_books
user_54_movies
user_54_comments
user_54_foobar
I can write $cache-delete('user_54_books'); but I have to do it with all "user_ID_objects", can I say to memcache,…
Hello, my configuration:
Windows 2008
IIS 7
PHP 5.2.10 / FastCGI
Memcache as a Windows Service
I tried to use the php_memcache extension for PHP but it doesn't load. This extension comes with PECL 5.2.6
Any idea? Do you know if exist a…
I want to set the TTL for the keys while creating the connection. Right now I am setting it while writing to the cache. Is there a configuration parameter for this?
If I load the data of user_x in the memory with memcache, how long will this data stay available. If a user only logs in ones a year this data is unnecessary in the memory.
Or am i looking at this thw wrong way?
I have a CodeIgniter project. I want to use Memcache, but I don't want to create a new
connection every time index.php is loaded (which is on every page load). How can I set up Apache / CodeIgniter so that I always have access to a…
Apple has removed Python support (at least on the Developer level) in 10.9.
Python IS still on the machine in /System/Library/Frameworks/Python.framework... but trying to link to Python using the 10.9 SDK fails.…