Q_Id
int64
337
49.3M
CreationDate
stringlengths
23
23
Users Score
int64
-42
1.15k
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
Tags
stringlengths
6
105
A_Id
int64
518
72.5M
AnswerCount
int64
1
64
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
6
11.6k
Available Count
int64
1
31
Q_Score
int64
0
6.79k
Data Science and Machine Learning
int64
0
1
Question
stringlengths
15
29k
Title
stringlengths
11
150
Score
float64
-1
1.2
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
8
6.81M
6,676,772
2011-07-13T09:25:00.000
1
0
1
1
python,macports
6,677,366
1
true
0
0
I think MacPorts is not aware of MacPython, and therefore your best bet would be to install python 2.7 from the ports. That way you'll be able to select python 2.7 as default. Another advantage of using python from MacPorts is that if you install ports that require python, MacPorts won't have to install python 2.7 a se...
1
0
0
I've installed MacPython 2.7 from python.org. How to set it as default in MacPorts? PS: #port select offers variants: ' none(active) python2.5-apple python2.6-apple
Using MacPython with MacPorts
1.2
0
0
132
6,676,946
2011-07-13T09:41:00.000
2
0
1
0
python,options,optparse,optionparser
6,676,982
2
false
0
0
--dry-run has no special meaning for the optparse module. It is just an example used in the documentation of the module.
1
1
0
I have been searching a lot for past hour but not able to find anything What is functionality of dry_run option in optparse of python and can anyone point to me some tutorial or link explaining all this?
What dry_run do in optparse python?
0.197375
0
0
1,339
6,678,523
2011-07-13T12:02:00.000
2
1
0
0
python,google-app-engine,integration-testing,tipfy,twill
6,681,186
1
true
1
0
There are not many alternatives for headless JS testing, you could try selenium 2 web driver. Good luck :)
1
3
0
I am using to twill to do integration testing for an AppEngine (using tipfy micro framework) application but unfortunately twill is not maintained and I cannot test PUT and DELETE requests. Is there any similar solution? I am thinking of using PhantomJS, there are some python bindings and it can execute JS (as it is a ...
Twill alternative for integration testing
1.2
0
0
1,072
6,679,530
2011-07-13T13:18:00.000
4
0
0
0
python,workflow,plone
6,680,001
3
false
1
0
Create a new automatic transition in the workflow you're using that has the guard: python:container.meta_type == 'ATFolder' this will then only fire if the parent object is of the standard 'Folder' type (note the meta type and the type name are not the same). The downside of this is that it will be fired relatively ear...
1
8
0
I have a custom folderish Dexterity content-type in Plone. It can have only Documents as children. I want these documents to be directly published as they are created. I can achieve this easily by setting an appropriate workflow for the Document type, but that would affect every document in my site. I want only the one...
How to directly publish only child items of my Container type in Plone?
0.26052
0
0
304
6,680,695
2011-07-13T14:39:00.000
0
0
0
0
python,logging
6,681,434
2
true
0
0
I assume by multiple files you mean you have multiple separate scripts running and you want to log some consolidated summary of events occurring in all those scripts. If you have a single script it is easy to do by maintaining a dict and dumping it to a log file or may be overwrite a single summary file, for multiple s...
1
1
0
I'm looking to keep a summary of both the number of times a specific thing happens and when something very important arises. I'll give an example... My code establishes a ssh connection and runs commands. An exception is raised and handled every time the script loses connection to the ssh server. Let's say this type of...
How can I record the number of times something happens over several files?
1.2
0
0
303
6,681,043
2011-07-13T15:04:00.000
0
0
0
0
python,screen-scraping,web-crawler
25,339,316
5
false
0
0
here's one workaround : get "download master" from chrome extensions, or similar program search on google or other for results, set google to 100 per page select - show all files write your file extension, .rdf press enter press download you can have 100 files per click, not bad.
3
3
0
As a part of a research, I need to download freely available RDF (Resource Description Framework - *.rdf) files via web, as much as possible. What are the ideal libraries/frameworks available in Python for doing this? Are there any websites/search engines capable of doing this? I've tried Google filetype:RDF search. ...
Crawling web for specific file type
0
0
1
2,777
6,681,043
2011-07-13T15:04:00.000
0
0
0
0
python,screen-scraping,web-crawler
6,681,208
5
false
0
0
Did you notice the text something like "google has hidden similar results, click here to show all results" at the bottom of one page? Might help.
3
3
0
As a part of a research, I need to download freely available RDF (Resource Description Framework - *.rdf) files via web, as much as possible. What are the ideal libraries/frameworks available in Python for doing this? Are there any websites/search engines capable of doing this? I've tried Google filetype:RDF search. ...
Crawling web for specific file type
0
0
1
2,777
6,681,043
2011-07-13T15:04:00.000
0
0
0
0
python,screen-scraping,web-crawler
25,339,126
5
false
0
0
teleport pro, although it maybe cant copy from google, too big, it can probably handly proxy sites that return google results, and i know, for a fact, i could download 10 000 pdfs with in a day if i wanted to. it has filetype specifiers and many options.
3
3
0
As a part of a research, I need to download freely available RDF (Resource Description Framework - *.rdf) files via web, as much as possible. What are the ideal libraries/frameworks available in Python for doing this? Are there any websites/search engines capable of doing this? I've tried Google filetype:RDF search. ...
Crawling web for specific file type
0
0
1
2,777
6,681,690
2011-07-13T15:45:00.000
2
1
0
1
python,eclipse,terminal,pydev
6,681,756
1
true
1
0
The key here is that PyDev and Eclipse manage a custom Python Path when you're launching within Eclipse. You can modify your environment variables to contain a more complete PYTHONPATH value that contains the locations where you're importing from, or you can use sys.path.append() to add directories to the path at run ...
1
2
0
Im having some import problems with an application I developed in python with Eclipse/PyDev. Running the app from within Eclipse is no problem but when I try running it through the linux terminal the imports (which are imported from other folders (packages in Eclipse)) are broken and I get an ImportError: No module nam...
Problem running PyDev-developed apps in terminal
1.2
0
0
408
6,683,165
2011-07-13T17:40:00.000
0
1
1
0
python,import
6,683,207
3
false
0
0
Set your PYTHONPATH to one level up, and then run it with the package syntax?
1
4
0
Currently I have a "main" folder where all of the modules I write eventually go, but I usually place the modules I'm currently working on in a 'dev' folder just so I don't clutter up the other folder with stuff that aren't ready. The structure looks like this MyProg |-run.py |-\lib | |-someLibrary.py | ... | |-\main |...
Relative import from current file
0
0
0
2,770
6,683,248
2011-07-13T17:47:00.000
5
0
0
1
java,php,javascript,c++,python
6,683,277
4
false
0
0
Code length depends completely on the type of the application you want to design. It also depends on the language of choice. A program written in c will likely be significantly longer than say code in python. It's never to late to learn!
3
0
0
It seems when I try to research all I can find are how many lines are in Linux, call of duty, windows and other things that are massive applications with millions of lines of code. Does anyone have examples of code size of applications that don't take teams and teams of people? P.S. I'm 24 yrs old and just starting to ...
How many line of code are in a program? (I know this is kind of vauge and depends but...)
0.244919
0
0
1,253
6,683,248
2011-07-13T17:47:00.000
0
0
0
1
java,php,javascript,c++,python
6,683,282
4
false
0
0
Between 1 and several million (roughly). It depends. One person can write a lot of code if given enough time.
3
0
0
It seems when I try to research all I can find are how many lines are in Linux, call of duty, windows and other things that are massive applications with millions of lines of code. Does anyone have examples of code size of applications that don't take teams and teams of people? P.S. I'm 24 yrs old and just starting to ...
How many line of code are in a program? (I know this is kind of vauge and depends but...)
0
0
0
1,253
6,683,248
2011-07-13T17:47:00.000
0
0
0
1
java,php,javascript,c++,python
6,683,278
4
false
0
0
No, there is no way to gauge or give this type of information. Frankly, it depends.
3
0
0
It seems when I try to research all I can find are how many lines are in Linux, call of duty, windows and other things that are massive applications with millions of lines of code. Does anyone have examples of code size of applications that don't take teams and teams of people? P.S. I'm 24 yrs old and just starting to ...
How many line of code are in a program? (I know this is kind of vauge and depends but...)
0
0
0
1,253
6,684,180
2011-07-13T19:03:00.000
8
0
0
0
python,qt,pyside
6,685,002
6
true
0
1
You should see a /Python27/Scripts/pyside-uic.exe. But I'm wondering why it's not visible (not executable). Maybe it's a packaging problem (permissions, etc). You could try to call it using the complete path.
1
9
0
I'm trying to use Qt Designer and pyside-uic mydesign.ui > design.py however, this program doesn't exist. I looked in site packages under python 2.7, and I see: pyside-lupdate.exe pyside-rcc.exe and a bunch of other programs, but there is no such thing as pyside-uic.exe ... why ?? Why is it missing from the installati...
Where is pyside-uic?
1.2
0
0
25,947
6,685,530
2011-07-13T20:54:00.000
1
1
0
0
python,ruby-on-rails,session,command-line,dos
6,685,611
1
true
1
0
What you are proposing could be possible if Rails was friendlier about forked processes. A cleaner and better solution would be to write a python daemon that you could query so that you don't incur the startup penalty. (This could be a web-service or a daemon you communicate with standard network sockets or whatever)...
1
0
0
Here is my scenario. I have a ajax call in my web site to find the elevation at particular point. Once this point comes into an action of a controller in Ruby on rails, I have to use python on command line to find the elevation. The following sequence of commands in DOS does that for me. python (starts a python sessio...
issuing dos commands from inside ruby on rails controller in the same dos session
1.2
0
0
95
6,687,108
2011-07-13T23:59:00.000
0
0
0
0
python,python-3.x,tabs,tkinter
69,530,509
2
false
0
1
I've been searching for ways to skip some widgets while tabbing and found in tkinter's tk_focusNext function description the following: "A widget is omitted if it has the takefocus resource set to 0." you can set takefocus on widget initialization as an argument.
1
11
0
I have been searching for a way to set the tab order in a tkinter application, that I have been working on. Currently the default order seems to be working from top-down, but it requires using CTRL + Tab to cycle through the controls. Is there any way to customize the order and, more so, change the CTRL + Tab to just ...
How to set the tab order in a tkinter application?
0
0
0
12,387
6,688,413
2011-07-14T04:13:00.000
0
0
0
0
python,mysql,flask
6,698,054
3
false
1
0
In my experience, it's often a good idea to close connections frequently. In particular, MySQL likes to close connections that have been idle for a while, and sometimes that can leave the persistent connection in a stale state that can make the application unresponsive. What you really want to do is optimize the "dead...
1
21
0
I am looking at the Flask tutorial, and it suggests to create a new database connection for each web request. Is it the right way to do things ? I always thought that the database connection should only once be created once for each thread. Can that be done, while maintaining the application as thread-safe, with flask,...
How to preserve database connection in a python web server
0
1
0
11,438
6,688,815
2011-07-14T05:26:00.000
0
0
0
1
python
6,688,913
3
false
0
0
Funnily enough, it means that access is denied. You don't have permission to kill the process. This could be due to your account level (a "guest" sort of account or an account restricted by group policy) or it could be due to UAC (admin on your own machine but not running as admin—not sure if Windows 7 allows non-eleva...
1
7
0
I've been trying to kill a process but all my options give me a Windows Access Denied Error. I open the process(a python script) through test= subprocess.Popen([sys.executable, "testsc.py"]) and I want to kill that process. So far, I've tried os.kill(pid, signal.SIGILL) , os.kill(pid, 9), test.Terminate() and simply t...
WindowsError: [Error 5] Access is denied
0
0
0
11,222
6,694,662
2011-07-14T14:17:00.000
2
0
0
1
python,google-app-engine,google-cloud-datastore
6,697,664
2
true
1
0
You basically need to do it in two steps: Do what systempuntoout's answer said to only allow logged-in users to see your site. On each of your routes (URL handlers), the first step should be to get their user object and check if they are on a list you're keeping of users allowed to see your app. For a first run, you c...
1
3
0
I want to upload my application on google app engine and want to use this by only selected user so want to know how it possible. want to use users gmail account.
How to allow only selected user login in gae+python application?
1.2
0
0
755
6,696,279
2011-07-14T16:02:00.000
3
0
1
0
python,associative-array
6,696,330
3
true
0
0
Is there any reason not to use a dict of dicts? It does what you want (though note that there's no such thing as ++ in Python), after all. There's nothing stylistically poor or non-Pythonic about using a dict of dicts.
1
5
1
I have a set() with terms like 'A' 'B' 'C'. I want a 2-d associative array so that i can perform an operation like d['A']['B'] += 1 . What is the pythonic way of doing this, I was thinking a dicts of dicts. Is there a better way.
Two dimensional associative array in Python
1.2
0
0
10,309
6,697,259
2011-07-14T17:10:00.000
2
0
0
0
python,keyboard,matplotlib,interactive
11,928,786
6
false
0
0
Use waitforbuttonpress(timeout=0.001) then plot will see your mouse ticks.
1
70
1
I used matplotlib to create some plot, which depends on 8 variables. I would like to study how the plot changes when I change some of them. I created some script that calls the matplotlib one and generates different snapshots that later I convert into a movie, it is not bad, but a bit clumsy. I wonder if somehow I co...
Interactive matplotlib plot with two sliders
0.066568
0
0
98,213
6,697,770
2011-07-14T17:56:00.000
0
0
1
0
python,datetime
12,212,950
2
false
0
0
I haven't heard of such module out there and don't think there is one. I would probably end up storing two dates for every instance: 1. the original input as a string, which could contain anything, even "N/A", just for showing back the original value, and 2. parsed and "normalized" datetime object which is the closest ...
1
6
0
The datetime module does date validation and math which is fine when you care about reality. I need an object that holds dates generated even if they were invalid. Date time is way too strict as sometimes I know year only or year and month only and sometimes I have a date like 2011-02-30. Is there a module out there th...
allowing invalid dates in python datetime
0
1
0
2,334
6,698,229
2011-07-14T18:34:00.000
5
0
0
0
python,excel
21,573,501
6
false
0
0
Long time after the original question, but last answer pushed it top of feed again. Others might benefit from my experience using python and excel. I am using excel and python quite bit. Instead of using the xlrd, xlwt modules directly, I normally use pandas. I think pandas uses these modules as imports, but i fi...
2
22
0
Does anyone know of a way of accessing MS Excel from Python? Specifically I am looking to create new sheets and fill them with data, including formulae. Preferably I would like to do this on Linux if possible, but can do it from in a VM if there is no other way.
Excel Python API
0.16514
1
0
37,522
6,698,229
2011-07-14T18:34:00.000
3
0
0
0
python,excel
6,698,343
6
false
0
0
It's surely possible through the Excel object model via COM: just use win32com modules for Python. Can't remember more but I once controlled the Media Player through COM from Python. It was piece of cake.
2
22
0
Does anyone know of a way of accessing MS Excel from Python? Specifically I am looking to create new sheets and fill them with data, including formulae. Preferably I would like to do this on Linux if possible, but can do it from in a VM if there is no other way.
Excel Python API
0.099668
1
0
37,522
6,700,149
2011-07-14T21:29:00.000
-2
0
0
0
python,zeromq
6,831,300
3
false
0
0
In ZeroMQ there can only be one publisher per port. The only (ugly) workaround is to start each child PUB socket on a different port and have the parent listen on all those ports. but the pipeline pattern describe on 0MQ, user guide is a much better way to do this.
1
9
1
I'd like to write a python script (call it parent) that does the following: (1) defines a multi-dimensional numpy array (2) forks 10 different python scripts (call them children). Each of them must be able to read the contents of the numpy array from (1) at any single point in time (as long as they are alive). (3) each...
Python zeromq -- Multiple Publishers To a Single Subscriber?
-0.132549
0
0
14,920
6,700,416
2011-07-14T21:56:00.000
2
1
0
0
python,eclipse,pydev,aptana,outline-view
6,700,834
2
false
1
0
Look in Window > Preferences > PyDev > Editor > Code Folding. Enable Folding for Function Definitions. Then hit Ctrl-9 and Ctrl-0 to fold and unfold your code. Edit: You can also use Ctrl-- (minus) and Ctrl-= to fold and unfold single levels.
1
0
0
Is there a way in a huge python file , you just see the function def you are interested in ? I remember Eclipse has an option to do this in Java and it was pretty helpful.How about for Python in PyDev/Aptana Studio 3?
Show only python function def in PyDev Eclipse/Aptana
0.197375
0
0
1,098
6,701,114
2011-07-14T23:20:00.000
0
1
0
0
python,django,eclipse,eclipse-plugin,reportlab
8,851,849
1
false
1
0
rlextra is a proprietary addition on top of ReportLab. You only get the .pyc files but not the source .py files when you receive the package. I do remember a packaging issue with datacharts.pyc on version 2.4 that was reported by a client and fixed on the day. If you contact ReportLab they will be more than happy to he...
1
0
0
I have an application made in Django which finally uses Reportlab to generate the pdf file by accessing the data from some tables. There are some imports like: from rlextra.graphics.guiedit.datacharts import DataAwareDrawing, ODBCDataSource, DataAssociation from reportlab.graphics.charts.barcharts import VerticalBarC...
eclipse with reportlab
0
0
0
318
6,701,732
2011-07-15T01:12:00.000
1
0
0
0
java,python,port,web-applications
6,701,836
3
false
1
0
Why not use sockets in python too and send it to the java server. Java does not know that the end client is python, what it reads is just data(bytes). I have done this, and it works seamlessly. See the python's struct module for more details on converting datatypes
1
0
0
I want some help on a way to transfer data from a python web application to a java desktop application. What I am doing is having java listen on a port and receive data. But I have no idea how I would send data from python to an open port on a server. What my question is how would I send data from a python web app to...
How To Transfer data from a python web application to a java desktop applaction
0.066568
0
0
747
6,704,151
2011-07-15T08:03:00.000
30
0
1
0
python,ruby,oop,metaprogramming,method-missing
6,704,345
3
true
0
0
There is no difference in Python between properties and methods. A method is just a property, whose type is just instancemethod, that happens to be callable (supports __call__). If you want to implement this, your __getattr__ method should return a function (a lambda or a regular def, whatever suite your needs) and may...
1
29
0
What is Python's equivalent of Ruby's method_missing method? I tried using __getattr__ but this hook applies to fields too. I only want to intercept the method invocations. What is the Python way to do it?
Python equivalent of Ruby's 'method_missing'
1.2
0
0
8,365
6,705,193
2011-07-15T09:39:00.000
0
0
0
1
python,linux,deployment,portability,portable-applications
6,705,461
4
false
0
0
I want to deploy them in all one module including current python version i am using (Most OS Still ship with Python 2.5,6 i am using 2.7 and 2.7 specific features.) . May be VirtualEnv is what you need for this?
2
4
0
I Develop Fairly large python application on server side , with all database connect , files extraction , parsing , command line calls. It becomes a nightmare for deploying as i used many third party modules outside of standard python lib. And i lost track of them . Especially Differnt Linux OS uses different version o...
Easy Deploying of Python and application in one Bundle , For Linux
0
0
0
6,739
6,705,193
2011-07-15T09:39:00.000
-4
0
0
1
python,linux,deployment,portability,portable-applications
6,705,387
4
false
0
0
There's no reason for Super Simple Server Side Setup. Don't waste time on that. How many server installations will happen? Not many. Sys admins expect a certain level of complexity in server-based applications. You have a list of 3rd party packages; they follow that list and do the installs. Then -- after they've do...
2
4
0
I Develop Fairly large python application on server side , with all database connect , files extraction , parsing , command line calls. It becomes a nightmare for deploying as i used many third party modules outside of standard python lib. And i lost track of them . Especially Differnt Linux OS uses different version o...
Easy Deploying of Python and application in one Bundle , For Linux
-1
0
0
6,739
6,705,521
2011-07-15T10:13:00.000
0
0
0
0
python,cross-platform,portability
6,705,952
3
true
0
0
Let your installation script copy some modules of your program to user application directory. In your program add that path to sys.path, that import would find your modules.
1
0
0
I am trying to make an application that should not portable between computers or between users of the same computer. Which is the best way to do this? edit: By not portable I meant, the application should not be usable without installing it. ie) moving the installed folder to a different computer or different user logi...
How to make an application not portable?
1.2
0
0
180
6,706,765
2011-07-15T12:11:00.000
3
0
0
0
python,django,django-admin
6,706,799
2
true
1
0
No you don't need to use startproject. You can copy files from another project or write the skeleton files yourself. You probably want to have a unique SECRET_KEY setting though.
2
2
0
When i need to start new django i use django-admin startproject site1 and it then create skeltion files. Then use syncdb i want to know if just copy the files from previous site e,g site1 and then rename it to different folder and make necessary chnages in settings and URL and then use syncdb . Will my site work or ...
Do i always need to start the new site in django by "django-admin"
1.2
0
0
53
6,706,765
2011-07-15T12:11:00.000
1
0
0
0
python,django,django-admin
6,706,792
2
false
1
0
Sure. You can definitely copy (or clone with mercurial, git, you name it) your project and make necessary changes and you are done. Django-admin is just a nice utility to make your django development easier, but it doesn't setup or do anything ultra-special on your project location.
2
2
0
When i need to start new django i use django-admin startproject site1 and it then create skeltion files. Then use syncdb i want to know if just copy the files from previous site e,g site1 and then rename it to different folder and make necessary chnages in settings and URL and then use syncdb . Will my site work or ...
Do i always need to start the new site in django by "django-admin"
0.099668
0
0
53
6,706,808
2011-07-15T12:16:00.000
8
1
0
0
python,datetime,date,timezone
6,706,828
3
false
0
0
If it's really a unix timestamp, then it's UTC based. Just interpret it correctly for your use case. Apply the timezone translation only when you have to print this date as text. If you're storing it as timestamp on your side too, keep it exactly as it is.
1
8
0
I retrieve a unix timestamp from a web service in a Python program. This timestamp is in a USA timezone. In order to insert it in a MySQL database with other objects, localized in France, I would like to convert this timestamp to the French timezone. I could do it with mathematical functions, but there is the issue of ...
Changing a unix timestamp to a different timezone
1
0
0
8,568
6,709,153
2011-07-15T15:07:00.000
2
0
1
0
python,inheritance,composition
6,709,274
3
true
0
0
In Python, there is no separate instance of a base class if the base class is inherited multiple times. I don't believe it's possible to achieve what you're asking using inheritance. Composition should work fine though. P.S. Your question is phrased in a rather cryptic manner (using C++ terminology for a purely Python ...
2
2
0
Is non-virtual inheritance possible in Python, or do I have to use composition? I would like to call methods against an individual instance of the base class for each subclass rather than a single one for all subclasses. Update Example: Class A has an list in it. Class B and C are sublasses of A B and C add things to ...
Non-Virtual Inheritance in Python
1.2
0
0
1,633
6,709,153
2011-07-15T15:07:00.000
1
0
1
0
python,inheritance,composition
6,709,808
3
false
0
0
One way to think about how python treats classes differently from C++ is what each language does with the class. In C++, each class stands on it's own as a definition of the "layout of the instances member variables", and also adds some metadata to a table that the C++ runtime will use to determine method resolution o...
2
2
0
Is non-virtual inheritance possible in Python, or do I have to use composition? I would like to call methods against an individual instance of the base class for each subclass rather than a single one for all subclasses. Update Example: Class A has an list in it. Class B and C are sublasses of A B and C add things to ...
Non-Virtual Inheritance in Python
0.066568
0
0
1,633
6,709,310
2011-07-15T15:19:00.000
0
0
1
1
python
6,709,401
2
true
0
0
No. All you get is whatever comes over the pipe returned from popen the exit code of the child process when you pclose the process.
1
1
0
I'm using os.popen(cmd) to connect to a database with isql. This is in Unix, Python version 2.3.4. I'm trying to implement error handling, and I'm wondering if there's an efficient way to capture errors/exceptions raised by called subprocesses such as this, without dealing with stderr, etc. Thanks, Dan
Python - capturing subprocess exceptions
1.2
0
0
3,223
6,709,693
2011-07-15T15:45:00.000
3
0
1
0
python,algorithm
6,709,749
7
false
0
0
Just use the same algorithm for calculating edit distance on strings if the values don't have any particular meaning.
1
27
0
I have two lists: eg. a = [1,8,3,9,4,9,3,8,1,2,3] and b = [1,8,1,3,9,4,9,3,8,1,2,3] Both contain ints. There is no meaning behind the ints (eg. 1 is not 'closer' to 3 than it is to 8). I'm trying to devise an algorithm to calculate the similarity between two ORDERED lists. Ordered is keyword right here (so I can't jus...
Calculating the similarity of two lists
0.085505
0
0
38,544
6,709,833
2011-07-15T15:56:00.000
0
0
0
0
php,python,mysql,xampp,php-gtk
6,711,276
2
true
0
0
If you intend to just convert the data which I guess is a process you do only once you will run the script locally as a command script. For that you don't need a web site and thus XAMPP. What language you take is secondary except you say that PHP has a library. Does python or others have one? About your concern of erro...
2
1
0
Recently I've begun working on exploring ways to convert about 16k Corel Paradox 4.0 database tables (my client has been using a legacy platform over 20 years mainly due to massive logistical matters) to more modern formats (i.e.CSV, SQL, etc.) en mass and so far I've been looking at PHP since it has a library devoted ...
Batch converting Corel Paradox 4.0 Tables to CSV/SQL -- via PHP or other scripts
1.2
1
0
734
6,709,833
2011-07-15T15:56:00.000
1
0
0
0
php,python,mysql,xampp,php-gtk
39,728,385
2
false
0
0
This is doubtless far too late to help you, but for posterity... If one has a Corel Paradox working environment, one can just use it to ease the transition. We moved the Corel Paradox 9 tables we had into an Oracle schema we built by connecting to the schema (using an alias such as SCHEMA001) then writing this Procedur...
2
1
0
Recently I've begun working on exploring ways to convert about 16k Corel Paradox 4.0 database tables (my client has been using a legacy platform over 20 years mainly due to massive logistical matters) to more modern formats (i.e.CSV, SQL, etc.) en mass and so far I've been looking at PHP since it has a library devoted ...
Batch converting Corel Paradox 4.0 Tables to CSV/SQL -- via PHP or other scripts
0.099668
1
0
734
6,711,365
2011-07-15T18:08:00.000
2
1
0
1
python,linux,module,copy
6,711,450
1
false
0
0
Make it a proper Python package on top of setuptools and register your command-line frontends using the 'console_scripts' entry-point.
1
1
0
I have some python modules to copy into my Linux computer. I found out that I need to copy them into one of the directory that python searches or else show a new path for it. 1. when I tried to copy files into /usr/bin/..../python2.6 .. its not allowing me. how do I make it. 2. Also do tell me how do I add a new sea...
how to copy python modules into python lib directory
0.379949
0
0
1,248
6,711,516
2011-07-15T18:20:00.000
1
0
1
0
python,unicode,encoding,character-encoding
6,711,665
3
false
0
0
It appears that although you configured MySql for UTF-8, you didn't actually write UTF-8 data into it. You would have had to encode from Unicode to UTF-8 before sending the string.
2
1
0
Before throwing tomatoes, let me explain my problem (I have read the python unicode doc first). I use json module to parse a json-format result into dictionaries. This, gives me unicode encoded strings (ex : u"My string t\xf4t"). Then I use Mysqldb to store this string in my Mysql database. I precise that these databas...
Python encoding problem (unicode)
0.066568
0
0
1,000
6,711,516
2011-07-15T18:20:00.000
1
0
1
0
python,unicode,encoding,character-encoding
6,711,591
3
false
0
0
u"My string t\xf4t" is a Unicode string (its type is unicode), but "My string t\xf4t" is a bytestring (its type is str). unicode(storedInDB, "utf_8") tries to decode the bytestring as UTF-8, but "My string t\xf4t" isn't valid UTF-8.
2
1
0
Before throwing tomatoes, let me explain my problem (I have read the python unicode doc first). I use json module to parse a json-format result into dictionaries. This, gives me unicode encoded strings (ex : u"My string t\xf4t"). Then I use Mysqldb to store this string in my Mysql database. I precise that these databas...
Python encoding problem (unicode)
0.066568
0
0
1,000
6,712,092
2011-07-15T19:16:00.000
1
1
0
0
php,python,cgi,webserver,cgihttprequesthandler
6,712,146
1
true
0
0
When you say your Python process "spawns and executes" a cgi-php script, I believe what you mean is "it calls my PHP script by executing the PHP CLI executable, passing it the name of my script." Using the PHP CLI executable, HTTP-specific superglobals and environment values will not be set automatically. You would ha...
1
0
0
I have a very simple CGI webserver running using python CGIHTTPServer class. This class spawns and executes a cgi-php script. If the webpage sends POST request, how can I access the POST request data in the php script?
Accessing POST request data from CGIHTTPServer (python)
1.2
0
1
1,199
6,712,824
2011-07-15T20:31:00.000
2
1
1
1
python,eclipse,macos
6,712,886
1
true
0
0
Go to Window > Preferences > PyDev > Interpreter - Python. You should have an interpreter set up. If not, click New and browse to it. Under Libraries, click New Folder and browse to the directory you want to include. Click Apply, let it build, and try again. Edit: That is if you want to run the scripts THROUGH Eclipse....
1
1
0
I'm using Pydev with Eclipse on Mac. My python interpeter is macports python 2.6. Right now the python package i'm working on is in my eclipse workspace, but the only way I can get my scripts to run is if I first install it into the macports 2.6 python site_packages folder. This means each time I make a code change...
Eclipse pydev project PYTHONPATH with macports python 2.6
1.2
0
0
932
6,713,715
2011-07-15T22:12:00.000
0
0
0
0
python,mysql,sqlalchemy,escaping,filepath
7,404,552
4
false
0
0
SQLAlchemy do sanitize for you if you will use regular queries. Maybe the problem that you use like clause. Like require addition escape for such symbols: _%. Thus you will need replace methods if you want to quote like expression.
4
9
0
I'm storing filenames and filepaths in MySQL. Retrieving them from the database using LIKE expressions requires that I escape all allowed filename chars that collide with MySQL special chars. I'm happy to simply use Python's string.replace() method, but was wondering if there was a more standard or built-in method of...
Escaping special characters in filepaths using SQLAlchemy
0
1
0
14,347
6,713,715
2011-07-15T22:12:00.000
-3
0
0
0
python,mysql,sqlalchemy,escaping,filepath
6,720,094
4
false
0
0
Why do you need to escape the file paths? As far as you are not manually writing select / insert queries, SQLAlchemy will take care of the escaping when it generates the query internally. The file paths can be inserted as they are into the database.
4
9
0
I'm storing filenames and filepaths in MySQL. Retrieving them from the database using LIKE expressions requires that I escape all allowed filename chars that collide with MySQL special chars. I'm happy to simply use Python's string.replace() method, but was wondering if there was a more standard or built-in method of...
Escaping special characters in filepaths using SQLAlchemy
-0.148885
1
0
14,347
6,713,715
2011-07-15T22:12:00.000
-4
0
0
0
python,mysql,sqlalchemy,escaping,filepath
7,435,697
4
false
0
0
You don't need do anything SQLAlchemy will do it for you.
4
9
0
I'm storing filenames and filepaths in MySQL. Retrieving them from the database using LIKE expressions requires that I escape all allowed filename chars that collide with MySQL special chars. I'm happy to simply use Python's string.replace() method, but was wondering if there was a more standard or built-in method of...
Escaping special characters in filepaths using SQLAlchemy
-1
1
0
14,347
6,713,715
2011-07-15T22:12:00.000
-3
0
0
0
python,mysql,sqlalchemy,escaping,filepath
7,479,678
4
false
0
0
As I know there isn’t what you are looking for in SQLAlchemy. Just go basestring.replace() method by yourself.
4
9
0
I'm storing filenames and filepaths in MySQL. Retrieving them from the database using LIKE expressions requires that I escape all allowed filename chars that collide with MySQL special chars. I'm happy to simply use Python's string.replace() method, but was wondering if there was a more standard or built-in method of...
Escaping special characters in filepaths using SQLAlchemy
-0.148885
1
0
14,347
6,715,436
2011-07-16T04:57:00.000
2
0
1
0
python
6,715,458
2
false
0
0
Yes, of course. That's one of the many normal ways to program in Python. You don't have to use classes -- in fact, many of the modules that come with Python are just collections of functions. Any Python documentation tool will be prepared to deal with this.
1
1
0
I have many python files. Each file has functions. That's it. I don't do anything with classes. Will Sphinx (or another documentation software) still create the documentation for it, and if so, what will it look like?
Is it possible to create a python documentation when there are no classes?
0.197375
0
0
75
6,716,125
2011-07-16T07:48:00.000
1
1
1
0
python,full-text-search
6,720,127
2
true
0
0
Solr, even though written in Java is an amazingly powerful search engine. It has everything you need like highlighting, weight, ability to insert new items in the index relatively fast, and also a whole slew of other features like ability to provide autocomplete-like features. It has json / xml / other response methond...
1
0
0
I want to add a feature to search documents stored in a directory. The back end is developed in Python to additionally manipulate the search results. The documents are stored in a dedicated web server. The established technologies (Lucene, Xapian, Whoosh) have mature python bindings. My colleagues have set up Apache, L...
Best-suited text indexer for handling 10000s of (formatted) documents in python
1.2
0
0
174
6,717,102
2011-07-16T11:42:00.000
1
0
1
0
python,regex,text,full-text-search
52,319,112
6
false
0
0
If you're concerned about understanding and debugging others' regex, there are translational tools that make them more easily understandable. My favorite is RegExBuddy on Windows. On Mac, RegExRx in the AppStore is helpful.
1
18
0
Regular expressions are highly unreadable and difficult to debug. Does there exist any replacement for text processing which could be handled by mere mortals? Criteria include It's a library or a tool (please point the answer to the library itself) Human readable syntax (no cheatsheets needed) Documentation with examp...
Alternatives for regex in Python
0.033321
0
0
7,974
6,721,138
2011-07-17T00:21:00.000
1
1
1
0
python,c,encryption,directory
6,721,220
1
true
0
0
I think the best thing to do would be to encrypt the individual text files using GPG, one of the strongest encryption systems available(and for free!) You can get several python libraries to do this, and I recommend python-gnupg. Also, you can probably just reference the file where the key is located and distribute it ...
1
0
0
I want to design an application that reads some a folder of text files and shows the user its contents. Three problems arise: I need the folder containing the text files to be encrypted which I don't know how to do, two, I need a way to read the encrypted files without revealing the key in the python code, so I guess C...
How to use python to read an encrypted folder
1.2
0
0
870
6,721,266
2011-07-17T00:58:00.000
1
0
0
0
python,pyside
6,721,303
2
true
0
1
Add /opt/local/var/macports/software/py26-pyside/1.0.4_0/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages to PYTHONPATH instead of what you have added.
2
0
0
I have trouble using PySide in Eclipse. I installed py26-pyside using macports and added /opt/local/var/macports/software/py26-pyside/1.0.4_0/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PySide to PYTHONPATH But I got the above import error. What am I missing? Thanks
ImportError: No module named PySide.QtCore
1.2
0
0
8,855
6,721,266
2011-07-17T00:58:00.000
0
0
0
0
python,pyside
6,988,124
2
false
0
1
Running Linux, I had the same problem and I don't use PYTHONPATH. Simpler to put /usr/local/lib/python2.6/site-packages in a file called /usr/lib/python2.6/site-packages/local.pth. It's pure python so it should work on other systems. The instructions in site.py are misleading.
2
0
0
I have trouble using PySide in Eclipse. I installed py26-pyside using macports and added /opt/local/var/macports/software/py26-pyside/1.0.4_0/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/PySide to PYTHONPATH But I got the above import error. What am I missing? Thanks
ImportError: No module named PySide.QtCore
0
0
0
8,855
6,722,736
2011-07-17T08:40:00.000
1
0
0
0
python,opencv,sift
7,152,292
5
false
0
0
Are you sure OpenCV is allowed to support SIFT? SIFT is a proprietary feature type, patented within the U.S. by the University of British Columbia and by David Lowe, the inventor of the algorithm. In my own research, I have had to re-write this algorithm many times. In fact, some vision researchers try to avoid SIFT an...
1
18
1
I know there is a lot of questions about Python and OpenCV but I didn't find help on this special topic. I want to extract SIFT keypoints from an image in python OpenCV. I have recently installed OpenCV 2.3 and can access to SURF and MSER but not SIFT. I can't see anything related to SIFT in python modules (cv and cv2)...
OpenCV Python and SIFT features
0.039979
0
0
12,701
6,723,242
2011-07-17T10:29:00.000
0
0
0
0
python,excel,colors,cell,xlwt
15,435,059
1
false
0
0
Best you read the colours from the sample given to you with xlrd. If there are only a few different colours and they stay the same over time, you can also open the file in Excel and use a colour picker tool to get the RGB values of the relevant cells.
1
3
0
I am working in python and using xlwt. I have got a sample excel sheet and have to generate same excel sheet from python. Now the problem is heading columns are highlighted using some color from excel color palette and I am not able to find the name of color. I need to generate exact copy of sample given to me. Is the...
Reading background color of a cell of an excel sheet from python?
0
1
0
1,582
6,723,370
2011-07-17T10:51:00.000
1
0
0
0
python,ruby-on-rails,content-management-system
6,723,498
1
false
1
0
I think learning Python is easier than learning Ruby (simpler syntax). So in my opinion start with Python to learn the concepts of scripting languages and afterwards Ruby will be easier.
1
0
0
My Graduation Project is developing a web-based Society Management System and i sould deliver Final Product of it at May 2012. for sure the front-end side will be designed using javascript,HTML,CSS,AJAX,..etc. The Question at Back-end side, my choice will be between Ruby on Rails and Python, i don't need to explain me ...
Ruby vs Python for Society Management System !
0.197375
0
0
196
6,723,588
2011-07-17T11:40:00.000
1
1
0
0
python,xmpp,amqp
6,724,730
3
false
0
0
This is really quite simple. I suggest that you start by writing an AMQP listener that simply prints out received messages. Once you get that working it should be obvious how to integrate that into an XMPP bot.
1
0
0
I'm looking for a way to write a XMPP bot that would listen to a RabbitMQ queue and send messages to the XMPP channel notifying users of any new issues ( already got Nagios sending notifications to RabbitMQ). I've tried using xmppy and it stopped working and I stumbled across SleekXMPP which looks fairly better. I'm j...
Interconnecting AMQP and XMPP
0.066568
0
1
571
6,724,672
2011-07-17T15:04:00.000
2
1
1
0
python,solr,full-text-search,sphinx,whoosh
6,724,817
3
false
0
0
Use Whoosh if you don't need the speed, extra features of the alternatives. It's great, has a nice API, good documentation. My second choice would probably be Xapian, which is fast and has a fairly decent API. They are all fairly mature products. If you don't know what you really need, I'd just go with Whoosh for now.
1
8
0
I am a newb coder in a startup and I am implementing search of documents in a directory in a web host. I am comparing Lucene/Solr, Whoosh, Sphinx and Xapian. Whoosh is natively python. But I want your opinions on it too. Which of these have mature and easy to use and install interfaces with python? (Whoosh is a no-br...
Among Lucene/Solr, Whoosh, Sphinx, Xapian which integrates best with python?
0.132549
0
0
2,946
6,725,559
2011-07-17T17:37:00.000
16
0
1
0
python,comparison,identity-operator
6,725,569
4
true
0
0
Try variable is False. False is 0 returns False,
2
14
0
How do I achieve the effect of the === operator in Python? For example, I don't want False == 0 to be True.
How do I achieve the effect of the === operator in Python?
1.2
0
0
6,311
6,725,559
2011-07-17T17:37:00.000
0
0
1
0
python,comparison,identity-operator
6,725,575
4
false
0
0
You can use the is operator to check for object identity. False is 0 will return False then.
2
14
0
How do I achieve the effect of the === operator in Python? For example, I don't want False == 0 to be True.
How do I achieve the effect of the === operator in Python?
0
0
0
6,311
6,725,868
2011-07-17T18:30:00.000
1
0
1
0
python,templates,generic-programming
6,725,895
9
false
0
0
Look at how the built-in containers do it. dict and list and so on contain heterogeneous elements of whatever types you like. If you define, say, an insert(val) function for your tree, it will at some point do something like node.value = val and Python will take care of the rest.
1
131
0
How does python handle generic/template type scenarios? Say I want to create an external file "BinaryTree.py" and have it handle binary trees, but for any data type. So I could pass it the type of a custom object and have a binary tree of that object. How is this done in python?
Generics/templates in python?
0.022219
0
0
155,599
6,726,101
2011-07-17T19:09:00.000
0
0
1
1
python,windows-xp
6,726,646
2
false
0
0
Do you have any other application using Python? It's also possible that applications install python for themself. An example could be a game, which uses Python for the AI. As far as i know, Panda3d installs its "own" Python...
1
1
0
I installed Python a while ago from the official python-2.5.4.msi, but I can't remember what else I might have done. On my disk, I have C:\Program Files\Python 2.5.4 and I also have C:\Python25. These directory contents look almost identical. The Program Files folder contains about 39 MB, the Python25 folder contains...
What should an installation of Python 2.5 look like on Windows XP?
0
0
0
128
6,728,944
2011-07-18T05:33:00.000
13
0
0
0
python,solr
7,787,789
4
true
0
0
Always know Solr independently of any client library like Sunburnt, pysolr, solrpy, etc. Just as you have to know relational databases before using any ORM. Moreover, no ORM documentation will teach you relational databases, and no one would expect it to do so.
1
12
0
I want to use Lucene Solr in Python. There seems to be multiple APIs for this purpose. They seem to suffer dependency hell and stability issues, and Solr doesnt ship with python bindings anymore. And I cant find any documentation for the user who is not familiar with Solr. I am leaning on Sunburnt over pysolr and solrp...
Solr: best documented, easy to use, stable Python APIs
1.2
0
0
6,472
6,733,443
2011-07-18T13:15:00.000
-1
0
1
0
python,string,pattern-matching,spell-checking
6,733,484
5
false
0
0
Use regular expressions along with a key press event!
1
5
0
Looking for a fast way to limit duplicates to a max of 2 when they occur next to each other. For example: jeeeeeeeep => ['jep','jeep'] Looking for suggestions in python but happy to see an example in anything - not difficult to switch. Thanks for any assistance! EDIT: English doesn't have any (or many) consonants (sa...
Remove letter duplicates that are in a row
-0.039979
0
0
967
6,736,152
2011-07-18T16:30:00.000
0
0
0
1
python,ajax,cgi,subprocess,pipe
6,737,020
2
false
0
0
This sounds a lot like a homework question, but even with this list, you have a lot of work ahead of you for a dubious reward, so here we go. Your C++ program should listen on a socket Your python program needs to listen on a web socket, and also have a connection open to the C++ program through the C++ socket. I'd s...
1
1
0
Let me start with an example: There is a c++ program which can be run on my server, the program is named "Guess the Number" which means every time it runs, first it will generate an integer between 1 and 100 randomly. then i need the user to guess a number and pass it to me though a web page, form or something. now...
How to INTERACT between a program on the server and the user via a web page REAL-TIME
0
0
1
233
6,736,179
2011-07-18T16:32:00.000
0
0
1
0
python,user-interface,mobile,pyqt4
6,737,107
1
true
0
1
There are python packages for symbian, look for python for S60. It's an open source project. Download the sis file to your phone and install it... good luck.
1
0
0
I am just newbie to python and now, I am writing an interface in Nokia n79 phone. My question is that is it possible to install PyQt4 in nokia n79 or possible to run PyQt4 in Nokia n79. If yes, how? Is there anyway that I could take as a reference or take as an example.
PyQT4 installation in nokia n79
1.2
0
0
170
6,736,195
2011-07-18T16:34:00.000
1
0
1
0
python,properties,wxpython,runtime,wxwidgets
6,737,329
2
false
0
1
Changing the widget's label or value are simple things. You can probably change a widgets location if you are using absolute positioning, but I think that would be counter-intuitive for the user. I know I wouldn't want my Close button to change locations all the time. I think you can set the size using its SetSize() me...
1
0
0
I have a project in Python 2.7 and wxPython. I have both IDLE and Boa Constructor available as IDEs. I need to change one or more properties of a GUI object, such as a button, at run time - especially size, location, and text (the latter in buttons and labels). How do I change these properties at run time? Mind you, I'...
Change an object's properties at run time?
0.099668
0
0
249
6,736,590
2011-07-18T17:10:00.000
5
0
0
0
python,performance,numpy,nan
46,067,557
8
false
0
0
use .any() if numpy.isnan(myarray).any() numpy.isfinite maybe better than isnan for checking if not np.isfinite(prop).all()
2
146
1
I'm looking for the fastest way to check for the occurrence of NaN (np.nan) in a NumPy array X. np.isnan(X) is out of the question, since it builds a boolean array of shape X.shape, which is potentially gigantic. I tried np.nan in X, but that seems not to work because np.nan != np.nan. Is there a fast and memory-effici...
Fast check for NaN in NumPy
0.124353
0
0
183,568
6,736,590
2011-07-18T17:10:00.000
34
0
0
0
python,performance,numpy,nan
6,736,673
8
false
0
0
I think np.isnan(np.min(X)) should do what you want.
2
146
1
I'm looking for the fastest way to check for the occurrence of NaN (np.nan) in a NumPy array X. np.isnan(X) is out of the question, since it builds a boolean array of shape X.shape, which is potentially gigantic. I tried np.nan in X, but that seems not to work because np.nan != np.nan. Is there a fast and memory-effici...
Fast check for NaN in NumPy
1
0
0
183,568
6,737,694
2011-07-18T18:40:00.000
0
0
1
0
python
6,738,871
5
false
0
1
It depends on what you are trying to do. You can have them coexist because 3.2 is backwards-compatible. Now you can install both versions on your computer 3.2 and 2.7, but 3.2 unfortunately will have to be used in IDLE....ugh.... Just install both and then depending on which one you want to use. Run that IDLE for eithe...
1
10
0
I'm new to programming and thought Python would be a good language to learn. Most of the tutorials I found were 2.7 based so I started to learn using that version. I've recently found a tkinter tutorial that I'd like to try out but I'm having a problem. If I run a script it will use Python 2.7 which contains Tkinter an...
How to I get Python 2.x and 3.x to co-exist?
0
0
0
15,701
6,738,310
2011-07-18T19:29:00.000
2
0
0
0
python,mysql,django,mysql-python,bitnami
6,738,365
3
true
1
0
You'll need to install MySQL for python as Django needs this to do the connecting, once you have the package installed you shouldn't need to configure it though as Django just needs to import from it. Edit: from your comments there is a setuptools bundled but it has been replaced by the package distribute, install thi...
3
0
0
So I installed Bitnami Django stack, hoping as proclaimed 'ready-to-run' versions of python and mysql. However, I can't get python to syncdb: "Error loading MySQLdb module: No module named MySQLdb" I thought the Bitnami package would already install everything necessary in Windows to make mysql and Python work together...
Mysql-python not installed with bitnami django stack? "Error loading MySQLdb module: No module named MySQLdb"
1.2
1
0
1,094
6,738,310
2011-07-18T19:29:00.000
0
0
0
0
python,mysql,django,mysql-python,bitnami
6,981,742
3
false
1
0
BitNami DjangoStack already includes the mysql-python components components. I guess you selected MySQL as the database when installing the BitNami Stack, right? (it also includes PostgreSQL and SQLite). Do you receive the error at installation time? Or later working with your Django project? In which platform are yo...
3
0
0
So I installed Bitnami Django stack, hoping as proclaimed 'ready-to-run' versions of python and mysql. However, I can't get python to syncdb: "Error loading MySQLdb module: No module named MySQLdb" I thought the Bitnami package would already install everything necessary in Windows to make mysql and Python work together...
Mysql-python not installed with bitnami django stack? "Error loading MySQLdb module: No module named MySQLdb"
0
1
0
1,094
6,738,310
2011-07-18T19:29:00.000
0
0
0
0
python,mysql,django,mysql-python,bitnami
12,083,825
3
false
1
0
So I got this error after installing Bitnami Django stack on Windows Vista. Turns out that I had all components installed, but easy_install mysql_python didn't unwrap the entire package... ? I inst... uninst... inst... uninst multiple times, but no combination (using mysql for the startup Project) made any difference...
3
0
0
So I installed Bitnami Django stack, hoping as proclaimed 'ready-to-run' versions of python and mysql. However, I can't get python to syncdb: "Error loading MySQLdb module: No module named MySQLdb" I thought the Bitnami package would already install everything necessary in Windows to make mysql and Python work together...
Mysql-python not installed with bitnami django stack? "Error loading MySQLdb module: No module named MySQLdb"
0
1
0
1,094
6,739,856
2011-07-18T21:49:00.000
1
1
0
0
python,lettuce
6,884,086
2
true
0
0
This was actually something simple: the folder the tests were running in were owned by root so I needed to run the tests with sudo in order for it to generate the report.
1
1
0
I'm trying to get an xml report of the results of my behavior tests running in the lettuce framework. According the --help for lettuce, you should use the switch --with-xunit. I've done that (and also used --xunit-file) but no report is generated. I tried reinstalling lettuce but still no luck. How can I get it to gene...
Python lettuce test results in XML
1.2
0
1
2,043
6,741,863
2011-07-19T03:01:00.000
1
0
0
0
android,python,monkeyrunner,monkey
11,164,138
3
false
0
1
There is a indirect way,you can toggle between portrain & landscape, but only the setting page.Steps:- 1.Disable auto-rotate screen option in settings page,keep the same page open. 2.Keep device in horizontally(It wont go to landscape mode as auto rotate is disabled 3.Get coordinates of disable/enable by enabling ...
3
3
0
How can I use MonkeyRunner to switch the screen mode(Portrait mode and Landscape mode)?
Switch the screen mode with MonkeyRunner?
0.066568
0
0
1,576
6,741,863
2011-07-19T03:01:00.000
0
0
0
0
android,python,monkeyrunner,monkey
6,820,953
3
false
0
1
If its a physical device then I do not know of a way to change the screen mode without actually physically putting the device on its side.
3
3
0
How can I use MonkeyRunner to switch the screen mode(Portrait mode and Landscape mode)?
Switch the screen mode with MonkeyRunner?
0
0
0
1,576
6,741,863
2011-07-19T03:01:00.000
1
0
0
0
android,python,monkeyrunner,monkey
8,223,351
3
false
0
1
There is no such way.
3
3
0
How can I use MonkeyRunner to switch the screen mode(Portrait mode and Landscape mode)?
Switch the screen mode with MonkeyRunner?
0.066568
0
0
1,576
6,742,589
2011-07-19T05:19:00.000
0
0
0
0
python,browser,artificial-intelligence,pygame
6,742,643
2
false
1
0
As far as I know it is not possible to execute python scripts in the browser. What you can do is generate the set of actions to be taken on the server side using python and then send these commands to the browser and interpret them in javascript. Or if you don't want a server side, you can just write the game in action...
1
0
0
I am not much into gaming but i am learning and doing some practicles in Artifical Intelligence algorithms. Now as i can develop full fledge application so it means even if learn various techniques , i won't be having anything to show in interview. I have seen that all AI techniques / algorithms are usually tested as s...
Can i code browser games in python in my website
0
0
1
1,443
6,743,033
2011-07-19T06:20:00.000
1
0
1
0
python,naming-conventions
6,743,099
4
false
0
0
Totally depends on what certain naming convention do you use. If naming of such functions is not described in it, then name the function as you will. are_strings_similar looks just fine for me. It's not a big deal.
2
1
0
It is well accepted that assertion functions that check a single value/object have names that start with "is" (is_valid, is_ok, is_empty). I have a function that compares several objects (strings, in my case) and decides whether they are "similar enough". How would you name such a function? My variant is are_strings_s...
Naming convention for a function that analyzes several objects and returns a boolean value
0.049958
0
0
274
6,743,033
2011-07-19T06:20:00.000
4
0
1
0
python,naming-conventions
6,743,204
4
true
0
0
Personally, I would go with is_strings_similar or just is_similar. Why? Because it makes the string search through your code for all assertion functions that much easier. It's code, not a research paper. Improperly conjugated verbs are not the main issue, ease of maintenance is. Most any English speaker can read "is_st...
2
1
0
It is well accepted that assertion functions that check a single value/object have names that start with "is" (is_valid, is_ok, is_empty). I have a function that compares several objects (strings, in my case) and decides whether they are "similar enough". How would you name such a function? My variant is are_strings_s...
Naming convention for a function that analyzes several objects and returns a boolean value
1.2
0
0
274
6,743,061
2011-07-19T06:23:00.000
2
0
0
0
c#,java,.net,python,linux
6,743,097
3
false
1
0
If you don't mind moving out of your comfort zone, I would recommend Ruby on Rails (on top of Django and JSP).
2
1
0
We are a group of 2 C# programmers, which have experience in wcf web services, asp.net MVC 3, different architectural patterns, Inversion of control etc. We have to implement a web site, which will run on Linux with minimum of 10k online users. The problem is that it will run on Linux, and we don't know what language t...
Cross platform, stable, and with great feature web platform
0.132549
0
0
262
6,743,061
2011-07-19T06:23:00.000
1
0
0
0
c#,java,.net,python,linux
6,743,485
3
false
1
0
I love Python and Django, and even use it in every projects I have at school/uni before. But it's just me, who have some experience with Python; everything you know have some real-world sample with large scale, so choose the one you like/know best. You are going to deploy in Linux, so maybe ASP.NET is a acceptable choi...
2
1
0
We are a group of 2 C# programmers, which have experience in wcf web services, asp.net MVC 3, different architectural patterns, Inversion of control etc. We have to implement a web site, which will run on Linux with minimum of 10k online users. The problem is that it will run on Linux, and we don't know what language t...
Cross platform, stable, and with great feature web platform
0.066568
0
0
262
6,743,407
2011-07-19T07:05:00.000
5
0
0
0
python,sorting,file-io
6,743,440
4
false
0
0
Sort your list of files in the program. Don't rely on operating system calls to give the files in the right order, it depends on the actual file system being used.
1
9
1
I am working with a program that writes output to a csv file based on the order that files are read in from a directory. However with a large number of files with the endings 1,2,3,4,5,6,7,8,9,10,11,12. My program actually reads the files by I guess alphabetical ordering: 1,10,11,12....,2,20,21.....99. The problem i...
How to sort files in a directory before reading?
0.244919
0
0
34,380
6,745,464
2011-07-19T10:05:00.000
3
1
1
0
python,math,trigonometry
6,745,509
7
false
0
0
You're looking for the math.acos() function.
1
52
0
Apologies if this is straight forward, but I have not found any help in the python manual or google. I am trying to find the inverse cosine for a value using python. i.e. cos⁻¹(x) Does anyone know how to do this? Thanks
Inverse Cosine in Python
0.085505
0
0
117,730
6,745,521
2011-07-19T10:11:00.000
2
0
1
0
python,unicode
6,745,694
1
true
0
0
repr() works fine on Unicode strings. For printable ASCII characters, it will print the character, and for unprintable characters, it will print the Unicode escape sequence.
1
3
0
Like repr(), except converting into \uXXXX instead of \x00 *edited title
Is there a built in python function to escape a string of unicode characters into unicode escape sequences "\uXXXX\uXXXX\uXXXX"?
1.2
0
0
1,081
6,745,854
2011-07-19T10:40:00.000
1
0
1
0
python
6,745,898
8
false
0
0
filter(bool, map(lambda x:x.rstrip(), open(filename)))
1
6
0
I'm looking for one liner which will remove all the blank lines from a file in python. python equivalent for --> grep -v '^$' file_name > file_name
one liner for removing blank lines from a file in python?
0.024995
0
0
17,598
6,746,614
2011-07-19T11:46:00.000
0
0
1
1
python,linux,kernel,gentoo
6,746,830
4
false
0
0
Another possibility would be to try some different commands till you find one that returns sensible results. "rpm -qa kernel" should work for RedHat and some others while "dpkg --list | grep linux-image" should do the trick for ubuntu. Probably not much better than searching the filesystem directly and you have to pars...
1
1
0
Simply I want to clean older kernel's modules. It's "uname -r" but I need to get such information for all kernels with Python (I already know their names and can clean kernel files, initramfs and System.map). if that is possible ... Thank you.
How to get kernel version by using kernel name (not current kernel)
0
0
0
4,768
6,748,791
2011-07-19T14:26:00.000
0
1
0
1
python
6,748,862
4
false
0
0
You could just check the properties of each folder and look for the total size of the files in it. In Ubuntu, just right click on the folder, click properties and check the contents size. Not a python solution, but much easier (not everything needs a script to find the answer). The biggest folders will likely be the o...
1
1
0
My hard drive is full. What is the easiest way to find out the TOP 5 FOLDERS that consume the most disk space? A python solution would be greatly appreciated. I use Ubuntu Linux.
Top 5 Folders Consuming The Most Space?
0
0
0
475
6,749,250
2011-07-19T14:55:00.000
0
0
0
0
grid,wxpython
6,750,499
1
true
0
1
Have you thought about using a ListCtrl instead? I think that might work better. I especially like the ObjectListView widget, which is a nice object oriented wrapper of the ListCtrl. Note that neither the grid nor the ListCtrl really support buttons in their cells, although the grid might work better by using a custom ...
1
0
0
I can't find anything in the docs. All the code I find is messy and all over the place; all I want to do, is have a table take up the whole frame, and have 6 columns; ID Name Author Type Tags More Info The "More Info" column should have a button, which will call a function with the ID column as param. How would I do ...
wxPython Tables to display data on full frame
1.2
0
0
1,980
6,750,619
2011-07-19T16:28:00.000
7
0
0
0
python,http,parallel-processing,download,feed
6,882,144
10
false
0
0
You can try pycurl, though the interface is not easy at first, but once you look at examples, its not hard to understand. I have used it to fetch 1000s of web pages in parallel on meagre linux box. You don't have to deal with threads, so it terminates gracefully, and there are no processes left behind It provides opt...
4
19
0
I'm looking for a python library or a command line tool for downloading multiple files in parallel. My current solution is to download the files sequentially which is slow. I know you can easily write a half-assed threaded solution in python, but I always run into annoying problem when using threading. It is for pollin...
Library or tool to download multiple files in parallel
1
0
1
6,882
6,750,619
2011-07-19T16:28:00.000
5
0
0
0
python,http,parallel-processing,download,feed
6,750,711
10
false
0
0
There are lots of options but it will be hard to find one which fits all your needs. In your case, try this approach: Create a queue. Put URLs to download into this queue (or "config objects" which contain the URL and other data like the user name, the destination file, etc). Create a pool of threads Each thread shoul...
4
19
0
I'm looking for a python library or a command line tool for downloading multiple files in parallel. My current solution is to download the files sequentially which is slow. I know you can easily write a half-assed threaded solution in python, but I always run into annoying problem when using threading. It is for pollin...
Library or tool to download multiple files in parallel
0.099668
0
1
6,882
6,750,619
2011-07-19T16:28:00.000
-1
0
0
0
python,http,parallel-processing,download,feed
6,750,741
10
false
0
0
Threading isn't "half-assed" unless you're a bad programmer. The best general approach to this problem is the producer / consumer model. You have one dedicated URL producer, and N dedicated download threads (or even processes if you use the multiprocessing model). As for all of your requirements, ALL of them CAN be don...
4
19
0
I'm looking for a python library or a command line tool for downloading multiple files in parallel. My current solution is to download the files sequentially which is slow. I know you can easily write a half-assed threaded solution in python, but I always run into annoying problem when using threading. It is for pollin...
Library or tool to download multiple files in parallel
-0.019997
0
1
6,882
6,750,619
2011-07-19T16:28:00.000
0
0
0
0
python,http,parallel-processing,download,feed
6,889,198
10
false
0
0
I used the standard libs for that, urllib.urlretrieve to be precise. downloaded podcasts this way, via a simple thread pool, each using its own retrieve. I did about 10 simultanous connections, more should not be a problem. Continue a interrupted download, maybe not. Ctrl-C could be handled, I guess. Worked on Windows,...
4
19
0
I'm looking for a python library or a command line tool for downloading multiple files in parallel. My current solution is to download the files sequentially which is slow. I know you can easily write a half-assed threaded solution in python, but I always run into annoying problem when using threading. It is for pollin...
Library or tool to download multiple files in parallel
0
0
1
6,882
6,750,717
2011-07-19T16:37:00.000
0
0
0
0
wxpython,refresh,frames
6,751,443
1
true
0
1
This one could be done with pubsub. Have the second frame publish a message to the first frame telling it to refresh. I actually think you'll want to use Layout() though. That's what I usually use when I remove or add visible elements. You shouldn't need to Refresh() a menu when removing items from it. At least, the ex...
1
0
0
Title says it all.I can't find a way to do it... .Refresh() doens't do anything, other than crash the program. The situation I'm in, is that I have a frame which is launched from the "main" frame. This frame makes changes to the "main" frame's menu bar and panel. What can I call to refresh the main frame, from the seco...
wxPython refresh frame
1.2
0
0
1,371
6,752,146
2011-07-19T18:24:00.000
0
0
0
0
python,pygtk,gtktreeview
6,755,133
3
false
0
1
If the strings are unique you can use a dictionary to link the strings with the objects by using the strings as keys. In this case you can find the objects by its string.
1
6
0
I have a list L of objects of my class A. This class implements __str__/__repr__, so each object has it's own string representation (not necessary unique). I have a GUI in pygtk, where I have a TreeView widget with only one column. I want to populate it with string representations of the objects in L, but then I want t...
Custom objects in ListStore/TreeStore
0
0
0
2,143
6,755,679
2011-07-20T00:21:00.000
0
0
0
0
python,facebook-graph-api
6,770,444
1
true
1
0
We don't allow access to friend email addresses for obvious privacy reasons. You have to explicitly ask for this from each user.
1
1
0
So, I have a FB app already, and when people connect I ask for the extended permission "email" and that is all well and good. I save the email and can get a list of their friends' ids and basic profiles. I want to know if there is a way for me to figure out which of their friends have allowed their email to be visible...
Facebook Graph API: Have extended permission, need something odd
1.2
0
1
226
6,755,794
2011-07-19T23:18:00.000
16
0
1
0
python,ipython
6,766,813
3
false
0
0
It should be stored as _exit_code after you run the command (at least in the upcoming v0.11 release).
1
8
0
Does anybody know how to check the status of the last executed command (exit code) in ipython?
Check the exit status of last command in ipython
1
0
0
5,195