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,824,681
2011-07-26T02:46:00.000
2
0
1
0
python,random
65,432,066
9
false
0
0
u could try this it produces randomly generated array of true and false : a=[bool(i) for i in np.array(np.random.randint(0,2,10))] out: [True, True, True, True, True, False, True, False, True, False]
1
328
0
I am looking for the best way (fast and elegant) to get a random boolean in python (flip a coin). For the moment I am using random.randint(0, 1) or random.getrandbits(1). Are there better choices that I am not aware of?
Get a random boolean in python?
0.044415
0
0
237,244
6,829,112
2011-07-26T11:09:00.000
6
0
0
0
python,windows,mercurial,pre-commit-hook
6,833,112
1
true
0
0
I got this solution over IRC for Mercurial. As stated in one of my comments, the script for the hook should be specified as an absolute path or it should a python module in PYTHONPATH. Hence, I was suggested by pmezard over IRC that I should have a fixed script that invokes the local commit.py. This can be done as show...
1
9
0
I'm trying to create a Mercurial hook that runs when the commits are being pushed to the main repository. I created a python script as given below: # commit.py from mercurial import ui, hg from mercurial.i18n import gettext as _ def getV1ID(ui, repo, **kwargs): ui.write("The hook works!!!") v1id = ui.prompt(...
Mercurial Pre-Commit Hook: How to hook to python program in current directory?
1.2
0
0
3,323
6,829,853
2011-07-26T12:16:00.000
1
0
0
0
resize,wxpython,frame
6,829,965
3
false
0
1
You can use SetSizeHints (or SetMaxSize and SetMinSize) to restrict the maximum and minimum sizes or th
1
11
0
How can I disable a wxFrame from being resized by the user? If there's a flag to put in when creating the frame, what is it?
wxPython Disable Frame Resizing
0.066568
0
0
16,096
6,835,274
2011-07-26T19:14:00.000
0
1
0
0
python,plugins,webserver,trac
33,694,758
3
false
0
0
Quite an old thread, but since I ran into the same problem at one point: Make sure you build the .egg with the same Python version that you use to run Trac with!Backwards compatibility between Python versions does not matter here, because Trac reads information about the Python version out of the .egg file before it ev...
3
1
0
At work we are using Trac on several internal wiki's and an external wiki. REcently we found the need for a new plugin. After we going through a few tutorials we went to install a plugin to make sure it would work. It didn't. We've been going through trying to figure out. Below I will list the steps and various things ...
Trac Plugin Not working
0
0
0
1,484
6,835,274
2011-07-26T19:14:00.000
0
1
0
0
python,plugins,webserver,trac
27,168,395
3
false
0
0
Check the Trac version and downloaded plugin instead python setup.py bdist_egg try python setup.py install
3
1
0
At work we are using Trac on several internal wiki's and an external wiki. REcently we found the need for a new plugin. After we going through a few tutorials we went to install a plugin to make sure it would work. It didn't. We've been going through trying to figure out. Below I will list the steps and various things ...
Trac Plugin Not working
0
0
0
1,484
6,835,274
2011-07-26T19:14:00.000
1
1
0
0
python,plugins,webserver,trac
6,848,819
3
false
0
0
It sounds like you built the egg correctly. After you copy it into your plugins folder, change the file's owner and group (I'm assuming you're on Linux since you mentioned chmod) to match the account that your webserver uses. I'm not sure if that's strictly necessary, but it's what's always worked for me. I may be mi...
3
1
0
At work we are using Trac on several internal wiki's and an external wiki. REcently we found the need for a new plugin. After we going through a few tutorials we went to install a plugin to make sure it would work. It didn't. We've been going through trying to figure out. Below I will list the steps and various things ...
Trac Plugin Not working
0.066568
0
0
1,484
6,837,514
2011-07-26T22:44:00.000
6
0
0
1
python,shell,virtualenv
6,847,060
3
false
0
0
So I figured out how to do this. In the activate script the $PS1 is redefined to prepend the name of the env, in this case (foo-env). In order to prepend it with whatever you want you have to go into the activate script that you run to activate the virtualenv ([yourenv]/bin/activate]). There you change the line that th...
1
5
0
When I am in my virtualenv and it's active, the name of the environment appears in parentheses before the normal command line prompt. It looks like: (foo-env)User:~/Development/foo-env/foo$ where foo-env is the name of the environment. I was wondering if there was a way to make it that the command line prompt displayed...
Displaying virtualenv
1
0
0
3,584
6,838,281
2011-07-27T00:44:00.000
0
0
0
0
python,linux,flash,npapi
6,839,048
1
false
0
0
Your best bet (assuming basing your hosting code on open source software isn't an issue for you licensing-wise) is probably to look at the implementation of NPAPI host in WebKit, Chromium, and/or Gecko. The Mozilla documentation for the browser side of NPAPI will help, but there are a lot of little corner cases where p...
1
2
0
The docs I've found on NPAPI plugins explain how to write plugins to be loaded by browsers, but how hard is it to write an application that loads existing NPAPI plugins? (My ultimate goal here is to find a way to use SWF content inside an application written with Python and wxPython in Linux. I've accomplished this on ...
How can I load an NPAPI plugin in my own application?
0
0
0
499
6,847,684
2011-07-27T16:10:00.000
3
0
0
1
python,linux,excel,win32com,wine
6,847,960
1
true
0
0
You'd need a Windows version of Python, not a Linux version -- I'm saying you'd have to run Python under wine as well. Have you tried with just a normal Windows install of Python on wine? I don't see any reason why this wouldn't work. There is are numerous pages in a Google search that show Windows Python (32-bit) work...
1
2
0
I have a rather complex Excel 2010 file that I automate using python and win32com. For this I run windows in virtual box on an ubuntu machine. However, that same excel file solves/runs fine on Ubuntu Maverick directly using wine 1.3. Any hope of automating Excel on wine so I can drop the VM? Or is that just crazy tal...
automating excel with win32com on linux with wine
1.2
1
0
2,617
6,848,790
2011-07-27T17:42:00.000
1
1
0
0
python,matlab,mex
11,173,545
4
false
0
0
A mex function is an api that allows Matlab (i.e. a matlab program) to call a function written in c/c++. This function, in turn, can call Matlab own internal functions. As such, the mex function will be linked against Matlab libraries. Thus, to call a mex function directly from a Python program w/o Matlab libraries do...
1
7
1
I am using a proprietary Matlab MEX file to import some simulation results in Matlab (no source code available of course!). The interface with Matlab is actually really simple, as there is a single function, returning a Matlab struct. I would like to know if there is any way to call this function in the MEX file direct...
Embed a function from a Matlab MEX file directly in Python
0.049958
0
0
7,858
6,850,012
2011-07-27T19:21:00.000
1
0
1
0
python,c,numpy,python-c-api
6,852,257
1
true
0
0
You can use PyType_IsSubtype(child, parent) to see if the child type inherits the parent, but it operates on PyTypeObject*, not PyObject*.
1
0
0
How do I use the Python C-API to check if a PyObject* points to the type numpy.uint8 etc? (Note that I want to check if the PyObject* points to the type numpy.uint8, not if it points to an instance of the type numpy.uint8.)
How to check if PyObject* points to the type numpy.uint8
1.2
0
0
411
6,850,080
2011-07-27T19:26:00.000
0
0
0
0
python,ffmpeg
7,193,911
1
false
0
0
Did you look at Celery distributed task queueing system? I use it in the quitd same project as yours. Sultan
1
0
0
I want to transcode videos that are uploaded to a directory in a server with a queue. How can I order the server to encode a video using FFmpeg with Python? And how a queue system can be added above that?
Transcode videos with queue
0
0
0
360
6,852,061
2011-07-27T22:35:00.000
4
0
0
0
python
6,853,367
2
false
1
0
does this look like a good design ? No. what tools would you choose to do it in if you program in python ? Beautiful Soup find automatically the right table in the HTML page, -- probably by searching the text for some sample data and trying to find the common HTML element which contain both Bad idea. A better id...
1
1
0
I have this problem, I need to scrape lots of different HTML data sources, each data source contains a table with lots of rows, for example country name, phone number, price per minute. I would like to build some semi automatic scraper which will try to .. find automatically the right table in the HTML page, -- probab...
Smart Automatic Scraping
0.379949
0
1
1,205
6,852,189
2011-07-27T22:52:00.000
10
1
1
0
python,oop,programming-languages,metaprogramming,smalltalk
6,864,488
2
false
0
0
Posted as an answer at questioner's request. One of the big ideas of Smalltalk is orthogonality. Frankly Python suffers in this respect. Not everything works on everything. Examples: inspect.getargspec() does not work on built-in functions or the results of calls to functools.partial (in the C interpreter anyway). eva...
2
10
0
I have of late been learning Python, and am amazed by its superb runtime metaprogramming capabilities. Previously I came across the term 'runtime metaprogramming' was when I was reading about Smalltalk, which as far as I know boasts of best runtime metaprogramming capabilities. How well does Python stack up against Sma...
Python and Smalltalk - Metaprogramming capabilities comparison
1
0
0
1,442
6,852,189
2011-07-27T22:52:00.000
12
1
1
0
python,oop,programming-languages,metaprogramming,smalltalk
6,853,978
2
true
0
0
Python actually holds up fairly well here. Smalltalk usually doesn't make explicit distinction between program and metaprogramm, but Python is more explicit - eg, the special syntax for decorators or the __foo__() naming convention for metaprogramming hooks. This is a good thing. On the other hand, it's a bit of an ap...
2
10
0
I have of late been learning Python, and am amazed by its superb runtime metaprogramming capabilities. Previously I came across the term 'runtime metaprogramming' was when I was reading about Smalltalk, which as far as I know boasts of best runtime metaprogramming capabilities. How well does Python stack up against Sma...
Python and Smalltalk - Metaprogramming capabilities comparison
1.2
0
0
1,442
6,852,990
2011-07-28T00:49:00.000
3
1
0
0
php,python,perl
6,854,713
3
false
0
0
First, Facebook is a large company. They have many different software projects, apart from the site itself, and some of them are probably written in languages different from the company's mainstream. Second, teaching a good $lang1 programmer $lang2's syntax takes two weeks, while teaching a bad $lang2 programmer how t...
1
0
0
I was reading through Facebook's hiring now job listings and I saw this... * Competency in Shell, PHP, Perl or Python. C is a plus This sparked a question in my mind, is it possible to use (for example) python and PHP together? As in... I write a function in PHP to read a MySQL database and cut the data read into raw ...
Python PHP and Perl being used together?
0.197375
0
0
406
6,853,923
2011-07-28T03:53:00.000
1
0
0
0
python,r,numpy,scipy,memory-mapped-files
6,854,030
6
false
0
0
I don't know anything about Rpy. I do know that SciPy is used to do serious number-crunching with truly large data sets, so it should work for your problem. As zephyr noted, you may not need either one; if you just need to keep some running sums, you can probably do it in Python. If it is a CSV file or other common f...
3
7
1
In my python environment, the Rpy and Scipy packages are already installed. The problem I want to tackle is such: 1) A huge set of financial data are stored in a text file. Loading into Excel is not possible 2) I need to sum a certain fields and get the totals. 3) I need to show the top 10 rows based on the totals. Wh...
Python: handling a large set of data. Scipy or Rpy? And how?
0.033321
0
0
3,050
6,853,923
2011-07-28T03:53:00.000
5
0
0
0
python,r,numpy,scipy,memory-mapped-files
6,853,981
6
false
0
0
Neither Rpy or Scipy is necessary, although numpy may make it a bit easier. This problem seems ideally suited to a line-by-line parser. Simply open the file, read a row into a string, scan the row into an array (see numpy.fromstring), update your running sums and move to the next line.
3
7
1
In my python environment, the Rpy and Scipy packages are already installed. The problem I want to tackle is such: 1) A huge set of financial data are stored in a text file. Loading into Excel is not possible 2) I need to sum a certain fields and get the totals. 3) I need to show the top 10 rows based on the totals. Wh...
Python: handling a large set of data. Scipy or Rpy? And how?
0.16514
0
0
3,050
6,853,923
2011-07-28T03:53:00.000
2
0
0
0
python,r,numpy,scipy,memory-mapped-files
7,559,475
6
true
0
0
As @gsk3 noted, bigmemory is a great package for this, along with the packages biganalytics and bigtabulate (there are more, but these are worth checking out). There's also ff, though that isn't as easy to use. Common to both R and Python is support for HDF5 (see the ncdf4 or NetCDF4 packages in R), which makes it ver...
3
7
1
In my python environment, the Rpy and Scipy packages are already installed. The problem I want to tackle is such: 1) A huge set of financial data are stored in a text file. Loading into Excel is not possible 2) I need to sum a certain fields and get the totals. 3) I need to show the top 10 rows based on the totals. Wh...
Python: handling a large set of data. Scipy or Rpy? And how?
1.2
0
0
3,050
6,854,658
2011-07-28T05:59:00.000
9
1
1
0
python,unit-testing,python-unittest
6,854,720
3
false
0
0
Suppose you have a suite with 10 tests. 8 of the tests share the same setup/teardown code. The other 2 don't. setup and teardown give you a nice way to refactor those 8 tests. Now what do you do with the other 2 tests? You'd move them to another testcase/suite. So using setup and teardown also helps give a natural way ...
1
116
0
Can anyone explain the use of Python's setUp and tearDown methods while writing test cases apart from that setUp is called immediately before calling the test method and tearDown is called immediately after it has been called?
Explain the "setUp" and "tearDown" Python methods used in test cases
1
0
0
128,148
6,854,665
2011-07-28T06:00:00.000
0
0
1
0
python
6,858,768
4
false
0
0
One possible solution is to use google documents to extract the text contents from binary .doc-files. You upload the document to google docs and then download the text contents. It is a fairly slow process, but it is the only "pure Python" solution I know of since it doesn't require any external tools except for networ...
1
0
0
I am developing a full text search engine for indexing popular binary formats. I know that there are hundereds of such questions (and solutions) already, but I found it tough to find one: cross platform supports DOC, DOCX and PDF formats at once easy to use with python can be set up in a major shared host
solution to convert PDFs, DOCs, DOCXs into a textual format with python
0
0
0
2,544
6,858,965
2011-07-28T12:27:00.000
0
0
0
0
python,twisted
6,863,320
1
true
0
0
Factories are a way to associate a particular way to create a connection with a particular listening or connecting socket. They are how you say "this port is speaking protocol X". Once a connection handler (Protocol instance) is constructed, it's not associated with its factory beyond the .factory attribute. You can ...
1
3
0
Im trying to get an hang of twisted for a new project I want to do on my spare time and Im having difficulties getting a grip of it. I havnt done any "real" work with it yet, just keeping myself busy with reading docs and sites Ive found. So say that I was making a multiplayer game with multiple zones (maps), kinda lik...
Python Twisted multiple clients
1.2
0
0
753
6,863,071
2011-07-28T17:25:00.000
2
0
1
0
python,oop,programming-languages
6,863,561
2
false
0
0
1) Python's approach for implementing classes is very different from languages like Java and C#. It's very flexible, and you can override and modify almost every part of its behaviour, you actually have control over the implementation of how they work. Class attributes are just objects that live in the namespace of the...
1
1
0
This is actually two questions: 1) What is that logic behind the fact that, when declaring a python class, do variables default to static and methods default to instance? I know i can declare variables in _init _ or add @staticmethod or @classmethod to methods to flip them to the other side, but it just seems (to me at...
Python class static/instance defaults
0.197375
0
0
375
6,863,756
2011-07-28T18:21:00.000
2
0
0
0
python,csv,performance
6,863,816
2
true
0
0
In order to remove duplicates you will have to have some sort of memory that tells you if you have seen a line before. Either by remembering the lines or perhaps a checksum of them (which is almost safe...) Any solution like that will probably have a "brute force" feel to it. If you could have the lines sorted before ...
1
1
1
I am trying to effeciently remove duplicate rows from relatively large (several hundred MB) CSV files that are not ordered in any meaningful way. Although I have a technique to do this, it is very brute force and I am certain there is a moe elegant and more effecient way.
Effeciently Removing Duplicates from a CSV in Python
1.2
0
0
1,090
6,864,484
2011-07-28T19:22:00.000
0
0
0
0
python,pygtk,gobject,pygobject
6,864,549
3
false
0
1
ffi.h is provided by the package libffi-dev, which is actually from the gcc source package. and most probably it's available for linux.
1
0
0
i am trying to install pygtk on my mac which then asked me to install pygobject which then asked me to get gobject-introspection . the problem i have in this installation is while configuring it shows this error : checking for FFI... no checking for ffi.h... configure: error: ffi.h not found please do help me with ...
problem with configuring gobject-introspection for pygobject and pygtk
0
0
0
2,065
6,865,896
2011-07-28T21:25:00.000
12
0
1
0
python,django,virtualenv,pip,buildout
6,870,373
1
true
1
0
At the core, buildout and pip+virtualenv do the same. They both use python packages, install them, isolate them from the rest of your python environment, handle dependencies (through setup.py) and so on. Buildout does more. Which, naturally, means a bit more configuration than with pip. You'll have to figure out whethe...
1
12
0
Pros and cons? I'm personally using buildout for my django projects but thinking of switching to virtualenv + pip for its simplicity.
Buildout vs virtualenv + pip for django?
1.2
0
0
2,492
6,866,802
2011-07-28T23:03:00.000
1
0
0
0
javascript,python
6,867,016
2
true
1
0
to a certain extent, the problem can be considered in terms of economic forces, where you maximize your own utility and minimize costs. In the case of a game with a client/server aspect, The actual forces acting on you are consuming server resources costs you actual money, but consuming client resources doesn't clien...
2
0
0
Im fairly proficient in php and am also learning python. I have been wanting to create a basic game for some time now and would like to create it in python. But in order to have a fancy smooth interface I need to use javascript (i dont much care for the flash/silverlight route). So I decided to start looking up game de...
Starting game development in javascript. Where to draw the line between JS and Server Language
1.2
0
0
1,209
6,866,802
2011-07-28T23:03:00.000
1
0
0
0
javascript,python
6,866,829
2
false
1
0
python would probably run on the server powering your web server. If you want to write multiplayer client-server games then a lot of server code/logic would be in python. If you want to write simpler singleplayer games then all your code is in the client (browser) and would be javascript. Python would just be there for...
2
0
0
Im fairly proficient in php and am also learning python. I have been wanting to create a basic game for some time now and would like to create it in python. But in order to have a fancy smooth interface I need to use javascript (i dont much care for the flash/silverlight route). So I decided to start looking up game de...
Starting game development in javascript. Where to draw the line between JS and Server Language
0.099668
0
0
1,209
6,869,107
2011-07-29T05:42:00.000
1
0
0
0
python,wsgi,multipartform-data,form-data
6,909,531
1
true
1
0
You can use cgi.FieldStorage to parse form posts etc. You may be better off though using Werkzeug/Flask which has its own implementation which works a lot better, plus you get higher level stuff which makes things a lot easier.
1
2
0
Is there a recommendable library to parse form data and/or multi-part requests with Python and WSGI?
Parsing form data / multi-part requests with Pythons WSGI
1.2
0
1
1,493
6,870,118
2011-07-29T07:51:00.000
2
0
0
0
python,resize,tkinter,tk
6,870,304
3
false
0
1
You can use right-anchored geometry specifications by using a minus sign in the right place: 123x467-78+9 However, I don't know if this will work on Windows (the above is an X11 trick, and I don't know if it is implemented in the platform-compatibility layer or not); you might have to just calculate the new position gi...
2
0
0
I'm not sure on how to articulate this... I have a Tkinter window, and I need to hide half of this window when a button is pressed. However, I need the left-most side to be hidden, so that the window is now half the size it originally was, and shows the right half of the original window. All of Tkinter's resize fu...
Resize Tkinter Window FROM THE RIGHT (python)
0.132549
0
0
1,136
6,870,118
2011-07-29T07:51:00.000
0
0
0
0
python,resize,tkinter,tk
6,954,676
3
false
0
1
My IT teacher had a suggestion: Add a Scrollbar out of sight, and after resizing the root window, force the scrollbar to scroll all the way to the right. (So I guess I'd have to create a canvas, pack all my widgets to the frame, pack the frame to the canvas, configure the canvas with the scrollbar?) I'm not sure if...
2
0
0
I'm not sure on how to articulate this... I have a Tkinter window, and I need to hide half of this window when a button is pressed. However, I need the left-most side to be hidden, so that the window is now half the size it originally was, and shows the right half of the original window. All of Tkinter's resize fu...
Resize Tkinter Window FROM THE RIGHT (python)
0
0
0
1,136
6,870,446
2011-07-29T08:22:00.000
1
0
0
0
python,html-parsing,beautifulsoup,lxml,pyquery
6,870,510
4
false
1
0
If beautifulsoup doesn't fix your html problem, the next best solution would be regular expression. lxml, elementtree, minidom are very strict in parsing and actually they are doing right. Other tips: I feed the html to lynx browser through command prompt, and take out the text version of the page/content and parse us...
2
4
0
I have some random HTML and I used BeautifulSoup to parse it, but in most of the cases (>70%) it chokes. I tried using Beautiful soup 3.0.8 and 3.2.0 (there were some problems with 3.1.0 upwards), but the results are almost same. I can recall several HTML parser options available in Python from the top of my head: Bea...
What’s the most forgiving HTML parser in Python?
0.049958
0
1
1,484
6,870,446
2011-07-29T08:22:00.000
2
0
0
0
python,html-parsing,beautifulsoup,lxml,pyquery
6,896,409
4
true
1
0
I ended up using BeautifulSoup 4.0 with html5lib for parsing and is much more forgiving, with some modifications to my code it's now working considerabily well, thanks all for suggestions.
2
4
0
I have some random HTML and I used BeautifulSoup to parse it, but in most of the cases (>70%) it chokes. I tried using Beautiful soup 3.0.8 and 3.2.0 (there were some problems with 3.1.0 upwards), but the results are almost same. I can recall several HTML parser options available in Python from the top of my head: Bea...
What’s the most forgiving HTML parser in Python?
1.2
0
1
1,484
6,871,470
2011-07-29T10:02:00.000
0
0
0
1
python,macos,sudo,orbited,pypm
6,992,590
1
true
0
0
Navigate to the directory of the files and then try running the command.
1
0
0
I have tried pypm install orbited but I still get sudo: orbited: command not found when running sudo orbited I downloaded orbited from http://pypi.python.org/pypi/orbited/0.7.10 Where do I put the files to install? Thanks
How to install orbited on Mac 10.6
1.2
0
0
124
6,871,537
2011-07-29T10:08:00.000
2
1
0
0
c++,python,windows,ipc
6,872,320
2
false
0
1
Since you say the device has a "C++ interface", I assume it provides a header file + DLL which you can link to and control the device via an API. In such a case, the fastest approach would be to wrap this API in Python (using Swig or other C++-to-Python API tools). This will provide a very low overhead of just a couple...
1
1
0
I have a USB camera (uEye) which has a C++ interface allowing you to configure some features of the camera. The C++ program can read the image data from the camera and store it somewhere in pre-allocated memory. All of this runs under Windows. Python with numpy gives me a simple environment to manipulate images and spe...
Share video data between C++ and Python
0.197375
0
0
1,214
6,874,214
2011-07-29T13:52:00.000
0
0
1
0
python,eclipse,pydev,pylint
7,062,993
5
false
0
0
have you tried rebuilding your project?
4
11
0
I have pylint installed (works fine on the command line) and set up within Pydev in Eclipse. Pylint is being triggered OK when I edit files, and is outputting to the Eclipse console. But, the pylint warnings don't appear as marks in the editor margin (in the same way as compiler warnings and errors) Newly-generated war...
How to get pylint warnings to be marked in the Pydev Eclipse editor margin?
0
0
0
3,051
6,874,214
2011-07-29T13:52:00.000
-1
0
1
0
python,eclipse,pydev,pylint
7,064,520
5
false
0
0
Only modules reachable through PYTHONPATH are passed to pylint, so you need to set your PYTHONPATH correctly in the project options.
4
11
0
I have pylint installed (works fine on the command line) and set up within Pydev in Eclipse. Pylint is being triggered OK when I edit files, and is outputting to the Eclipse console. But, the pylint warnings don't appear as marks in the editor margin (in the same way as compiler warnings and errors) Newly-generated war...
How to get pylint warnings to be marked in the Pydev Eclipse editor margin?
-0.039979
0
0
3,051
6,874,214
2011-07-29T13:52:00.000
2
0
1
0
python,eclipse,pydev,pylint
7,349,528
5
false
0
0
I was having the same problem, and it turned out to be my pylint configuration file (~/.pylintrc by default). Be sure the output-format field is correct. It is under the [REPORTS] section, and the line should be: output-format=text If you've ever used pylint with another application (I do with emacs), it might say ou...
4
11
0
I have pylint installed (works fine on the command line) and set up within Pydev in Eclipse. Pylint is being triggered OK when I edit files, and is outputting to the Eclipse console. But, the pylint warnings don't appear as marks in the editor margin (in the same way as compiler warnings and errors) Newly-generated war...
How to get pylint warnings to be marked in the Pydev Eclipse editor margin?
0.07983
0
0
3,051
6,874,214
2011-07-29T13:52:00.000
3
0
1
0
python,eclipse,pydev,pylint
7,449,962
5
true
0
0
I had this exact problem today, on a brand new system. I tracked down the cause, and it seems that PyDev refuses to pick up the messages from pylint 0.24.0, which was released on July 20, 2011. Reverting to the previous version (pylint 0.23.0) seems to have solved the problem. For me, that involved removing everything...
4
11
0
I have pylint installed (works fine on the command line) and set up within Pydev in Eclipse. Pylint is being triggered OK when I edit files, and is outputting to the Eclipse console. But, the pylint warnings don't appear as marks in the editor margin (in the same way as compiler warnings and errors) Newly-generated war...
How to get pylint warnings to be marked in the Pydev Eclipse editor margin?
1.2
0
0
3,051
6,874,527
2011-07-29T14:17:00.000
21
0
1
0
python,linux,ubuntu,pip,apt-get
26,352,956
7
false
0
0
Most answers to this question miss one of the advantages using apt-get: apt-get is pre-compiled, which installs much faster than pip. To install numpy, matplotlib, pandas, and other scipy-related modules, apt-get only takes seconds; pip can easily consume 10min+. If you have root access and don't mind a little outdate...
5
37
0
I'm trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I'm able to install them using either apt-get or using pip. Is there a difference in installing by the two methods? I know that using pip, I'm able to install it into a virtual environment but with apt-get it i...
What is the difference between installing a package using pip vs. apt-get?
1
0
0
22,077
6,874,527
2011-07-29T14:17:00.000
36
0
1
0
python,linux,ubuntu,pip,apt-get
6,874,826
7
true
0
0
You probably already know the benefits of apt-get. Automatic update notifications, other apt-installed packages that need those tools know they're installed, etc. With pip, you know you're getting the latest version at the time you install it, you can install to a non-default version of Python, and you can install to a...
5
37
0
I'm trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I'm able to install them using either apt-get or using pip. Is there a difference in installing by the two methods? I know that using pip, I'm able to install it into a virtual environment but with apt-get it i...
What is the difference between installing a package using pip vs. apt-get?
1.2
0
0
22,077
6,874,527
2011-07-29T14:17:00.000
2
0
1
0
python,linux,ubuntu,pip,apt-get
56,688,016
7
false
0
0
Which one should you use: Both apt-get and pip are mature package managers which automatically install any other package dependency while installing. You may use anyone as you like. However, if you need to install a particular version of python-package, or install the package in a virtualenv, or install a package which...
5
37
0
I'm trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I'm able to install them using either apt-get or using pip. Is there a difference in installing by the two methods? I know that using pip, I'm able to install it into a virtual environment but with apt-get it i...
What is the difference between installing a package using pip vs. apt-get?
0.057081
0
0
22,077
6,874,527
2011-07-29T14:17:00.000
5
0
1
0
python,linux,ubuntu,pip,apt-get
31,239,300
7
false
0
0
You should be aware that what makes it in the package manager undergoes some integration testing, while what is in Pypi is untested. Pypi is OK for development. In production, you may go with Pypi, but you will soon learn that you can always rely on what is in the package manager...
5
37
0
I'm trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I'm able to install them using either apt-get or using pip. Is there a difference in installing by the two methods? I know that using pip, I'm able to install it into a virtual environment but with apt-get it i...
What is the difference between installing a package using pip vs. apt-get?
0.141893
0
0
22,077
6,874,527
2011-07-29T14:17:00.000
1
0
1
0
python,linux,ubuntu,pip,apt-get
60,768,134
7
false
0
0
I found something about this. My ubuntu has both python version 3.6 and 3.7. When apt install python3-xxx, xxx will be installed at /usr/lib/python3/dist-packages, but pip3 install xxx at /usr/local/lib/python3.7(my default python version)/dist-packages. And when change python to version 3.6, xxx installed by pip3 coul...
5
37
0
I'm trying to deploy a Django site on an Ubuntu machine. I need to install Psycopg2 and PIL but it seems that I'm able to install them using either apt-get or using pip. Is there a difference in installing by the two methods? I know that using pip, I'm able to install it into a virtual environment but with apt-get it i...
What is the difference between installing a package using pip vs. apt-get?
0.028564
0
0
22,077
6,875,599
2011-07-29T15:41:00.000
1
0
0
1
python,python-2.7,socketserver
68,489,995
5
false
0
0
It seems that you can't use ForkingServer to share variables because Copy-on-Write happens when a process tries to modify a shared variable. Change it to ThreadingServer and you'll be able to share global variables.
1
24
0
I would like to pass my database connection to the EchoHandler class, however I can't figure out how to do that or access the EchoHandler class at all. class EchoHandler(SocketServer.StreamRequestHandler): def handle(self): print self.client_address, 'connected' if __name__ == '__main__': conn = MySQ...
With python socketserver how can I pass a variable to the constructor of the handler class
0.039979
0
0
13,253
6,876,120
2011-07-29T16:24:00.000
1
0
0
0
php,python,django,zend-framework,cakephp
6,876,279
2
true
1
0
All of the frameworks that you mentioned are capable. Pick one in the language that you know the best and use that.
1
0
0
I'm trying to develop an application server that will deliver content to a core group of websites, as well as provide third party services to other websites that also want to use this content. The app server will be hosting web services for these core + 3rd party websites. Authentication and all that comes into play....
Developing an application server: django vs. zend vs. cakephp vs. codeigniter vs. other
1.2
0
0
1,278
6,877,301
2011-07-29T18:16:00.000
0
0
0
0
python,frameworks
6,877,382
6
false
1
0
I don't think that any web framework is specifically oriented for the use case you're talking about; They all assume they are running on a server and there's a browser on a remote machine that is accessing them. A better approach is to think about the HTTP server you'll be using. It's probably preferable to use a ser...
1
3
0
I have a python program that I would like to present as a simple web application. The program currently uses sqlite for storage. I also need to distribute the whole thing to colleagues so having something standalone and easy to start would be ideal ( no install if possible). This web app is meant to be used locally ...
Suggest a standalone python web framework?
0
0
0
2,446
6,877,326
2011-07-29T18:18:00.000
1
0
0
0
python,wxpython,clipboard,pickle
6,878,114
2
false
0
1
You should not trust data from the clipboard for unpickling, unless you have a sure way to make sure it was wrtten by your app, and has not been altered. From the python documentation: Warning The pickle module is not intended to be secure against erroneous or maliciously constructed data. Never unpickle data rec...
2
2
0
I'd like my wxPython application to support cut/copy/paste operations between different running instances of the application. Is it OK to simply pickle a data structure, copy it to clipboard as text, and then unpickle it for paste operations? I know I'd have to check the data for some sign that it's from my app. Or cou...
Is it OK to pass complex data structures through the clipboard with wxPython?
0.099668
0
0
261
6,877,326
2011-07-29T18:18:00.000
1
0
0
0
python,wxpython,clipboard,pickle
6,878,268
2
false
0
1
If applicable I suggest you to convert your data to and from json using one of the many python implementations. Being plain text is easy to transfer using clipboard moreover there are no risks converting back a json object back to python. One last thing: no risks of deprecation.
2
2
0
I'd like my wxPython application to support cut/copy/paste operations between different running instances of the application. Is it OK to simply pickle a data structure, copy it to clipboard as text, and then unpickle it for paste operations? I know I'd have to check the data for some sign that it's from my app. Or cou...
Is it OK to pass complex data structures through the clipboard with wxPython?
0.099668
0
0
261
6,877,553
2011-07-29T18:40:00.000
0
0
0
0
python,dns,dnspython
6,890,137
1
false
1
0
Do you really have to do it with DNSPython? Is this a custom name server? The typical way you normally do it (with bind, for example) is by pre-signing the zone file. The DNSSEC RRSIG does not have any dependency on the connection parameters so we don't really have to do on-the-fly signing. Also, things like NSEC would...
1
3
0
I'm trying to DNSSEC Sign a RRSET, however I am not able finding any references to how to do so using DNSPython. Yes it has dns.dnssec.validate_rrsig(), but I want to DNSSEC sign a rrset, how can this be done? I've been pooring over the RFC's however I'm obviously lacking something in order to make it work.
DNSSEC Sign RRSET using DNSPython
0
0
0
884
6,878,273
2011-07-29T19:48:00.000
0
1
0
0
python
6,892,524
1
true
0
0
I used the SendKeys module, which allows you to send keystrokes to Windows. Not perfect, but it works in the meantime.
1
0
0
I am wondering what modules or methods I should use to control a File Upload box from Python. I want Python to take control of this box when it pops up, and automatically navigate to a specific folder/file and select this file.
Controlling a File Upload Box with Python
1.2
0
0
175
6,878,303
2011-07-29T19:51:00.000
2
0
1
0
python,c,cryptography,cryptanalysis
6,878,635
5
false
0
0
I don't see why a Markov chain couldn't be modified to work. I would create a text file dictionary of sorts, and read that in to initially populate the data structure. You would just be using a chain of n letters to predict the next letter, rather than n words to predict the next word. Then, rather than randomly gen...
3
12
0
I'm not sure how exactly to word this question, so here's an example: string1 = "THEQUICKBROWNFOX" string2 = "KLJHQKJBKJBHJBJLSDFD" I want a function that would score string1 higher than string2 and a million other gibberish strings. Note the lack of spaces, so this is a character-by-character function, not word-by-wor...
Scoring a string based on how English-like it is
0.07983
0
0
3,190
6,878,303
2011-07-29T19:51:00.000
9
0
1
0
python,c,cryptography,cryptanalysis
6,878,408
5
false
0
0
I would start with a simple probability model for how likely each letter is, given the previous (possibly-null, at start-of-word) letter. You could build this based on a dictionary file. You could then expand this to use 2 or 3 previous letters as context to condition the probabilities if the initial model is not good ...
3
12
0
I'm not sure how exactly to word this question, so here's an example: string1 = "THEQUICKBROWNFOX" string2 = "KLJHQKJBKJBHJBJLSDFD" I want a function that would score string1 higher than string2 and a million other gibberish strings. Note the lack of spaces, so this is a character-by-character function, not word-by-wor...
Scoring a string based on how English-like it is
1
0
0
3,190
6,878,303
2011-07-29T19:51:00.000
0
0
1
0
python,c,cryptography,cryptanalysis
6,878,774
5
false
0
0
I don't know how it works, but Mail::SpamAssassin::Plugin::TextCat analyzes email and guesses what language it is (with dozens of languages supported).
3
12
0
I'm not sure how exactly to word this question, so here's an example: string1 = "THEQUICKBROWNFOX" string2 = "KLJHQKJBKJBHJBJLSDFD" I want a function that would score string1 higher than string2 and a million other gibberish strings. Note the lack of spaces, so this is a character-by-character function, not word-by-wor...
Scoring a string based on how English-like it is
0
0
0
3,190
6,878,404
2011-07-29T20:01:00.000
3
0
0
0
python,django,apache,wsgi
6,878,503
3
true
1
0
. 4. Point Apache at your static folder.
1
2
0
I'm deploying my app and I wonder what I'm missing. I did the following: Set my STATIC_ROOT to an empty folder in my server. Set the STATIC_URL to '/static/' Added 'django.contrib.staticfiles' to INSTALLED_APPS In development my static files are in the root of my app in a folder named static. So, I ran manage.py coll...
How to serve static files in production for Django 1.3
1.2
0
0
940
6,878,418
2011-07-29T20:02:00.000
3
0
0
0
python,cookies,python-requests,httprequest
6,929,808
9
false
0
0
Well, cookielib.LWPCookieJar has load and save methods on it. Look at the format and see if it matches the native cookie format. You may well be able to load your cookie straight into a cookie jar using StringIO. Alternatively, if Requests is using urllib2 under the hood, you could add a cookie handler to the default o...
1
43
0
I'm using the Python Requests library to make HTTP requests. I obtain a cookie from the server as text. How do I turn that into a CookieJar with the cookie in it?
Putting a `Cookie` in a `CookieJar`
0.066568
0
1
74,064
6,878,642
2011-07-29T20:26:00.000
1
0
0
1
python,google-app-engine,pdf
6,893,852
2
true
1
0
No. This requires a PDF renderer, and to the best of my knowledge no such thing exists in pure-Python. You'll have to use an external service to generate thumbnails.
1
4
0
Is it possible, using the python version of google app engine, to create a thumbnail of a PDF file? The goal is for the user to be able to upload a PDF, and see it represented as a thumbnail on the page.
PDF Thumbnailing with Google App Engine (Python)
1.2
0
0
568
6,879,815
2011-07-29T22:51:00.000
-1
0
0
0
python,django,django-admin
6,880,287
2
false
1
0
I'm not too sure, but admin forms don't reach to the commit point unless they meet clean() requirements. After that I guess everything will be committed. This behavior should be sufficient for the default forms in admin. However, for more complex forms, you can create your custom admin form and I'm pretty sure you can ...
1
6
0
I just wonder how is transaction managed in django's admin commands. Commit on save? Commit on success? I can't find related info from official documents.
How is transaction managed in Django's admin commands?
-0.099668
0
0
1,967
6,880,142
2011-07-29T23:59:00.000
0
1
0
0
python,gwt,gwt-rpc
6,883,832
2
false
1
0
The answer to the question is GWT requires the content-type to be x-gwt-rpc; rather than 'application/x-www-form-urlencoded'; which is hard coded in _http.py in the mechanize library. Quick and dirty hack is to change this to text/x-gwt-rpc; charset=UTF-8 -- I'm sure this could be done better by subcl...
2
0
0
I am getting a 500 : Internal error, the payload of the POST is definately right, one thing I noticed is the Content-Type is not "sticking" using b.addheaders = [('Content-Type',"text-x-gwt-rpc")] -- and I'm not sure why. Does anyone have quick/dirty code used to access a GWT RPC (i.e. emulate the GWT client) in Python...
Calling a GWT RPC function from Python-mechanize
0
0
0
425
6,880,142
2011-07-29T23:59:00.000
0
1
0
0
python,gwt,gwt-rpc
6,880,354
2
false
1
0
Do not use GWT-RPC from non-GWT solutions, the format is internal and subject to change without notice. Consider RESTifying the app (or use SOAP and reuse the existing code of the methods, but care needs to be given to the interface definitions).
2
0
0
I am getting a 500 : Internal error, the payload of the POST is definately right, one thing I noticed is the Content-Type is not "sticking" using b.addheaders = [('Content-Type',"text-x-gwt-rpc")] -- and I'm not sure why. Does anyone have quick/dirty code used to access a GWT RPC (i.e. emulate the GWT client) in Python...
Calling a GWT RPC function from Python-mechanize
0
0
0
425
6,880,884
2011-07-30T03:24:00.000
8
0
1
0
python,dependency-injection
6,881,159
2
false
0
0
The conclusion (The following is the most relevant part of the original post. I admit, I waxed a little poetical, and so I though I should simply include the most important sentences in their own section. That said, I feel that the poetic waxing is important enough that I have not deleted it.) Dependency injection is s...
1
17
0
Been messing about with python, as usual it throws my rigid static typed Object Oriented world in to a bit of a mess. Python supports duck typing, has no usable concept of interface based programming (as in C# interfaces) and allows Global variables. With all these goodies is there really any point to a dependency inje...
Is there a point to dependency injection container in Python?
1
0
0
7,750
6,881,010
2011-07-30T04:04:00.000
6
0
0
0
python,tkinter,widget,width,tkinter-entry
6,883,301
3
true
0
1
You cannot specify the width in pixels using the '-width' option, but there are ways to accomplish the same thing. For example, you could pack an entry in a frame that has no border, turn off geometry propagation on the frame, then set the width of the frame in pixels.
1
11
0
I noticed that the width argument for the Tkinter entry widget is in characters, not pixels. Is it possible to adjust the width in pixels?
How do I set the width of an Tkinter Entry widget in pixels?
1.2
0
0
25,061
6,882,218
2011-07-30T09:17:00.000
1
1
0
0
android,python,sl4a
10,452,996
2
true
1
1
I used a round about method to circumvent the problem. First the python script needs to be modified to look for a text file containing the attributes. Now whenever I need to start the script, i have to push the txt file containing the attributes and then start the script.
1
2
0
I am trying to get a Python script which I normally run on my PC to run on my Android phone (HTC Hero). I have SL4A running on my phone and have made a few tweaks to the Python script so that this does now run. The problem that I am having is how to pass parameters to the script. I have tried creating a sh script in SL...
Passing parameters to a python script using SL4A on Android
1.2
0
0
2,086
6,886,553
2011-07-30T23:22:00.000
1
0
0
0
c++,python,opengl
6,886,657
6
false
0
1
I agree with newlymintedcocoaguy something such as Pygame is the way to go in your situation. But to awnser your second question, you can make 2D games in C++ without the use of OpenGL/DirectX. I have done this in the past using the Windows libraries for bitmaps, RECTS etc. I assume Linux will have similiar function...
3
3
0
A friend of mine is making the jump from graphic designer to game developer, and I have decided to work with him in my free time. Neither of us have much development experience, but I am very interested in learning Python, and my friend wants to learn C++. I have read that C++ is the common denominator in game programm...
2D Game Programming for Linux, OSX, and Windows - C++/Python/OpenGL?
0.033321
0
0
6,008
6,886,553
2011-07-30T23:22:00.000
0
0
0
0
c++,python,opengl
6,887,227
6
false
0
1
As someone whose familiar with the "I'm new, I want to do X, what should I learn?" thing, having done it quite recently, I'd say stick with Python for now. As others have mentioned, there are some decent libraries like PyGame out there, and C++ is well, a little complex. If you're learning both how to put the parts tog...
3
3
0
A friend of mine is making the jump from graphic designer to game developer, and I have decided to work with him in my free time. Neither of us have much development experience, but I am very interested in learning Python, and my friend wants to learn C++. I have read that C++ is the common denominator in game programm...
2D Game Programming for Linux, OSX, and Windows - C++/Python/OpenGL?
0
0
0
6,008
6,886,553
2011-07-30T23:22:00.000
1
0
0
0
c++,python,opengl
6,888,494
6
false
0
1
i will recommend c++. Many people say that its difficult, true to some extent, but you can make a good 2d game in c++, without getting into the 'difficult' part. And for this you will need a library like SDL , SFML etc. Its worth your time, if you learn C++, at least you will never run in performance problem.
3
3
0
A friend of mine is making the jump from graphic designer to game developer, and I have decided to work with him in my free time. Neither of us have much development experience, but I am very interested in learning Python, and my friend wants to learn C++. I have read that C++ is the common denominator in game programm...
2D Game Programming for Linux, OSX, and Windows - C++/Python/OpenGL?
0.033321
0
0
6,008
6,886,578
2011-07-30T23:29:00.000
3
0
1
0
python,pycairo
8,592,610
3
false
0
0
android's step almost works. one needs to use (from llimllib): export ARCHFLAGS='-arch x86_64' in step 5, and then python waf install can succeed.
1
16
0
Has anyone installed pycairo 1.10 on the mac using the new waf build? Its failing on can't find python headers.
How to install PyCairo 1.10 on Mac OSX with default python
0.197375
0
0
9,191
6,886,699
2011-07-31T00:05:00.000
0
1
0
0
php,python,django
6,886,763
2
false
1
0
Which language do you prefer? That's all that really matters. Both have solid frameworks and similar performance. If you want to increase performance, writing more efficient code is going to make a way bigger difference. Personally, I like python. Django is great, but you might also consider Flask or Pyramid/Pylons....
1
0
0
I was thinking of rewriting my custom PHP app on a framework... mainly for the solidity and more ease of growth going forward. Right now its a pseudo MVC setup with lots of hacks in between. I already have the db built out and the app uses a lot of AJAX too. I am not concerned with the amount of work involved as the s...
Rewriting A Custom PHP App on a framework. Torn between Python (Django) and PHP (CodeIgniter)
0
0
0
259
6,888,332
2011-07-31T08:22:00.000
3
1
1
0
javascript,python
6,888,348
1
false
0
0
You're missing the fact that MI is very, very rarely used in Python, usually only for mixins where the inheritance chain tends to be very short anyways.
1
1
0
I am curious about the complexity of Python and JS 's looking up: Python supports multi-inheritance, which affects the member lookup. Specifically, when referencing a member from an instance of a class, the process will start from the instance's dict, then to the class of the instance, then up to the super classes of ...
The complexity of member looking up: Python Vs. Javascript
0.53705
0
0
121
6,888,622
2011-07-31T09:32:00.000
0
0
0
0
python,google-app-engine,django-templates
7,345,375
1
false
1
0
Write a unit test in tests.py, where you render the template using django.templates.Template. Check there whether it renders to something else than None or "" or white space. Once that unit test succeeds, you can proceed with the next one: Use self.client to render the template using the full stack. If the problem is h...
1
4
0
Usually an error message is shown in browser if any error occured processing a Django/GAE template. But once such error is contained in an included file, then none message is shown - the "include" tag produces just blank output making development difficult. Is there a way to show all errors?
No errors shown rendering an included file in Django/GAE
0
0
0
81
6,888,750
2011-07-31T09:58:00.000
34
0
0
0
python,pyqt,pyside
6,889,577
6
true
0
1
Both toolkits are actively maintained, and by now more or less equal in features and quality. There are only few, rather unimportant differences. Still, I'd recommend PySide for Python 2. It has a more reasonable API, mainly it doesn't expose Qt types, which have a direct equivalent in Python (e.g. QString, QList, et...
5
72
0
I started learning a bit of python and would now like to toy around a bit with gui-building. Qt seems to be a good choice because of its cross-platformishness. Now there seem to be two bindings available: PyQt by Riverbank Computing and PySide, originally developed by Nokia. So which one should I choose? All I can find...
PyQt or PySide - which one to use
1.2
0
0
57,758
6,888,750
2011-07-31T09:58:00.000
18
0
0
0
python,pyqt,pyside
7,159,812
6
false
0
1
I recently ported a significant code base (over 8,000 lines of code) from PyQt to PySide. Right now I'd say PyQt is a much more mature, performant and stable project. I hit a number of bugs in PySide, and suspect that any big project will hit issues. Having said that, I reported a bug to the project and it was fixed an...
5
72
0
I started learning a bit of python and would now like to toy around a bit with gui-building. Qt seems to be a good choice because of its cross-platformishness. Now there seem to be two bindings available: PyQt by Riverbank Computing and PySide, originally developed by Nokia. So which one should I choose? All I can find...
PyQt or PySide - which one to use
1
0
0
57,758
6,888,750
2011-07-31T09:58:00.000
25
0
0
0
python,pyqt,pyside
6,906,509
6
false
0
1
There is also the licensing difference. PySide is LGPL while PyQt is GPL. This could make a difference if you don't wish to make your project opensource. Although PyQt always has the propriety version available for a fairly reasonable price. I tend to find the PySide documentation more intuitive. The API, in my opin...
5
72
0
I started learning a bit of python and would now like to toy around a bit with gui-building. Qt seems to be a good choice because of its cross-platformishness. Now there seem to be two bindings available: PyQt by Riverbank Computing and PySide, originally developed by Nokia. So which one should I choose? All I can find...
PyQt or PySide - which one to use
1
0
0
57,758
6,888,750
2011-07-31T09:58:00.000
5
0
0
0
python,pyqt,pyside
17,322,123
6
false
0
1
I have a 20k line Python app that I unsuccessfully tried to convert to PySide. Conversion is easy and most of the functionality works. There are several methods that are not implemented because they are 'deprecated', so I had to fix those. That was OK. On Windows, using PySide-1.1.2, the '==' operator is not implement...
5
72
0
I started learning a bit of python and would now like to toy around a bit with gui-building. Qt seems to be a good choice because of its cross-platformishness. Now there seem to be two bindings available: PyQt by Riverbank Computing and PySide, originally developed by Nokia. So which one should I choose? All I can find...
PyQt or PySide - which one to use
0.16514
0
0
57,758
6,888,750
2011-07-31T09:58:00.000
10
0
0
0
python,pyqt,pyside
12,804,098
6
false
0
1
Although they might have similar interface for Qt/C++ classes, their interface for Qt/C++ macros such as signal/slot/property are very different. Porting one to another is not an easy job. It would be better to make the right decision at the very beginning. Beyond the grammar/license differences, I just want to point o...
5
72
0
I started learning a bit of python and would now like to toy around a bit with gui-building. Qt seems to be a good choice because of its cross-platformishness. Now there seem to be two bindings available: PyQt by Riverbank Computing and PySide, originally developed by Nokia. So which one should I choose? All I can find...
PyQt or PySide - which one to use
1
0
0
57,758
6,888,856
2011-07-31T10:20:00.000
2
1
0
0
c#,java,javascript,python
6,888,882
4
false
1
1
I'd recommend you GWT from Google. It is great, well done framework that allows creating Web 2.0 applications without dealing with HTML/JavaScript at all.
1
0
0
I'm looking for solutions that make it possible to create AJAX-enabled web applications without need to write JavaScript code manually. The requirements are: Performance doesn't matter. It can be slow, JavaScript may be unoptimized, amount of code it generates may be large. Platform doesn't matter as long as I can wor...
AJAX web applications with no hand-written JavaScript
0.099668
0
0
217
6,889,490
2011-07-31T12:32:00.000
24
0
1
0
readline,ipython,pip,osx-lion
6,889,502
2
true
0
0
I've had the same issue and for some reason only the version of readline installed via easy_install readline works fine.
1
14
0
What is required to get ipython fully functional on OSX Lion? I'm trying to get ipython with readline working and having no success. My approach: (inside a virtual environment) pip install ipython # runs, but only slightly useful because can't indent blocks pip install readline The second completes with warnings a...
pip installing ipython with readline on OSX Lion
1.2
0
0
8,629
6,889,747
2011-07-31T13:31:00.000
51
0
1
0
python,interpreted-language
6,889,786
15
false
0
0
The CPU can only understand machine code indeed. For interpreted programs, the ultimate goal of an interpreter is to "interpret" the program code into machine code. However, usually a modern interpreted language does not interpret human code directly because it is too inefficient. The Python interpreter first reads the...
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
1
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
2
0
1
0
python,interpreted-language
15,917,436
15
false
0
0
Almost, we can say Python is interpreted language. But we are using some part of one time compilation process in python to convert complete source code into byte-code like java language.
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
0.02666
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
38
0
1
0
python,interpreted-language
39,355,299
15
false
0
0
The answer depends on what implementation of python is being used. If you are using lets say CPython (The Standard implementation of python) or Jython (Targeted for integration with java programming language)it is first translated into bytecode, and depending on the implementation of python you are using, this bycode ...
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
1
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
0
0
1
0
python,interpreted-language
69,549,874
15
false
0
0
Seems to be a case of semantics. I think most of us infer that the usual result of compiling is machine-code. With that in mind I say to myself that python is not compiled. I would be wrong though because compile really means convert to a lower level so converting from source to byte-code is also compiling.
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
0
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
5
0
1
0
python,interpreted-language
64,294,007
15
false
0
0
It really depends on the implementation of the language being used! There is a common step in any implementation, though: your code is first compiled (translated) to intermediate code - something between your code and machine (binary) code - called bytecode (stored into .pyc files). Note that this is a one-time step th...
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
0.066568
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
6
0
1
0
python,interpreted-language
52,136,618
15
false
0
0
If ( You know Java ) { Python code is converted into bytecode like java does. That bytecode is executed again everytime you try to access it. } else { Python code is initially traslated into something called bytecode that is quite close to machine language but not actual machine code so each time we access or run it...
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
1
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
11
0
1
0
python,interpreted-language
62,849,220
15
false
0
0
Its a big confusion for people who just started working in python and the answers here are a little difficult to comprehend so i'll make it easier. When we instruct Python to run our script, there are a few steps that Python carries out before our code actually starts crunching away: It is compiled to bytecode. Then i...
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
1
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
0
0
1
0
python,interpreted-language
47,177,165
15
false
0
0
The python code you write is compiled into python bytecode, which creates file with extension .pyc. If compiles, again question is, why not compiled language. Note that this isn't compilation in the traditional sense of the word. Typically, we’d say that compilation is taking a high-level language and converting it to...
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
0
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
0
0
1
0
python,interpreted-language
68,519,866
15
false
0
0
As sone one already said, "interpreted/compiled is not a property of the language but a property of the implementation." Python can be used in interpretation mode as well as compilation mode. When you run python code directly from terminal or cmd then the python interpreter starts. Now if you write any command then thi...
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
0
0
0
210,806
6,889,747
2011-07-31T13:31:00.000
2
0
1
0
python,interpreted-language
57,390,010
15
false
0
0
For newbies Python automatically compiles your script to compiled code, so called byte code, before running it. Running a script is not considered an import and no .pyc will be created. For example, if you have a script file abc.py that imports another module xyz.py, when you run abc.py, xyz.pyc will be created since x...
10
241
0
From my understanding: An interpreted language is a high-level language run and executed by an interpreter (a program which converts the high-level language to machine code and then executing) on the go; it processes the program a little at a time. A compiled language is a high-level language whose code is first conver...
Is Python interpreted, or compiled, or both?
0.02666
0
0
210,806
6,892,408
2011-07-31T21:22:00.000
1
0
0
1
python,ruby-on-rails-3,google-app-engine,data-migration
6,892,479
2
false
1
0
You can't change the name of an entity. It's not permitted. If you change the name of an attribute in a model (please don't call them columns), AppEngine will ignore the old data in the old field, and return None for the new field.
1
5
0
I've done a lot of development in rails, and am looking into developing projects using python & app engine. From the demo project and what I've seen so far, I've got a question/concern about app engine projects: How is data migration handled in app-engine? For example, if I change the name of an entity/table (ex: Texts...
Data Migrations and AppEngine
0.099668
0
0
608
6,892,449
2011-07-31T21:32:00.000
5
1
0
0
python,machine-learning,statistics,intrusion-detection
17,491,843
1
false
0
0
Here's a simple machine learning approach to the problem, and is what I'd do to get started on this problem and develop a baseline classifier: Build up a corpus of scripts and attach a label either 'good' (label= 0) or 'bad' (label = 1) the more the better. Try to ensure that the 'bad' scripts are a reasonable fractio...
1
15
0
I work for a webhost and my job is to find and cleanup hacked accounts. The way I find a good 90% of shells\malware\injections is to look for files that are "out of place." For example, eval(base64_decode(.......)), where "....." is a whole bunch of base64'ed text that is usually never good. Odd looking files jump o...
Anomaly detection using Python
0.761594
0
0
3,832
6,892,686
2011-07-31T22:16:00.000
2
1
0
0
python,django,bash,ssh
6,898,424
1
true
1
0
The chosen UNIX shell does not matter for the Python development. AFAIK the only shell specific part in Python development, which is currently being widely used, is virtualenv and it should work with sh compatible shells.
1
0
0
i want to create a django project using ssh, my host give me some options when i enable ssh, i'm allowed to use bash, zsh, ksh, csh,fish and tcsh, I'm familiar with bash but not with the rest so which is better for django? which is the closest to python? or are they all the same when it comes to application development...
run django from ssh
1.2
0
0
342
6,895,205
2011-08-01T07:12:00.000
0
0
0
0
php,jquery,python,html,ajax
6,895,290
3
false
1
0
Yeah, you'll need ajax for that. Create the form as usual, then submit it using Ajax. Form handling can be done as usual. If you google 'file upload Ajax' I'm sure you can find everything you need :)
2
0
0
I want to build a web service that will process some files. Here is what I want to do: User uploads a file to the server using "upload form", the file is saved as a temporary file on the server-side Server-side python script processes the temporary file and produces some statistics (for example, number of lines and w...
How to upload a file and display its information
0
0
0
197
6,895,205
2011-08-01T07:12:00.000
0
0
0
0
php,jquery,python,html,ajax
6,895,293
3
false
1
0
yeah, i'd made second ajax request and run it with schedule (e.g. every 10 seconds). it will query the server if uploaded file is processed. the server may even do the file processing in external program. the php-script that accepts second ajax request checks some READY status and give client the answer YES/NO/FAILED. ...
2
0
0
I want to build a web service that will process some files. Here is what I want to do: User uploads a file to the server using "upload form", the file is saved as a temporary file on the server-side Server-side python script processes the temporary file and produces some statistics (for example, number of lines and w...
How to upload a file and display its information
0
0
0
197
6,895,269
2011-08-01T07:18:00.000
0
0
1
1
python,ide
6,897,397
4
false
0
0
I'd recommend starting with 2.7 since most libraries work with it. The differences between both are not too big, so you might even be able to switch if you want to in the future. But before you choose Python 3 and you find a library you really want to use and it's not available for Python 3 you would regret choosing. w...
1
1
0
Based on my project, which is the best version of Python to use? Which is the best IDE to use that runs on Linux (Ubuntu) and Windows? Here is the background for these questions: I'm building a small application GUI that features "drill-down" views and direct manipulation on personalized calendars. Should I use Python ...
Which is the best Python version and IDE for me to use?
0
0
0
2,710
6,895,545
2011-08-01T07:49:00.000
2
0
0
0
python,tkinter
6,897,584
1
false
0
1
Yes, it's possible to implement it. You can use the dump method of the text widget to get all the text and tags in a given range. To paste, you just have to use that information when inserting the text. It gets somewhat complicated when you try to paste, say, italic text inside a range of already bolded text since you ...
1
0
0
in my Text widget I have here and there many tags, taking care of the text appearance (bold, italic etc). Tkinter takes care by default of cut/copy/paste in the text widget, but only of the text content, not of the associated tags. Do you know if it is possible to implement it? I anticipate some problems if I would cut...
python/tkinter: is it possible to copy paste text AND tags?
0.379949
0
0
598
6,896,565
2011-08-01T09:36:00.000
4
1
1
0
python,objective-c,coding-style
6,896,630
1
false
0
0
If you mean, "can I write the call with square brackets instead of round ones and put them around the object and method names instead of after and omit the commas", then no. If you mean "can I make verbose, descriptive method names", then of course you can; you can do that in any language worth mentioning. I think what...
1
2
0
I know that this question will recieve some fairly strong comments but I'm going to post it anyway. I'm working on a project in Python. My simple reasons for choosing Python are the available librtaries and it is cross platform and open source. My problem is that I really enjoy coding with the very verbose, descriptiv...
Using Objective C function call styles in Python
0.664037
0
0
142
6,896,942
2011-08-01T10:10:00.000
1
1
1
0
php,asp.net,python,django
6,899,782
3
false
1
0
python has a ui like vb, it's called pygtk (pygtk.org), i suggest you learn python, it's the easiest to learn, and you don't have to write as much as you would in .net php is powerful, and you have to learn it, you just have to, but for big complicated web apps, I rather choose ruby on rails or even better django which...
3
2
0
I know similar questions to this have been asked before, but I'm looking for a more specific answer so here it goes: I'm a student and am looking to develop a web app. I have little experience with all mentioned and like different aspects of each. I like the Visual Web Dev that can be used to create ASP.NET sites, a a...
Python + Django vs. ASP.NET + C#/VB vs PHP?
0.066568
0
0
3,202
6,896,942
2011-08-01T10:10:00.000
1
1
1
0
php,asp.net,python,django
6,899,152
3
true
1
0
This question is really too open ended. there is no one true language, otherwise we'd all be using it. As you've seen they all have merit. You didn't mention Java which still holds a lot of clout in enterprise computing. The only answer is pick one you like and get good at it. You can spends years wishing you'd picked ...
3
2
0
I know similar questions to this have been asked before, but I'm looking for a more specific answer so here it goes: I'm a student and am looking to develop a web app. I have little experience with all mentioned and like different aspects of each. I like the Visual Web Dev that can be used to create ASP.NET sites, a a...
Python + Django vs. ASP.NET + C#/VB vs PHP?
1.2
0
0
3,202
6,896,942
2011-08-01T10:10:00.000
0
1
1
0
php,asp.net,python,django
6,897,150
3
false
1
0
I would recomend looking at asp.net mvc and scaffolding. That way you can create good applications quick and effective.
3
2
0
I know similar questions to this have been asked before, but I'm looking for a more specific answer so here it goes: I'm a student and am looking to develop a web app. I have little experience with all mentioned and like different aspects of each. I like the Visual Web Dev that can be used to create ASP.NET sites, a a...
Python + Django vs. ASP.NET + C#/VB vs PHP?
0
0
0
3,202
6,902,663
2011-08-01T18:26:00.000
6
0
0
1
python,google-app-engine
6,902,956
1
true
1
0
This is configurable in the dashboard, under Administration -> Application Settings. The default is 1 day, but you can set it as high as 2 weeks.
1
3
0
When do user sessions (Users API in Python) timeout when logging in with Google Accounts?
App Engine Session Timeout
1.2
0
0
824
6,904,069
2011-08-01T20:28:00.000
4
0
1
1
python
6,904,116
2
false
0
0
If you're on Python 2.6 or higher, you can simply use shutil.copytree and its ignore argument. Since it gets passed all the files and directories, you can call your function from there, unless you want it to be called right after the file is copied. If that is the case, the easiest thing is to copy and modify the copyt...
1
3
0
I want to copy a directory to another directory recursively. I also want to ignore some files (eg. all hidden files; everything starting with ".") and then run a function on all the other files (after copying them). This is simple to do in the shell, but I need a Python script. I tried using shutil.copytree, which has ...
Copying files recursively with skipping some directories in Python?
0.379949
0
0
2,031