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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5,173,024 | 2011-03-02T20:28:00.000 | -1 | 0 | 0 | 0 | python,django,ide,syntax-highlighting,pydev | 5,173,496 | 5 | false | 1 | 0 | If you install the Eclipse Web Tools Platform (WTP), it bundles a nice HTML editor, which does 95% of the syntax highlighting you'd want in a Django template. It also includes editors for other common web types, like JS and CSS, which are often nice when working with Django projects. This will also give you code comp... | 2 | 27 | 0 | I use Eclipse and pydev for django development. This has worked more or less ok, including debugging. Syntax highlighting doesn't seem to work everywhere though. I couldn't get any highlighting for the templates thought. Is there a way to get the highlighting and code suggestions for the templates? | Django templates syntax highlighting in Eclipse | -0.039979 | 0 | 0 | 15,866 |
5,174,080 | 2011-03-02T22:00:00.000 | 1 | 1 | 0 | 1 | python,cron,execution,crontab | 5,174,130 | 4 | false | 0 | 0 | I believe it should be */1, not *\1. | 2 | 2 | 0 | what happens to my script in python that does not run through crontab every minute.
My script has execute permissions and then calls two other scripts in python.
This is the content of my crontab (#crontab -l):
*/1 * * * * /usr/bin/rsm/samplesMonitor.py
Thank you guys. | python script execution through crontab | 0.049958 | 0 | 0 | 7,385 |
5,174,080 | 2011-03-02T22:00:00.000 | 0 | 1 | 0 | 1 | python,cron,execution,crontab | 5,174,140 | 4 | false | 0 | 0 | It should be */1 instead of *\1 (forward slash instead of backslash). Also, make sure the path is correct; there usually are no subdirectories under /usr/bin. | 2 | 2 | 0 | what happens to my script in python that does not run through crontab every minute.
My script has execute permissions and then calls two other scripts in python.
This is the content of my crontab (#crontab -l):
*/1 * * * * /usr/bin/rsm/samplesMonitor.py
Thank you guys. | python script execution through crontab | 0 | 0 | 0 | 7,385 |
5,174,199 | 2011-03-02T22:13:00.000 | 2 | 0 | 0 | 0 | python,lisp,common-lisp,ffi | 5,174,322 | 5 | false | 0 | 0 | I would suggest writing an "exposer" interface for your code that takes text and writes text such that you can call it on the command line. Ideally, with a typical STDIN | STDOUT approach.
I believe that is typically the best approach for non-performance applications. | 1 | 13 | 0 | One thing I really miss when writing Common Lisp code is access to Python libraries, both standard library and third party modules. CLPython provides a limited subset of Python functionality which precludes the use of most libraries, so that's not really useful to me. I would like to be able to call Python code from Co... | Is there a simple way to use Python libraries from Common Lisp? | 0.07983 | 0 | 0 | 2,566 |
5,174,269 | 2011-03-02T22:22:00.000 | 4 | 0 | 0 | 0 | python,sql,sql-server | 5,174,307 | 2 | false | 0 | 0 | You could just run them using sqlcmd. Sqlcmd is a command line utility that will let you run .sql scripts from the command line, which I'm sure you can kick off through python. | 1 | 1 | 0 | As part of artifacts delivery, our developers give the data and structure scripts in .sql files. I usually "double click" on these files to open in "Microsoft SQL Server Management Studio". Management studio will prompt me for entering database server and user/pwd. I enter them manually and click on Execute button to e... | Execute .sql files that are used to run in SQL Management Studio in python | 0.379949 | 1 | 0 | 3,938 |
5,174,810 | 2011-03-02T23:25:00.000 | 9 | 0 | 0 | 1 | python,text-cursor,command-window | 70,550,803 | 4 | false | 0 | 0 | I'm surprised nobody mentioned that before, but you actually don't need any library to do that.
Just use print('\033[?25l', end="") to hide the cursor.
You can show it back with print('\033[?25h', end="").
It's as easy as that :) | 1 | 16 | 0 | I have a Python script that sends output to a DOS command window (I am using Windows 7) using the print() function, but I would like to prevent (or hide) the cursor from blinking at the next available output position. Has anyone any idea how I can do this? I have looked at a list of DOS commands but I cannot find any... | How to turn off blinking cursor in command window? | 1 | 0 | 0 | 16,984 |
5,176,668 | 2011-03-03T04:30:00.000 | 0 | 0 | 1 | 0 | python,memory-management | 5,177,026 | 5 | false | 0 | 0 | It does not create a new list object, it extends a. This is self-evident from the fact that you don't make an assigment. Python will not magically replace your objects with other objects. :-)
How the memory allocation happens inside the list object is implementation dependent. | 1 | 2 | 0 | If I have a list:
a = [1,2,3,4]
and then add 4 elements using extend
a.extend(range(5,10))
I get
a = [1, 2, 3, 4, 5, 6, 7, 8, 9]
How does python do this? does it create a new list and copy the elements across or does it make 'a' bigger? just concerned that using extend will gobble up memory. I'am also asking as ther... | How does python extend work? | 0 | 0 | 0 | 2,066 |
5,176,959 | 2011-03-03T05:18:00.000 | 1 | 0 | 1 | 0 | python | 5,176,967 | 4 | false | 0 | 0 | It's because newlines in Windows are two characters, CR and LF. On Unix they are just one, LF. By default, Python will convert \n to be your OS's notion of a newline.
The L you are seeing simply tells you that the number is a long integer. | 2 | 2 | 0 | In the book - Core Python Programming, there is following example -
>>> f = open('/tmp/x', 'w+')
>>> f.tell()
0
>>> f.write('test line 1\n') # add 12-char string [0-11]
>>> f.tell()
12
>>> f.write('test line 2\n') # add 12-char string [12-23]
>>> f.tell() # tell us current file location (end))
24
... | Python tell() behaving differently regarding position in the current file | 0.049958 | 0 | 0 | 827 |
5,176,959 | 2011-03-03T05:18:00.000 | 0 | 0 | 1 | 0 | python | 5,176,997 | 4 | false | 0 | 0 | That is because of newlines. :)
On Unix is it '\n' and Mac '\r' and most probably the author of core-python was using this.
You are on Windows and it is '\r\n' and so you are getting additional character counted. | 2 | 2 | 0 | In the book - Core Python Programming, there is following example -
>>> f = open('/tmp/x', 'w+')
>>> f.tell()
0
>>> f.write('test line 1\n') # add 12-char string [0-11]
>>> f.tell()
12
>>> f.write('test line 2\n') # add 12-char string [12-23]
>>> f.tell() # tell us current file location (end))
24
... | Python tell() behaving differently regarding position in the current file | 0 | 0 | 0 | 827 |
5,177,030 | 2011-03-03T05:30:00.000 | 0 | 0 | 1 | 1 | python,multithreading,terminal | 5,178,184 | 1 | false | 0 | 0 | The -S option of xterm can be used to pass a PTY slave file descriptor. Data written to the corresponding PTY master should then appear in the xterm window.
So in your thread, you could call os.openpty() to open a new PTY, start an xterm with subprocess.Popen(), passing a suitable -S option, and write all thread's outp... | 1 | 0 | 0 | How to execute a thread in a script in a new terminal window/command prompt? So that the results of the thread will be displayed on a separate window while still having control on the main interpreter? The thread is a continuous remote server pinging thread for alive check. | Python: How to execute a thread in a new terminal window/command prompt? | 0 | 0 | 0 | 1,644 |
5,179,743 | 2011-03-03T10:53:00.000 | 0 | 0 | 1 | 0 | python,windows-server-2003,py2exe,pywin32,x86-64 | 6,172,840 | 1 | false | 0 | 0 | You might want to check out the subprocess and threading modules that come with the standard Python library with regards to your multi-core issue. As for the 64bit issue, are you sure you need the additional memory space? I've never had any issue with 32bit python. | 1 | 0 | 0 | My problem is
my python binaries not running as 64bits program on my amd64(Opteron 8214, 4 cpu) server.
The machine is a Dual-Core, so there are 8 core shown in taskmgr.
It shown no "*32" in taskmgr(so it probably already in 64bits mode), but use only one core.
And I take same code(project) to compiled and executed on ... | My python build binaries not really running as 64bit program in AMD Win2003r2x64 machine | 0 | 0 | 0 | 197 |
5,179,934 | 2011-03-03T11:09:00.000 | 1 | 0 | 1 | 0 | python,string | 5,180,066 | 6 | false | 0 | 0 | If you only want to remove a '$' then s.replace('$', '') will do want you want.
If you want to replace more than one character then you need to chain replace calls together, which gets very ugly very quickly and in that case one of the other solutions is probably better. | 1 | 0 | 0 | Using Python v2, is there a way to ignore a value in a string if it is there?
For instance: I want someone to enter a value of $100.00, or they could enter a value of 100.00 without the leading $ symbol. What I want to do is ignore the '$' value if it is typed in.
Any push in the right direction would be appreciated. | Python Chosing To Ignore String Value | 0.033321 | 0 | 0 | 8,340 |
5,180,099 | 2011-03-03T11:26:00.000 | 3 | 0 | 0 | 0 | python,django,couchdb,pylons,pypy | 5,180,344 | 4 | false | 1 | 0 | HTML 5, CSS 3 - PyPy 1.4/CPython 3 + Pylons/Tornado/Django - CouchDB/MongoDB/Riak + Erlang?
Simplify.
Python 2.7, Django 1.2, SQLite and MongoDB get started building stuff right away.
Add later. Upgrade to Python 3 later. | 4 | 0 | 0 | Early stage of planning a large project - difficult decision of choosing frameworks :)
In mind:
"select way - run fast".
Select technologies with growth opportunity, prototype as fast as possible.
"look at horizon - build a ship".
Understand the scope, invest in difficult decision but reach the goal.
"take the best ... | Python or PyPy for small group and large project? | 0.148885 | 0 | 0 | 852 |
5,180,099 | 2011-03-03T11:26:00.000 | 0 | 0 | 0 | 0 | python,django,couchdb,pylons,pypy | 5,204,074 | 4 | false | 1 | 0 | It's good prqctice to mix technologies in scope of a project. Depending on purpose for example erlang may be more suitable than python. | 4 | 0 | 0 | Early stage of planning a large project - difficult decision of choosing frameworks :)
In mind:
"select way - run fast".
Select technologies with growth opportunity, prototype as fast as possible.
"look at horizon - build a ship".
Understand the scope, invest in difficult decision but reach the goal.
"take the best ... | Python or PyPy for small group and large project? | 0 | 0 | 0 | 852 |
5,180,099 | 2011-03-03T11:26:00.000 | 5 | 0 | 0 | 0 | python,django,couchdb,pylons,pypy | 5,180,163 | 4 | false | 1 | 0 | Go with CPython. All known bindings to external libraries or whatever are supposed to work with CPython. I doubt that you will have success with PyPy here. Just from the prospective of risk management in large projects: stay mainstream. | 4 | 0 | 0 | Early stage of planning a large project - difficult decision of choosing frameworks :)
In mind:
"select way - run fast".
Select technologies with growth opportunity, prototype as fast as possible.
"look at horizon - build a ship".
Understand the scope, invest in difficult decision but reach the goal.
"take the best ... | Python or PyPy for small group and large project? | 0.244919 | 0 | 0 | 852 |
5,180,099 | 2011-03-03T11:26:00.000 | 5 | 0 | 0 | 0 | python,django,couchdb,pylons,pypy | 5,180,288 | 4 | false | 1 | 0 | Python (assuming you mean the CPython implementation) and PyPy are not frameworks, but implementations of the Python language. Note that they implement the same language. I'd start with CPython because it's industrial-strength today, and the multitude of Python libraries, frameworks and extensions all target it.
PyPy ... | 4 | 0 | 0 | Early stage of planning a large project - difficult decision of choosing frameworks :)
In mind:
"select way - run fast".
Select technologies with growth opportunity, prototype as fast as possible.
"look at horizon - build a ship".
Understand the scope, invest in difficult decision but reach the goal.
"take the best ... | Python or PyPy for small group and large project? | 0.244919 | 0 | 0 | 852 |
5,181,320 | 2011-03-03T13:28:00.000 | 1 | 0 | 1 | 0 | python,operators | 58,923,036 | 3 | false | 0 | 0 | __mul__() is the case of a dot product and the result of the dot product should be a scalar or just a number, i.e. __mul__() results in a dot product multiplication like x1*x2+y1*y2. In __rmul__() , the result is a point with x = x1*x2 and y = y1*y2 . | 1 | 66 | 0 | Say I have a list l. Under what circumstance is l.__rmul__(self, other) called?
I basically understood the documentation, but I would also like to see an example to clarify its usages beyond any doubt. | Under what circumstances are __rmul__ called? | 0.066568 | 0 | 0 | 33,102 |
5,183,672 | 2011-03-03T16:40:00.000 | 2 | 0 | 1 | 0 | python,linux,installation,package,m2crypto | 46,864,759 | 12 | false | 0 | 0 | Get all the outdated packages and create a batch file with the following
commands
pip install xxx --upgrade for each outdated packages | 1 | 305 | 0 | I'm running Ubuntu 9:10 and a package called M2Crypto is installed (version is 0.19.1). I need to download, build and install the latest version of the M2Crypto package (0.20.2).
The 0.19.1 package has files in a number of locations including (/usr/share/pyshared and /usr/lib/pymodules.python2.6).
How can I completely... | How do I update a Python package? | 0.033321 | 0 | 0 | 654,027 |
5,184,490 | 2011-03-03T17:51:00.000 | 0 | 0 | 1 | 0 | .net,asp.net,ironpython,dynamic-language-runtime | 5,189,111 | 1 | false | 0 | 0 | There was a CodeDom provider in IronPython 1.0 and 1.1 but it was never ported to 2.x. Part of the problem is that the CodeDom model doesn't work very well with Python because CodeDom is frequently used (and in particular by ASP.NET) to create code, compile it, and then load the resulting assembly and get some types o... | 1 | 1 | 0 | I'm trying to get a CodeExpression from a string of python. It seems possible since some of the DLR docs mention CodeDom classes but I haven't been able to find any examples or better docs. Any insight or psuedocode appreciated...
FYI, the use case here is to make an Asp.Net ExpressionBuilder that can evaluate python... | Get CodeExpression from string of python using IronPython? | 0 | 0 | 0 | 414 |
5,185,016 | 2011-03-03T18:39:00.000 | 16 | 0 | 0 | 0 | python,android,android-emulator,webview | 5,185,046 | 4 | true | 1 | 0 | Use address 10.0.2.2 instead of localhost. | 4 | 6 | 0 | I'm running an android app on the emulator. This app tries to load a html file using the webview api.
I also have a simple http server running on the same computer under the directory where I want to serve the request using the following python command:
python -m SimpleHTTPServer 800
However, I couldn't access this lin... | How can I let android emulator talk to the localhost? | 1.2 | 0 | 1 | 3,711 |
5,185,016 | 2011-03-03T18:39:00.000 | 0 | 0 | 0 | 0 | python,android,android-emulator,webview | 5,185,075 | 4 | false | 1 | 0 | Actually localhost refers to the emulators directory itself.
Use your system ip to access the link | 4 | 6 | 0 | I'm running an android app on the emulator. This app tries to load a html file using the webview api.
I also have a simple http server running on the same computer under the directory where I want to serve the request using the following python command:
python -m SimpleHTTPServer 800
However, I couldn't access this lin... | How can I let android emulator talk to the localhost? | 0 | 0 | 1 | 3,711 |
5,185,016 | 2011-03-03T18:39:00.000 | 0 | 0 | 0 | 0 | python,android,android-emulator,webview | 5,185,051 | 4 | false | 1 | 0 | localhost is a short-cut to tell the "whatever" to talk to itself. So, you are telling the emulator to look for a web server running in the emulator.
Instead of trying to connect to localhost, look up the IP for your computer and use that instead. | 4 | 6 | 0 | I'm running an android app on the emulator. This app tries to load a html file using the webview api.
I also have a simple http server running on the same computer under the directory where I want to serve the request using the following python command:
python -m SimpleHTTPServer 800
However, I couldn't access this lin... | How can I let android emulator talk to the localhost? | 0 | 0 | 1 | 3,711 |
5,185,016 | 2011-03-03T18:39:00.000 | -2 | 0 | 0 | 0 | python,android,android-emulator,webview | 5,186,087 | 4 | false | 1 | 0 | Best solution is not to use emulator at all. Its slow and full of bugs. Get your employer to buy a device or two. | 4 | 6 | 0 | I'm running an android app on the emulator. This app tries to load a html file using the webview api.
I also have a simple http server running on the same computer under the directory where I want to serve the request using the following python command:
python -m SimpleHTTPServer 800
However, I couldn't access this lin... | How can I let android emulator talk to the localhost? | -0.099668 | 0 | 1 | 3,711 |
5,185,438 | 2011-03-03T19:21:00.000 | 0 | 0 | 0 | 0 | python,postgresql,sqlalchemy,connection-pooling,cherrypy | 5,195,465 | 1 | true | 0 | 0 | Turns out there was ScopedSession being used outside the normal application usage and the close wasn't in a finally. | 1 | 1 | 0 | I'm using SQLAlchemy 0.6.6 against a Postgres 8.3 DB on Windows 7 an PY 2.6. I am leaving the defaults for configuring pooling when I create my engine, which is pool_size=5, max_overflow=10.
For some reason, the connections keep piling up and I intermittently get "Too many clients" from PG. I am positive that connect... | SQLAlchemy Connection Pooling Problems - Postgres on Windows | 1.2 | 1 | 0 | 1,198 |
5,185,444 | 2011-03-03T19:21:00.000 | 1 | 0 | 1 | 0 | python,file,readline | 5,185,463 | 4 | false | 0 | 0 | Why not read just the line and split it up later? You'd have to read byte-by-byte and look for the space character, which is very inefficient. Better to read the entire line, and then split the resulting string on the space, giving you two strings. | 1 | 0 | 0 | how can I read once at a time 2 strings from a txt file, that are written on the same line?
e.g.
francesco 10 | Python reading 2 strings from the same line | 0.049958 | 0 | 0 | 1,336 |
5,185,563 | 2011-03-03T19:34:00.000 | 1 | 0 | 0 | 0 | python,django | 5,185,748 | 4 | false | 1 | 0 | I've had a similar problem and I've ended up adding a counter into the Album equivalent. If the count is 0 and the operation is delete(), then the album object is delete()d.
Other solution os to overload the delete() method in the song model, or use post-delete to delete the album. | 1 | 6 | 0 | I am writing a small music database. Learning SQL lies quite a long time in my past and I always wanted to give Django a try. But there is one thing I couldn't wrap my head around.
Right now, my models only consist of two Classes, Album and Song.
Song has a foreign key pointing to the album it belongs to. Now if I woul... | What is the reverse equivalent of cascade? | 0.049958 | 0 | 0 | 1,807 |
5,186,361 | 2011-03-03T20:48:00.000 | 0 | 0 | 0 | 1 | c++,python,swig,osx-leopard,importerror | 5,191,205 | 1 | false | 0 | 0 | Given that it worked on 32 bits, I would first check whether the library has 64 bits code. You can use the file command I think to check the arch in a multi-arch mach-o binary.
If the library is indeed 64 bits, then please give us the exact exception in python, and more importantly, a build log from cmake. Build issues... | 1 | 1 | 0 | I create a dynamic library and then using swig under snow leopard but when I import my module
it returns always ImportError: No module named blabla. I've all compiled in 64 bit, download and install python 2.7 64 bit.
This test library has been created with cmake, and when I was with leopard 32 bit, it worked. | python/c++ wrapping on Snow Leopard | 0 | 0 | 0 | 142 |
5,187,457 | 2011-03-03T22:32:00.000 | 0 | 0 | 1 | 0 | python,iterator | 36,212,806 | 6 | false | 0 | 0 | Does "consuming" do different things in different Pythonic contexts?
No, "consuming" always does the same thing.
What happens to data when it is consumed, such as in iter()?
It is no longer available from the place you got it.
When a variable is assigned to an iterator's result-- the allegedly consumed piece of dat... | 5 | 13 | 0 | I have been working in Python for a few months now, and it has occurred to me that I often overlook vocabulary that escapes me at first glance, instead trying to get the gist of an idea. Now, looking back, I still find myself confused beyond belief at what the term consume refers to. My initial interest came from expla... | What does it mean to "consume" in Python? In an iterator? | 0 | 0 | 0 | 4,283 |
5,187,457 | 2011-03-03T22:32:00.000 | 4 | 0 | 1 | 0 | python,iterator | 5,187,512 | 6 | false | 0 | 0 | I'm not a Python expert, but I can say this: Most of the time, consumption in programming is the opposite of production. You can classify some processes as producers, which create values; and others as consumers, which use the values created by the producers.
In the case of an iterator, an iterator is a producer which ... | 5 | 13 | 0 | I have been working in Python for a few months now, and it has occurred to me that I often overlook vocabulary that escapes me at first glance, instead trying to get the gist of an idea. Now, looking back, I still find myself confused beyond belief at what the term consume refers to. My initial interest came from expla... | What does it mean to "consume" in Python? In an iterator? | 0.132549 | 0 | 0 | 4,283 |
5,187,457 | 2011-03-03T22:32:00.000 | 5 | 0 | 1 | 0 | python,iterator | 5,188,405 | 6 | true | 0 | 0 | Concerning 2.
In fact, we must distinguish two cases.
Remember what Greg Hewgill wrote:
An "iterator" is a single object that is responsible
for creating some sequence of elements.
This sequence might be elements of an existing list,
or it might be something calculated, like prime numbers
or the decimal di... | 5 | 13 | 0 | I have been working in Python for a few months now, and it has occurred to me that I often overlook vocabulary that escapes me at first glance, instead trying to get the gist of an idea. Now, looking back, I still find myself confused beyond belief at what the term consume refers to. My initial interest came from expla... | What does it mean to "consume" in Python? In an iterator? | 1.2 | 0 | 0 | 4,283 |
5,187,457 | 2011-03-03T22:32:00.000 | 7 | 0 | 1 | 0 | python,iterator | 5,187,719 | 6 | false | 0 | 0 | The term "consume" is an informal term that refers to the way iterators work in Python. An "iterator" is a single object that is responsible for creating some sequence of elements. This sequence might be elements of an existing list, or it might be something calculated, like prime numbers or the decimal digits of π.
Wh... | 5 | 13 | 0 | I have been working in Python for a few months now, and it has occurred to me that I often overlook vocabulary that escapes me at first glance, instead trying to get the gist of an idea. Now, looking back, I still find myself confused beyond belief at what the term consume refers to. My initial interest came from expla... | What does it mean to "consume" in Python? In an iterator? | 1 | 0 | 0 | 4,283 |
5,187,457 | 2011-03-03T22:32:00.000 | 0 | 0 | 1 | 0 | python,iterator | 5,187,511 | 6 | false | 0 | 0 | I can answer your first point, to consume is to exhaust an iterable this means to run the iterable out of next items. | 5 | 13 | 0 | I have been working in Python for a few months now, and it has occurred to me that I often overlook vocabulary that escapes me at first glance, instead trying to get the gist of an idea. Now, looking back, I still find myself confused beyond belief at what the term consume refers to. My initial interest came from expla... | What does it mean to "consume" in Python? In an iterator? | 0 | 0 | 0 | 4,283 |
5,187,602 | 2011-03-03T22:48:00.000 | 1 | 0 | 0 | 1 | python,google-app-engine,macos,bash | 5,187,728 | 7 | false | 1 | 0 | Try: ./appcfg.py
Current dir is usually not part of path. | 2 | 11 | 0 | My computer says...
"-bash: appcfg.py: command not found"
What is wrong?
I can run my application using google-app-engine-launcher and I have python pre-installed.
I am trying to upload my app using "appcfg.py update myapp"
I am new to Mac development. | Cannot find appcfg.py or dev_appserver.py? | 0.028564 | 0 | 0 | 17,655 |
5,187,602 | 2011-03-03T22:48:00.000 | 17 | 0 | 0 | 1 | python,google-app-engine,macos,bash | 5,188,313 | 7 | true | 1 | 0 | In App Engine launcher there is a menu option called "Make Symlinks..." that adds symlinks for the various App Engine utility commands, like appcfg.py. | 2 | 11 | 0 | My computer says...
"-bash: appcfg.py: command not found"
What is wrong?
I can run my application using google-app-engine-launcher and I have python pre-installed.
I am trying to upload my app using "appcfg.py update myapp"
I am new to Mac development. | Cannot find appcfg.py or dev_appserver.py? | 1.2 | 0 | 0 | 17,655 |
5,187,705 | 2011-03-03T23:00:00.000 | 0 | 1 | 0 | 1 | python,linux | 5,187,734 | 3 | false | 0 | 0 | Iterate over them and use optimise flag you might also want to parse them using pypy it compiles python via a JIT compiler allowing for a somewhat marked increase in speed. | 1 | 3 | 0 | I have 10,000 binary files, named like this:
file0.bin
file1.bin
............
............
file10000.bin
Each of the above files contains exactly 391 float values (1564 bytes per file).
my goal is to read all of the files into a python array in the fastest way possible. If I open & close each file using a script, it ta... | Fast Reading of 10000 Binary Files? | 0 | 0 | 0 | 669 |
5,188,423 | 2011-03-04T00:42:00.000 | 4 | 0 | 1 | 1 | python,linux,ubuntu | 5,188,512 | 2 | true | 0 | 0 | There's multiple limits in play. The first is the system-wide open files limit, /proc/sys/fs/nr_open. This is typically in the million-range.
This limit may continue to be counted against processes that open the file, set up the mapping, then close the file again.
The second is the per-process getrlimit(2) RLIMIT_NOFIL... | 2 | 0 | 0 | Using a Linux machine, how many files can one 'mmap' using python (what is the limit)?
Thanks. | Python & memory mapping? | 1.2 | 0 | 0 | 479 |
5,188,423 | 2011-03-04T00:42:00.000 | 1 | 0 | 1 | 1 | python,linux,ubuntu | 5,188,437 | 2 | false | 0 | 0 | This is completely system dependent.
This limit won't be imposed by python, rather it will be dependent on your OS settings and the amount of memory you have available. Furthermore, your system may impose a per process mmap limit which you can check at /proc/sys/vm/max_map_count. | 2 | 0 | 0 | Using a Linux machine, how many files can one 'mmap' using python (what is the limit)?
Thanks. | Python & memory mapping? | 0.099668 | 0 | 0 | 479 |
5,188,792 | 2011-03-04T01:47:00.000 | 6 | 0 | 1 | 0 | python,string | 5,188,863 | 7 | false | 0 | 0 | This will test if strings are made up of some combination or digits, the dollar sign, and a commas. Is that what you're looking for?
import re
s1 = 'Testing string'
s2 = '1234,12345$'
regex = re.compile('[0-9,$]+$')
if ( regex.match(s1) ):
print "s1 matched"
else:
print "s1 didn't match"
if ( regex.match(s2)... | 1 | 228 | 0 | How can I check if a string has several specific characters in it using Python 2?
For example, given the following string:
The criminals stole $1,000,000 in jewels.
How do I detect if it has dollar signs ("$"), commas (","), and numbers? | How to check a string for specific characters? | 1 | 0 | 0 | 833,589 |
5,189,630 | 2011-03-04T04:23:00.000 | 2 | 0 | 1 | 0 | import,ironpython,rect | 5,190,602 | 1 | false | 0 | 1 | You probably need to do:
import clr
clr.AddReference('WindowsBase')
to load the assembly Rect is declared in before importing it. | 1 | 1 | 0 | When I try to import the 'Rect'-struct from System.Windows, IronPython-Interpreter claims that it cannot import.
Since I am using the IronPython Tools for Visual Studio, i can also see that the IntelliSense-DropDown does not show this struct.
Is there a need for a special statement for importing this struct?
Thanks! | IronPython: Cannot import 'Rect'-struct from System.Windows | 0.379949 | 0 | 0 | 273 |
5,190,030 | 2011-03-04T05:25:00.000 | 0 | 0 | 1 | 1 | python,macos,terminal | 5,190,101 | 6 | false | 0 | 0 | The statements which represent a block of code below end with a colon(:) in Python.
By doing that way, you can add extra statements under a single block and execute them at once. | 2 | 12 | 0 | I'm using Python in Terminal on Mac OSX latest. When I press enter, it processes the code I've entered, and I am unable to figure out how to add an additional line of code e.g. for a basic loop. | How do I create a line-break in Terminal? | 0 | 0 | 0 | 43,483 |
5,190,030 | 2011-03-04T05:25:00.000 | 1 | 0 | 1 | 1 | python,macos,terminal | 25,158,836 | 6 | false | 0 | 0 | The answer here is far more simple. If you want to continue in the next line after a loop like
while b<1:
when you press enter you get prompted with
...
then you "have to make an indent" by space of tab and only then you can put more code after the three dots like
... (tab or space) print b
then when you press en... | 2 | 12 | 0 | I'm using Python in Terminal on Mac OSX latest. When I press enter, it processes the code I've entered, and I am unable to figure out how to add an additional line of code e.g. for a basic loop. | How do I create a line-break in Terminal? | 0.033321 | 0 | 0 | 43,483 |
5,191,878 | 2011-03-04T09:25:00.000 | 0 | 0 | 0 | 1 | python,security,sudo | 5,192,008 | 9 | false | 0 | 0 | You can use setuid to set the users uid. But for obvious security reasons you can only do this if you are root (or the program has suid root rights). Both of these are probably a bad idea.
In this case you need to sudo rights to run a specific program. In that case just sub to "sudo theprogram" instead. | 1 | 27 | 0 | I have a problem. I am writing a piece of software, which is required to perform an operation which requires the user to be in sudo mode. running 'sudo python filename.py' isn't an option, which leads me to my question. Is there a way of changing to sudo half way through a python script, security isn't an issue as the ... | Change to sudo user within a python script | 0 | 0 | 0 | 53,178 |
5,194,343 | 2011-03-04T13:30:00.000 | 0 | 0 | 1 | 1 | python,osx-snow-leopard,virtualenv,homebrew | 5,195,551 | 2 | false | 0 | 0 | I use the python_select utility to switch between versions (it takes care of all the paths and links). It's easy to install with MacPorts or fink, so I would guess you can install the same utility with Homebrew. | 2 | 0 | 0 | whats is the current best practice for installing multiple versions of python on snow leopard?
have setup python 2.7.1 via Homebrew, very easy process, all great.
but now I need to setup python 2.5 to develop an appengine project.. Initially created a new virtualenv against system python2.5 .. but finding I have all ... | how to install multiple python versions on snow leopard? | 0 | 0 | 0 | 1,005 |
5,194,343 | 2011-03-04T13:30:00.000 | 2 | 0 | 1 | 1 | python,osx-snow-leopard,virtualenv,homebrew | 5,194,593 | 2 | true | 0 | 0 | Snow leopard already contains python 2.5 and python 2.6, no issues there.
If you require obscure modifications to the python installations, just compile your own, and put it in some place where it won't conflict with the system python. (I suggest /opt/your-pythonx.y).
As an aside, check: "man python" on mac to see how ... | 2 | 0 | 0 | whats is the current best practice for installing multiple versions of python on snow leopard?
have setup python 2.7.1 via Homebrew, very easy process, all great.
but now I need to setup python 2.5 to develop an appengine project.. Initially created a new virtualenv against system python2.5 .. but finding I have all ... | how to install multiple python versions on snow leopard? | 1.2 | 0 | 0 | 1,005 |
5,196,084 | 2011-03-04T15:53:00.000 | 4 | 0 | 0 | 0 | python,django,internationalization,translation,gettext | 5,244,999 | 1 | true | 1 | 0 | After doing some more research and reading, specifically about gettext, I don't think this is possible. gettext documentation only allows one variable to control the pluralization. There are probably problems with having 2 variable pluralization, since in arabic, you'd have to have 36 different strings to translate.
In... | 1 | 3 | 0 | I am internationalizing (i18n) our django project, i.e. adding {% blocktrans %} to our templates. I know about using count and {% plural %} to have different strings for varaibles. However I have a string that has two variables that each need to be pluralized, i.e. 4 possible options.
For example, my string is "You hav... | Multiple pluralisable variables in internationalized django template | 1.2 | 0 | 0 | 846 |
5,200,635 | 2011-03-05T00:09:00.000 | 0 | 1 | 0 | 0 | python,cgi,security | 5,200,797 | 2 | false | 0 | 0 | This is a good idea. chmod 500 is better in this case. The rule of th You have to have the most restrictive privileges as possible. Keep in mind your app might hacked and then you don't want your app to write to its self. (unless it has too...) | 2 | 1 | 0 | So I have been developing my first website. I have a cgi script that allows users to sign up for e-mail updates. However, I don't trust the security of cgi-bin with the api-key I am using to sign people up to a mailing list. So I put the api-key in another folder in home with chmod 711 on the directory (as opposed to 7... | Basic python cgi security question: Storing sensitive information in another directory | 0 | 0 | 0 | 227 |
5,200,635 | 2011-03-05T00:09:00.000 | 0 | 1 | 0 | 0 | python,cgi,security | 5,200,769 | 2 | false | 0 | 0 | This isn't a Python question (the fact that you're using Python is totally incidental), but the answer is: yeah, it's a good idea to have your sensitive data in a place where your Web server can't, even if somewhat misconfigured, send it to an attacker. So outside of whatever directory hierarchy your Web documents and ... | 2 | 1 | 0 | So I have been developing my first website. I have a cgi script that allows users to sign up for e-mail updates. However, I don't trust the security of cgi-bin with the api-key I am using to sign people up to a mailing list. So I put the api-key in another folder in home with chmod 711 on the directory (as opposed to 7... | Basic python cgi security question: Storing sensitive information in another directory | 0 | 0 | 0 | 227 |
5,201,388 | 2011-03-05T03:10:00.000 | 2 | 0 | 0 | 0 | python,sockets,loops,tcp,connection | 5,201,409 | 3 | true | 0 | 0 | Call connect outside the while loop. You only need to connect once. | 2 | 0 | 0 | Hey I'm working on a python project using sockets. Basically I want to loop a connection to a host for user input. Here is what I'm trying:
while True:
sock.connect((host, port))
inputstring = " > "
userInput = raw_input(inputstring)
sock.send(userInput + '\r\n\r\n')
recvdata = sock.recv(socksize)
... | Python keeping socket alive? | 1.2 | 0 | 1 | 2,005 |
5,201,388 | 2011-03-05T03:10:00.000 | 1 | 0 | 0 | 0 | python,sockets,loops,tcp,connection | 5,201,407 | 3 | false | 0 | 0 | Put the sock.connect outside of your while True. | 2 | 0 | 0 | Hey I'm working on a python project using sockets. Basically I want to loop a connection to a host for user input. Here is what I'm trying:
while True:
sock.connect((host, port))
inputstring = " > "
userInput = raw_input(inputstring)
sock.send(userInput + '\r\n\r\n')
recvdata = sock.recv(socksize)
... | Python keeping socket alive? | 0.066568 | 0 | 1 | 2,005 |
5,201,876 | 2011-03-05T05:22:00.000 | 1 | 0 | 1 | 0 | python,wxpython,tkinter | 5,201,931 | 2 | false | 0 | 1 | There are several functions in wx.Python to do that.
You should check the "Process and events" section of the wxPython demos, More especifically those related with wx.Timer
The wx.Timer class allows you to
execute code at specified intervals
from within the wxPython event loop.
Timers can be one-shot or repeatin... | 1 | 1 | 0 | Is there an equivalent to Tkinter's .after() in wxPython?
For those that don't know .after() allows the running of functions at some point in the future. This can be used to make loops with functions.
I'm attempting to make a clock, so this would be handy for making it tick. | wxPython Equivalent to Tkinter .after() | 0.099668 | 0 | 0 | 1,132 |
5,201,965 | 2011-03-05T05:44:00.000 | 5 | 0 | 1 | 0 | python,objective-c,cocoa | 5,202,012 | 3 | false | 0 | 0 | -hasPrefix() and -hasSuffix() return YES or NO depending on whether the receiver begins or ends with the given substring. If that's what startswith() and endswith() do, then that's your answer. | 1 | 45 | 0 | Python has string.startswith() and string.endswith() functions which are pretty useful.
What NSString methods can I use to have the same function? | Objective-C (cocoa) equivalent to python's endswith/beginswith | 0.321513 | 0 | 0 | 7,753 |
5,202,362 | 2011-03-05T07:22:00.000 | 0 | 1 | 1 | 0 | python,algorithm,string | 5,202,394 | 7 | false | 0 | 0 | I believe to understand your question correctly, and here is my attempt at answering it, if I have mis-understood please correct me.
The standard comparisons (<, <=, >, >=, ==, !=) apply to strings. These comparisons use the standard character-by-character comparison rules for ASCII or Unicode. That being said, the gr... | 2 | 1 | 0 | How to check for a string that for every character in it, there exists all the characters which are alphabetically smaller than it before it e.g aab is correct while aacb is not, because the second case, we have 'c' but 'b' is not present before it.
Also aac is not correct as it does not have 'b' before 'c'. | a string that for every character in it, there exists all the characters which are alphabetically smaller than it before it | 0 | 0 | 0 | 155 |
5,202,362 | 2011-03-05T07:22:00.000 | 0 | 1 | 1 | 0 | python,algorithm,string | 5,202,661 | 7 | false | 0 | 0 | The idea is very simple, for each char in the string, it should not less than its preceding, and it shouldn't larger than its preceding + 1. | 2 | 1 | 0 | How to check for a string that for every character in it, there exists all the characters which are alphabetically smaller than it before it e.g aab is correct while aacb is not, because the second case, we have 'c' but 'b' is not present before it.
Also aac is not correct as it does not have 'b' before 'c'. | a string that for every character in it, there exists all the characters which are alphabetically smaller than it before it | 0 | 0 | 0 | 155 |
5,203,378 | 2011-03-05T11:02:00.000 | 1 | 0 | 0 | 1 | python,google-app-engine,redirect | 5,203,395 | 2 | false | 1 | 0 | import time at the top of your module and do a time.sleep(0.5) before you do a self.redirect call. The sleep argument can take a floating point value of number of seconds to delay. Just make sure that you don't exceed 30 seconds of delay as GAE expects that every request be handled within that otherwise it will be int... | 2 | 1 | 0 | Is that possible to redirect to another url with a delay in GAE? I know I can use JavaScript for this purpose, but may be there is a way to do delayed redirection without it?
Now I use self.redirect("/") from GAE tutorial.
Thanks. | GAE redirection with a delay | 0.099668 | 0 | 0 | 2,116 |
5,203,378 | 2011-03-05T11:02:00.000 | 8 | 0 | 0 | 1 | python,google-app-engine,redirect | 5,203,418 | 2 | true | 1 | 0 | You can use the <meta http-equiv="refresh" content="x;url=http://yoururl/"> tag where x is the number of seconds to wait before redirect.
This tag would go in <head> part of the generated page. | 2 | 1 | 0 | Is that possible to redirect to another url with a delay in GAE? I know I can use JavaScript for this purpose, but may be there is a way to do delayed redirection without it?
Now I use self.redirect("/") from GAE tutorial.
Thanks. | GAE redirection with a delay | 1.2 | 0 | 0 | 2,116 |
5,204,339 | 2011-03-05T14:19:00.000 | 0 | 1 | 0 | 0 | python,imaplib | 5,204,450 | 3 | false | 0 | 0 | You could fetch the headers for the message, and use the message's Date and/or Message-Id header value to construct a "unique id prefix" for all of the attachments in that message. Then create a key of the form [unique_id]_[filename], check if that key exists in your database or filesystem. If not, download all attachm... | 2 | 2 | 0 | I'm writing a script in Python that saves attachments from Gmail, only from unseen emails. To save on bandwidth I want to make sure that every file only gets downloaded once.
-I can't check the folder where I save them, because the file could be removed already, and then it shouldn't download again. (The scripts access... | Way to avoid downloading file twice via IMAP | 0 | 0 | 0 | 292 |
5,204,339 | 2011-03-05T14:19:00.000 | 0 | 1 | 0 | 0 | python,imaplib | 5,204,367 | 3 | true | 0 | 0 | You could not only save the filename to the database but save, for example, the Date:-header of the mail, too. (Or any combination of headers of which you are sure that they define a mail uniquely). | 2 | 2 | 0 | I'm writing a script in Python that saves attachments from Gmail, only from unseen emails. To save on bandwidth I want to make sure that every file only gets downloaded once.
-I can't check the folder where I save them, because the file could be removed already, and then it shouldn't download again. (The scripts access... | Way to avoid downloading file twice via IMAP | 1.2 | 0 | 0 | 292 |
5,205,062 | 2011-03-05T16:24:00.000 | 0 | 0 | 0 | 0 | python,user-interface | 5,205,268 | 4 | false | 1 | 0 | Tkinter is probably going to be the solution you can use quickest. Its API is simple and straight-forward, and you probably already have it installed. | 1 | 0 | 0 | We are in the process of standing up a UI on top of a python system. This is all throw away code, so we want something quick, yet presentable.
We will have a couple of "interfaces" but they will be of two types. One will be control, it will basically be sitting on top of a python thread, and accepting requests from... | Python Web/UI Options | 0 | 0 | 0 | 3,564 |
5,206,838 | 2011-03-05T21:18:00.000 | 2 | 0 | 0 | 1 | python,google-app-engine | 5,210,681 | 1 | false | 1 | 0 | I see a few problems right off:
You'll need to create a web interface to the script
GAE does not allow long running tasks and this looks like it could take a while. You'd need to recode it to break the work up into chunks.
Outbound FTP (for fetching word lists) is not supported on GAE
Local file write access is not s... | 1 | 0 | 0 | Do you see any limitations for cupp (http://www.securityfocus.com/tools/7320) running on GAE? | CUPP (pentest) on google app engine | 0.379949 | 0 | 0 | 272 |
5,208,158 | 2011-03-06T02:06:00.000 | 3 | 0 | 0 | 0 | python,django | 5,209,121 | 4 | false | 1 | 0 | Premature optimisation is the root of all evil.
Django makes things extremely convenient if you're doing web development. That plus a great community with hundreds of plugins for common tasks is a real boon if you're doing serious work.
Even if your "raw" implementation is faster, I don't think it will be fast enough... | 4 | 5 | 0 | I was wondering what the performance difference is between using plain python files to make web pages and using Django. I was just wondering if there was a significant difference between the two. Thanks | Performance between Django and raw Python | 0.148885 | 0 | 0 | 1,142 |
5,208,158 | 2011-03-06T02:06:00.000 | 11 | 0 | 0 | 0 | python,django | 5,208,366 | 4 | true | 1 | 0 | Django IS plain Python. So the execution time of each like statement or expression will be the same. What needs to be understood, is that many many components are put together to offer several advantages when developing for the web:
Removal of common tasks into libraries (auth, data access, templating, routing)
Correc... | 4 | 5 | 0 | I was wondering what the performance difference is between using plain python files to make web pages and using Django. I was just wondering if there was a significant difference between the two. Thanks | Performance between Django and raw Python | 1.2 | 0 | 0 | 1,142 |
5,208,158 | 2011-03-06T02:06:00.000 | 5 | 0 | 0 | 0 | python,django | 5,208,183 | 4 | false | 1 | 0 | Depends on how your "plain Python" makes web pages. If it uses a templating engine, for instance, the performance of that engine is going make a huge difference. If it uses a database, what kind of data access layer you use (in the context of the requirements for that layer) is going to make a difference.
The question,... | 4 | 5 | 0 | I was wondering what the performance difference is between using plain python files to make web pages and using Django. I was just wondering if there was a significant difference between the two. Thanks | Performance between Django and raw Python | 0.244919 | 0 | 0 | 1,142 |
5,208,158 | 2011-03-06T02:06:00.000 | 2 | 0 | 0 | 0 | python,django | 5,208,968 | 4 | false | 1 | 0 | Django is also plain Python.
See the performance mostly relies on how efficient your code is.
Most of the performance issues of software arise from the inefficient code, rather than choice of tools and language. So the implementation matters. AFAIK Django does this excellently and it's performance is above the mark. | 4 | 5 | 0 | I was wondering what the performance difference is between using plain python files to make web pages and using Django. I was just wondering if there was a significant difference between the two. Thanks | Performance between Django and raw Python | 0.099668 | 0 | 0 | 1,142 |
5,208,186 | 2011-03-06T02:15:00.000 | 1 | 0 | 1 | 0 | excel,ironpython,add-in,excel-addins,excel-dna | 5,241,373 | 3 | false | 0 | 0 | Is a "plain old" VBA add-in out of the question? It's going to be smaller, quicker to implement, easier to deploy. | 1 | 4 | 0 | I don't know much about VSTO or VSTA, but I think you need the full version of Visual Studio to use either one. I can't convince my boss to buy us this, but I would like to develop Excel addins in IronPython. I've looked at several tutorials that show you how interact with Excel using IronPython, but I can't find muc... | Looking for free way to develop Excel add-ins using IronPython? | 0.066568 | 0 | 0 | 1,837 |
5,209,003 | 2011-03-06T06:00:00.000 | 0 | 1 | 0 | 0 | python,api,twitter | 5,209,588 | 1 | true | 0 | 0 | A tweet itself comes with a geo tag. But it is a new feature and majority tweets do not have it. So it is not possible to search for all tweets containing "Gaddafi" from a city given the city name.
What you could do is the reverse, you search for "Gaddafi" first (regardless of geo location), using search api. Then, for... | 1 | 0 | 0 | I have little working knowledge of python. I know that there is something called a Twitter search API, but I'm not really sure what I'm doing. I know what I need to do:
I need point data for a class. I thought I would just pull up a map of the world in a GIS application, select cities that have x population or larger, ... | Performing multiple searches of a term in Twitter | 1.2 | 0 | 1 | 268 |
5,209,395 | 2011-03-06T08:05:00.000 | 1 | 0 | 1 | 0 | python,list | 5,209,402 | 6 | false | 0 | 0 | just b = sorted(a) ? | 1 | 1 | 0 | I have a list a = ['a1', 'b1', 'c1', 'd1', 'a2', 'b2', 'c2', 'd2',]
How can I get list b = ['a1,', 'a2', 'b1', 'b2', 'c1', 'c2', 'd1', 'd2'] without using .sorted()?
Thanks! | sorting the list in Python without .sorted() | 0.033321 | 0 | 0 | 5,522 |
5,210,318 | 2011-03-06T11:56:00.000 | 1 | 0 | 0 | 0 | python | 5,210,383 | 2 | false | 1 | 0 | Okay, here's an idea:
Ship all the data as is done now.
Have the installation script install it in the appropriate databases.
Let users modify this database and give them a button "restore to original" that simply reinstalls from the text file.
Alternatively, this route may be easier, esp. when upgrading an installat... | 1 | 4 | 0 | I have about 30 MB of textual data that is core to the algorithms I use in my web application.
On the one hand, the data is part of the algorithm and changes to the data can cause an entire algorithm to fail. This is why I keep the data in text files in my source control, and all changes are auto-tested (pre-commit). I... | What's the best way to handle source-like data files in a web application? | 0.099668 | 1 | 0 | 127 |
5,210,692 | 2011-03-06T13:13:00.000 | 0 | 1 | 0 | 0 | python,facebook | 23,464,883 | 3 | false | 1 | 0 | If you do not want to start on Django now. Try learning Flask(which is comparatively a lot easier to begin than Django) and then start building app with Flask. | 1 | 6 | 0 | I'd like to ask you about your experiences in developing facebook applications in Python. Which of the popular web frameworks for this language you think best suits this purpose? I know "best" is a very subjective word, so I'm specifically interested in the following:
Most reusable libraries. For example one might wan... | Python frameworks for developing facebook apps | 0 | 0 | 0 | 2,182 |
5,211,129 | 2011-03-06T14:45:00.000 | 0 | 0 | 0 | 1 | python,google-app-engine | 5,211,520 | 2 | false | 1 | 0 | My initial gut reaction (without knowing what's inside the gzipped file) is to do the processing somewhere else (AWS?) and then pushed the processed data to your GAE application in small bits. | 2 | 0 | 0 | I'm working on a Python web app that needs to import big (in terms of GAE limits) gzipped files from a third party site on regular basis. Think of rdf exports DMOZ project is producing on regular intervals.
This means daily fetching of a 500+ MB gzip file, gunzipping, parsing, processing and storing the results in GAE'... | GAE: scheduled import of big gzipped file from a third party site | 0 | 0 | 0 | 87 |
5,211,129 | 2011-03-06T14:45:00.000 | 1 | 0 | 0 | 1 | python,google-app-engine | 5,226,725 | 2 | true | 1 | 0 | The limit on downloaded file size in App Engine is currently 64MB. As a result, you've got two options:
Use HTTP Range headers to download and process the file in chunks.
Use an external service to do the download, split it into pieces, and send the pieces to your App Engine app. | 2 | 0 | 0 | I'm working on a Python web app that needs to import big (in terms of GAE limits) gzipped files from a third party site on regular basis. Think of rdf exports DMOZ project is producing on regular intervals.
This means daily fetching of a 500+ MB gzip file, gunzipping, parsing, processing and storing the results in GAE'... | GAE: scheduled import of big gzipped file from a third party site | 1.2 | 0 | 0 | 87 |
5,211,338 | 2011-03-06T15:26:00.000 | 0 | 0 | 0 | 0 | python,django,rendering | 5,216,170 | 3 | false | 1 | 0 | By default mod_python decides when to reload, so you'll get what you get when you get it.
Maybe I am mistaken, but I thought there was a directive you could send that would explicitly force the python reload now. That should (in theory) help with achieving consistent but perhaps not ideal, behavior.
Off topic, this so... | 1 | 0 | 0 | Well main question of the day will django work correctly under python 2.5.2 ?
So why i am asking this question?
First of all i have some test class written , nothing special which renders a page. The problem is that everytime i access this page i get random 3 different responses :
1)exceptions must be classes, instanc... | Django 1.2.3 compatible with python 2.5.2 ? Weird django behaviour | 0 | 0 | 0 | 180 |
5,211,340 | 2011-03-06T15:26:00.000 | 3 | 0 | 0 | 0 | python,django,sqlite | 5,211,417 | 3 | false | 1 | 0 | As always, syncdb does not migrate the existing schema. | 1 | 4 | 0 | I'm not sure if this is an issue specific to sqlite databases but after adding some properties I executed syncdb successfully but still the the columns were not added to the database and when I try the access the model in admin I get no such column error.
Why is this happening and how do I overcome this issue?
Details:... | Django manage.py syncdb doing nothing when used with sqlite3 | 0.197375 | 1 | 0 | 5,639 |
5,214,230 | 2011-03-06T23:26:00.000 | 3 | 0 | 1 | 0 | python,v8 | 5,214,600 | 7 | false | 1 | 0 | There are already three projects that provide a Python to Javascript compiler. The resulting Javascript can then be run on any engine including V8. Look for Pyjamas, Skulpt and Py2JS.
This is not the same as compiling Python to V8 bytecodes, but the end result is much the same. | 3 | 7 | 0 | Presumably Javascript is compiled to some kind of byte-code to run on the V8 Engine? Is Python a similar enough language that we can imagine Python being compiled to the same byte-code and run on the V8?
Any projects trying to do this? | Could Python be compiled to run on the V8 Engine? | 0.085505 | 0 | 0 | 2,419 |
5,214,230 | 2011-03-06T23:26:00.000 | 3 | 0 | 1 | 0 | python,v8 | 5,611,008 | 7 | true | 1 | 0 | V8 doesn't actually have a general purpose bytecode. There's a regexp byte code, but support is not usually compiled in. There's a deserialization byte code and a relocation information byte code, but both are implemtation details and you can't use them for anything.
So what you are looking for is something that comp... | 3 | 7 | 0 | Presumably Javascript is compiled to some kind of byte-code to run on the V8 Engine? Is Python a similar enough language that we can imagine Python being compiled to the same byte-code and run on the V8?
Any projects trying to do this? | Could Python be compiled to run on the V8 Engine? | 1.2 | 0 | 0 | 2,419 |
5,214,230 | 2011-03-06T23:26:00.000 | -5 | 0 | 1 | 0 | python,v8 | 5,214,247 | 7 | false | 1 | 0 | Python is already compiled to bytecode and executed. This is what the .pyc files are in CPython. Jython likewise compiles to Java bytecode (dynamically), and so does IronPython for .NET | 3 | 7 | 0 | Presumably Javascript is compiled to some kind of byte-code to run on the V8 Engine? Is Python a similar enough language that we can imagine Python being compiled to the same byte-code and run on the V8?
Any projects trying to do this? | Could Python be compiled to run on the V8 Engine? | -1 | 0 | 0 | 2,419 |
5,214,369 | 2011-03-06T23:52:00.000 | 12 | 0 | 1 | 0 | python,matlab,ide | 6,088,759 | 11 | false | 0 | 0 | I've been getting on very well with the Spyder IDE in the Python(x,y) distribution. I'm a long term user of Matlab and have known of the existence of Python for 10 years or so but it's only since I installed Python(x,y) that I've started using Python regularly. | 5 | 26 | 1 | I'm considering making the switch from MATLAB to Python. The application is quantitative trading and cost is not really an issue. There are a few things I love about MATLAB and am wondering how Python stacks up (could not find any answers in the reviews I've read).
Is there an IDE for Python that is as good as MATLAB'... | Python vs Matlab | 1 | 0 | 0 | 47,020 |
5,214,369 | 2011-03-06T23:52:00.000 | 2 | 0 | 1 | 0 | python,matlab,ide | 10,388,279 | 11 | false | 0 | 0 | after long long tryouts with many editors,
i have settled for aptana ide + ipython (including notebook in internet browser)
great for editing, getting help easy, try fast new things
aptana is the same as eclipse (because of pydev) but aptana has themes and different little things eclipse lacks
about python a little,
do... | 5 | 26 | 1 | I'm considering making the switch from MATLAB to Python. The application is quantitative trading and cost is not really an issue. There are a few things I love about MATLAB and am wondering how Python stacks up (could not find any answers in the reviews I've read).
Is there an IDE for Python that is as good as MATLAB'... | Python vs Matlab | 0.036348 | 0 | 0 | 47,020 |
5,214,369 | 2011-03-06T23:52:00.000 | 6 | 0 | 1 | 0 | python,matlab,ide | 41,910,220 | 11 | false | 0 | 0 | I've been in the engineering field for a while now and I've always used MATLAB for high-complexity math calculations. I never really had an major problems with it, but I wasn't super enthusiastic about it either. A few months ago I found out I was going to be a TA for a numerical methods class and that it would be taug... | 5 | 26 | 1 | I'm considering making the switch from MATLAB to Python. The application is quantitative trading and cost is not really an issue. There are a few things I love about MATLAB and am wondering how Python stacks up (could not find any answers in the reviews I've read).
Is there an IDE for Python that is as good as MATLAB'... | Python vs Matlab | 1 | 0 | 0 | 47,020 |
5,214,369 | 2011-03-06T23:52:00.000 | 2 | 0 | 1 | 0 | python,matlab,ide | 5,214,892 | 11 | false | 0 | 0 | almost everything is covered by others .. i hope you don't need any toolboxes like optimizarion toolbox , neural network etc.. [ I didn't find these for python may be there are some .. i seriously doubt they might be better than Matlab ones..]
if u don't need symbolic manipulation capability and are using windows pyth... | 5 | 26 | 1 | I'm considering making the switch from MATLAB to Python. The application is quantitative trading and cost is not really an issue. There are a few things I love about MATLAB and am wondering how Python stacks up (could not find any answers in the reviews I've read).
Is there an IDE for Python that is as good as MATLAB'... | Python vs Matlab | 0.036348 | 0 | 0 | 47,020 |
5,214,369 | 2011-03-06T23:52:00.000 | 1 | 0 | 1 | 0 | python,matlab,ide | 9,317,942 | 11 | false | 0 | 0 | I have recently switched from MATLAB to Python (I am about 2 months into the transition), and am getting on fairly well using Sublime Text 2, using the SublimeRope and SublimeLinter plugins to provide some IDE-like capabilities, as well as pudb to provide some graphical interactive debugging capabilities.
I have not ye... | 5 | 26 | 1 | I'm considering making the switch from MATLAB to Python. The application is quantitative trading and cost is not really an issue. There are a few things I love about MATLAB and am wondering how Python stacks up (could not find any answers in the reviews I've read).
Is there an IDE for Python that is as good as MATLAB'... | Python vs Matlab | 0.01818 | 0 | 0 | 47,020 |
5,215,195 | 2011-03-07T02:27:00.000 | 0 | 1 | 0 | 0 | python,svn,dependencies,detection | 5,215,273 | 3 | false | 0 | 0 | Absolutely! If you are working from a UNIX or Linux shell, a simple combination of grep and awk would work; basically, all you want to do is search for lines containing the "import" keyword.
However, if you are working from any environment, you could just write a small Python script to do the searching for you (don't f... | 1 | 2 | 0 | Is it possible to programmatically detect dependencies given a python project residing in SVN? | Python dependencies? | 0 | 0 | 0 | 1,336 |
5,215,883 | 2011-03-07T04:38:00.000 | 3 | 0 | 1 | 0 | python,bdd,lettuce | 5,665,792 | 2 | true | 0 | 0 | There is a "behave_as" feature for Lettuce which should do this. Though there were some bugs with it last time I tried to use it. May be fixed now. I opened a bug on it with Gabriel, the author. | 1 | 3 | 0 | I am using Lettuce BDD framework for python, and I am wondering how to run one scenario from within another scenario..
For example, say there is a "registration" scenario that establishes some pre-conditions which will be used by a subsequent scenario (say "action" scenario") - how do I refer and call the "registratio... | Lettuce BDD : How to refer scenarios? | 1.2 | 0 | 0 | 822 |
5,216,891 | 2011-03-07T07:17:00.000 | -18 | 0 | 0 | 0 | python,django,entity-relationship | 5,223,598 | 2 | true | 1 | 0 | If you discovered ManyToManyRel by digging into the source code, you can read the docstrings for the class. It's not documented anywhere - on purpose, because it's not for external use. It is certainly not meant for defining actual field relationships between models. | 1 | 57 | 0 | What is the difference between Django's models.ManyToManyField and models.ManyToManyRel? I'm confused about this stuff. | Django: what is the difference (rel & field) | 1.2 | 0 | 0 | 11,436 |
5,217,033 | 2011-03-07T07:34:00.000 | 1 | 0 | 0 | 1 | python,date | 5,217,076 | 2 | false | 0 | 0 | If you use Windows, you should be able to do that in the time and date control panel (should be self explaining).
If you use Linux, use the date command, and maybe hwclock (more info in the man pages).
If you use AmigaOS, use the appropriate settings window in the system Preferences folder.
If you use any other OS, yo... | 2 | 0 | 0 | I need to change my computer's local date to an earlier date (e.g. 2010). I couldnt do that in BIOS. Does anybody know how to do this task, for example by writing a Python snippet?
Thanks. | Change system date | 0.099668 | 0 | 0 | 666 |
5,217,033 | 2011-03-07T07:34:00.000 | 1 | 0 | 0 | 1 | python,date | 5,375,660 | 2 | false | 0 | 0 | If you are not permitted to do this via the operating system, then you will not be permitted to do it from a scripting language like Python, either. | 2 | 0 | 0 | I need to change my computer's local date to an earlier date (e.g. 2010). I couldnt do that in BIOS. Does anybody know how to do this task, for example by writing a Python snippet?
Thanks. | Change system date | 0.099668 | 0 | 0 | 666 |
5,217,260 | 2011-03-07T08:03:00.000 | 1 | 0 | 1 | 0 | python,nltk | 5,247,667 | 1 | false | 0 | 0 | Depends what you mean by an "idiom". Joe's suggestion of POS tagging is probably a good start - and might be what you are really after. If so, go read "Natural Language Processing with Python" by Bird et al. It is published by O'Reilly but is also available online under a Creative Commons license. This will get you sta... | 1 | 1 | 0 | I want a code for tagging idioms in a given sentence or text using NLTK and Python. | code using nltk and python | 0.197375 | 0 | 0 | 415 |
5,217,513 | 2011-03-07T08:40:00.000 | 2 | 0 | 1 | 0 | python | 5,217,530 | 4 | false | 0 | 1 | Short answer: Yes, it is.
But this heavily depends on your problem :) | 1 | 0 | 0 | i am looking to start learning. people have told me it is juts as capable. though i haven't really seen any good looking games available. some decent ones on pygame, but none really stand out.
i would like to know if python really is as capable as other languages.
EDIT: thanks guys, is python good for game development? | is python as capable as other languages like c++? | 0.099668 | 0 | 0 | 161 |
5,219,977 | 2011-03-07T12:55:00.000 | 2 | 0 | 0 | 1 | python,google-app-engine,bulkloader | 5,220,288 | 4 | false | 1 | 0 | If you're using App Engine Launcher, simply click the Deploy button; it runs appcfg.py update. appcfg is installed as part of the SDK. | 1 | 1 | 0 | I am trying to use Bulkloader of google app engine but unfortunately could not understand what to do from documentation. It says add this part to app.yaml
builtins:
- remote_api: on
ok i have added. Then says that i have to execute this command
appcfg.py update
but i don't have any appcfg.py file. And also what is the... | App Engine Bulkloader | 0.099668 | 0 | 0 | 1,639 |
5,220,580 | 2011-03-07T14:00:00.000 | 43 | 0 | 1 | 0 | python,pylint | 5,497,591 | 3 | true | 0 | 0 | Use pylint --generate-rcfile > ~/.pylintrc to get a standard pylintrc.
Edit the file, go to the [BASIC] section, and change the following regexps:
function-rgx=_?_?[a-z][A-Za-z0-9]{1,30}$
method-rgx=_?_?[a-z][A-Za-z0-9]{1,30}$
attr-rgx=_?_?[a-z][A-Za-z0-9]{1,30}$
argument-rgx=_?[a-z][A-Za-z0-9]{1,30}$
variable-rgx=_?[... | 3 | 22 | 0 | In python i'm following camelCase Naming style. I checked my code with "pylint" and it gives error for not following lower_case_with_underscores style. Also i use netBeans IDE for coding. This IDE gives warning for not following lower_case_with_underscores style.
How to tell pylint and netBeans that i'm following came... | Change default python coding style | 1.2 | 0 | 0 | 10,918 |
5,220,580 | 2011-03-07T14:00:00.000 | 2 | 0 | 1 | 0 | python,pylint | 33,075,919 | 3 | false | 0 | 0 | for netbeans 8.0.2 ...
Tools --> Options --> Editor --> Hints --> Python --> Naming Conventions --> Functions --> mixedCase | 3 | 22 | 0 | In python i'm following camelCase Naming style. I checked my code with "pylint" and it gives error for not following lower_case_with_underscores style. Also i use netBeans IDE for coding. This IDE gives warning for not following lower_case_with_underscores style.
How to tell pylint and netBeans that i'm following came... | Change default python coding style | 0.132549 | 0 | 0 | 10,918 |
5,220,580 | 2011-03-07T14:00:00.000 | 5 | 0 | 1 | 0 | python,pylint | 61,979,321 | 3 | false | 0 | 0 | Accepted answer is outdated. Now its much simpler:
Use pylint --generate-rcfile > ~/.pylintrc to get a standard pylintrc.
Edit the file, go to the [BASIC] section, and change the different ...-naming-styles to camelCase. | 3 | 22 | 0 | In python i'm following camelCase Naming style. I checked my code with "pylint" and it gives error for not following lower_case_with_underscores style. Also i use netBeans IDE for coding. This IDE gives warning for not following lower_case_with_underscores style.
How to tell pylint and netBeans that i'm following came... | Change default python coding style | 0.321513 | 0 | 0 | 10,918 |
5,221,977 | 2011-03-07T16:12:00.000 | 6 | 0 | 0 | 1 | python,google-app-engine,caching,memcached,google-cloud-datastore | 5,222,081 | 3 | true | 1 | 0 | This is a recipe for lost data. I have a hard time believing that a guest book is causing enough write activity to be an issue. Also, the bookkeeping involved in this would be tricky, since memcache isn't searchable. | 1 | 2 | 0 | I am trying to modify the guestbook example webapp to reduce the amount of database writes.
What I am trying to achieve is to load all the guestbook entries into memcache which I have done.
However I want to be able to directly update the memcache with new guestbook entries and then write all changes to the database a... | Limit amount of writes to database using memcache | 1.2 | 1 | 0 | 1,124 |
5,224,420 | 2011-03-07T19:42:00.000 | 6 | 0 | 1 | 0 | python,arrays,list,performance,numpy | 7,501,276 | 2 | false | 0 | 0 | There are several differences:
You can append elements to a list, but you can't change the size of a
´numpy.ndarray´ without making a full copy.
Lists can containt about everything, in numpy arrays all the
elements must have the same type.
In practice, numpy arrays are faster for vectorial functions than
mapping funct... | 1 | 4 | 1 | What are the differences between python's numpy.ndarray and list datatypes? I have vague ideas, but would like to get a definitive answer about:
Size in memory
Speed / order of access
Speed / order of modification in place but preserving length
Effects of changing length
Thanks! | Differences between python's numpy.ndarray and list datatypes | 1 | 0 | 0 | 5,003 |
5,224,541 | 2011-03-07T19:55:00.000 | 31 | 0 | 0 | 1 | python,file,networking,copy,unc | 5,224,625 | 2 | false | 0 | 0 | Personally, I've never had difficulties getting Python to simply recognize \\\\<server>\\path\\to\\directory\\. The annoying part is that for every "\" in the win. path, there needs to be 2 in python. | 1 | 14 | 0 | I am running python in a non interactive session on windows and therefore I cannot map a network drive.
Most of what I have researched on here and through google everyone suggests mapping a network drive and copying the files that way.
On linux I would facilitate this with an smbmount but unfortunately the software I a... | python copy files to a network location on Windows without mapping a drive | 1 | 0 | 0 | 64,546 |
5,224,679 | 2011-03-07T20:08:00.000 | 0 | 0 | 1 | 0 | multithreading,ffmpeg,imagemagick,pyqt4,python-2.6 | 5,273,687 | 1 | true | 0 | 1 | The answer is yes and no - you can use QThread for threading but you'll still be subject to the GIL, so your threads will run in serial.
You could try using multiprocessing to create a worker class in its own process and send work to it (or have it steal work from a queue), however this could introduce its own performa... | 1 | 0 | 0 | Im making a PyQt4 app which calls Imagemagick and ffmpeg, but it takes too much to complete the tasks and im wondering if there is a way to implement threads to this, the app is going to run in a multicore machine, and some of the methods I have seen are not efficient enough. Thanks in advance | Threads in PyQt4 | 1.2 | 0 | 0 | 256 |
5,224,759 | 2011-03-07T20:17:00.000 | 3 | 0 | 1 | 0 | python | 5,224,812 | 6 | false | 0 | 1 | I'd say Python is okay for scripting in a game engine (See: EVE Online, Civ IV), but I wouldn't write a game engine in it. The performance just isn't there for serious real-time games. If you just want to do simple 2d stuff that's fine, but your're not going to write the next Crysis, or even the next Minecraft, in pure... | 2 | 21 | 0 | i hear people say python is just as good as c++ and java but i cant find many good games made in python. a few in pygames but not many
just trying to choose the right language
edit: sorry, many games really, i would love to make a roguelike, basically my dream. also an overhead rpg. nothing to complex, i dont want to r... | is python good for making games? | 0.099668 | 0 | 0 | 90,954 |
5,224,759 | 2011-03-07T20:17:00.000 | 1 | 0 | 1 | 0 | python | 5,261,445 | 6 | false | 0 | 1 | For the kind of games you want to make, Python is a perfectly suitable language. The only reason there are few games made in Python is because the professional game development industry nearly exclusively uses C++, which in turn due to a combination of performance concerns and reliance on legacy code. These aren't sign... | 2 | 21 | 0 | i hear people say python is just as good as c++ and java but i cant find many good games made in python. a few in pygames but not many
just trying to choose the right language
edit: sorry, many games really, i would love to make a roguelike, basically my dream. also an overhead rpg. nothing to complex, i dont want to r... | is python good for making games? | 0.033321 | 0 | 0 | 90,954 |
5,225,155 | 2011-03-07T20:56:00.000 | 0 | 0 | 0 | 0 | python,ruby,eclipse,netbeans,monodevelop | 5,225,427 | 1 | true | 1 | 0 | Tcl/tk has excellent unicode support, and a very workable message catalog library. It's also highly portable to all major platforms (and several not-so-major platforms). In addition, you have the option of packaging your whole app up as a platform-dependent runtime (tclkit) and platform-independent application file (st... | 1 | 0 | 0 | I am interested in developing a simple language learning (French, German, etc) desktop application to assist users in learning vocabulary by seeing and listening (via MP3 files) to words simultaneously.
I done some programming when I was younger and see this as a long term project to get back into programming by develo... | Cross Platform App with Localization | 1.2 | 0 | 0 | 176 |
5,225,780 | 2011-03-07T22:00:00.000 | 12 | 0 | 0 | 0 | python,postgresql,sqlalchemy | 5,331,129 | 2 | false | 0 | 0 | the warning means you did a table or metadata reflection, and it's reading in postgresql indexes that have some complex condition which the SQLAlchemy reflection code doesn't know what to do with. This is a harmless warning, as whether or not indexes are reflected doesn't affect the operation of the application, unle... | 1 | 35 | 0 | I'm using sqlalchemy with reflection, a couple of partial indices in my DB make it dump warnings like this:
SAWarning: Predicate of partial index i_some_index ignored during reflection
into my logs and keep cluttering. It does not hinder my application behavior. I would like to keep these warnings while developing, but... | Turn off a warning in sqlalchemy | 1 | 1 | 0 | 14,820 |
5,225,899 | 2011-03-07T22:12:00.000 | 0 | 0 | 0 | 1 | python,redis,celery,django-celery | 7,691,148 | 1 | false | 0 | 0 | The only reason that seems logical is that you exceed the memory that your redis-instance uses. So some messages are discarded ( with LRU policy (?) ). | 1 | 2 | 0 | I'm using Celery (2.2.4) with Redis (v.2.2.2) as my message broker.
Any idea what would cause SOME (most) messages to randomly and inconsistently get lost? | Celery/Redis some (many) messages getting dropped | 0 | 0 | 0 | 732 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.