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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,791,905 | 2010-09-25T00:27:00.000 | 0 | 0 | 1 | 1 | python | 3,791,920 | 4 | false | 0 | 0 | That seems to work fine for me in the DOS shell. | 1 | 2 | 0 | I'm using a script that someone else wrote in python. It's executed from the command line with 3 arguments.
example: "python script.py 1111 2222 3333"
It does it's thing and works perfectly. The results are NOT saved though, and I would really like to pipe the output to a text file. Can I simply use similar dos comm... | Output a python script to text file | 0 | 0 | 0 | 33,610 |
3,792,054 | 2010-09-25T01:26:00.000 | 1 | 0 | 1 | 1 | python,process,ipc,stdout,stdin | 3,792,108 | 2 | false | 0 | 0 | In most platforms (i.e., operating systems), an existing process's existing file descriptors are inviolate -- the operating system, striving to guarantee process integrity, will be designed to not allow a separate, unrelated process to alter those file descriptors.
Nevertheless, if you do specify a very specific and we... | 1 | 2 | 0 | Standard streams are associated with a program. So, suppose there
is a program already running in some way (I don't care how or in
what way). The goal is to create pipes to the STDIN of the
program from different processes (or programs) that run either
locally or remotely and stream data into it asynchronously.
Availab... | How do you stream data into the STDIN of a program from different local/remote processes in Python? | 0.099668 | 0 | 0 | 1,779 |
3,792,465 | 2010-09-25T04:12:00.000 | 2 | 1 | 0 | 0 | python,matlab,statistics,analysis | 3,792,494 | 5 | false | 0 | 0 | SciPy, NumPy and Matplotlib. | 2 | 8 | 1 | Which one among the two languages is good for statistical analysis? What are the pros and cons, other than accessibility, for each? | Among MATLAB and Python, which one is good for statistical analysis? | 0.07983 | 0 | 0 | 1,096 |
3,792,465 | 2010-09-25T04:12:00.000 | 3 | 1 | 0 | 0 | python,matlab,statistics,analysis | 3,792,582 | 5 | false | 0 | 0 | I would pick Python because it can be a powerful as Matlab but is free. Also, you can distribute your applications for free and no licensing chains.
Matlab is awesome and expensive (it had a great statistical package) and it will glow smoother than Python in the beginning, but not so in the long run.
Now, if you real... | 2 | 8 | 1 | Which one among the two languages is good for statistical analysis? What are the pros and cons, other than accessibility, for each? | Among MATLAB and Python, which one is good for statistical analysis? | 0.119427 | 0 | 0 | 1,096 |
3,793,424 | 2010-09-25T10:34:00.000 | 1 | 0 | 0 | 0 | python,django,subdomain | 3,794,000 | 1 | true | 1 | 0 | You may be able to do what you need with apache mod_rewrite.
Obviously I didn't read the question clearly enough.
As for how to do it in django: you could have some middleware that looks at the server name, and redirects according to that (or even sets a variable). You can't do it with the bare url routing system, as t... | 1 | 2 | 0 | What are the best practices and solutions for managing dynamic subdomains in different technologies and frameworks? I am searching for something to implement in my Django project but those solutions that I saw, don't work. I also tried to use Apache rewrite mod to send requests from subdomain.domain.com to domain.com/s... | Managing subdomains | 1.2 | 0 | 0 | 347 |
3,793,526 | 2010-09-25T11:01:00.000 | 1 | 0 | 0 | 0 | python,events,wxpython,mouseevent | 3,806,500 | 1 | true | 0 | 1 | In the toolbar button's event, you should be able to get the state of the mouse via wx.GetMouseState.
Alternatively, you can make your own toolbar with a panel and some wx.Buttons (or other button widgets). | 1 | 0 | 0 | I have a wx.toolbar with some buttons. One of the buttons makes pan left!
I want to click on the button and while I keep it pressed, the pan left is made.
For now I only saw that the wx.EVT_TOOL only works when mouse left is up.
Is there a way to do what I intend ? | How to change my wx.toolbar event? | 1.2 | 0 | 0 | 318 |
3,793,745 | 2010-09-25T12:18:00.000 | 1 | 0 | 1 | 0 | python,fork,ads | 3,793,988 | 2 | false | 0 | 0 | One problem I forsee is that it then means that each platform has different behaviour.
The next is that not every filesystem OS X supports also supports resource forks (and the way it stores them in non-hfs filesystems is universally hated by everyone else: ._ )
Having said that, I have often been bitten by a .pyc file... | 1 | 1 | 0 | I'm wondering if it wouldn't be a better if Python would store the compiled code in a file stream of the original source file. This would work on file systems supporting forks/data-streams, and fall-back if this is not possible.
On Windows using ADS (Alternative Data Streams)
On OS X using resource forks
On Linux usin... | Would it be a good idea to make python store compile code in file stream instead of pyc files? | 0.099668 | 0 | 0 | 104 |
3,794,762 | 2010-09-25T17:25:00.000 | 2 | 0 | 1 | 0 | python,ruby,generator,enumerator | 3,796,237 | 3 | false | 0 | 0 | Generators are stack based, Ruby's Enumerators are often specialised (at the interpreter level) and not stack based. | 1 | 20 | 1 | I've been researching the similarities/differences between Ruby and Python generators (known as Enumerators in Ruby), and so far as i can tell they're pretty much equivalent.
However one difference i've noticed is that Python Generators support a close() method whereas Ruby Generators do not. From the Python docs the ... | Ruby generators vs Python generators | 0.132549 | 0 | 0 | 4,732 |
3,794,868 | 2010-09-25T17:54:00.000 | 8 | 0 | 1 | 0 | python,multithreading,thread-safety,thread-local | 3,794,914 | 1 | true | 0 | 0 | No -- thread local means that each thread gets its own copy of that variable. Using it is (at least normally) thread-safe, simply because each thread uses its own variable, separate from variables by the same name that's accessible to other threads. OTOH, they're not (normally) useful for communication between threads... | 1 | 5 | 0 | Specifically I'm talking about Python. I'm trying to hack something (just a little) by seeing an object's value without ever passing it in, and I'm wondering if it is thread safe to use thread local to do that. Also, how do you even go about doing such a thing? | Does thread-local mean thread safe? | 1.2 | 0 | 0 | 718 |
3,795,605 | 2010-09-25T21:20:00.000 | 4 | 1 | 0 | 0 | python,ftp,metadata | 3,795,678 | 2 | true | 0 | 0 | There is no such attribute. You may be unable to GET such file, but it depends on the server software. Also, file access flags may be set one way while the file is being uploaded and then changed when upload is complete; or incomplete file may have modified name (e.g. original_filename.ext.part) -- it all depends on th... | 1 | 1 | 0 | Python 2.6
My script needs to monitor some 1G files on the ftp, when ever it's changed/modified, the script will download it to another place. Those file name will remain unchanged, people will delete the original file on ftp first, then upload a newer version. My script will checking the file metadata like file size a... | Python to check if file status is being uploading | 1.2 | 0 | 0 | 2,665 |
3,795,914 | 2010-09-25T23:07:00.000 | 0 | 1 | 1 | 0 | c#,ironpython,.net-assembly,cil,cls-compliant | 3,835,553 | 2 | false | 0 | 1 | I'm typing this on my phone so please forgive any silly mistakes. To use the compiled assembly, make sure you compile with clr.CompileModules, NOT pyc.py. Then in your C# call the LoadAssembly method on your Python ScriptEngine object. The module can then be imported by calling the ImportModule method on your ScriptEng... | 1 | 1 | 0 | IronPython.net documentation says the MSIL in the assembly isn't CLS-compliant, but is there a workaround? | Is there a way to use IronPython objects and functions (compiled into an assembly) from C# code? | 0 | 0 | 0 | 305 |
3,798,067 | 2010-09-26T13:49:00.000 | 0 | 0 | 0 | 0 | python | 3,805,092 | 4 | false | 0 | 0 | Dcolish's answer is good. I'm not sure the idea of executing code that comes in on a network interface is good in itself, though - you will need to take care to verify that you can trust the sending party, especially if this interface is going to be exposed to the Internet or really any production network. | 1 | 0 | 0 | how do i run a python program that is received by a client from server without writing it into a new python file? | network programming in python | 0 | 0 | 1 | 387 |
3,798,606 | 2010-09-26T16:04:00.000 | 1 | 0 | 0 | 0 | python,windows,web2py | 3,798,630 | 3 | false | 1 | 0 | If you mean you need code at the server to know the windows id of the current browser user, web2py isn't going to be able to tell you that. Windows authentication has nothing to do with web protocols. | 1 | 3 | 0 | I'm using web2py for an intranet site and need to get current login windows user id in my controller. Whether any function is available? | How to get windows user id in web2py for an intranet application? | 0.066568 | 0 | 1 | 996 |
3,798,629 | 2010-09-26T16:09:00.000 | 1 | 1 | 0 | 0 | python,django,unit-testing,tdd,bdd | 3,799,733 | 2 | true | 1 | 0 | You don't have to contain all possibilities in acceptance tests at all - you will still write unit tests. So I would say that a single tests "user can fill in the form, save it and load it back" is enough to start with. Then you can add more tests if you think that a particular aspect of your system is important enough... | 2 | 7 | 0 | I was reading "Growing Object-Oriented Software, Guided by Tests" lately.
Authors of this book sugested to always start developing a feature with an end-to-end acceptance test (before starting TDD cycle) to not loose a track of progress and to make sure that you're still on the same page while unit-testing.
Ok, so I've... | "Zero Iteration" - end to end acceptance test in simple contact-form feature | 1.2 | 0 | 0 | 479 |
3,798,629 | 2010-09-26T16:09:00.000 | 0 | 1 | 0 | 0 | python,django,unit-testing,tdd,bdd | 3,799,623 | 2 | false | 1 | 0 | This use-case leads to several test-cases (every tests a dedicated possible path of execution).
When writing tests focus on one possible outcome, after a while test-suite grows. The first tests then also give you safety net as regression tests to not break anything which you already implemented successfully.
My first ... | 2 | 7 | 0 | I was reading "Growing Object-Oriented Software, Guided by Tests" lately.
Authors of this book sugested to always start developing a feature with an end-to-end acceptance test (before starting TDD cycle) to not loose a track of progress and to make sure that you're still on the same page while unit-testing.
Ok, so I've... | "Zero Iteration" - end to end acceptance test in simple contact-form feature | 0 | 0 | 0 | 479 |
3,798,728 | 2010-09-26T16:31:00.000 | 0 | 0 | 0 | 0 | php,python,ajax,mongodb,real-time | 3,799,207 | 2 | false | 1 | 0 | It depends heavily on the server running said NoSQL solution, amount of data etc... I have played around with Mongo a bit and it is very easy to setup multiple servers to run simultaneously and you would most likely be able to accomplish high concurrency by starting multiple instances on the same box and having them ac... | 2 | 2 | 0 | Howdie stackoverflow people!
So I've been doing some digging regarding these NoSQL databases, MongoDB, CouchDB etc. Though I am still not sure about real time-ish stuff therefore I thought i'd ask around to see if someone have any practical experience.
Let's think about web stuff, let's say we've got a very dynamic sup... | MongoDB for realtime ajax stuff? | 0 | 1 | 0 | 1,738 |
3,798,728 | 2010-09-26T16:31:00.000 | 2 | 0 | 0 | 0 | php,python,ajax,mongodb,real-time | 3,801,074 | 2 | true | 1 | 0 | Let's say we have 5000 users at the
same time, every 5, 10 or 20 seconds
ajax requests that updates various
interfaces.
OK, so to get this right, you're talking about 250 to 1000 writes per second? Yeah, MongoDB can handle that.
The real key on performance is going to be whether or not these are queries, updates... | 2 | 2 | 0 | Howdie stackoverflow people!
So I've been doing some digging regarding these NoSQL databases, MongoDB, CouchDB etc. Though I am still not sure about real time-ish stuff therefore I thought i'd ask around to see if someone have any practical experience.
Let's think about web stuff, let's say we've got a very dynamic sup... | MongoDB for realtime ajax stuff? | 1.2 | 1 | 0 | 1,738 |
3,800,925 | 2010-09-27T03:27:00.000 | 1 | 0 | 1 | 0 | python,image,image-processing | 7,101,902 | 3 | false | 0 | 0 | If you should generate text or other vector based images (and then save to .png or .jpg), you could also consider Cairo (PyCairo, in this case). I use it a lot.
Otherwise, for pixel-level manipulation, PIL is the obvious choice. | 1 | 3 | 0 | What are some of the better libraries for image generation in Python? If I were to implement a GOTCHA (for example's sake), thereby having to manipulate an image on the pixel level, what would my options be? Ideally I would like to save resulting image as a low-resolution jpeg, but this is mere wishing, I'll settle for... | Python 2D image generation | 0.066568 | 0 | 0 | 8,712 |
3,801,379 | 2010-09-27T05:48:00.000 | 61 | 0 | 0 | 0 | python,django,redis | 7,722,260 | 5 | false | 1 | 0 | Just because Redis stores things in-memory does not mean that it is meant to be a cache. I have seen people using it as a persistent store for data.
That it can be used as a cache is a hint that it is useful as a high-performance storage. If your Redis system goes down though you might loose data that was not been writ... | 1 | 107 | 0 | I've heard of redis-cache but how exactly does it work? Is it used as a layer between django and my rdbms, by caching the rdbms queries somehow?
Or is it supposed to be used directly as the database? Which I doubt, since that github page doesn't cover any login details, no setup.. just tells you to set some config pro... | How can I use redis with Django? | 1 | 1 | 0 | 75,541 |
3,802,544 | 2010-09-27T09:33:00.000 | 0 | 1 | 0 | 0 | python,e-commerce | 11,260,331 | 1 | false | 1 | 0 | well, if that is the case, I think the only reason I can think up of is that this Satchmo is not that popular so that nobody is willing to port or design a theme for it.
I would suggest randomly grab a theme, port it here accordingly | 1 | 3 | 0 | There are two good open source python e-commerce solutions exist: Satchmo and LFS. But I can't find any theme for them. Does at least one open source theme for them exist? There are thousands themes for Magento, osCommerce, OpenCart, but zero themes for Satchmo.
Thanks. | Themes for python e-commerce solutions | 0 | 0 | 0 | 299 |
3,805,802 | 2010-09-27T16:28:00.000 | 1 | 0 | 0 | 1 | python,google-app-engine | 3,805,886 | 2 | false | 1 | 0 | Typically when I end up doing something more than a trivial demo I need a reason. Figure out something you want to make and stumble through it, learning as you go until it's working.
I'd use the google app engine community as a place to get questions answered, they're pretty good for that.
As a first app, I'd just hav... | 1 | 1 | 0 | I want to develop some web apps using Google app engine. I had deployed a guest book application which was their in "gooleappengine" folder by changing its ID.and also was successful.This is simple one.But not getting how to develop complex web apps. Can anyone please suggest me any good Tutarial or example codes Or an... | New to google app engine ! what to do next? | 0.099668 | 0 | 0 | 120 |
3,805,828 | 2010-09-27T16:31:00.000 | 0 | 0 | 0 | 0 | python,emacs | 3,807,886 | 4 | false | 0 | 0 | I find pdbtrack (part of python-mode.el) invaluable | 2 | 5 | 0 | I 'm just starting to use Python, but I'm a very experienced emacs user. I'd trying to decide between python.el and python-mode.el (or any other equivalent mode people can suggest).
Currently I'm leaning strongly towards python-mode.el, mainly because it has a useful "indent-region" method...
However, there's a couple... | emacs python mode preferences | 0 | 0 | 0 | 1,493 |
3,805,828 | 2010-09-27T16:31:00.000 | 4 | 0 | 0 | 0 | python,emacs | 3,806,044 | 4 | false | 0 | 0 | There are C-M-a and C-M-e in python-mode. They go to start and end, respectively, of the current def or class. They're mapped to beginning-of-defun and end-of-defun by default.
There's also C-c C-u, which is mapped to python-beginning-of-block. My python-mode doesn't map python-end-of-block by default, but it's there t... | 2 | 5 | 0 | I 'm just starting to use Python, but I'm a very experienced emacs user. I'd trying to decide between python.el and python-mode.el (or any other equivalent mode people can suggest).
Currently I'm leaning strongly towards python-mode.el, mainly because it has a useful "indent-region" method...
However, there's a couple... | emacs python mode preferences | 0.197375 | 0 | 0 | 1,493 |
3,806,082 | 2010-09-27T17:08:00.000 | 0 | 1 | 0 | 0 | python,facebook | 3,806,101 | 1 | false | 1 | 0 | You probably need to update the domain in the facebook settings/api key which allow you access. | 1 | 0 | 0 | I changed my domain from abc.com to xyz.com. After that my facebook authentication is not working.
It is throwing a key error KeyError: 'access_token'I am using python as my language. | My facebook authentication is not working? | 0 | 0 | 1 | 186 |
3,806,393 | 2010-09-27T17:43:00.000 | 1 | 1 | 0 | 0 | python | 3,806,787 | 3 | false | 0 | 0 | It is very difficult to validate an e-mail address because the syntax is so flexible. The best strategy is to send a test e-mail to the entered address. | 1 | 0 | 0 | Is there any python function that validates E-mail addresses, aware of IDN domains ?
For instance, user@example.com should be as correct as user@zääz.de or user@納豆.ac.jp
Thanks. | Function to validate an E-mail (IDN aware) | 0.066568 | 0 | 1 | 548 |
3,806,473 | 2010-09-27T17:57:00.000 | 16 | 1 | 0 | 0 | python,time,week-number | 3,806,516 | 17 | false | 0 | 0 | If your first week starts on the first day of the month you can use integer division:
import datetime
day_of_month = datetime.datetime.now().day
week_number = (day_of_month - 1) // 7 + 1 | 1 | 39 | 0 | Does python offer a way to easily get the current week of the month (1:4) ? | Week number of the month? | 1 | 0 | 0 | 60,362 |
3,808,581 | 2010-09-27T23:17:00.000 | 0 | 1 | 0 | 0 | python,apache,embedded,beagleboard | 3,811,703 | 4 | false | 1 | 0 | the device will be mobile and will be moving locations every few days. So, I can't guarantee a static IP address for the device.
Your device can be a client of the web site.
Your web site has two interfaces.
HTML interface to people.
A non-HTML interface to the device. As a client of a web site, the device will nee... | 1 | 5 | 0 | I'm currently working on a project where I'm trying to control an embedded device through an Internet facing website. The idea is is that a user can go to a website and tell this device to preform some kind of action. An action on the website would be translated into a series of CLI commands and then sent to the device... | Creating a website to communicate with an embedded device | 0 | 0 | 0 | 1,776 |
3,809,314 | 2010-09-28T02:40:00.000 | 3 | 0 | 1 | 0 | python,windows,compatibility,backwards-compatibility,build-environment | 3,809,331 | 19 | false | 0 | 0 | You can install multiple versions of Python one machine, and during setup, you can choose to have one of them associate itself with Python file extensions. If you install modules, there will be different setup packages for different versions, or you can choose which version you want to target. Since they generally inst... | 8 | 234 | 0 | I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x.
Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I "choose" which version of Python should run it? W... | How to install both Python 2.x and Python 3.x in Windows | 0.031568 | 0 | 0 | 242,246 |
3,809,314 | 2010-09-28T02:40:00.000 | 81 | 0 | 1 | 0 | python,windows,compatibility,backwards-compatibility,build-environment | 22,626,734 | 19 | false | 0 | 0 | What I did was download both 2.7.6 and 3.3.4. Python 3.3.4 has the option to add the path to it in the environment variable so that was done. So basically I just manually added Python 2.7.6.
How to...
Start > in the search type in environment select "Edit environment variables to your account"1
Scroll down to Path, se... | 8 | 234 | 0 | I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x.
Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I "choose" which version of Python should run it? W... | How to install both Python 2.x and Python 3.x in Windows | 1 | 0 | 0 | 242,246 |
3,809,314 | 2010-09-28T02:40:00.000 | 13 | 0 | 1 | 0 | python,windows,compatibility,backwards-compatibility,build-environment | 48,239,658 | 19 | false | 0 | 0 | To install and run any version of Python in the same system follow my guide below.
For example say you want to install Python 2.x and Python 3.x on the same Windows system.
Install both of their binary releases anywhere you want.
When prompted do not register their file extensions and
do not add them automatical... | 8 | 234 | 0 | I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x.
Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I "choose" which version of Python should run it? W... | How to install both Python 2.x and Python 3.x in Windows | 1 | 0 | 0 | 242,246 |
3,809,314 | 2010-09-28T02:40:00.000 | 0 | 0 | 1 | 0 | python,windows,compatibility,backwards-compatibility,build-environment | 64,577,951 | 19 | false | 0 | 0 | I use a simple solution to switch from a version to another version of python, you can install all version you want. All you have to do is creating some variable environment.
In my case, I have installed python 2.7 and python 3.8.1, so I have created this environment variables:
PYTHON_HOME_2.7=<path_python_2.7>
PYTHON... | 8 | 234 | 0 | I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x.
Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I "choose" which version of Python should run it? W... | How to install both Python 2.x and Python 3.x in Windows | 0 | 0 | 0 | 242,246 |
3,809,314 | 2010-09-28T02:40:00.000 | -1 | 0 | 1 | 0 | python,windows,compatibility,backwards-compatibility,build-environment | 43,160,074 | 19 | false | 0 | 0 | I have installed both python 2.7.13 and python 3.6.1 on windows 10pro and I was getting the same "Fatal error" when I tried pip2 or pip3.
What I did to correct this was to go to the location of python.exe for python 2 and python 3 files and create a copy of each, I then renamed each copy to python2.exe and python3.exe... | 8 | 234 | 0 | I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x.
Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I "choose" which version of Python should run it? W... | How to install both Python 2.x and Python 3.x in Windows | -0.010526 | 0 | 0 | 242,246 |
3,809,314 | 2010-09-28T02:40:00.000 | 1 | 0 | 1 | 0 | python,windows,compatibility,backwards-compatibility,build-environment | 33,527,329 | 19 | false | 0 | 0 | Check your system environment variables after installing Python, python 3's directories should be first in your PATH variable, then python 2.
Whichever path variable matches first is the one Windows uses.
As always py -2 will launch python2 in this scenario. | 8 | 234 | 0 | I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x.
Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I "choose" which version of Python should run it? W... | How to install both Python 2.x and Python 3.x in Windows | 0.010526 | 0 | 0 | 242,246 |
3,809,314 | 2010-09-28T02:40:00.000 | -1 | 0 | 1 | 0 | python,windows,compatibility,backwards-compatibility,build-environment | 21,692,110 | 19 | false | 0 | 0 | Only Works if your running your code in your Python IDE
I have both Python 2.7 and Python 3.3 installed on my windows operating system. If I try to launch a file, it will usually open up on the python 2.7 IDE. How I solved this issue, was when I choose to run my code on python 3.3, I open up python 3.3 IDLE(Python GUI)... | 8 | 234 | 0 | I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x.
Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I "choose" which version of Python should run it? W... | How to install both Python 2.x and Python 3.x in Windows | -0.010526 | 0 | 0 | 242,246 |
3,809,314 | 2010-09-28T02:40:00.000 | 0 | 0 | 1 | 0 | python,windows,compatibility,backwards-compatibility,build-environment | 17,660,471 | 19 | false | 0 | 0 | Install the one you use most (3.3 in my case) over the top of the other. That'll force IDLE to use the one you want.
Alternatively (from the python3.3 README):
Installing multiple versions
On Unix and Mac systems if you intend to install multiple versions of Python
using the same installation prefix (--prefix argument ... | 8 | 234 | 0 | I do most of my programming in Python 3.x on Windows 7, but now I need to use the Python Imaging Library (PIL), ImageMagick, and wxPython, all of which require Python 2.x.
Can I have both Python 2.x and Python 3.x installed in Windows 7? When I run a script, how would I "choose" which version of Python should run it? W... | How to install both Python 2.x and Python 3.x in Windows | 0 | 0 | 0 | 242,246 |
3,809,440 | 2010-09-28T03:16:00.000 | 0 | 0 | 0 | 1 | python,amqp,celery | 4,311,856 | 1 | true | 1 | 0 | After reading some docs and trying out a few options, I have found that RabbitMQ suffices for most purposes. | 1 | 0 | 0 | I wanted to get your opinions on the merits of different AMQP implementations to be used with celery. I am looking particularly at message prioritization and job queue sizes.
What are your thoughts? | AMQP implementations with Celery | 1.2 | 0 | 0 | 289 |
3,809,981 | 2010-09-28T05:39:00.000 | 2 | 1 | 1 | 0 | php,python,ruby,programming-languages | 3,809,997 | 8 | false | 0 | 0 | I personally would prefer Ruby, as it goes wonderfully with the Rails framework and is a blast to learn and to work with.
I have only used Python a few times. While I know it is powerful, I have never really fallen in love with it the way I have with Ruby (and specifically the Rails framework) | 6 | 2 | 0 | I'm considering learning a new language as an alternative to PHP. I'm considering Python and Ruby. Which one is a better language based on the following four criteria, and any other qualifiers you may have?
Which is more stable?
Which is more scaleable?
Which is more secure?
Which is easier to learn?
EDIT:
Keeping th... | Ruby or Python instead of PHP? | 0.049958 | 0 | 0 | 3,516 |
3,809,981 | 2010-09-28T05:39:00.000 | 1 | 1 | 1 | 0 | php,python,ruby,programming-languages | 3,810,088 | 8 | false | 0 | 0 | To get a quick feel for each and see which one "tastes" better I would suggest taking each one for a spin on a selection of problems on ProjectEeuler. PE is more about algorithms and math but some of thee simpler problems are a great way to get going with syntax and some core library features such as file IO etc. | 6 | 2 | 0 | I'm considering learning a new language as an alternative to PHP. I'm considering Python and Ruby. Which one is a better language based on the following four criteria, and any other qualifiers you may have?
Which is more stable?
Which is more scaleable?
Which is more secure?
Which is easier to learn?
EDIT:
Keeping th... | Ruby or Python instead of PHP? | 0.024995 | 0 | 0 | 3,516 |
3,809,981 | 2010-09-28T05:39:00.000 | 3 | 1 | 1 | 0 | php,python,ruby,programming-languages | 3,810,286 | 8 | false | 0 | 0 | These two languages are so similar that any strong preference will be mostly subjective. They are both the correct answer. | 6 | 2 | 0 | I'm considering learning a new language as an alternative to PHP. I'm considering Python and Ruby. Which one is a better language based on the following four criteria, and any other qualifiers you may have?
Which is more stable?
Which is more scaleable?
Which is more secure?
Which is easier to learn?
EDIT:
Keeping th... | Ruby or Python instead of PHP? | 0.07486 | 0 | 0 | 3,516 |
3,809,981 | 2010-09-28T05:39:00.000 | 1 | 1 | 1 | 0 | php,python,ruby,programming-languages | 3,869,927 | 8 | false | 0 | 0 | i think you should prefer ruby, while python is assumed easier to learn!
python is so friendly great language but you rarely find servers with python support most are expensive one's, ruby on rails is great framework many frameworks for other languages are drives from , great cake php is a sort of such a thing.
ruby o... | 6 | 2 | 0 | I'm considering learning a new language as an alternative to PHP. I'm considering Python and Ruby. Which one is a better language based on the following four criteria, and any other qualifiers you may have?
Which is more stable?
Which is more scaleable?
Which is more secure?
Which is easier to learn?
EDIT:
Keeping th... | Ruby or Python instead of PHP? | 0.024995 | 0 | 0 | 3,516 |
3,809,981 | 2010-09-28T05:39:00.000 | 0 | 1 | 1 | 0 | php,python,ruby,programming-languages | 3,869,982 | 8 | false | 0 | 0 | pyfunc pretty much said it, but I'd like to offer two more thoughts:
1) Ruby will probably end up being a tiny bit more familiar as it a) can often optionally use a more C-like syntax, b) is not structured quite as foreignly as Python coming from PHP
2) They can both scale well, but Python will probably give you the mo... | 6 | 2 | 0 | I'm considering learning a new language as an alternative to PHP. I'm considering Python and Ruby. Which one is a better language based on the following four criteria, and any other qualifiers you may have?
Which is more stable?
Which is more scaleable?
Which is more secure?
Which is easier to learn?
EDIT:
Keeping th... | Ruby or Python instead of PHP? | 0 | 0 | 0 | 3,516 |
3,809,981 | 2010-09-28T05:39:00.000 | 1 | 1 | 1 | 0 | php,python,ruby,programming-languages | 3,811,039 | 8 | false | 0 | 0 | No significant difference on the first four criteria.
No significant difference on coding speed either - you're going to be slow in both at the start, then you'll get faster. Ruby may be slightly better at managing libraries (Ruby Gems) but Python probably has slightly broader library coverage. No big deal either way.
... | 6 | 2 | 0 | I'm considering learning a new language as an alternative to PHP. I'm considering Python and Ruby. Which one is a better language based on the following four criteria, and any other qualifiers you may have?
Which is more stable?
Which is more scaleable?
Which is more secure?
Which is easier to learn?
EDIT:
Keeping th... | Ruby or Python instead of PHP? | 0.024995 | 0 | 0 | 3,516 |
3,810,869 | 2010-09-28T08:15:00.000 | 2 | 0 | 1 | 0 | python,error-handling,timeout | 3,810,878 | 3 | false | 0 | 0 | You can't do it without some sort of multithreading or multiprocessing, even if that's hidden under some layers of abstraction, unless that "process" you're running is specifically designed for asynchronicity and calls-back to a known function once in a while.
If you describe what that process actually is, it will be e... | 1 | 4 | 0 | I've been searching on this but can't seem to find an exact answer (most get into more complicated things like multithreading, etc), I just want to do something like a Try, Except statement where if the process doesn't finish within X number of seconds it will throw an exception.
EDIT: The reason for this is that I am ... | Python, Timeout of Try, Except Statement after X number of seconds? | 0.132549 | 0 | 1 | 6,285 |
3,811,197 | 2010-09-28T09:04:00.000 | 1 | 1 | 0 | 1 | python,file-permissions | 3,811,219 | 4 | false | 0 | 0 | Start your program with a user that is allowed to write there. For example login to root first (su) or run the script with sudo myscript.py. | 1 | 6 | 0 | I m using shutil.copy from python to copy a list of files. But when i copy the files to /usr/lib/ location, i m getting permission denied as i need to be an administrator to do that.
So How could i copy files with admin permission or
how could i get the admin password from the user to copy the files?
Ideas would be ap... | Getting admin password while copy file using shutil.copy? | 0.049958 | 0 | 0 | 7,772 |
3,811,674 | 2010-09-28T10:08:00.000 | 0 | 0 | 0 | 0 | php,python,django,url,screenshot | 21,106,018 | 6 | false | 1 | 0 | If you are family with Python, you can use PyQt4. This library supports to get screenshot from a url. | 1 | 7 | 0 | There is the URL of page on the Internet. I need to get a screenshot of this page (no matter in which browser).
I need a script (PHP, Python (even Django framework)) that receives the URL (string) and output screenshot-file at the exit (file gif, png, jpg).
UPD:
I need dynamically create a page where opposite to URL w... | Convert URL to screenshot (script) | 0 | 0 | 1 | 31,489 |
3,812,417 | 2010-09-28T11:58:00.000 | 0 | 0 | 0 | 1 | windows,scripting,time,tracking,python-idle | 49,125,177 | 3 | false | 0 | 0 | Do check that CanHandleSessionChange property is True or not ?
This will be checked from the designer view -> Property
Then use OnSessionChange function | 1 | 1 | 0 | Please help me to find a way to track lock/unlock time on my WinXP machine. I've tried windows scheduler - it only logs logins, not locks. Any alternatives?
In Miranda's source code I saw implementation via IdleObject tracker, but this way is too long. May be an AutoIt script? Time tracking program (freeware)? | Trigger an event when system locks/unlocks on Windows XP | 0 | 0 | 0 | 3,146 |
3,812,778 | 2010-09-28T12:43:00.000 | 2 | 0 | 1 | 0 | java,python,html,human-readable | 3,812,833 | 9 | false | 1 | 0 | One piece of advice is not to be lazy with names. For example, if you have a Java class which is an implementation of the Transformer interface, and it transforms String to Date, don't hesitate to name the class StringToDateTransformerImpl. | 7 | 6 | 0 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? | Are there any basic standards and practices for making human readable code? | 0.044415 | 0 | 0 | 407 |
3,812,778 | 2010-09-28T12:43:00.000 | 1 | 0 | 1 | 0 | java,python,html,human-readable | 3,813,396 | 9 | false | 1 | 0 | Proper indentation when writing HTML can be a lifesaver, especially when you're interacting with any sort of nested elements. Just be consistent with the indentation and be sure to update surrounding lines when you move or delete an indented element. This makes it much easier to update the page, as the level of indenta... | 7 | 6 | 0 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? | Are there any basic standards and practices for making human readable code? | 0.022219 | 0 | 0 | 407 |
3,812,778 | 2010-09-28T12:43:00.000 | 2 | 0 | 1 | 0 | java,python,html,human-readable | 3,812,887 | 9 | false | 1 | 0 | Well, you can always use the "ignorant test". Show your code to someone who knows absolutely nothing about programmation. If he can see more or less what a function does, the code is probably readable. | 7 | 6 | 0 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? | Are there any basic standards and practices for making human readable code? | 0.044415 | 0 | 0 | 407 |
3,812,778 | 2010-09-28T12:43:00.000 | 3 | 0 | 1 | 0 | java,python,html,human-readable | 3,812,844 | 9 | false | 1 | 0 | Try to read your code out loud (or at least in your head). | 7 | 6 | 0 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? | Are there any basic standards and practices for making human readable code? | 0.066568 | 0 | 0 | 407 |
3,812,778 | 2010-09-28T12:43:00.000 | 5 | 0 | 1 | 0 | java,python,html,human-readable | 3,812,826 | 9 | true | 1 | 0 | Use consistent casing and naming.
Use tabs (and brackets where available) to provide a visual flow.
Use comments that explain what's happening conceptually as well as technically. (e.g., //Do we have a valid user? not //Check that user_ID is not -1)
I'm sure some more seasoned developers will have more suggestions, ... | 7 | 6 | 0 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? | Are there any basic standards and practices for making human readable code? | 1.2 | 0 | 0 | 407 |
3,812,778 | 2010-09-28T12:43:00.000 | 5 | 0 | 1 | 0 | java,python,html,human-readable | 3,812,816 | 9 | false | 1 | 0 | Proper indention and informative comments. | 7 | 6 | 0 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? | Are there any basic standards and practices for making human readable code? | 0.110656 | 0 | 0 | 407 |
3,812,778 | 2010-09-28T12:43:00.000 | 5 | 0 | 1 | 0 | java,python,html,human-readable | 3,812,812 | 9 | false | 1 | 0 | Make sure your code is well structured (proper indentation, blank lines to separate sections of code, etc.) and use standard, consistent, and fully named (rather than incomprehensible abbreviated) variable names.
Others would suggest using proper comments. I would tend to disagree. If your code is well structured and v... | 7 | 6 | 0 | More specifically making HTML, Java, and python more readable? Does anyone have suggestions for this programming student? | Are there any basic standards and practices for making human readable code? | 0.110656 | 0 | 0 | 407 |
3,813,451 | 2010-09-28T13:51:00.000 | 2 | 0 | 0 | 0 | python,sockets,system,distributed | 3,813,510 | 1 | false | 0 | 0 | You can't. Any intermediate nodes can drop your packets or the reply packets from the remote node. | 1 | 1 | 0 | How can I know if a node that is being accessed using TCP socket is alive or if the connection was interrupted and other errors?
Thanks! | Python socket programming | 0.379949 | 0 | 1 | 240 |
3,814,365 | 2010-09-28T15:28:00.000 | 1 | 0 | 0 | 0 | python,xml.etree | 3,814,788 | 1 | true | 0 | 0 | register_namespace was only introduced in lxml 2.3 (still beta)
I believe you can provide an nsmap parameter (dictionary with prefix-uri mappings) when creating an element, but I don't think you can change it for an existing element. (there is an .nsmap property on the element, but changing that doesn't seem to work. T... | 1 | 3 | 0 | I wish to set the namespace prefix in xml.etree. I found register_namespace(prefix, url) on the Web but this threw "unknown attribute". I have also tried nsmap=NSMAP but this also fails. I'd be grateful for example syntax that shows how to add specified namespace prefixes | how to set namespace prefixes in xml.etree | 1.2 | 0 | 1 | 1,128 |
3,817,481 | 2010-09-28T22:29:00.000 | 12 | 0 | 1 | 0 | python,command-line,python-3.x,argparse | 3,817,517 | 2 | true | 0 | 0 | It will be in Python 3.2. It was just added in Python 2.7, which was released just this July; Python 3.2 will be the next 3.x release after that date. | 1 | 6 | 0 | does somebody know, why the argparse module didn't make it in python 3? it's new in python 2.7, but the 2.x branch is running out with 2.7. it makes no sense to me not to support it in the actual python 3 branch. | argparse missing in python 3 | 1.2 | 0 | 0 | 2,789 |
3,818,405 | 2010-09-29T02:47:00.000 | 7 | 0 | 1 | 0 | python,matlab,formatting,keyboard-shortcuts | 3,818,446 | 3 | false | 0 | 0 | Python is a programming language, not an integrated development environment (IDE), therefore it has no "keyboard shortcuts" or the like. Each given development environment may offer different facilities or the like. You appear to consider GNU Readline (typically used in the simple text-mode interpreter environment th... | 2 | 2 | 0 | After we write a code in Matlab we can use ctrl+A+ctrl+I and ctrl+A+ctrl+J to format our code (comments, loops alignment etc). Is there something similar or any helpful keyboard shortcuts in Python?
Also, just like we can use upward arrow to copy our previous command window history in Matlab, is it possible or some key... | Are there any keyboard shortcuts for formatting in Python? | 1 | 0 | 0 | 7,325 |
3,818,405 | 2010-09-29T02:47:00.000 | 1 | 0 | 1 | 0 | python,matlab,formatting,keyboard-shortcuts | 3,818,483 | 3 | false | 0 | 0 | If you use the Python IDLE (comes with Python on Windows, readily available on Linux and Unix flavors), most of the formatting work is done for you. For instance, IDLE automatically indents loops and any other code block after a :. This is far better than writing Python scripts in a standard text editor like gedit, ema... | 2 | 2 | 0 | After we write a code in Matlab we can use ctrl+A+ctrl+I and ctrl+A+ctrl+J to format our code (comments, loops alignment etc). Is there something similar or any helpful keyboard shortcuts in Python?
Also, just like we can use upward arrow to copy our previous command window history in Matlab, is it possible or some key... | Are there any keyboard shortcuts for formatting in Python? | 0.066568 | 0 | 0 | 7,325 |
3,818,703 | 2010-09-29T04:22:00.000 | 0 | 1 | 0 | 0 | c++,python,boost,lua,embedding | 3,819,333 | 2 | false | 0 | 1 | If you are planning to just use windows you could use C++/CLI a managed variant of C++. With C++/CLI you can easily mix managed and unmanaged code. You could call the managed classes from any .net language and the unmanaged (exported) functions from C. | 1 | 2 | 0 | I have used Lua.NET on .NET platform and I could call the .NET class/object from Lua and I could call the Lua from .NET Lua API interface. I did the same with the IronPython. I knew the how the .NET binding works.
Now I have a C++ project and I want to use the dynamic capabilities. I want to call C++ object which may ... | Lua or Python binding with C++ | 0 | 0 | 0 | 3,491 |
3,818,881 | 2010-09-29T05:10:00.000 | 0 | 0 | 0 | 0 | python,memory-management,numpy | 3,819,063 | 2 | false | 0 | 0 | If You have matrices with lots of zeros use scipy.sparse.csc_matrix.
It's possible to write everything, for example You can override numarray array class. | 1 | 1 | 1 | In using the numpy.darray, I met a memory overflow problem due to the size of data,for example:
Suppose I have a 100000000 * 100000000 * 100000000 float64 array data source, when I want to read data and process it in memory with np. It will raise a Memoray Error because it works out all memory for storing such a big ar... | using file/db as the buffer for very big numpy array to yield data prevent overflow? | 0 | 0 | 0 | 337 |
3,821,305 | 2010-09-29T11:49:00.000 | 5 | 0 | 0 | 0 | javascript,python | 3,821,323 | 1 | true | 1 | 0 | When you use Python for web development, you use it server-side (like PHP). It's not for client-side programming in the same way that JavaScript is. The vast majority of browsers only support JavaScript for client-side programming.
If you want client-side code on a site that's using Python on the server, it still has... | 1 | 1 | 0 | I want to add interactivity like clicks, hover, onpage load() to a webpage, if i use python for generating xhtml, will python give essential flavors like javascript??
I'm bit confused and starter in python for web development, so is there need to include old javascript into python or the python only can handle interact... | does python gives interactivity as javascript? | 1.2 | 0 | 0 | 128 |
3,821,636 | 2010-09-29T12:41:00.000 | 2 | 0 | 0 | 1 | python,google-app-engine | 3,823,052 | 1 | true | 1 | 0 | I've solved this in the past by keeping the status for the tasks in memcached, and polling (via Ajax) to determine when the tasks are finished.
If you go this way, it's best if you can always "manually" determine the status of the tasks without looking in memcached, since there's always the (slim) chance that memcach... | 1 | 1 | 0 | I need to import some data to show it for user but page execution time exceeds 30 second limit. So I decided to split my big code into several tasks and try Task Queues. I add about 10-20 tasks to queue and app engine executes tasks in parallel while user is waiting for data. How can I determine that my tasks are compl... | Python App Engine: Task Queues | 1.2 | 0 | 0 | 284 |
3,822,336 | 2010-09-29T14:01:00.000 | 6 | 0 | 0 | 0 | python,permissions,chmod | 3,822,354 | 3 | false | 0 | 0 | Read/write is enough if you want to run it by typing python file.py. If you want to run it directly as if it were a compiled program, e.g. ./file.py, then you need execute permission (and the appropriate hash-bang line at the top). | 3 | 4 | 0 | i wrote a py script to fetch page from web,it just read write permission enough,so my question is when we need execute permission? | when we need chmod +x file.py | 1 | 0 | 1 | 6,642 |
3,822,336 | 2010-09-29T14:01:00.000 | 0 | 0 | 0 | 0 | python,permissions,chmod | 3,822,352 | 3 | false | 0 | 0 | If you want to be able to run it directly with $ file.py then you'll need the execute bit set. Otherwise you can run it with $ python file.py. | 3 | 4 | 0 | i wrote a py script to fetch page from web,it just read write permission enough,so my question is when we need execute permission? | when we need chmod +x file.py | 0 | 0 | 1 | 6,642 |
3,822,336 | 2010-09-29T14:01:00.000 | 5 | 0 | 0 | 0 | python,permissions,chmod | 3,822,410 | 3 | true | 0 | 0 | It's required to do so if you need to run the script in this way: ./file.py. Keep in mind though, you need to put the path of python at the very top of the script: #!/usr/bin/python.
But wait, you need to make sure you have the proper path, to do that execute: which python. | 3 | 4 | 0 | i wrote a py script to fetch page from web,it just read write permission enough,so my question is when we need execute permission? | when we need chmod +x file.py | 1.2 | 0 | 1 | 6,642 |
3,822,857 | 2010-09-29T14:55:00.000 | 1 | 0 | 0 | 0 | python,django-admin,customization | 3,831,573 | 2 | false | 1 | 0 | If I were you (and I am), I would stop trying to integrate this functionality with the Django admin site. Speaking from experience, you'll find that what you're trying to do is much easier to implement as regular views. Sure, it isn't be as pretty, but something that works beats something that's pretty but doesn't work... | 1 | 0 | 0 | I am trying to create a Django admin filter that will get random groups of users. At this point, I have two problems:
Applying a custom filter to the User model, and
Displaying a random set of users.
On #1, I've tried using User.username.random_filter = True, but it comes back with an AttributeError saying that User ... | Django randomly order users in admin | 0.099668 | 0 | 0 | 235 |
3,823,420 | 2010-09-29T15:57:00.000 | 1 | 0 | 0 | 0 | python,network-protocols | 3,824,612 | 2 | false | 0 | 0 | It wasn't obvious from your question but if getting answers back synchronously doesn't matter to you (i.e., you are just asking for work to be performed) you might want to consider just using a job queue. It's generally the easiest way to communicate between hosts. If you don't mind depending on AWS using SQS is super ... | 1 | 0 | 0 | The situation is that I have a small datacenter, with each server running python instances. It's not your usual distributed worker setup, as each server has a specific role with an appropriate long-running process.
I'm looking for good ways to implement the the cross-server communication. REST seems like overkill. XML-... | What are good specs/libraries for closed network communication in python? | 0.099668 | 0 | 1 | 196 |
3,823,429 | 2010-09-29T15:58:00.000 | 1 | 0 | 0 | 0 | wxpython,window,sizer | 3,823,479 | 1 | true | 0 | 1 | I would create a subclass of wx.Panel for each "slot", then manage them with a grid or box sizer. | 1 | 0 | 0 | all, I want to draw a rectangular or a container with 20 slots inside. it is like a cd container or archive, with empty slot to insert the cd or book. I choose wxPython.
for this 20 horizontal empty slots, i see there is wx.BoxSizer(wx.Horizonal) or other sizers to make the layout.
my question is, Is it possible to ha... | use wxPython to draw a grided rectangular container or box | 1.2 | 0 | 0 | 355 |
3,823,659 | 2010-09-29T16:22:00.000 | 0 | 0 | 0 | 0 | python,sqlite,full-text-search,fts3,fts4 | 12,372,189 | 4 | false | 0 | 0 | What Naveen said but =>
For Windows installations:
While running setup.py for for package installations... Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use Visual Studio by setting
SET VS90COMNTOOLS=%VS100COMNTOOLS%
before calling setup.py. | 2 | 13 | 0 | FTS3/FTS4 doesn't work in python by default (up to 2.7). I get the error: sqlite3.OperationalError: no such module: fts3
or
sqlite3.OperationalError: no such module: fts4
How can this be resolved? | How to setup FTS3/FTS4 with python2.7 on Windows | 0 | 1 | 0 | 6,571 |
3,823,659 | 2010-09-29T16:22:00.000 | 2 | 0 | 0 | 0 | python,sqlite,full-text-search,fts3,fts4 | 3,826,412 | 4 | false | 0 | 0 | never mind.
installing pysqlite from source was easy and sufficient.
python setup.py build_static install fts3 is enabled by default when installing from source. | 2 | 13 | 0 | FTS3/FTS4 doesn't work in python by default (up to 2.7). I get the error: sqlite3.OperationalError: no such module: fts3
or
sqlite3.OperationalError: no such module: fts4
How can this be resolved? | How to setup FTS3/FTS4 with python2.7 on Windows | 0.099668 | 1 | 0 | 6,571 |
3,824,249 | 2010-09-29T17:26:00.000 | 0 | 0 | 0 | 1 | java,python,scripting | 3,824,363 | 3 | false | 1 | 0 | Have you considered jython? You can:
1) use it to run python scripts (allowing it to call Java classes)
2) compile python into class files, making them usable by normal Java code without jython being present at runtime
I've only used it in the first pattern, but I've seen tonnes of docs on the second. | 1 | 3 | 0 | I developed a command-line utility which needs to be called from a Java GUI application. The team in charge on the Java GUI would like to bind my command-line application to a button in the GUI; the Python application is such that at the time we have no time or interest in rewriting it in Java.
I have no experience wha... | Running Python command-line utility from Java | 0 | 0 | 0 | 2,293 |
3,824,734 | 2010-09-29T18:31:00.000 | 0 | 0 | 0 | 0 | python,selenium | 3,825,411 | 1 | true | 0 | 0 | I ended up just doing a check of what browser I was running and then returning the string with the '\n ' replaced with '\n' if the browser was firefox. | 1 | 1 | 0 | When I call selenium.get_text("foo") on a certain element it returns back a different value depending on what browser I am working in due to the way each browser handles newlines.
Example:
An elements string is "hello[newline]how are you today?[newline]Very well, thank you."
When selenium gets this back from IE it gets... | Selenium and Python: remove \n from returned selenium.get_text() | 1.2 | 0 | 1 | 1,614 |
3,824,923 | 2010-09-29T18:59:00.000 | 13 | 0 | 0 | 0 | python,apache,logging,mod-wsgi | 3,825,257 | 1 | true | 1 | 0 | Mostly, we use logging and write to sys.stderr. That seems to write to the Apache error_log. | 1 | 12 | 0 | I have a Django project where I have been logging to a file using the standard library logging module. For a variety of reasons I would like to change it so that it writes to the Apache log files. I've seen quite a bit of discussion of how to do this with mod_python, but not mod_wsgi. How do I do this for a project ... | How do I write to the apache log files when using mod_wsgi | 1.2 | 0 | 0 | 3,241 |
3,825,200 | 2010-09-29T19:38:00.000 | 2 | 0 | 1 | 0 | c#,python,linq | 3,825,269 | 2 | false | 0 | 0 | Enumerable.Aggregate is your answer. reduce(function, list, seed) ==> list.Aggregate(seed, function). In addition, there are many predefined "aggregates", like Sum, Min, Max, Average, etc. You should use Aggregate only when the aggregator is not built-in. | 1 | 3 | 0 | How to apply a function to every element in a list using Linq in C# like the method reduce() in python? | How to apply a function to every element in a list using Linq in C# like the method reduce() in python? | 0.197375 | 0 | 0 | 1,094 |
3,826,552 | 2010-09-29T23:10:00.000 | 2 | 0 | 0 | 0 | python,sql,memory,sqlite | 25,521,707 | 4 | false | 0 | 0 | If you are using Linux, you can try tmpfs which is a memory-based file system.
It's very easy to use it:
mount tmpfs to a directory.
copy sqlite db file to the directory.
open it as normal sqlite db file.
Remember, anything in tmpfs will be lost after reboot. So, you may copy db file back to disk if it changed. | 1 | 8 | 0 | I have a 100 mega bytes sqlite db file that I would like to load to memory before performing sql queries. Is it possible to do that in python?
Thanks | In python, how can I load a sqlite db completely to memory before connecting to it? | 0.099668 | 1 | 0 | 12,928 |
3,826,604 | 2010-09-29T23:23:00.000 | 2 | 1 | 0 | 0 | python,android,debugging,build,trace | 9,443,567 | 2 | false | 1 | 0 | I've just experienced an odd effect of using $(info) when compiling a java+C++ Android application:
I used $info) to output some informations about conditional compiling in the Android.mk of the main application and when trying to debug the native part of the program, using ndk-gdb, it failed because apparently the out... | 1 | 3 | 0 | I am building Froyo, is it possible that during building, make/python can output the file and the command it is calling right now.
For example, in one of the Android.mk, there is a line, says,
echo build success.
On the monitor it will show "build success",
what I want is that in addition, it shows
"Android.mk line 2... | Android.mk debug output | 0.197375 | 0 | 0 | 4,399 |
3,829,405 | 2010-09-30T09:40:00.000 | 0 | 0 | 0 | 0 | python,code-generation,web-crawler,robot | 3,829,743 | 1 | true | 1 | 0 | You need to separate out the idea of what code to generate from the events triggering generation.
What code is generated is governed by the combined set of all the checkboxes that are checked.
Triggering code generation occurs each time any of them are changed. You need to regenerate everything at that time.
In detail:... | 1 | 1 | 0 | I want to write a web-based code generator for a Python crawler. Its aim is to automatically generate code so a developer doesn't need to write it, but I've run into this problem: in one of my project's webpages, there are some checkboxes, buttons, etc. Each of them generates some Python code and writes it to a common ... | Problem with web code generator designer | 1.2 | 0 | 0 | 82 |
3,830,294 | 2010-09-30T11:59:00.000 | 1 | 0 | 0 | 1 | python,sqlite,web-applications,nginx,blob | 3,831,317 | 3 | true | 1 | 0 | Why so complicated?
Serve the image under the name which the user supplied (i.e. http://www.mywebapp.com/images/foo1.jpg)
Save the images in a directory using a UUID as name.
Create a map of file names to UUIDs in the session.
In the handler for /images/ look up the real file name in the map. Return 404 if no such ent... | 2 | 0 | 0 | I want to serve images in a web-app using sessions such that the links to the images expire once the session has expired.
If I show the actual links to the filesystem store of the images, say http://www.mywebapp.com/images/foo1.jpg this clearly makes stopping future requests for the image (one the user has signed out o... | ensuring dynamic image urls in a web-app: use a blob store? | 1.2 | 0 | 0 | 291 |
3,830,294 | 2010-09-30T11:59:00.000 | -1 | 0 | 0 | 1 | python,sqlite,web-applications,nginx,blob | 3,830,345 | 3 | false | 1 | 0 | A combination of your two ideas (copy to a dir, expire when session expires) could be generalized to creating a new dir (could be as simple as a symlink) every 15 minutes. When generating the new symlink, also remove the one that's an hour old by now. Always link to the newest name in your code. | 2 | 0 | 0 | I want to serve images in a web-app using sessions such that the links to the images expire once the session has expired.
If I show the actual links to the filesystem store of the images, say http://www.mywebapp.com/images/foo1.jpg this clearly makes stopping future requests for the image (one the user has signed out o... | ensuring dynamic image urls in a web-app: use a blob store? | -0.066568 | 0 | 0 | 291 |
3,830,508 | 2010-09-30T12:36:00.000 | 1 | 1 | 0 | 0 | python,ssh,ssh-keys | 3,830,595 | 4 | false | 0 | 0 | paramiko will raise an AuthenticationException if you don't pass a password to the SSHClient's .connect() method and a working key cannot be found. | 1 | 5 | 0 | I would test via a python script whether a passwordless ssh login has been setup or not.
If i run the normal ssh command then it will wait to accept the password for some amount of time.
Is there a way where the ssh command should return an error as soon as ssh asks for a password.
Is it possible to achieve this? | Check if passwordless access has been setup | 0.049958 | 0 | 0 | 3,677 |
3,836,086 | 2010-10-01T02:10:00.000 | 1 | 0 | 0 | 0 | python,tkinter | 3,836,182 | 2 | true | 0 | 1 | You want to use wm_geometry and a tiny bit of math to calculate and set a suitable starting position for the second toplevel. | 1 | 1 | 0 | I have a Toplevel widget I'd like it so that it would never appear within the confines of the main Tk window. Basically so that when the Toplevel appears it doesn't cover up any of the main Tk window. | Toplevel widgets in Tkinter | 1.2 | 0 | 0 | 348 |
3,836,620 | 2010-10-01T04:51:00.000 | 0 | 0 | 0 | 0 | python,continuous | 3,836,650 | 3 | false | 0 | 0 | If you really wanted to (and wanted to waste a lot of resources), you could cut your loop into 200 ms chunks. So sleep 200 ms, check input, repeat until five minutes elapse, and then check your inbox. I wouldn't recommend it, though.
While it's sleeping, though, the process is blocked and won't receive input until the ... | 1 | 4 | 0 | I have a script that runs continuously when invoked and every 5 minutes checks my gmail inbox. To get it to run every 5 minutes I am using the time.sleep() function. However I would like user to end the script anytime my pressing q, which it seems cant be done when using time.sleep(). Any suggestions on how i can do th... | Continous loop and exiting in python | 0 | 0 | 1 | 5,470 |
3,836,828 | 2010-10-01T05:49:00.000 | 8 | 1 | 0 | 0 | python,parsing,cgi,request | 39,910,366 | 2 | false | 0 | 0 | notice that if you call cgi.FieldStorage() before in your code, you can't get the body data from stdin, because it just be read once. | 1 | 11 | 0 | I just need to write a simple python CGI script to parse the contents of a POST request containing JSON. This is only test code so that I can test a client application until the actual server is ready (written by someone else).
I can read the cgi.FieldStorage() and dump the keys() but the request body containing the J... | How to parse the "request body" using python CGI? | 1 | 0 | 1 | 8,362 |
3,839,216 | 2010-10-01T12:41:00.000 | 0 | 0 | 0 | 0 | javascript,python,html,css,user-interface | 3,839,449 | 10 | true | 1 | 0 | update: This is an old answer, nowadays you want to go with an embedded browser in your app (*webkit projects etc.), but at the time of writing, no such technology existed. The answer is still valid if you don't want to add quite a few megabytes to your packaged app though.
Find a lightweight server, or better - embed... | 1 | 11 | 0 | Different languages have different GUI toolkits, but it looks very difficult to achieve attractive user interfaces as good as we can using HTML and CSS with less effort.
I don't do my application in javascript as I doubt if it has all the required libraries and I want to do it in python.
How do I use rendering engines... | how to write a desktop application which uses HTML and CSS for user interface and python/perl/c++/java for the processing? | 1.2 | 0 | 0 | 4,636 |
3,839,383 | 2010-10-01T13:02:00.000 | 1 | 0 | 0 | 1 | python,ubuntu-10.04,autostart,wakeup | 3,839,956 | 3 | false | 0 | 0 | If you want to guarantee it's always running, have a look at man inittab. | 2 | 0 | 0 | I'm trying to setup a Python application that should automatically start when Linux boots. It should also start (unless not already running) if the computer resumes from standby mode - which is mainly the problem.
Does anybody know where to integrate these requirements?
Thanks,
Marius | Creating an autostart application on Ubuntu Linux | 0.066568 | 0 | 0 | 1,095 |
3,839,383 | 2010-10-01T13:02:00.000 | 0 | 0 | 0 | 1 | python,ubuntu-10.04,autostart,wakeup | 3,839,444 | 3 | true | 0 | 0 | Configure a cron job every minute to detect if application running - if not start. | 2 | 0 | 0 | I'm trying to setup a Python application that should automatically start when Linux boots. It should also start (unless not already running) if the computer resumes from standby mode - which is mainly the problem.
Does anybody know where to integrate these requirements?
Thanks,
Marius | Creating an autostart application on Ubuntu Linux | 1.2 | 0 | 0 | 1,095 |
3,839,426 | 2010-10-01T13:07:00.000 | 2 | 0 | 0 | 0 | python,user-interface,qt4,pyqt4 | 3,839,514 | 2 | true | 0 | 1 | You should initializer a pointer to the QWidget (member variable) to 0.
When the button is pressed, check if the pointer is 0 - if it is, load and show the widget, and assign the pointer variable to point to the new widget. If the pointer is not null when the button is pressed, call widget->raise() and widget->activate... | 2 | 2 | 0 | I'm developing a plugin UI for an existing application using PyQt4. The window is created using uic.loadUi() on the press of a button in the main window. The problem is that if I press the button again (while the window is showing) the window is re-created and unsaved changes are lost. I don't want to make the window m... | How to check if a QWidget is already showing? | 1.2 | 0 | 0 | 1,072 |
3,839,426 | 2010-10-01T13:07:00.000 | 0 | 0 | 0 | 0 | python,user-interface,qt4,pyqt4 | 3,839,466 | 2 | false | 0 | 1 | I would have thought that this would be handled more by your application logic than anything else. The main window should disable the button after it has been clicked and then re-enable it again when the window is closed. Connect up a closing signal on the secondary window to a slot on the main window to notify the mai... | 2 | 2 | 0 | I'm developing a plugin UI for an existing application using PyQt4. The window is created using uic.loadUi() on the press of a button in the main window. The problem is that if I press the button again (while the window is showing) the window is re-created and unsaved changes are lost. I don't want to make the window m... | How to check if a QWidget is already showing? | 0 | 0 | 0 | 1,072 |
3,840,177 | 2010-10-01T14:37:00.000 | 2 | 0 | 0 | 0 | python,module,importerror | 3,840,201 | 1 | true | 1 | 0 | You might have more than one python version installed? Check the version you are running.
Also, I found using easy_install worked well for installing BeautifulSoup. | 1 | 0 | 0 | I've unpacked BeautifulSoup into c:\python2.6\lib\site-packages, which is in sys.path, but when I enter import BeautifulSoup I get an import error saying no such module exists. Obviously I'm doing something stupid... what is it? | Trouble importing BeautifulSoup in python | 1.2 | 0 | 0 | 1,900 |
3,840,779 | 2010-10-01T15:44:00.000 | 0 | 0 | 1 | 0 | emacs,python-mode | 3,841,767 | 2 | false | 0 | 0 | Also running python-mode.el and when I tab a comment it cycles through the indentation levels. What version of emacs are you using?
edit getting the behavior you describe if there is a non-space immediately following the #. I always put a space after, but it sounds like a bug to me. I'd ask on the python-mode.el lis... | 1 | 1 | 0 | I'm using python-mode.el, and when I try to indent comments, it always wants to put them all the way to the left. I want them indented in line with the rest of the code. Is there an easy way to achieve this? | Tabbing comments in emacs py-mode? | 0 | 0 | 0 | 136 |
3,842,155 | 2010-10-01T18:47:00.000 | 0 | 0 | 0 | 0 | python,text,tkinter | 58,942,250 | 13 | false | 0 | 1 | You could use a Label instead. A Label can be edited programmatically and cannot be edited by the user. | 1 | 83 | 0 | It doesn't look like it has that attribute, but it'd be really useful to me. | Is there a way to make the Tkinter text widget read only? | 0 | 0 | 0 | 131,968 |
3,842,558 | 2010-10-01T19:50:00.000 | -1 | 0 | 1 | 0 | python,multithreading,pyqt | 3,886,587 | 3 | false | 0 | 1 | I use pyqtSignal and Python's threading. You can create threads and when the thread is completed have it send a signal to update your GUI. | 1 | 1 | 0 | I am developing an application that uses multiple threads to gather data from a variety of network devices. I'm using PyQT to display the collected data on a GUI. I am using regular python threads (from thread, threading) in my app (instead of QThread). In order to update the GUI on the different threads, I use a lock... | PyQT and threads | -0.066568 | 0 | 0 | 7,384 |
3,842,882 | 2010-10-01T20:36:00.000 | 1 | 0 | 0 | 0 | python,macos,itunes,sourceforge-appscript,py-appscript | 3,843,204 | 1 | true | 0 | 0 | Some very few applications are recordable: that is, they'll send Apple Events to themselves which can be intercepted. iTunes is not one of these applications. iTunes does send distributed notifications for music start/stop, but not for rating changes. Assuming you don't want to patch iTunes itself, your only real cho... | 1 | 1 | 0 | Is it possible to subscribe to events using py-appscript ?
Example: I'd like to get a callback when a user changes a rating on iTunes. | py-appscript & events | 1.2 | 0 | 0 | 282 |
3,843,218 | 2010-10-01T21:41:00.000 | 1 | 0 | 0 | 0 | python,drupal | 3,843,449 | 1 | true | 1 | 0 | If you write API calls and utilize Drupal Services module, you can hook into just about anything and send/receive JSON/XML data. | 1 | 1 | 0 | This week, I want to start a web mapping and data visualization site for my work.
Unfortunately, I just found out my work place will be using Drupal in a few months down the road. (Most of my web development experience is with App Engine.)
My problem is that I need to make sure my web application embeds nicely into th... | Starting a web app now which will use python that later this need to embed nicely into a Drupal site? | 1.2 | 0 | 0 | 114 |
3,844,158 | 2010-10-02T02:49:00.000 | 8 | 1 | 1 | 0 | python,oop | 3,844,175 | 2 | true | 0 | 0 | What are these kinda classes classified under OOdesign? Can I do it in a more elegant way?
You do have better alternatives, IMHO.
I use a class that has just named constants , this class is used directly other classes to get values of constants in it.I dont instantiate the class.
For e.g. in this case you don't nece... | 1 | 2 | 0 | I just want to know how I can call certian classes in design pattern here, like which type are they classified in OO design
(1) I use a class that has just named constants , this class is used directly other classes to get values of constants in it.I dont instantiate the class.
(2) I use a class with full of static met... | Static or constant or what are they? | 1.2 | 0 | 0 | 705 |
3,844,801 | 2010-10-02T07:31:00.000 | 6 | 0 | 1 | 0 | python,algorithm,comparison | 41,332,976 | 29 | false | 0 | 0 | Check if all elements equal to the first.
np.allclose(array, array[0]) | 1 | 505 | 0 | I need a function which takes in a list and outputs True if all elements in the input list evaluate as equal to each other using the standard equality operator and False otherwise.
I feel it would be best to iterate through the list comparing adjacent elements and then AND all the resulting Boolean values. But I'm not ... | Check if all elements in a list are identical | 1 | 0 | 0 | 489,466 |
3,845,018 | 2010-10-02T08:52:00.000 | 25 | 0 | 1 | 0 | python,bitwise-operators,boolean-operations | 3,845,096 | 9 | false | 0 | 0 | In theory, and and or come straight from boolean logic (and therefore operate on two booleans to produce a boolean), while & and | apply the boolean and/or to the individual bits of integers. There are a lot lot of questions here on how the latter work exactly.
Here are practical differences that potentially affect you... | 1 | 91 | 0 | I am confused as to when I should use Boolean vs bitwise operators
and vs &
or vs |
Could someone enlighten me as to when do i use each and when will using one over the other affect my results? | Boolean operators vs Bitwise operators | 1 | 0 | 0 | 53,143 |
3,846,875 | 2010-10-02T17:50:00.000 | 2 | 0 | 1 | 1 | python,twisted | 3,846,924 | 4 | false | 0 | 0 | Look at the samples that come with twisted's documentation. Also, the documentation is not bad, but it is not very complete. Also, the API docs are quite good in fact.
When you know with which part you start, just try and play with the code until you're stuck, then google samples relating to your code and ask on stack... | 2 | 19 | 0 | How do I begin learning Twisted? What books, documentation or tutorial do you guys recommend?
The reason I asked this question is that I think learning Twisted would help me otherwise also in learning concepts related to network programming (terminologies and how it works and stuff) I have heard that the documentation ... | Learning Twisted | 0.099668 | 0 | 0 | 5,772 |
3,846,875 | 2010-10-02T17:50:00.000 | 3 | 0 | 1 | 1 | python,twisted | 3,846,959 | 4 | false | 0 | 0 | The way i learned twisted was by starting a small project and lots of googling around; the twisted tutorials are sometimes not very clear, its just getting used to the framework and the way it works...
EDIT:
itd also recommend trying to understand what twisted is based on, the whole idea of twisted is to provide event ... | 2 | 19 | 0 | How do I begin learning Twisted? What books, documentation or tutorial do you guys recommend?
The reason I asked this question is that I think learning Twisted would help me otherwise also in learning concepts related to network programming (terminologies and how it works and stuff) I have heard that the documentation ... | Learning Twisted | 0.148885 | 0 | 0 | 5,772 |
3,847,202 | 2010-10-02T19:29:00.000 | 0 | 0 | 0 | 1 | python,django,google-app-engine | 13,424,917 | 4 | false | 1 | 0 | If you plan to use Django on app engine, then chances are you will want to use Djangos ORM. Which means.. you will probably be looking at Django non-rel. However there are a few things to consider:
Django non-rel runs a few versions behind the latest django release, so some modern features (such as advanced timezone s... | 2 | 13 | 0 | I've been learning Python and now I'd like to learn a Python-based web framework. I'm considering Google App Engine and Django. Which one should I choose? What are their unique features and learning curves? | Google App Engine or Django? | 0 | 0 | 0 | 5,657 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.