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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20,756,170 | 2013-12-24T06:43:00.000 | 1 | 0 | 1 | 1 | python,logging | 20,756,290 | 2 | true | 0 | 0 | Maximum size of a file is filesystem dependant. There's nothing about it in Python. | 1 | 0 | 0 | In python, what's the limit of log-file's size by default? 10M, 2G, or some other limit?
Where can I find this information in the API? I know the rollback of RotateFileHandlers, it can configure. Thanks. | what's the limit of logfile's size in python | 1.2 | 0 | 0 | 1,003 |
20,758,839 | 2013-12-24T10:02:00.000 | 1 | 0 | 0 | 0 | python,mysql,django,peewee | 32,690,398 | 4 | false | 1 | 0 | Use of peewee in Django is totally OK. Actually I recently did a project like that. But I still recommend using Django ORM if you do not have some particular reasons to use peewee.
Here are some issues that may occur when you use Peewee in Django:
You may need to write your own db middleware and testcase base class t... | 2 | 1 | 0 | Working on a python & Django project with mysql (newbie)
Trying to figure out if it is preferable to use peewee in the python DB part & Django models in the Django forms or go ahead and use Django for the entire thing
Related answers claim that Django is high overhead but could not find a base for that assumption
Than... | peewee vs django for DB processing | 0.049958 | 0 | 0 | 3,159 |
20,758,839 | 2013-12-24T10:02:00.000 | 3 | 0 | 0 | 0 | python,mysql,django,peewee | 20,759,485 | 4 | false | 1 | 0 | This is entirely opinionated, but I think you should use Django for the entire thing. It's not that I don't like peewee. On the contrary, it might very well be a better ORM. But I have a few reasons I think you'd prefer the Django ORM:
I think the Django ORM is more intuitive for beginners, and covers most use-cases p... | 2 | 1 | 0 | Working on a python & Django project with mysql (newbie)
Trying to figure out if it is preferable to use peewee in the python DB part & Django models in the Django forms or go ahead and use Django for the entire thing
Related answers claim that Django is high overhead but could not find a base for that assumption
Than... | peewee vs django for DB processing | 0.148885 | 0 | 0 | 3,159 |
20,761,523 | 2013-12-24T13:06:00.000 | 0 | 1 | 0 | 1 | python,bash,shell,email | 20,764,497 | 2 | false | 0 | 0 | procmail does this kind of thing trivally - checking the format of an incoming email and running a shell script that is. There's no need to reinvent the wheel
I'm not entirely clear from your description how python fits in to what you want to do..
Hope this helps! | 1 | 0 | 0 | Having failed to find an answer to this elsewhere, I am opening this question more widely.
I need to execute a bash shell command when a properly constructed email is received (I'm using GMail) using Python. I have previously used Python to send emails, but the only solution I have yet found is to use feedparser and Go... | Execute shell command when receiving properly constructed email | 0 | 0 | 0 | 817 |
20,762,556 | 2013-12-24T14:26:00.000 | 1 | 0 | 1 | 0 | python,split | 20,762,787 | 4 | false | 0 | 0 | I think I found a tricky way for my question. I don't need to use any modules for that. I can use replace method of str library and replace words like ! or ? with . . Then I can use split method for my text to split word by . . | 1 | 1 | 0 | How can I write a program in python that can split more than one word or character?
For example I have these sentences: Hi, This is a test. Are you surprised? In this example i need my program to split these sentences by ',','!','?' and '.'. I know split in str library and NLTK but I need to know is there any internal ... | Split more than one word in python | 0.049958 | 0 | 0 | 174 |
20,763,775 | 2013-12-24T16:14:00.000 | 0 | 0 | 0 | 1 | python,windows,apache,wsgi | 20,779,815 | 1 | false | 1 | 0 | Accordning to the links in the comments above, restarts after source changes are always necessary on windows. On linux you still need to touch the wsgi file after source changes. Is it only me that finds this being a major drawback, compared to PHP? | 1 | 0 | 0 | I am evaluating python for web development (mod_wsgi) and have noticed that on windows I have to restart Apache after changing my python source code. On Ubuntu the problem doesn't exists, probably because linux supports wsgi daemon mode.
Are there any way to have hot deployment during web development on windows, like ... | Apache restart when developing python wsgi apps | 0 | 0 | 0 | 217 |
20,764,023 | 2013-12-24T16:33:00.000 | 4 | 0 | 1 | 0 | window,ipython-notebook | 20,764,676 | 1 | true | 0 | 0 | alias ipn='ipython notebook --pylab inline
But the dev team recommend not to start with --pylab it leads to bugs for newcommers that do not know what pylab really does :-(. It is better to use %matplotlib inline at beginning of notebooks ! (explicit is better than implicit)
As for opening in a new window, IPython rely... | 1 | 3 | 0 | so I've been talked into ipython notebook. I even set a shortcut (should be added to the beginners guides: alias ipn='ipython notebook --pylab inline &') but it opens a new tab in an open browsing session.
I'd like it to start the ipython in a NEW window. How do I do that?
Thanks guys! | ipython notebook in a new broswer window (and not a new tab in an existing window) | 1.2 | 0 | 0 | 1,761 |
20,764,462 | 2013-12-24T17:10:00.000 | 0 | 0 | 1 | 1 | python,c,debugging,gdb | 20,764,514 | 2 | false | 0 | 0 | ubiQ,
I've always used IDLE for debugging. Do a google search for it. Hope this helps, if not, let me know! | 1 | 1 | 0 | I'm looking to 'watch' a program as it executes. I want to, for example, keep track of a program's stack pointer as it changes through execution. I've been looking at scripting GDB with python but the solutions to this are very buggy - I've been unsuccessful thus far at installing PythonGDB. If anyone has any solutions... | Following a program's execution | 0 | 0 | 0 | 73 |
20,766,813 | 2013-12-24T21:14:00.000 | 17 | 0 | 1 | 0 | python,integer,unsigned,signed | 20,766,849 | 6 | false | 0 | 0 | Python doesn't have builtin unsigned types. You can use mathematical operations to compute a new int representing the value you would get in C, but there is no "unsigned value" of a Python int. The Python int is an abstraction of an integer value, not a direct access to a fixed-byte-size integer. | 1 | 99 | 0 | Let's say I have this number i = -6884376.
How do I refer to it as to an unsigned variable?
Something like (unsigned long)i in C. | How to convert signed to unsigned integer in python | 1 | 0 | 0 | 253,575 |
20,773,538 | 2013-12-25T13:59:00.000 | 0 | 1 | 1 | 0 | python,security,hide | 20,775,488 | 2 | false | 0 | 0 | You should tell us what kind of protection you want. Do you want to make everybody able to execute you script without knowing the password? Do you want to be the only able to execute you script but you want to protect the password from people who can read the source? There may be different solution.
However every solut... | 2 | 1 | 0 | I am writing a Python code and it is requisite to include a password of one of my online account. I want to cover it in some way as keeping its functionality in the code. Is there nay way to masquerade this kind of credential information as keeping its use in the source code? | How could I securely embed a required password into source code? | 0 | 0 | 0 | 329 |
20,773,538 | 2013-12-25T13:59:00.000 | 1 | 1 | 1 | 0 | python,security,hide | 20,775,416 | 2 | false | 0 | 0 | I would recommend two levels to secure passwords. 1 encrypt, 2, protect the key used for encrypting in key store.
Details- Encrypt the password using aes 256 or similar based on the risk. Key used for encrypting should be in key store and you can hard code the key store password.
You can also choose number of levels ba... | 2 | 1 | 0 | I am writing a Python code and it is requisite to include a password of one of my online account. I want to cover it in some way as keeping its functionality in the code. Is there nay way to masquerade this kind of credential information as keeping its use in the source code? | How could I securely embed a required password into source code? | 0.099668 | 0 | 0 | 329 |
20,774,949 | 2013-12-25T16:53:00.000 | 0 | 0 | 0 | 0 | python,sockets,networking,tcp,client-server | 20,775,026 | 3 | false | 0 | 0 | I believe what you are trying to achieve is a bit similar to jsonp. While sending to the client, send through a callback method which you know of, that is existing in client.
like if you are sending "some data xyz", send it like server.send("callback('some data xyz')");. This suggestion is for javascript because it exe... | 2 | 0 | 0 | As far as I understand the basics of the client-server model, generally only client may initiate requests; server responds to them. Now I've run into a system where the server sends asynchronous messages back to the client via the same persistent TCP connection whenever it wants. So, a couple of questions:
Is it a rig... | Is it OK to send asynchronous notifications from server to client via the same TCP connection? | 0 | 0 | 1 | 530 |
20,774,949 | 2013-12-25T16:53:00.000 | 0 | 0 | 0 | 0 | python,sockets,networking,tcp,client-server | 20,775,573 | 3 | false | 0 | 0 | Yes this is very normal and Server can also send the messages to client after connection is made like in case of telnet server when you initiate a connection it sends you a message for the capability exchange and after that it asks you about your username & password.
You could very well use select() or if I were in you... | 2 | 0 | 0 | As far as I understand the basics of the client-server model, generally only client may initiate requests; server responds to them. Now I've run into a system where the server sends asynchronous messages back to the client via the same persistent TCP connection whenever it wants. So, a couple of questions:
Is it a rig... | Is it OK to send asynchronous notifications from server to client via the same TCP connection? | 0 | 0 | 1 | 530 |
20,777,307 | 2013-12-25T22:33:00.000 | 0 | 0 | 0 | 1 | python,macos,sublimetext,read-eval-print-loop,sublimerepl | 65,398,436 | 4 | false | 0 | 0 | I would suggest to change the directory to
/Library/Frameworks/Python.framework/Versions/Current/bin/python3
This way whenever you update python, SublimeREPL will always get the updated version. | 1 | 5 | 0 | My question is the following, I have sublime 2 and sublime repl plugin installed all working fine, the only thing i need is to change the version of python that is running on the sublimerepl built in console. What I mean is, I have python 2.7.5 (which is pre installed with maveriks) running fine in sublime (via sublime... | How to run Python 3 in Sublime 2 REPL Mac | 0 | 0 | 0 | 6,952 |
20,778,806 | 2013-12-26T03:38:00.000 | 0 | 0 | 0 | 0 | python,numpy,ubuntu-12.04,scientific-computing,intel-mkl | 20,780,564 | 1 | false | 0 | 0 | As far as I know the only way is to compile NumPy again without MKL, preferably in a virtualenv.... | 1 | 4 | 1 | So, I compiled NumPy from source, linking to MKL. Now I want to compare NumPy's performance with and without MKL. Is there any way I can "tell" NumPy not to use MKL, so I can produce the benchmarks? For instance, with numExpr we can do numexpr.use_vml = False. Is there anything similar for NumPy? I really don't wanna h... | compare NumPy vs. NumPy+MKL performance | 0 | 0 | 0 | 1,214 |
20,779,360 | 2013-12-26T04:58:00.000 | 1 | 1 | 0 | 0 | python,radius,freeradius | 20,792,780 | 1 | false | 0 | 0 | Not directly no. You can use sqlite if you want an easily modifiable local data store for clients definitions. | 1 | 0 | 0 | I wrote an auth module for FreeRADIUS with Python.
I want to manage a NAS with it.
Is there way except generating a client.conf file and restarting? | Can I define RADIUS clients with Python? | 0.197375 | 0 | 1 | 961 |
20,786,478 | 2013-12-26T14:27:00.000 | 47 | 0 | 1 | 1 | python,windows,python-2.7,python-3.x,cmd | 34,838,251 | 3 | false | 0 | 0 | I also met the case to use both python2 and python3 on my Windows machine. Here's how i resolved it:
download python2x and python3x, installed them.
add C:\Python35;C:\Python35\Scripts;C:\Python27;C:\Python27\Scripts to environment variable PATH.
Go to C:\Python35 to rename python.exe to python3.exe, also to C:\Pyth... | 1 | 32 | 0 | How can I configure windows command dialog to run different python versions in it? For example when I type python2 it runs python 2.7 and when I type python3 it runs python 3.3? I know how to configure environment variables for one version but two? I mean something like Linux terminal. | How to run different python versions in cmd | 1 | 0 | 0 | 170,536 |
20,789,687 | 2013-12-26T18:52:00.000 | 3 | 0 | 0 | 0 | python,django,model,django-forms | 20,789,744 | 1 | true | 1 | 0 | This behavior is by design. Django would rather have empty strings than NULLs, for various reasons. Google will tell you, but long story short, Django finds NULL and "" overlapping in meaning, and does away with the former.
What you can do, is intercept the value coming from the database driver and change empty strings... | 1 | 0 | 0 | I've looked all around the documentation and internet, but I can't find an answer for this. I have a model with several fields that have (blank=True, null=True). When I save the ModelForm, the columns get set as empty strings in the database. I would like it to save them as NULL in the database (if they are empty).
How... | Django ModelForm not saving NULL values | 1.2 | 0 | 0 | 277 |
20,793,740 | 2013-12-27T02:01:00.000 | 1 | 0 | 1 | 0 | python,error-handling | 28,821,129 | 2 | false | 0 | 0 | Compile errors will be shown when you first try to compile the RPY files. They will be put in "errors.txt" in your project directory. Most errors are not found at compile-time, however, and will only show up once you encounter them at run-time.
You can use Lint to check for some common errors (It's called "Check Scri... | 2 | 2 | 0 | I'm making a game using Ren'py (based on python) and most errors aren't shown, especially the errors in python code. Is there a possibility to check for possible errors at compile time and how do I get where some errors occur? If there are errors the game normally doesn't run or breaks at the a errors appearance withou... | How do I handle errors in Ren'py | 0.099668 | 0 | 0 | 2,449 |
20,793,740 | 2013-12-27T02:01:00.000 | 0 | 0 | 1 | 0 | python,error-handling | 56,918,348 | 2 | false | 0 | 0 | If you're looking for some kind of intellisense like you have for some languages, where as you write the code the IDE shows errors, then it doesn't exist. You have to launch the game so that the code is compiled, just then Ren'py will show you errors. You can see them in the editor or in the errors.txt that Ren'Py crea... | 2 | 2 | 0 | I'm making a game using Ren'py (based on python) and most errors aren't shown, especially the errors in python code. Is there a possibility to check for possible errors at compile time and how do I get where some errors occur? If there are errors the game normally doesn't run or breaks at the a errors appearance withou... | How do I handle errors in Ren'py | 0 | 0 | 0 | 2,449 |
20,794,033 | 2013-12-27T02:44:00.000 | 1 | 0 | 0 | 0 | python,tornado | 20,817,404 | 2 | true | 1 | 0 | Tornado doesn't know anything about html comments, so any html comments will be passed through as-is. (You can use {# #} to add comments to your templates). There is limited support for stripping whitespace, which is enabled by default based on file extension (.html and .js). There's also a half-implemented compress... | 1 | 0 | 0 | I am using tornado and the tornado templating engine. Even when debug is set to False, tornado-rendered pages still have HTML comments and unnecessary whitespace in them. Is there a setting to automatically strip this out when rendering pages (essentially minifying the rendered pages)? | Strip unnecessary whitespace and html comments from Tornado-rendered Pages | 1.2 | 0 | 0 | 662 |
20,795,990 | 2013-12-27T06:31:00.000 | 1 | 0 | 0 | 0 | python | 70,174,450 | 2 | false | 0 | 0 | Try color = '#FF000000' its the Hex code. | 1 | 0 | 1 | How do I plot a line of transparent colour or no colour ?
For example :
plot(x,y,color='transparent')
or
plot(x,y,color='None')
BTW , color='white' is not what I'm looking for .
Thanks in advance invisible computer people . | Python . Select transparent colour or no colour for lines / points etc | 0.099668 | 0 | 0 | 18,046 |
20,797,277 | 2013-12-27T08:19:00.000 | 1 | 0 | 1 | 0 | python | 20,797,309 | 6 | false | 0 | 0 | If the list returns is guaranteed not to be empty, then simply using if result will do it.
Using if lst is the standard way of checking if a list is non-empty, as empty lists evaluate to False in a boolean context. Because your function only ever returns non-empty lists or False, this will work.
This can become confusi... | 1 | 0 | 0 | I have a function that return either a list or False, what is the most elegant way to test if the function returns a list in an if statement ( or else if it returns False ). I'm testing the "type" of the value returned but it feels clumsy , surely there is a better way to test if the function returns False ( or a list ... | Testing if a function returns a list or a bool | 0.033321 | 0 | 0 | 95 |
20,798,818 | 2013-12-27T10:15:00.000 | 0 | 0 | 0 | 0 | python,mysql,connection-pooling,mysql-python,zope | 21,954,872 | 1 | false | 0 | 0 | I guess you've advanced with your problem, but this is not a reason not to comment.
1) Long-term answer: seriously consider building a path to migrating to ZODB instead of mysql. ZODB is integrated with Zope and is way more efficient than mysql for storing Zope data. You can't do it at once, but may be you can identify... | 1 | 1 | 0 | I'm started enhancing an application which has developed in Python. Zope server has been used to deploy the application.
In many modules DB connection has established and used for DB transaction, and which has not used any connection pooling mechanism. Considering the volume of users it is vulnerable to have DB connect... | How to configure DB connection pooling in Python Zope server | 0 | 1 | 0 | 309 |
20,803,514 | 2013-12-27T15:47:00.000 | 1 | 0 | 1 | 1 | macos,ipython,ipython-notebook | 21,111,278 | 2 | false | 0 | 0 | thanks for the info but I have found out the problems a few weeks ago and have forgotten to post it here....
It is just that for Mac installation, it is pretty tricky and hence while installing, instead of typing in: easy_install ipython, users have to specify the python version.
Thus, I will need to type in easy_insta... | 1 | 1 | 0 | I am wondering if anyone has installed ipython notebook on mac OSX?
Currently I am able to run it in the terminal note but as soon as I type in the notebook version, there are problems encountered in running it.
Below is the error I have gotten:
Traceback (most recent call last): File
"/Users/tayyangki/anaconda/b... | ipython notebook installation on mac os x | 0.099668 | 0 | 0 | 3,347 |
20,808,909 | 2013-12-27T22:52:00.000 | 0 | 1 | 0 | 1 | python,apache,mod-wsgi | 20,809,616 | 1 | false | 0 | 0 | There are two options. Use mod_wsgi daemon mode and run the daemon process as a distinct user. Then lock down all your file permissions appropriately to deny access from that user. The second is that mod_wsgi daemon mode also supports a chroot option. Using a chroot is obviously a lot more complicated to set up however... | 1 | 0 | 0 | Lets say I have directory with subdirectories where are projects stored.
How to lock Python script inside that subdirectory ? That it can not scan parent directories, read files, import etc. Is it possible with mod_wsgi ?
And how to disable any python functions ?
Thank | Apache: python directory restriction | 0 | 0 | 0 | 50 |
20,809,396 | 2013-12-27T23:48:00.000 | 0 | 0 | 1 | 0 | python,file,memory,file-read | 20,809,521 | 6 | false | 0 | 0 | Unless you have an index built or fixed length records, you'll probably need to read the file, one line at a time, throwing out early values until you get the one you want. | 1 | 2 | 0 | I'm trying to read through a very large text file (> 1.5gb) line by line but would like to avoid loading the whole file into memory, is there a way to just read a specific line at once without loading everything first? | Read specific line of file in Python without filling memory | 0 | 0 | 0 | 2,160 |
20,813,532 | 2013-12-28T10:34:00.000 | 0 | 0 | 0 | 1 | python-2.7,hadoop,hadoop-streaming | 20,821,705 | 1 | true | 0 | 0 | MapReduce isn't really meant to handle that small of an input dataset. The MapReduce framework has to determine which nodes will run tasks and then spin up a JVM to run each individual Map and Reduce task(s) (the number of tasks is dependent on the size of your data set). That usually has a latency on the order of te... | 1 | 0 | 0 | I am running three MapReduce jobs in sequence (output of one is the input to another) on a Hadoop cluster with 3 nodes (1 master and 2 slaves).
Apparently, the total time taken by individual jobs to finish on a single node cluster is less than the above by quite a margin.
What could be the possible reasons? Is it the n... | Hadoop : single node vs cluster performance | 1.2 | 0 | 0 | 1,247 |
20,815,873 | 2013-12-28T14:52:00.000 | 0 | 0 | 1 | 0 | python,regex,python-3.x | 20,815,915 | 5 | false | 0 | 0 | I think you need to do this in two steps: first, find the dots inside the double quotes, and "protect" them (for example, replace them with a string like $%$%$%$ that is unlikely to appear in a Chinese text.). Next, explode the strings as before. Finally, replace the $%$%$%$ with a dot again. | 1 | 0 | 0 | I am writing a program about getting the abstract of Chinese article. Firstly I have to explode each sentence with symbols like “。!?”.
In Chinese article, when referring other's word, they would use double quotation marks to mark the referred words, which may contain "。" but should not be exploded. For example, the fol... | How to explode sentences with "。" but ignore the "。" in the double quotation marks | 0 | 0 | 0 | 202 |
20,816,257 | 2013-12-28T15:38:00.000 | 0 | 0 | 1 | 1 | python,macos,automation | 20,816,671 | 2 | false | 0 | 0 | Set a variable to the future time, and check it in a while() loop | 1 | 0 | 0 | I have the following set-up
A Python script
A Mac OSX Automator application with said script
An iCal alert that runs the Automator (and thus the Python script) on a regular schedule
All of the above works just fine. But I need to make a change. I need the script to check a web site for a time in the future (that same... | Architecture for a self-running Python script on Mac OSX | 0 | 0 | 0 | 217 |
20,816,984 | 2013-12-28T16:53:00.000 | 6 | 0 | 1 | 0 | python,virtualenv,virtualenvwrapper | 20,817,628 | 4 | false | 0 | 0 | Generally this is considered good practice. However, keep in mind that this can result in disk consumption fairly quickly if you have multiple large projects. Moreover, sometimes virtualenv may not be appropriate if you have low level system integration in your project.
If you are sharing your projects, it is good to ... | 2 | 13 | 0 | After googling around regarding virtualenv, I was under the impression that virtual environments should be created for every project I create (that are related and use the same site packages).
Is this true and why or why not?
Also, if I am currently using a virtualenv for one of my projects, how would I go about upgrad... | Should I be creating a virtual environment for each project? | 1 | 0 | 0 | 7,906 |
20,816,984 | 2013-12-28T16:53:00.000 | -4 | 0 | 1 | 0 | python,virtualenv,virtualenvwrapper | 20,817,834 | 4 | false | 0 | 0 | Q : I was under the impression that virtual environments should be created for every project I create (that are related and use the same site packages).
Answer:
No. You keep a single virtualenv for a set of projects that share same characteristics.
Q : Also, if I am currently using a virtualenv for one of my projects, ... | 2 | 13 | 0 | After googling around regarding virtualenv, I was under the impression that virtual environments should be created for every project I create (that are related and use the same site packages).
Is this true and why or why not?
Also, if I am currently using a virtualenv for one of my projects, how would I go about upgrad... | Should I be creating a virtual environment for each project? | -1 | 0 | 0 | 7,906 |
20,817,133 | 2013-12-28T17:07:00.000 | 1 | 0 | 1 | 0 | python,django,pycharm | 63,396,738 | 2 | false | 0 | 0 | Another way is to navigate to the first line using goto line: Ctrl-G and then 1. But this will move the cursor to the first line.
A small disadvantage is it is a two step process and adds a navigation step. Moving back to your previous location with CtrlAlt-< will have to be done in two steps if you do an edit. | 2 | 23 | 0 | I'm new to PyCharm and haven't been able to figure out what I'm sure is a very simple thing -- what's the key stroke to go to the top of the current file?
(Bonus question -- is there a way to scroll to the top of the current file without moving the cursor there also, a la the Home key in Sublime Text 2?) | In PyCharm, how to navigate to the top of the file? | 0.099668 | 0 | 0 | 8,443 |
20,817,133 | 2013-12-28T17:07:00.000 | 19 | 0 | 1 | 0 | python,django,pycharm | 20,817,174 | 2 | true | 0 | 0 | You navigate to the top of the file using Ctrl+Home. It moves cursor too. So does navigating via Page Up and Page Down keys.
Ctrl+Up and Ctrl+Down move the view without moving cursor but scrolling the long file takes some time.
Additionally You can change the keymap (Settings > Keymap). There is 'Scroll to Top' in 'Edi... | 2 | 23 | 0 | I'm new to PyCharm and haven't been able to figure out what I'm sure is a very simple thing -- what's the key stroke to go to the top of the current file?
(Bonus question -- is there a way to scroll to the top of the current file without moving the cursor there also, a la the Home key in Sublime Text 2?) | In PyCharm, how to navigate to the top of the file? | 1.2 | 0 | 0 | 8,443 |
20,818,230 | 2013-12-28T19:02:00.000 | 2 | 0 | 1 | 0 | java,python,image,matlab,image-processing | 33,393,680 | 3 | false | 0 | 0 | Spatial = Space
Example, Image consist of pixel values which needs memory space to store. Spatial information = Pixel values stored into Memory
Temporal = Time
Example, Video consists of image frame sequence. With respect to time the frames are changed in video. This is called Temporal Information. | 2 | 13 | 1 | I am a beginner in learning image processing and I am a bit confused with the concept of spatial and temporal characterization. So, for Spatial characterization, is it like a 2D map which contains some statistical information about the map? And in terms of the temporal characterization, is the value with respect to t... | what's the difference between spatial and temporal characterization in terms of image processing? | 0.132549 | 0 | 0 | 72,641 |
20,818,230 | 2013-12-28T19:02:00.000 | 0 | 0 | 1 | 0 | java,python,image,matlab,image-processing | 70,253,700 | 3 | false | 0 | 0 | Example of Spatial analysis application: Inspecting an image e.g. pose estimation on an image.
Example of Temporal analysis application: Inspecting a video e.g. vehicle monitoring or pedestrian path prediction | 2 | 13 | 1 | I am a beginner in learning image processing and I am a bit confused with the concept of spatial and temporal characterization. So, for Spatial characterization, is it like a 2D map which contains some statistical information about the map? And in terms of the temporal characterization, is the value with respect to t... | what's the difference between spatial and temporal characterization in terms of image processing? | 0 | 0 | 0 | 72,641 |
20,825,590 | 2013-12-29T13:25:00.000 | 1 | 0 | 1 | 1 | python,linux,shell | 20,825,952 | 1 | true | 0 | 0 | You won't have any problem with what you're trying to do. You can call the same script in parallel a lot of times, with different input arguments. (sys.argv entries). For each run, a new memory space will be allocated. | 1 | 0 | 0 | I have a question about the Python Interpreter. How does is treat the same script running 100 times, for example with different sys.argv entries? Does it create a different memory space for each script or something different?
System is Linux , CentOS 6.5. Is there any operational limit that can be observed and tuned? | Call a Python Script from parallel shell scripts at the same time | 1.2 | 0 | 0 | 88 |
20,826,619 | 2013-12-29T15:17:00.000 | 1 | 0 | 1 | 1 | python,eclipse,pydev | 20,826,849 | 2 | false | 0 | 0 | I bet it's the problem of 3.x version of PyDev. It demands java 7.
2 solutions are possible:
Install java 7. re-run the Eclipse, Pydev should function well now. OR
Install last 2.x version of PyDev.
To do it
1) Remove PyDev : In Eclipse About window click Installation Details
button below. You will see controls for r... | 1 | 0 | 0 | This isn't my first time using Eclipse or installing PyDev but this is the first time it both succeeded and failed.
It succeeded because it installed, it shows up as being installed and installation went on fine without a problem.
It failed because nothing has shown up, there is no Python perspective, no PyDev views in... | Eclipse - Installed PyDev and nothing changed | 0.099668 | 0 | 0 | 762 |
20,827,199 | 2013-12-29T16:15:00.000 | 1 | 0 | 1 | 0 | python,pygame,paint,undo,redo | 20,828,238 | 2 | false | 0 | 1 | My suggestion is to have a buffer of the last operations that have been done. Each operation will consist of a sprite, and a position of where it is placed.
You will be drawing the canvas, as well as all sprites from that buffer. When you have to many sprites in the buffer, you can blit the oldest onto the canvas, thu... | 1 | 1 | 0 | I am currently working on creating a paint program using python and pygame. I am currently having trouble with creating the undo/redo function in the program. The way I was thinking of doing so would be to save the canvas image after each time the user releases the mouse, but I am not sure if the individual images wo... | Paint Program in Python - Undo and Redo | 0.099668 | 0 | 0 | 982 |
20,829,163 | 2013-12-29T19:23:00.000 | 0 | 0 | 0 | 1 | python,google-app-engine,google-cloud-storage | 20,847,501 | 1 | true | 1 | 0 | Stupid question now that i found the solution.
It was because i was running old_dev_appserver.py in my server startup script.
GCS is only supported from the 1.8.1 and greater. | 1 | 0 | 0 | I'm trying to work with gae-boilerplate on google app engine and I want to
communicate with the cloud on local development server (for now).
I took the test app example and it runs perfectly but when trying to integrate with
gae-boilerplate it falls apart.
If I extend my class with webapp2.request it will work but I ca... | gae-boilerplate and gcs client | 1.2 | 0 | 0 | 156 |
20,830,698 | 2013-12-29T22:16:00.000 | 3 | 0 | 1 | 1 | python,pip,pypi | 20,890,406 | 1 | true | 0 | 0 | pip does not support installing packages distributed as '"dumb" binaries'. Only source distributions, eggs and wheels are supported.
There are various other drawbacks to using dumb binaries, not least in that the Python version for which they were compiled is not listed, and they contain the full path to the files maki... | 1 | 2 | 0 | I have a package that I have registered on Pypi. However when I do sudo pip install mypackage from ubuntu it gives me the windows package rather than the linux one. How do you configure your package to give the right version for the right OS? | How to get pypi to recognise the OS correctly | 1.2 | 0 | 0 | 157 |
20,831,821 | 2013-12-30T00:43:00.000 | 0 | 0 | 0 | 0 | python,captcha,bots,google-finance | 20,929,338 | 2 | true | 1 | 0 | Yahoo YQL works fairly well, but throws numerous HTTP 500 errors that need to be handled, they are all benign. TradeKing is an option, however, the oauth2 package is required and that is very difficult to install properly | 1 | 0 | 0 | So I have run into the issue of getting data from Google Finance. They have an html access system that you can use to access webpages that give stock data in simple text format (ideal for minimizing parsing). However, if you access this service too frequently, Google locks you out and you need to enter a captcha. I cur... | Google Finance Lock Out - Robot | 1.2 | 0 | 1 | 447 |
20,832,826 | 2013-12-30T03:17:00.000 | 8 | 0 | 1 | 0 | python,python-3.x,sublimetext | 33,468,290 | 3 | false | 0 | 0 | Click on tools > build systems > select Python, then Build with using ctr+shif B and select python, and it ll work. Second time you can use the build command, ctr + B since python is now set as default | 1 | 7 | 0 | New to Python & Sublime
Problem:
I type 'print ("Hello world")
How do I get it to show me the output (Hello world), is it in a separate window? or...
I understand I can use the Python Console built in, but that's a command line, what about when I get to use a ton of code, how do I get the output? | Display Python Output in Sublime text | 1 | 0 | 0 | 29,017 |
20,833,826 | 2013-12-30T05:27:00.000 | 0 | 0 | 1 | 0 | python,python-2.7 | 47,946,736 | 2 | false | 0 | 1 | You need to activate the appropriate virtual environment and then use the command pip install PyQt4or pip install PyQt5. Since you are using virtualenvwrapper, the virtual environment is activated automatically. Otherwise, use workon virtualenv_name to activate the environment.Do tell if the problem still persists. | 1 | 0 | 0 | I'm trying to maintain 2 python projects. one of them is using PyQt4 and another one is using PyQt5. So I created 2 virtualenv as follow.
1) installed virtualenv and virtualenvwrapper by sudo
2) logout from root(sudo)
3) created virtualenv at /home/thura/workspace/python/virtualenv
4) mkvirtualenv gui_pyqt4 under
/h... | How to install PyQt4 and PyQt5 at different virtualenv? | 0 | 0 | 0 | 1,320 |
20,834,740 | 2013-12-30T06:52:00.000 | 1 | 0 | 0 | 0 | python,sqlite,sqlalchemy | 20,835,718 | 2 | false | 0 | 0 | Sounds like the python binary you are using wasn't compiled with the sqlite module. If you are compiling from source, make sure you have the sqlite headers available. | 1 | 0 | 0 | I am trying to import sqlalchemy.databases.sqlite.DateTimeMixIn. I get ImportError: No module named sqlite. SQLAlchemy 0.8.4 is installed. If I do import sqlite I get the same error. | Importing SQLAlchemy DateTimeMixin raises ImportErrror | 0.099668 | 1 | 0 | 79 |
20,839,182 | 2013-12-30T12:04:00.000 | 39 | 0 | 1 | 0 | python,pycharm | 23,500,783 | 12 | false | 0 | 0 | If you want to remove the project from the recent projects list, just highlight the project with your mouse and hit the del key. | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 1 | 0 | 0 | 108,420 |
20,839,182 | 2013-12-30T12:04:00.000 | 87 | 0 | 1 | 0 | python,pycharm | 21,887,362 | 12 | true | 0 | 0 | Just follow these steps in order. They assume you currently have the project open in a PyCharm window:
Close your project by clicking on File -> Close Project
Locate your project in the PyCharm file directory
Delete your project's directory
I agree that PyCharm's handling of what should be a very simple procedure is ... | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 1.2 | 0 | 0 | 108,420 |
20,839,182 | 2013-12-30T12:04:00.000 | 6 | 0 | 1 | 0 | python,pycharm | 50,676,466 | 12 | false | 0 | 0 | click the project you want to remove.
menu bar Edit-> Remove from Project View. | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 1 | 0 | 0 | 108,420 |
20,839,182 | 2013-12-30T12:04:00.000 | 1 | 0 | 1 | 0 | python,pycharm | 67,867,930 | 12 | false | 0 | 0 | In 2021 maybe another way to do it. My problem was in project with user directory (root was /Users) that contains too many not Python files, and it triggers some problems with Git and file index.
What I did:
show hidden files (Cmd + Shift + .),
find .idea directories,
delete all .idea directories.
open PyCharm and add... | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 0.016665 | 0 | 0 | 108,420 |
20,839,182 | 2013-12-30T12:04:00.000 | 0 | 0 | 1 | 0 | python,pycharm | 47,864,018 | 12 | false | 0 | 0 | I had the same issue. My solution was:
Close project.
Rename the folder you want to dissapear
Open pycharm project. A dialog will be shown asking if you want Pycharm remove the folder. Answer: yes.
That is enough. | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 0 | 0 | 0 | 108,420 |
20,839,182 | 2013-12-30T12:04:00.000 | 4 | 0 | 1 | 0 | python,pycharm | 44,430,173 | 12 | false | 0 | 0 | Version 2017.2.1
Press Alt+1 to bring the project pane, and make sure you're in
Project view (not Project Files view).
Select the desired project, and choose "Delete from project
view" from the context menu (right click). You can also use Delete
key. | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 0.066568 | 0 | 0 | 108,420 |
20,839,182 | 2013-12-30T12:04:00.000 | 0 | 0 | 1 | 0 | python,pycharm | 43,861,035 | 12 | false | 0 | 0 | In version 2017.2.1
File → Close Project
You will be taken to the start-up window, where you can see the projects you've created on the left. You can then delete a project by clicking the cross sign ('x') following the project name. | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 0 | 0 | 0 | 108,420 |
20,839,182 | 2013-12-30T12:04:00.000 | 1 | 0 | 1 | 0 | python,pycharm | 34,987,731 | 12 | false | 0 | 0 | Highlight the project with your mouse and hit the del key, which works for me. | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 0.016665 | 0 | 0 | 108,420 |
20,839,182 | 2013-12-30T12:04:00.000 | 2 | 0 | 1 | 0 | python,pycharm | 51,585,059 | 12 | false | 0 | 0 | In PyCharm 2018 I finally had to resort to deleting .idea folder and the project went away. | 9 | 78 | 0 | If I'm closing a project and then just delete the project folder, after PyCharm restarts an empty project folder is created again. | How to remove project in PyCharm? | 0.033321 | 0 | 0 | 108,420 |
20,839,246 | 2013-12-30T12:07:00.000 | 0 | 0 | 0 | 0 | python,pygame,sprite | 20,843,239 | 1 | false | 0 | 1 | Can't you just stop drawing the pig? Each frame you fill the screen with the background, so it won't be visible. | 1 | 0 | 0 | I have two objects troll and pig. I'm detecting collisions between these two characters with Pygame's colliderect function. collisions for this works perfectly, however I am unable to remove the object from the screen when a collision occurs. When a troll collideswith a pig, I want the pig to disappear from the screen.... | remove object after collision | 0 | 0 | 0 | 489 |
20,839,944 | 2013-12-30T12:50:00.000 | 0 | 0 | 0 | 0 | c++,python,sockets | 20,840,334 | 4 | false | 0 | 1 | I would go for named pipes, would be readily available in your circumstance because it is just similar to reading and writing to file, but it also has features similar to sockets i.e. you can make them communicate on a network (different hosts) | 1 | 4 | 0 | I'm looking for some advice mainly here.
I'm working on an application, where the main processing (stored on a server) is carried out in C++ and the GUI (front-end) is carried out in Python. These two programs will communicate with each other. The Python will send across the files needed for the C++ program to work, a... | Sending/Receiving data between two different programs | 0 | 0 | 0 | 3,600 |
20,840,803 | 2013-12-30T13:45:00.000 | -2 | 0 | 1 | 0 | python,string,integer | 60,319,095 | 9 | false | 0 | 0 | only with this:
const a = true;
const b = false;
console.log(+a);//1
console.log(+b);//0 | 4 | 161 | 0 | Is there a way to convert true of type unicode to 1 and false of type unicode to 0 (in Python)?
For example: x == 'true' and type(x) == unicode
I want x = 1
PS: I don’t want to use if-else. | How to convert 'false' to 0 and 'true' to 1? | -0.044415 | 0 | 0 | 324,682 |
20,840,803 | 2013-12-30T13:45:00.000 | 4 | 0 | 1 | 0 | python,string,integer | 64,686,481 | 9 | false | 0 | 0 | +(False) converts to 0 and
+(True) converts to 1 | 4 | 161 | 0 | Is there a way to convert true of type unicode to 1 and false of type unicode to 0 (in Python)?
For example: x == 'true' and type(x) == unicode
I want x = 1
PS: I don’t want to use if-else. | How to convert 'false' to 0 and 'true' to 1? | 0.088656 | 0 | 0 | 324,682 |
20,840,803 | 2013-12-30T13:45:00.000 | 0 | 0 | 1 | 0 | python,string,integer | 45,032,626 | 9 | false | 0 | 0 | bool to int:
x = (x == 'true') + 0
Now the x contains 1 if x == 'true' else 0.
Note: x == 'true' will return bool which then will be typecasted to int having value (1 if bool value is True else 0) when added with 0. | 4 | 161 | 0 | Is there a way to convert true of type unicode to 1 and false of type unicode to 0 (in Python)?
For example: x == 'true' and type(x) == unicode
I want x = 1
PS: I don’t want to use if-else. | How to convert 'false' to 0 and 'true' to 1? | 0 | 0 | 0 | 324,682 |
20,840,803 | 2013-12-30T13:45:00.000 | 13 | 0 | 1 | 0 | python,string,integer | 48,975,163 | 9 | false | 0 | 0 | You can use x.astype('uint8') where x is your Boolean array. | 4 | 161 | 0 | Is there a way to convert true of type unicode to 1 and false of type unicode to 0 (in Python)?
For example: x == 'true' and type(x) == unicode
I want x = 1
PS: I don’t want to use if-else. | How to convert 'false' to 0 and 'true' to 1? | 1 | 0 | 0 | 324,682 |
20,847,122 | 2013-12-30T20:36:00.000 | 1 | 0 | 0 | 0 | javascript,python | 31,151,979 | 4 | false | 1 | 0 | In my opinion, the best option for achieving real time data streaming to a frontend UI is to use a messaging service like pubnub. They have libraries for any language you are going to want to be using. Basically, your user interfaces subscribe to a data channel. Things which create data then publish to that channel, an... | 1 | 3 | 0 | I am using Flask and I want to show the user how many visits that he has on his website in realtime.
Currently, I think a way is to, create an infinite loop which has some delay after every iteration and which makes an ajax request getting the current number of visits.
I have also heard about node.js however I think t... | How to achieve realtime updates on my website (with Flask)? | 0.049958 | 0 | 0 | 5,285 |
20,847,499 | 2013-12-30T21:01:00.000 | 0 | 0 | 0 | 0 | python-2.7,segmentation-fault,nuitka | 25,286,959 | 1 | false | 0 | 0 | Did you try taking a look at the core file? That should give you an idea where the segmentation fault is happening. | 1 | 0 | 0 | I'm developing an embedded device controlled by a python2.7 script. And I need to compile the source for both security (I don't want device users to mess with my sources) and performance (I'm working on an BeagleBone Black, ARM microPC, and it's pretty short on CPU/RAM).
I'm using Nuitka python compiler for this. I've ... | python package compiled with nuitka fails with segmentation fault | 0 | 0 | 0 | 651 |
20,847,649 | 2013-12-30T21:11:00.000 | 0 | 0 | 0 | 1 | python,aptana,pydev | 21,073,033 | 3 | false | 1 | 0 | Aptana 3.5.0 and PyDev 3.0 does not work under Mac OS X 10.9 Mavericks yet. PyDev reports builtin symbols such as None could not be recognized.
I rolled back to 3.4.2 as well. | 2 | 0 | 0 | Aptana Studio is my primary Python IDE and I have been using it for years with much joy and success! Recently, when I start Aptana Studio it fails to recognize any PyDev projects that I have previously created. I noticed that this was happening after installing a recent update of the IDE. I tried uninstalling Aptana an... | PyDev won't start in Aptana Studio3 | 0 | 0 | 0 | 666 |
20,847,649 | 2013-12-30T21:11:00.000 | 0 | 0 | 0 | 1 | python,aptana,pydev | 20,851,621 | 3 | false | 1 | 0 | I went back to the Aptana website and this time around it gave me Aptana Studio 3, build: 3.4.2.201308081805 which works fine. 3.5.0 does still not appear to work for Python development at the moment. | 2 | 0 | 0 | Aptana Studio is my primary Python IDE and I have been using it for years with much joy and success! Recently, when I start Aptana Studio it fails to recognize any PyDev projects that I have previously created. I noticed that this was happening after installing a recent update of the IDE. I tried uninstalling Aptana an... | PyDev won't start in Aptana Studio3 | 0 | 0 | 0 | 666 |
20,849,706 | 2013-12-31T00:10:00.000 | 1 | 0 | 1 | 0 | python,function,project,structure | 20,850,514 | 2 | true | 0 | 0 | I generally find it easiest to put such code in a separate file, because for clarity you don't want more than one different copyright/licensing term to apply within a single file. So in Python this does indeed mean a separate module. Then the file can contain whatever attribution and other legal boilerplate you need.
A... | 2 | 0 | 0 | Recently, I have been working on a Python project with usual directory structure, and have received help from someone else who has given me a code snippet (a single function definition, about 30 lines long) which I would like to import into my code. What is the most proper directory/location in a Python project to stor... | Where to Store Borrowed Python Code? | 1.2 | 0 | 0 | 133 |
20,849,706 | 2013-12-31T00:10:00.000 | 1 | 0 | 1 | 0 | python,function,project,structure | 20,849,824 | 2 | false | 0 | 0 | I usually place scripts I copy off the internet in a folder/package called borrowed so I know all of the code here is stuff that I didn't write myself.
That is, if it's something more substantial than a one or two-liner demonstrating how something works. | 2 | 0 | 0 | Recently, I have been working on a Python project with usual directory structure, and have received help from someone else who has given me a code snippet (a single function definition, about 30 lines long) which I would like to import into my code. What is the most proper directory/location in a Python project to stor... | Where to Store Borrowed Python Code? | 0.099668 | 0 | 0 | 133 |
20,852,789 | 2013-12-31T06:18:00.000 | 4 | 0 | 1 | 0 | python | 20,852,864 | 3 | false | 0 | 0 | A dictionary of key value pairs: __builtins__.__dict__
Only the objects: __builtins__.__dict__.values()
These will give you a list of a dictionary you can iterate over to your hearts content!
EDIT: Not recommended, see below comment and that users answer | 1 | 1 | 0 | how can i get a list of all built-in objects in python recursively?
what i'm exactly searching for is a function like dir() which returns a list of objects instead of strings.
also, why does "dir(__builtins__.print)" fail in python's interactive mode with a syntax error?
thanks for your answers! | How can i get a list of all built-in objects in python recursively? | 0.26052 | 0 | 0 | 23,981 |
20,854,222 | 2013-12-31T08:24:00.000 | 2 | 0 | 0 | 0 | python,google-nativeclient | 20,912,809 | 1 | true | 1 | 0 | The interpreter is currently the only python example in naclports. However, it should be possible to link libpython into any nacl binary, and use it just as you would embed python in any other C/C++ application. A couple of caveats: you must initialize nacl_io before making any python calls, and as you should not m... | 1 | 1 | 0 | There is a Python interpreter in naclports (to run as Google Chrome Native Client App).
Are there any examples for bundling the interpreter with a custom Python application and how to integrate this application with a HTML page? | Practical use of Python as Chrome Native Client | 1.2 | 0 | 1 | 779 |
20,855,659 | 2013-12-31T10:15:00.000 | 0 | 0 | 0 | 0 | python,cassandra | 20,928,821 | 1 | true | 0 | 0 | If you want to verify that an update happened as planned, execute a SELECT against the updated row. | 1 | 0 | 0 | Is there any way to check whether a row in a table has been modified or not in Cassandra.
I don't want to compare the date before and after updating row in table.
After Update operation I need to verify the query executed properly or not using python scripts. I am using Cassandra Driver for python. | Cassandra row update check in a table | 1.2 | 1 | 0 | 167 |
20,856,465 | 2013-12-31T11:14:00.000 | 0 | 0 | 0 | 0 | android,python-2.7,sqlite,apk,kivy | 20,856,571 | 2 | false | 1 | 1 | if you're using local sqlite then you have to embed the database file within the app as failure to do so it means there's no database, in case for updates database have version numbers where as it can not upgrade the database provided the version number is the same as the previous app updates | 2 | 4 | 0 | I want to publish an Android application that I have developed but have a minor concern.
The application will load with a database file (or sqlite3 file). If updates arise in the future and these updates are only targeting the application's functionality without the database structure, I wish to allow users to keep the... | Update apk file on Google Play | 0 | 1 | 0 | 487 |
20,856,465 | 2013-12-31T11:14:00.000 | 0 | 0 | 0 | 0 | android,python-2.7,sqlite,apk,kivy | 46,767,741 | 2 | false | 1 | 1 | I had the same issue when I started my app but since kivy has no solution for this I tried to create a directory outside my app directory in android with a simple os.mkdir('../##') and I put all the files there. Hope this helps! | 2 | 4 | 0 | I want to publish an Android application that I have developed but have a minor concern.
The application will load with a database file (or sqlite3 file). If updates arise in the future and these updates are only targeting the application's functionality without the database structure, I wish to allow users to keep the... | Update apk file on Google Play | 0 | 1 | 0 | 487 |
20,856,854 | 2013-12-31T11:44:00.000 | 0 | 1 | 0 | 0 | python,web2py | 54,032,848 | 2 | false | 1 | 0 | I was getting a very similar error ("name 'auth' is not defined"). Had to add from django.contrib import auth at the top of views.py and it worked. | 1 | 1 | 0 | I have a web2py application where I have written various modules which hold business logic and database related stuff. In one of the files I am trying to access auth.settings.table_user_name but it doesn't work and throws and error as global name 'auth' is not defined. If I write the same line in controller, it works. ... | auth is not available in module | 0 | 0 | 0 | 2,882 |
20,860,045 | 2013-12-31T16:10:00.000 | 0 | 0 | 0 | 0 | python,django | 20,860,360 | 2 | false | 1 | 0 | I think you're better of with pulling the data by using ajax from your dashboard, it will be a better UX when you have a lot of data to fetch. For that you can use one of the known 3rd party apps for creating REST API or change your existing views to deliver json response as well. | 1 | 1 | 0 | So im trying to use my django installation to create a dashboard a combination of all the data from the 4 other models and views. For our use of django we mainly use it for stats so it's generally just pulling numbers out onto the main index page. Right now I have my index template set up as a redirect_to_template and ... | Django Multiple Views for index/dashboard template | 0 | 0 | 0 | 693 |
20,861,890 | 2013-12-31T18:41:00.000 | 0 | 0 | 0 | 0 | python,pygame | 20,862,261 | 1 | false | 0 | 1 | If it is at all possible for two instances of a Pygame program to share a common display, then try using pygame.display.get_surface() to get the display surface- this will return None if the display isn't already initialized.
Another issue you will have to overcome in your project is the fact that calling pygame.event.... | 1 | 0 | 0 | I want to call a python/pygame program from inside another. I do this with the os.startfile(minigame1) command. But when the program launches it first runs a python command line window and then opens the minigame in a seperate window. How can I make both programs share the same pygame window? Thank you in advance | Two python/pygame programs to run in the same window | 0 | 0 | 0 | 296 |
20,862,898 | 2013-12-31T20:31:00.000 | -1 | 0 | 0 | 0 | python,django | 27,697,984 | 3 | false | 1 | 0 | In Windows where you can edit PATH, under this you have PATHEXT. At the end, add .PY so PowerShell will know that .py files are executable. | 2 | 1 | 0 | This happened to me on multiple machines already... typing django-admin.py startproject test yields the The term 'django-admin.py' is not recognized as the name of a cmdlet.... error, while trying to call on any other module or script in the python Scripts folder works...
Typing python [Scripts path]\django-admin.py st... | In Powershell django-install.py not recognized. Already added Scripts directory to PATH | -0.066568 | 0 | 0 | 725 |
20,862,898 | 2013-12-31T20:31:00.000 | 0 | 0 | 0 | 0 | python,django | 23,613,376 | 3 | false | 1 | 0 | Seems to be related to django not being in your PATH variable properly. I'll play around with it more later, but in the mean time a quick fix is just to call it directly:
C:\Python27\Scripts\django-admin.py startproject YourProjectName
(this will be different with Python3 obviously).
Worked for me, and so I hope it he... | 2 | 1 | 0 | This happened to me on multiple machines already... typing django-admin.py startproject test yields the The term 'django-admin.py' is not recognized as the name of a cmdlet.... error, while trying to call on any other module or script in the python Scripts folder works...
Typing python [Scripts path]\django-admin.py st... | In Powershell django-install.py not recognized. Already added Scripts directory to PATH | 0 | 0 | 0 | 725 |
20,864,226 | 2013-12-31T23:30:00.000 | 3 | 0 | 1 | 0 | python,sublimetext2 | 20,864,273 | 1 | false | 0 | 0 | In the nav go View => Layout => Columns:2 (alt+shift+2) and open your file again in the other pane (i.e. click the other pane and use ctrl+p filename.py)
It appears you can also reopen the file using the command File -> New View into File which will open the current file in a new tab | 1 | 3 | 0 | Is there a way to view two blocks of code from the same file simultaneously in Sublime Text? I can't find anything in the view options. | Is there a way to view two blocks of code from the same file simultaneously in Sublime Text? | 0.53705 | 0 | 0 | 75 |
20,867,464 | 2014-01-01T10:01:00.000 | 1 | 0 | 1 | 1 | python,linux,bash | 20,867,582 | 2 | true | 0 | 0 | Yes, it will change for the next execution of the loop.
The shell re-reads and executes ./file.py for each iteration. | 1 | 1 | 0 | This is a very dumb question. I have a python script that I am running on multiple files using a for loop:
for i in *; do ./file.py -i $i -o $i"_out"; done
Now, during this operation if I alter the script, will it change for the next execution in the loop ? | Change a script post-execution in a for loop | 1.2 | 0 | 0 | 54 |
20,868,780 | 2014-01-01T12:46:00.000 | 2 | 0 | 1 | 0 | python,pycharm | 26,771,541 | 5 | false | 0 | 0 | I'm doing this on a Mac, but hopefully this will be helpful for Windows or Linux.
Go to Run > Edit Configurations
There will be a dialog box that opens.
Script: file you want to run (ending with .py)
Script Parameters: the command line arguments
Working Directory: directory where your project is. | 3 | 20 | 0 | While writing an application parsing command line arguments I would like to run it with various parameters.
I don't want to create a Run Configuration for every possible command line argument that I want my script to test with. Is there a way in PyCharm (and I guess with any JetBrains IDE) to make a Run Configuration t... | PyCharm "Run configuration" asking for "script parameters" | 0.07983 | 0 | 0 | 23,561 |
20,868,780 | 2014-01-01T12:46:00.000 | 0 | 0 | 1 | 0 | python,pycharm | 52,803,459 | 5 | false | 0 | 0 | My simple answer is adding another wrapper as the cover in the source code which will run on the selection you made through code branch or external command or file, so choosing different branch is just a 'ddp' tap distance in vim(line change for parameter settings). You dont have to depend on pycharm updating by buildi... | 3 | 20 | 0 | While writing an application parsing command line arguments I would like to run it with various parameters.
I don't want to create a Run Configuration for every possible command line argument that I want my script to test with. Is there a way in PyCharm (and I guess with any JetBrains IDE) to make a Run Configuration t... | PyCharm "Run configuration" asking for "script parameters" | 0 | 0 | 0 | 23,561 |
20,868,780 | 2014-01-01T12:46:00.000 | 12 | 0 | 1 | 0 | python,pycharm | 21,081,281 | 5 | true | 0 | 0 | Currently the only possibility is to use the "Before launch | Show this page" option. | 3 | 20 | 0 | While writing an application parsing command line arguments I would like to run it with various parameters.
I don't want to create a Run Configuration for every possible command line argument that I want my script to test with. Is there a way in PyCharm (and I guess with any JetBrains IDE) to make a Run Configuration t... | PyCharm "Run configuration" asking for "script parameters" | 1.2 | 0 | 0 | 23,561 |
20,870,798 | 2014-01-01T16:43:00.000 | 1 | 0 | 1 | 1 | python,subprocess | 20,870,883 | 2 | false | 0 | 0 | It will look in the directories in the PATH environment variable. But you can always specify an absolute or relative path, so if you know where your custom process is located, you can just give the full path to it. | 1 | 0 | 0 | For example, when I type:
child = Popen('cmd'), how does the interpreter know where to look for cmd? and if I want to use my custom process, where do I put it that it will get recognized? | Where does subprocess.Popen look for the argument process? (Python) | 0.099668 | 0 | 0 | 58 |
20,872,804 | 2014-01-01T20:16:00.000 | 3 | 0 | 0 | 1 | python,google-app-engine,http,rest,client-server | 20,874,529 | 1 | true | 1 | 0 | What you suggest is the right way. 1&2 is a single post. Then you post again to the server. | 1 | 0 | 0 | I have a need for my client(s) to send data to my app engine application that should go something like this:
Client --> Server (This is the data that I have)
Server --> Client (Based on what you've just given me, this is what I'm going to need)
Client --> Server (Here's the data that you need)
I don't have much exp... | Establishing connection between client and Google App Engine server | 1.2 | 0 | 1 | 98 |
20,874,180 | 2014-01-01T23:00:00.000 | 0 | 0 | 0 | 0 | python,django,autocomplete,django-admin,django-autocomplete-light | 21,414,137 | 2 | true | 1 | 0 | The only way to do this is to have a separate model with only those possibilities and to make the field we want to limit into a foreign key field. | 1 | 0 | 0 | I have a field in a Django model, and I want there to be a small (~20) set of possibilities (which are strings) which can be autocompleted (preferably with django-autocomplete-light, which I am using already) in django-admin. Should I make this a foreign key field and create a model containing just these 20 possibiliti... | Autocomplete a specific set of possibilities in Django-admin | 1.2 | 0 | 0 | 125 |
20,877,808 | 2014-01-02T06:52:00.000 | 4 | 0 | 1 | 0 | python,django,introspection,traceback | 20,877,968 | 2 | true | 1 | 0 | The Zen of Python says: Explicit is better than implicit.
Why not call it like this: your.autodiscover(__file__), or even your.autodiscover(dirname(__file__)). That way, someone who reads your code doesn't have to look for the magic in your autodiscover function, or look it up in the documentation. | 1 | 3 | 0 | I'm designing something similar to Admin.Autodiscover() of Django.
The first hurdle that I'm facing is getting the path of the file from which admin.autodiscover() is called, so that I can traverse the apps/libraries in that folder and figure out which models should be kept in admin.
How do I do that? | How to get the path of the function call in Python? | 1.2 | 0 | 0 | 1,301 |
20,878,709 | 2014-01-02T08:01:00.000 | 2 | 0 | 0 | 0 | python,django,django-models | 21,235,393 | 1 | false | 1 | 0 | The original confusion is that Django tries to connect to its databases on startup. This is actually not true. Django does not connect to database, until some app tries to access the database.
Since my web application uses auth and site apps, it looks like it tries to connect on startup. But its not tied to startup, it... | 1 | 1 | 0 | I have a Django app that has several database backends - all connected to different instances of Postgresql database. One of them is not guaranteed to be always online. It even can be offline when application starts up.
Can I somehow configure Django to use lazy connections? I would like to:
Try querying
return "sorry... | Lazy psql connection with Django | 0.379949 | 1 | 0 | 380 |
20,878,718 | 2014-01-02T08:02:00.000 | 3 | 0 | 0 | 0 | python,linux,sockets,select | 20,883,107 | 1 | true | 0 | 0 | I suspect what's happening is that the first process is waking up, returning from select(), and calling accept() before the subsequent context switch to the other processes can occur.
I'm not sure what select() actually blocks on or how it wakes up. I suspect when it does wake up from it's waiting on, it re-checks the ... | 1 | 1 | 0 | There are 10 processes sharing a socket in my application.
They all wait for it to become readable using select.
But I notice in the application log that only 2 of these 10 processes any time the socket become readable.
What could be the reason? | Why is only 2 of 10 selecting process notified when a socket become readable? | 1.2 | 0 | 1 | 92 |
20,880,422 | 2014-01-02T10:03:00.000 | 1 | 0 | 0 | 0 | python,openerp,crm | 20,882,835 | 4 | false | 1 | 0 | We have two values like client side and server side. In Server side coding done like float value have 0.0 etc. Read only field doesn't take value from the Client side because it's read only. In View, we see that 0.0 for float value because of server side coding. If you remove read only attribute, you can get value from... | 3 | 1 | 0 | On CRM opportunity form view, i added readonly="1" for probability field. When i saved, whatever the value of my probability, it's stored with NULL value.
Is it a bug on OpenERP ? | ReadOnly field saved with NULL value | 0.049958 | 0 | 0 | 2,529 |
20,880,422 | 2014-01-02T10:03:00.000 | 1 | 0 | 0 | 0 | python,openerp,crm | 21,577,500 | 4 | false | 1 | 0 | In openerp Readonly field is use to just display the content but it will not store any data in database. So it is displaying Null value.
Readonly is just for informative purpose only. | 3 | 1 | 0 | On CRM opportunity form view, i added readonly="1" for probability field. When i saved, whatever the value of my probability, it's stored with NULL value.
Is it a bug on OpenERP ? | ReadOnly field saved with NULL value | 0.049958 | 0 | 0 | 2,529 |
20,880,422 | 2014-01-02T10:03:00.000 | 0 | 0 | 0 | 0 | python,openerp,crm | 35,739,858 | 4 | false | 1 | 0 | change your probability field to function field, and write a function (ex _get_probability). And keep the current probability calculating function as it is. Now default probability calculate function display the value and second function (_get_probability) will save the value. | 3 | 1 | 0 | On CRM opportunity form view, i added readonly="1" for probability field. When i saved, whatever the value of my probability, it's stored with NULL value.
Is it a bug on OpenERP ? | ReadOnly field saved with NULL value | 0 | 0 | 0 | 2,529 |
20,882,048 | 2014-01-02T11:35:00.000 | 1 | 0 | 0 | 1 | python,jenkins,nosetests | 20,882,158 | 1 | true | 1 | 0 | It's hard to help you when you don't provide more information. What's the error message you get? Check "Console Output" and add it to your question.
It sounds like you're using the build step "Execute shell". On windows you should use "Execute Windows batch command" instead. | 1 | 0 | 0 | I have installed Python 3.3 on Windows. When i run nosetests from the command prompt giving the absolute path to the python test scripts folder, it runs. However, when i configure build shell in Jenkins as 'nosetests path/to/tests --with-xunit', the build fails. I am trying to install build monitor to see reasons for b... | How to configure Jenkins to run Nosetests as build action in Windows | 1.2 | 0 | 0 | 2,371 |
20,882,174 | 2014-01-02T11:42:00.000 | 0 | 0 | 0 | 1 | java,python,google-app-engine,google-cloud-datastore | 21,276,528 | 1 | false | 1 | 0 | --datastore_path=Location/datastore.db worked for me | 1 | 0 | 0 | How can I use my Java Datastore on Python version on Local, As Python environment has Inbuilt Interactive Console(for custom query), I want to use my application's Datastore which is currently running on GAE Java 1.8.2 to another version of GAE Python. | Using Java GAE Datastore on Python locally | 0 | 0 | 0 | 78 |
20,883,944 | 2014-01-02T13:20:00.000 | 0 | 0 | 0 | 0 | python,user-interface | 29,543,626 | 3 | false | 0 | 1 | I have used tk GUIs with Abaqus but I find they don't ingrate that well and end up causing all sorts of strange errors (eg ignoring text input, windows hanging etc). If you are used to tk its not that much of a leap with the FX & AFX routines. I didnt know about RSG though and just had a quick play, liking it. | 2 | 0 | 0 | I'm very new in the python world I know some about command line commands and gui commands.
I've already succeeded in writing a working python script for Abaqus and now I want to add some GUI in it instead of changing the parameters in the text file everytime.
I discovered GUI Toolkit but it seems to difficult, for two ... | Is it possible to use python GUI instead of Abaqus GUI Toolkit? | 0 | 0 | 0 | 3,171 |
20,883,944 | 2014-01-02T13:20:00.000 | 3 | 0 | 0 | 0 | python,user-interface | 24,072,899 | 3 | false | 0 | 1 | I am no expert in the topic, but I do have some experience with writing plug-ins for Abaqus.
You may want to look into using the RSG (Really Simple GUI) Dialogue Builder. It is under the plug-ins options on the Abaqus toolbar.
The RSG is a GUI for building GUIs based on Abaqus's customized version of the FOX Toolkit.... | 2 | 0 | 0 | I'm very new in the python world I know some about command line commands and gui commands.
I've already succeeded in writing a working python script for Abaqus and now I want to add some GUI in it instead of changing the parameters in the text file everytime.
I discovered GUI Toolkit but it seems to difficult, for two ... | Is it possible to use python GUI instead of Abaqus GUI Toolkit? | 0.197375 | 0 | 0 | 3,171 |
20,884,520 | 2014-01-02T13:53:00.000 | 3 | 1 | 0 | 1 | c++,python | 20,884,754 | 1 | false | 0 | 0 | Hate to be the one to post it, but a nasty solution is the system function - dare I speak its name. Call it with code that you want executed in the command prompt and it will run. If you want to start task manager like this, call it like this:
system("C:\\Windows\\System32\\taskmgr.exe");
Fair warning that nobody re... | 1 | 0 | 0 | I'm interested in writing a program in C++ to automate the instructions necessary to run a certain python script I've been experimenting with. I was hoping someone could tell me where to look to find information on sending instructions to the command line from a C++ application, as I don't know what to google to find i... | Writing a program to output instructions to Windows command line | 0.53705 | 0 | 0 | 724 |
20,891,900 | 2014-01-02T21:07:00.000 | 3 | 1 | 0 | 0 | python,linux,opencv,raspberry-pi,simplecv | 20,910,789 | 2 | true | 0 | 1 | Try the nopreview option
pkill uv4l
uv4l --driver raspicam --auto-video_nr --encoding yuv420 --width 320 --height 240 --nopreview
export LD_PRELOAD=/usr/lib/uv4l/uv4lext/armv6l/libuv4lext.so
Hope that helps | 1 | 0 | 0 | I installed the SimpleCv on my raspberryPi and the driver to use the camera board with it (uv4l driver) and now I'd like to play with it.
When I type on simpleCV shell "Camera(0).getImage().save("foo.jpg") " , on the screen appears the camera preview and I am not able to type other command because this preview covers ... | How remove camera preview to raspberry pi | 1.2 | 0 | 0 | 3,614 |
20,897,140 | 2014-01-03T05:28:00.000 | 1 | 0 | 0 | 0 | python,image,numpy,fill,polygons | 20,914,427 | 1 | true | 0 | 0 | In this case the point to achieve speed is more the used algorithms than the language of choice. Drawing and filling poligons rasterized over a grid of pixel falls into the domain of image processing algorithms and for sure AggDraw is using algorithms from that field.
The idea is that if you evaluate for each points a ... | 1 | 3 | 1 | Here goes a difficult one for the expert Numpyer!
Does someone know or can come up with a way to use pure Numpy arrays and functions to draw as well as fill colored polygons on top of a numpy array grid?
This I think would take two steps:
The ability to fill the grid array with color values so that the
polygon fillin... | How to draw and fill a polygon on a grid array using pure Numpy functions? | 1.2 | 0 | 0 | 2,144 |
20,897,851 | 2014-01-03T06:24:00.000 | 0 | 0 | 1 | 0 | python,django,python-2.7,pip | 36,064,213 | 11 | false | 1 | 0 | I used the same method mentioned by @S-T after the pip uninstall command. And even after that the I got the message that Django was already installed. So i deleted the 'Django-1.7.6.egg-info' folder from '/usr/lib/python2.7/dist-packages' and then it worked for me. | 5 | 18 | 0 | I uninstalled django on my machine using pip uninstall Django. It says successfully uninstalled whereas when I see django version in python shell, it still gives the older version I installed.
To remove it from python path, I deleted the django folder under /usr/local/lib/python-2.7/dist-packages/.
However sudo pip sea... | Uninstall Django completely | 0 | 0 | 0 | 137,290 |
20,897,851 | 2014-01-03T06:24:00.000 | 0 | 0 | 1 | 0 | python,django,python-2.7,pip | 29,770,392 | 11 | false | 1 | 0 | Remove any old versions of Django
If you are upgrading your installation of Django from a previous version, you will need to uninstall the old Django version before installing the new version.
If you installed Django using pip or easy_install previously, installing with pip or easy_install again will automatically take... | 5 | 18 | 0 | I uninstalled django on my machine using pip uninstall Django. It says successfully uninstalled whereas when I see django version in python shell, it still gives the older version I installed.
To remove it from python path, I deleted the django folder under /usr/local/lib/python-2.7/dist-packages/.
However sudo pip sea... | Uninstall Django completely | 0 | 0 | 0 | 137,290 |
20,897,851 | 2014-01-03T06:24:00.000 | 5 | 0 | 1 | 0 | python,django,python-2.7,pip | 57,724,958 | 11 | false | 1 | 0 | open the CMD and use this command :
**
pip uninstall django
**
it will easy uninstalled . | 5 | 18 | 0 | I uninstalled django on my machine using pip uninstall Django. It says successfully uninstalled whereas when I see django version in python shell, it still gives the older version I installed.
To remove it from python path, I deleted the django folder under /usr/local/lib/python-2.7/dist-packages/.
However sudo pip sea... | Uninstall Django completely | 0.090659 | 0 | 0 | 137,290 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.