Q_Id int64 2.93k 49.7M | CreationDate stringlengths 23 23 | Users Score int64 -10 437 | Other int64 0 1 | Python Basics and Environment int64 0 1 | System Administration and DevOps int64 0 1 | DISCREPANCY int64 0 1 | Tags stringlengths 6 90 | ERRORS int64 0 1 | A_Id int64 2.98k 72.5M | API_CHANGE int64 0 1 | AnswerCount int64 1 42 | REVIEW int64 0 1 | is_accepted bool 2
classes | Web Development int64 0 1 | GUI and Desktop Applications int64 0 1 | Answer stringlengths 15 5.1k | Available Count int64 1 17 | Q_Score int64 0 3.67k | Data Science and Machine Learning int64 0 1 | DOCUMENTATION int64 0 1 | Question stringlengths 25 6.53k | Title stringlengths 11 148 | CONCEPTUAL int64 0 1 | Score float64 -1 1.2 | API_USAGE int64 1 1 | Database and SQL int64 0 1 | Networking and APIs int64 0 1 | ViewCount int64 15 3.72M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8,779,159 | 2012-01-08T16:29:00.000 | 1 | 0 | 0 | 0 | 0 | php,python,facebook,api,facebook-graph-api | 0 | 8,781,271 | 0 | 1 | 0 | true | 1 | 0 | 1) Nope.
2) Yes, you can use the Graph API and HTTP Get me/feed?until={date} | 1 | 4 | 0 | 0 | So I was flicking through my Facebook Timeline, and started to look at some old posts I made in 2009~2010. And they're a bit stupid and I'd like to remove them or change the privacy settings on them.
There are too many to do it individually, so I've been looking at the Graph API. However, I have been unable to find an... | Changing privacy of old Facebook posts using the Graph API | 1 | 1.2 | 1 | 0 | 1 | 740 |
8,790,555 | 2012-01-09T15:12:00.000 | 1 | 0 | 0 | 1 | 0 | python,colors,hex,x11,rgb | 0 | 8,791,192 | 0 | 4 | 0 | false | 0 | 0 | You can't convert to x11 colors automatically.
x11 colors are basically just names mapped to arbitrary RGB values, so the only way to get from RGB to x11 is to reverse the map.
If you want to convert an RGB color that isn't in x11 to the closest match in x11 that would be pretty difficult. | 2 | 2 | 0 | 0 | I'm searching for a single function to convert RGB tuple (255, 255, 255) or HTML hex (#FFFFFF) to X11 color (0...255 int) to manage colors in Unix terminal. I've looked over the internet but I didn't find anything like that, so I'm asking for code or link to a website that contains code or information about how I can d... | Convert HTML HEX Color or RGB tuple to X11 color | 0 | 0.049958 | 1 | 0 | 0 | 2,309 |
8,790,555 | 2012-01-09T15:12:00.000 | 1 | 0 | 0 | 1 | 0 | python,colors,hex,x11,rgb | 0 | 8,791,219 | 0 | 4 | 0 | false | 0 | 0 | If I understand your question properly, I don't think you can do this. The RGB tuple (and its representation as a 6-digit hex number for HTML) represents a specific color in the RGB colorspace. The single integer in the range 0 to 255 you mention for the Unix terminal isn't a specific color, but rather an index into a ... | 2 | 2 | 0 | 0 | I'm searching for a single function to convert RGB tuple (255, 255, 255) or HTML hex (#FFFFFF) to X11 color (0...255 int) to manage colors in Unix terminal. I've looked over the internet but I didn't find anything like that, so I'm asking for code or link to a website that contains code or information about how I can d... | Convert HTML HEX Color or RGB tuple to X11 color | 0 | 0.049958 | 1 | 0 | 0 | 2,309 |
8,792,044 | 2012-01-09T16:50:00.000 | 13 | 0 | 1 | 1 | 0 | python,python-idle | 0 | 34,907,888 | 0 | 10 | 0 | false | 0 | 0 | One way to run IDLE from spotlight or an icon in the Applications folder is to build a quick Automation for it. As mentioned by other commentators, this probably isn't necessary for Python 3, as it creates a shortcut automatically, and some hand-installed versions have tools to do this automatically. But if you want t... | 6 | 46 | 0 | 0 | I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight. | how do I launch IDLE, the development environment for Python, on Mac OS 10.7? | 0 | 1 | 1 | 0 | 0 | 100,963 |
8,792,044 | 2012-01-09T16:50:00.000 | 2 | 0 | 1 | 1 | 0 | python,python-idle | 0 | 45,255,372 | 0 | 10 | 0 | false | 0 | 0 | first to launch the terminal CMD+space
second to input idle3
the idle will be activated automatically. | 6 | 46 | 0 | 0 | I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight. | how do I launch IDLE, the development environment for Python, on Mac OS 10.7? | 0 | 0.039979 | 1 | 0 | 0 | 100,963 |
8,792,044 | 2012-01-09T16:50:00.000 | 63 | 0 | 1 | 1 | 0 | python,python-idle | 0 | 8,792,311 | 0 | 10 | 0 | true | 0 | 0 | In the stock Mac OS X python installation, idle is found in /usr/bin, which is not (easily) accessible from Finder and not indexed by Spotlight. The quickest option is to open the Terminal utility and type 'idle' at the prompt. For a more Mac-like way of opening it, you'll have to create a small app or shortcut to laun... | 6 | 46 | 0 | 0 | I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight. | how do I launch IDLE, the development environment for Python, on Mac OS 10.7? | 0 | 1.2 | 1 | 0 | 0 | 100,963 |
8,792,044 | 2012-01-09T16:50:00.000 | 0 | 0 | 1 | 1 | 0 | python,python-idle | 0 | 32,878,774 | 0 | 10 | 0 | false | 0 | 0 | As to the earlier questions about starting IDLE: you can certainly start it from the command line. Also, if you installed Python using Homebrew, you can run 'brew linkapps' (from the command line); that will place an app for IDLE (among other things) in Launchpad (Applications folder). | 6 | 46 | 0 | 0 | I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight. | how do I launch IDLE, the development environment for Python, on Mac OS 10.7? | 0 | 0 | 1 | 0 | 0 | 100,963 |
8,792,044 | 2012-01-09T16:50:00.000 | 1 | 0 | 1 | 1 | 0 | python,python-idle | 0 | 32,877,359 | 0 | 10 | 0 | false | 0 | 0 | After you launch idle from the command line (make sure idle shell window has focus), click File, click "New File". A new window opens; this is your editor.
Type your program in the editor. Click "File", click "Save As...". Save your file somewhere with any name you choose, and a ".py" extension to the file name.
Click... | 6 | 46 | 0 | 0 | I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight. | how do I launch IDLE, the development environment for Python, on Mac OS 10.7? | 0 | 0.019997 | 1 | 0 | 0 | 100,963 |
8,792,044 | 2012-01-09T16:50:00.000 | 1 | 0 | 1 | 1 | 0 | python,python-idle | 0 | 35,586,250 | 0 | 10 | 0 | false | 0 | 0 | The answer of Matthewm1970 works like a charm!
And if you add an & to your shell command, the automation script will end immediately. There is no spinning gear. Like so:
/usr/local/bin/idle3.5&
Note the ampersand.
Cheers.
-melle | 6 | 46 | 0 | 0 | I am running python 2.7.1. I can't figure out how to launch the IDLE IDE. I am told it comes already installed with python, but I can't find it using spotlight. | how do I launch IDLE, the development environment for Python, on Mac OS 10.7? | 0 | 0.019997 | 1 | 0 | 0 | 100,963 |
8,793,702 | 2012-01-09T19:02:00.000 | 2 | 0 | 1 | 0 | 0 | python,icr | 0 | 8,793,854 | 0 | 3 | 0 | false | 0 | 0 | I don't really see what this has to do with python, unless of course you've already digitized the results and are now looking to tally up the results. It sounds like you still need to scan the results in and as far as I know, python doesn't have any direct capabilities of doing something like that. You're going to have... | 1 | 3 | 0 | 0 | I am interested in doing some snail mail based surveys but I am looking for quick ways to digitize the surveys they send back.
So if I had a question and 5 boxes beneath it where you would indicate your opinion by checking the appropriate box, does anything exist where I could scan it and run it through a piece of soft... | any Python tools for reading Scantron-style data | 1 | 0.132549 | 1 | 0 | 0 | 2,785 |
8,793,877 | 2012-01-09T19:17:00.000 | 1 | 0 | 1 | 0 | 0 | python,django,virtualenv,pip | 0 | 43,931,969 | 0 | 5 | 0 | false | 0 | 0 | seems like we can't just copy one virtualenv as another one.
even you chnage the $VIRTUAL_ENV in the activate file, it still act as in origin virtualenv and pip will install all the packages to origin site-packages/ | 3 | 34 | 0 | 0 | Is it possibe to copy python modules from one virtualenv to another.If so how is this done? | how to copy modules from one virtualenv to another | 0 | 0.039979 | 1 | 0 | 0 | 31,912 |
8,793,877 | 2012-01-09T19:17:00.000 | 0 | 0 | 1 | 0 | 0 | python,django,virtualenv,pip | 0 | 69,423,767 | 0 | 5 | 0 | false | 0 | 0 | I was facing a problem installing 'wordcloud' on another Python venv on Windows 10. Package was installed on another project, same machine.
copy "wordcloud" and "wordcloud-1.8.1.dist-info" folders from Users/<user>/PycharmProjects/<projectname>/venv/Lib/site-packages and paste to your new project /<projectname>/venv/Li... | 3 | 34 | 0 | 0 | Is it possibe to copy python modules from one virtualenv to another.If so how is this done? | how to copy modules from one virtualenv to another | 0 | 0 | 1 | 0 | 0 | 31,912 |
8,793,877 | 2012-01-09T19:17:00.000 | 1 | 0 | 1 | 0 | 0 | python,django,virtualenv,pip | 0 | 8,794,087 | 0 | 5 | 0 | false | 0 | 0 | Usually you are able to copy the .egg-info from the lib/site-packages folder of the virtualenv to the lib/site-packages of the other environment. | 3 | 34 | 0 | 0 | Is it possibe to copy python modules from one virtualenv to another.If so how is this done? | how to copy modules from one virtualenv to another | 0 | 0.039979 | 1 | 0 | 0 | 31,912 |
8,796,565 | 2012-01-09T23:18:00.000 | 2 | 0 | 1 | 0 | 0 | python,types | 0 | 8,796,638 | 0 | 2 | 0 | false | 0 | 0 | Python is dynamic and strongly typed programming language. What that means is that you can define a variable without explicitly stating its type, but when you first use that variable it becomes bound to a certain type.
For example,
x = 5 is an integer, and so now you cannot concatenate it with string, e.g. x+"hello" | 1 | 1 | 0 | 0 | Using Haskell's type system I know that at some point in the program, a variable must contain say an Int of a list of strings. For code that compiles, the type checker offers certain guarantees that for instance I'm not trying to add an Int and a String.
Are there any tools to provide similar guarantees for Python code... | When coding in Python, how do I achieve guarantees of correctness similar to those I get with Haskell's type system? | 0 | 0.197375 | 1 | 0 | 0 | 497 |
8,796,800 | 2012-01-09T23:46:00.000 | 14 | 1 | 1 | 0 | 0 | python,serial-port,pyserial | 0 | 8,808,218 | 0 | 3 | 0 | true | 0 | 0 | I have done this with pyserial. Reading from one thread and writing from another should not cause problems in general, since there isn't really any kind of resource arbitration problem. Serial ports are full duplex, so reading and writing can happen completely independently and at the same time. | 3 | 10 | 0 | 0 | I tried googling this, couldn't find an answer, searched here, couldn't find an answer. Has anyone looked into whether it's thread safe to write to a Serial() object (pyserial) from thread a and do blocking reads from thread b?
I know how to use thread synchronization primitives and thread-safe data structures, and in... | pyserial - possible to write to serial port from thread a, do blocking reads from thread b? | 0 | 1.2 | 1 | 0 | 0 | 10,755 |
8,796,800 | 2012-01-09T23:46:00.000 | 0 | 1 | 1 | 0 | 0 | python,serial-port,pyserial | 0 | 14,660,364 | 0 | 3 | 0 | false | 0 | 0 | I would recommend to modify Thread B from "blocking read" to "non blocking read/write". Thread B would become your serial port "Daemon".
Thread A could run at full speed for a friendly user interface or perform any real time operation.
Thread A would write a message to Thread B instead of trying to write directly to th... | 3 | 10 | 0 | 0 | I tried googling this, couldn't find an answer, searched here, couldn't find an answer. Has anyone looked into whether it's thread safe to write to a Serial() object (pyserial) from thread a and do blocking reads from thread b?
I know how to use thread synchronization primitives and thread-safe data structures, and in... | pyserial - possible to write to serial port from thread a, do blocking reads from thread b? | 0 | 0 | 1 | 0 | 0 | 10,755 |
8,796,800 | 2012-01-09T23:46:00.000 | 4 | 1 | 1 | 0 | 0 | python,serial-port,pyserial | 0 | 8,814,172 | 0 | 3 | 0 | false | 0 | 0 | I've used pyserial in this way on Linux (and Windows), no problems ! | 3 | 10 | 0 | 0 | I tried googling this, couldn't find an answer, searched here, couldn't find an answer. Has anyone looked into whether it's thread safe to write to a Serial() object (pyserial) from thread a and do blocking reads from thread b?
I know how to use thread synchronization primitives and thread-safe data structures, and in... | pyserial - possible to write to serial port from thread a, do blocking reads from thread b? | 0 | 0.26052 | 1 | 0 | 0 | 10,755 |
8,808,476 | 2012-01-10T18:27:00.000 | 1 | 1 | 0 | 0 | 0 | python,thrift | 0 | 8,826,673 | 0 | 2 | 1 | false | 0 | 0 | I've read that you can deploy it behind nginx using the upstream module to point to the thrift server. You should have at least one CPU core per thrift server and one left for the system (i.e. if you're on a quad-core, you should only run 3 thrift servers, leaving one left over for the system). | 2 | 5 | 0 | 0 | There is probably a nice document that will help me. Please point to it.
If I write a Thrift server using Python what is the best way to deploy it in a production environment? All I can find is examples of using the Python based servers that come with the distribution. How can I use Apache as the server platform for... | how to deploy a hardened Thrift server for python? | 0 | 0.099668 | 1 | 0 | 0 | 1,005 |
8,808,476 | 2012-01-10T18:27:00.000 | 1 | 1 | 0 | 0 | 0 | python,thrift | 0 | 17,220,313 | 0 | 2 | 1 | false | 0 | 0 | I assume that you are using the Python THttpServer? A couple of notes:
1) There is a comment in that code that reads
"""
This class is not very performant, but it is useful (for example) for
acting as a mock version of an Apache-based PHP Thrift endpoint.
"""
I wouldn't recommend that you use it in production if you ... | 2 | 5 | 0 | 0 | There is probably a nice document that will help me. Please point to it.
If I write a Thrift server using Python what is the best way to deploy it in a production environment? All I can find is examples of using the Python based servers that come with the distribution. How can I use Apache as the server platform for... | how to deploy a hardened Thrift server for python? | 0 | 0.099668 | 1 | 0 | 0 | 1,005 |
8,823,830 | 2012-01-11T17:29:00.000 | 0 | 0 | 1 | 0 | 0 | ipython | 0 | 8,825,937 | 0 | 1 | 0 | true | 0 | 0 | Unfortunately, it may not be possible to free memory effectively in the Controller in IPython 0.10, but the MultiEngineClient.clear_pending_results() method may help.
The controller in 0.11-0.12 can use a database (sqlite or mongodb) to store results, and has been seen to run for a long time, with gigabytes of throughp... | 1 | 0 | 0 | 0 | I am using IPython 0.10.2 and Python 2.7 right now. I start one ipcontroller and 20 ipengines on my cluster. The code structure is very simple. I just use MultiEngineClient.execute() methods and MultiEngineClient dictionary interface (e.g., mec['a'] = b) . My current application needs to run nearly two days. However, a... | Huge memory usage by ipcontroller | 0 | 1.2 | 1 | 0 | 0 | 345 |
8,823,924 | 2012-01-11T17:36:00.000 | 4 | 0 | 0 | 0 | 0 | python,emacs,docstring,pep8,autoformatting | 0 | 8,827,727 | 0 | 4 | 0 | false | 0 | 0 | I don't know how to do that, but I've never felt the need. It is so easy to use C-x f to change the fill column. And you can just hit M-p to reuse the last value you entered. Just C-x f M-p --- 3 keystrokes. | 1 | 14 | 0 | 0 | I would like to have auto-fill set to 79 columns for code sections and 72 for docstrings to get automatic PEP8 compliance. There seems to be an option to do this for Lisp mode (emacs-lisp-docstring-fill-column) but not for Python.
Is there an enhanced python-mode.el around somewhere that includes this? | In emacs Python mode, how do I set a different auto-fill width for docstrings and code? | 1 | 0.197375 | 1 | 0 | 0 | 2,249 |
8,826,688 | 2012-01-11T21:11:00.000 | 2 | 0 | 0 | 0 | 0 | python,pyqt,pyqt4,editing,qtablewidget | 0 | 8,948,046 | 0 | 2 | 0 | false | 0 | 1 | You can also use setCurrentCell.
table.setCurrentCell(0,1)
QTableWidget.setCurrentCell (self, int row, int column) | 1 | 2 | 0 | 0 | Two part question:
I have a 10x10 QTableWidget with QTableWidgetItem in each cell.
For some reason, clicking on a cell is not sufficient to edit it, I need to double-click the cell to enter it.
Is there a way to change this behavior to single click
Is there a way to have 2nd cell in 1st row selected and ready for ed... | QTableWidget how to have a cell selected for editing from code and/or with single click | 0 | 0.197375 | 1 | 0 | 0 | 3,799 |
8,827,703 | 2012-01-11T22:33:00.000 | 7 | 0 | 1 | 0 | 0 | python,algorithm,theory | 0 | 8,827,797 | 0 | 4 | 0 | true | 0 | 0 | It is proven for rock-paper-scissors that a random bot will be at the median of each rank.
Therefore, I'd create a set of bots, each calculating one heuristic and running on the background on parallel. For each turn, each bot will virtually "draw" and check if he had won or lost - if it would have played this turn. Eac... | 2 | 10 | 0 | 0 | In my school our teacher is holding a Rock, paper, scissors bot competition. I know how to program in Python, but I have no idea how to program a bot that would have a bigger chance of success than one that randomly selects its weapons. I think it is possible to store all previous moves and then look for patterns in or... | Rock paper Scissors bot algorithm | 1 | 1.2 | 1 | 0 | 0 | 6,603 |
8,827,703 | 2012-01-11T22:33:00.000 | 0 | 0 | 1 | 0 | 0 | python,algorithm,theory | 0 | 8,827,880 | 0 | 4 | 0 | false | 0 | 0 | Where might be some potential profit in trying to figure out the strategies of the other bots, for instance, if it's a forced participation, there will be some lazy student who makes up a bot that would always throw up scissors.
I propose another strategy (I've heard about it on some similar competition, but can't trac... | 2 | 10 | 0 | 0 | In my school our teacher is holding a Rock, paper, scissors bot competition. I know how to program in Python, but I have no idea how to program a bot that would have a bigger chance of success than one that randomly selects its weapons. I think it is possible to store all previous moves and then look for patterns in or... | Rock paper Scissors bot algorithm | 1 | 0 | 1 | 0 | 0 | 6,603 |
8,840,127 | 2012-01-12T18:15:00.000 | 0 | 0 | 0 | 0 | 0 | python,opencv,face-detection,simplecv | 0 | 33,917,789 | 0 | 2 | 0 | false | 0 | 0 | The color segementation involves "gradient of the difference between the pseudo-hue and luminance (obtaining hybrid contours)". Try googling for qouted string and you will find multiple research papers on this topic. | 1 | 5 | 1 | 0 | How do people usually extract the shape of the lips once the mouth region is found (in my case using haar cascade)? I tried color segmentation and edge/corner detection but they're very inaccurate for me. I need to find the two corners and the very upper and lower lip at the center. I've heard things about active appea... | OpenCV Lip Segmentation | 0 | 0 | 1 | 0 | 0 | 4,301 |
8,845,456 | 2012-01-13T03:15:00.000 | 2 | 0 | 1 | 0 | 0 | python,elementtree | 0 | 8,848,549 | 0 | 3 | 0 | true | 0 | 0 | You can't replace an element from the ElementTree you can only work with Element.
Even when you call ElementTree.find() it's just a shortcut for getroot().find().
So you really need to:
extract the parent element
use comprehension (or whatever you like) on that parent element
The extraction of the parent element can ... | 1 | 6 | 0 | 0 | I want to replace child elements from one tree to another , based on some criteria. I can do this using Comprehension ? But how do we replace element in ElementTree? | How can i do replace a child element(s) in ElementTree | 0 | 1.2 | 1 | 0 | 1 | 6,654 |
8,858,306 | 2012-01-13T22:47:00.000 | 0 | 1 | 0 | 0 | 0 | python,hp-quality-center | 0 | 13,123,269 | 0 | 1 | 0 | false | 0 | 0 | Can you post the default script here ? Iam not sure why you cant edit it ? You can edit the script as you want.
There are 2 ways you can run the QC script one using VAPI-XP-TEST as you are doing , in that case you can use tdhelper object for updating the results.
Second is OTA-API which you can use python script exte... | 1 | 0 | 0 | 0 | I have a simple need with Quality Center 10
If you noticed in Quality Center Client on IE 8 -> Test Plan. If you create a new Testcase with Test Type = 'VAPI-XP-TEST', it will ask you for Script Language and Script Name. I have selected Script Language to be Python. Once you have gone through this process of creating a... | Quality Center VAPI-XP-TEST - Modify Default Python Script | 0 | 0 | 1 | 0 | 0 | 2,376 |
8,858,946 | 2012-01-14T00:11:00.000 | 0 | 0 | 0 | 0 | 0 | python | 0 | 8,858,983 | 0 | 4 | 0 | false | 0 | 0 | str.split() without any arguments will split by any length of whitespace. operator.itemgetter() takes multiple arguments, and will return a tuple. | 1 | 5 | 1 | 0 | I have a text file containing tabular data. What I need to do is automate the task of writing to a new text file that is comma delimited instead of space delimited, extract a few columns from existing data, reorder the columns.
This is a snippet of the first 4 lines of the original data:
Number of rows: 8542
Algor... | converting a space delimited file to a CSV | 0 | 0 | 1 | 0 | 0 | 18,146 |
8,859,532 | 2012-01-14T01:57:00.000 | 4 | 1 | 0 | 0 | 0 | python,mongodb,heroku,mlab | 0 | 8,859,701 | 0 | 5 | 0 | false | 1 | 0 | Get the connection string settings by running heroku config on the command line after installed the add-on to your heroku app.
There will be an entry with the key MONGOLAB_URI in this form:
MONGOLAB_URI => mongodb://user:pass@xxx.mongolab.com:27707/db
Simply the info from the uri in python by creating a connection from... | 1 | 3 | 0 | 0 | The documentation only talks about how to do it from ruby. | How can I use the mongolab add-on to Heroku from python? | 0 | 0.158649 | 1 | 0 | 0 | 6,640 |
8,864,599 | 2012-01-14T19:03:00.000 | 0 | 0 | 0 | 0 | 0 | python,netcdf | 0 | 9,473,690 | 0 | 7 | 0 | false | 0 | 0 | IDV is a good visualization tool for NetCDF, but, as far as I know, there is no command line interface.
I would recommend Matlab. It has read and write functions for NetCDF as well as an extensive plotting library...probably one of the best. You can then compile the matlab code and run it from the command line. | 1 | 6 | 1 | 0 | I have a netcdf file that I would like to convert to an image (joed, png, gif) using a command line tool.
Is someone could please help me with the library name and possibly a link to how it is done.
Regards
David | Convert netcdf to image | 0 | 0 | 1 | 0 | 0 | 8,951 |
8,873,219 | 2012-01-15T20:43:00.000 | 3 | 0 | 0 | 0 | 0 | python,image,pygame | 0 | 8,873,270 | 0 | 4 | 0 | false | 0 | 1 | After using blit or any other update on your drawing surface, you have to call pygame.display.flip() to actually update what is displayed. | 1 | 16 | 0 | 0 | I would like to know how to draw images using pygame. I know how to load them.
I have made a blank window.
When I use screen.blit(blank, (10,10)), it does not draw the image and instead leaves the screen blank. | What is a good way to draw images using pygame? | 1 | 0.148885 | 1 | 0 | 0 | 36,330 |
8,878,210 | 2012-01-16T09:50:00.000 | 1 | 0 | 1 | 0 | 0 | python,virtualenv,pip | 1 | 10,285,156 | 1 | 1 | 0 | true | 0 | 0 | pip install package will only be executed with you don't have this package already.
With you want to upgrade the package you'll have to use: pip install -U package | 1 | 0 | 0 | 0 | As part of a deployment procedure, I upload Python source packages (generated with setup.py sdist) to a remote server and install them in a virtualenv using pip install mypackage-1.0.tar.bz2.
This has worked for long time both for new installs and upgrades (specifically, upgrades without a change in the package's versi... | Python package won't upgrade | 1 | 1.2 | 1 | 0 | 0 | 227 |
8,879,102 | 2012-01-16T11:04:00.000 | 0 | 1 | 0 | 0 | 0 | python,git,aptana | 0 | 8,897,929 | 0 | 1 | 0 | false | 0 | 0 | i suggest you to click on:
HELP -> About Aptana
then: Installation Details (button on the bottom left)
in the new window you can remove software, or revert some installation/configuration with with the "installation history" section.
Hope this help you | 1 | 0 | 0 | 0 | I've been happily using Aptana for a PHP project. As of yesterday evening, it's been crashing repeatedly and causing no end of grief!
I can pinpoint two events which may have caused this:
Yesterday evening I seem to have hit a combination of keyboard keys which has resulted in 'Python not configured' appearing at the ... | Aptana has started crashing - possibly due to Python or Git | 0 | 0 | 1 | 0 | 0 | 308 |
8,888,567 | 2012-01-17T01:19:00.000 | 51 | 0 | 1 | 0 | 0 | python,regex | 0 | 8,888,615 | 0 | 4 | 0 | true | 0 | 0 | You can use the built in functions any (or all if all regexes have to match) and a Generator expression to cycle through all the regex objects.
any (regex.match(line) for regex in [regex1, regex2, regex3])
(or any(re.match(regex_str, line) for regex in [regex_str1, regex_str2, regex_str2]) if the regexes are not pre-co... | 2 | 28 | 0 | 0 | Is there a way to see if a line contains words that matches a set of regex pattern?
If I have [regex1, regex2, regex3], and I want to see if a line matches any of those, how would I do this?
Right now, I am using re.findall(regex1, line), but it only matches 1 regex at a time. | Match a line with multiple regex using Python | 0 | 1.2 | 1 | 0 | 0 | 55,780 |
8,888,567 | 2012-01-17T01:19:00.000 | 7 | 0 | 1 | 0 | 0 | python,regex | 0 | 8,888,619 | 0 | 4 | 0 | false | 0 | 0 | Try this new regex: (regex1)|(regex2)|(regex3). This will match a line with any of the 3 regexs in it. | 2 | 28 | 0 | 0 | Is there a way to see if a line contains words that matches a set of regex pattern?
If I have [regex1, regex2, regex3], and I want to see if a line matches any of those, how would I do this?
Right now, I am using re.findall(regex1, line), but it only matches 1 regex at a time. | Match a line with multiple regex using Python | 0 | 1 | 1 | 0 | 0 | 55,780 |
8,906,265 | 2012-01-18T06:48:00.000 | 1 | 0 | 1 | 0 | 0 | python,design-patterns | 0 | 8,908,454 | 0 | 2 | 0 | true | 0 | 0 | I have used the "global collection" alternative in the past.
If you are concerned with naming: how would you handle this in your config file? The way I see it, your global collection is a datastructure representing the same information you have in your config file, so if you have a way of resolving or avoiding name cl... | 1 | 0 | 0 | 0 | I have objects from various classes that work together to perform a certain task. The task requires a lot of parameters, provided by the user (through a configuration file). The parameters are used deep inside the system.
I have a choice of having the controller object read the configuration file, and then allocate the... | how to make a lot of parameters available to the entire system? | 0 | 1.2 | 1 | 0 | 0 | 83 |
8,909,342 | 2012-01-18T11:29:00.000 | 0 | 0 | 0 | 0 | 0 | python,xlrd | 0 | 43,124,531 | 0 | 4 | 0 | false | 0 | 0 | The correct answer to this is to simply use the Cell.value function. This will return a number or a Unicode string depending on what the cell contains. | 1 | 9 | 0 | 0 | Well i have a question that i feel i've been answered several times, from what i found here. However, as a newbie, i can't really understand how to perform a really basic operation.
Here's the thing :
i have an .xls and when i use xlrd to get a value i'm just using
sh.cell(0,0) (assuming that sh is my sheet);
if what... | Python xlrd : how to convert an extracted value? | 0 | 0 | 1 | 1 | 0 | 27,320 |
8,912,327 | 2012-01-18T15:03:00.000 | 1 | 0 | 1 | 0 | 0 | python,user-interface | 0 | 8,913,722 | 0 | 10 | 0 | false | 0 | 1 | If you're more into gaming you can use PyGame for GUIs. | 2 | 23 | 0 | 1 | I was wondering if any of you know where I could find a simple tutorial on the web maybe to make a very simplistic gui. I have no idea how to start out in code to make one so I need your help. What I want the gui to be used for is I have written a program that I want to be to use it on other computers that already don'... | How to make a gui in python | 0 | 0.019997 | 1 | 0 | 0 | 104,449 |
8,912,327 | 2012-01-18T15:03:00.000 | 0 | 0 | 1 | 0 | 0 | python,user-interface | 0 | 8,912,460 | 0 | 10 | 0 | false | 0 | 1 | While some suggestions have included tkinter and wxPython, the other part of the answer to your question is that you will also need to package it using something like py2app, pyinstaller, or py2exe (depending on the operating system). You mentioned the other machines do not have python, so this would be required in ord... | 2 | 23 | 0 | 1 | I was wondering if any of you know where I could find a simple tutorial on the web maybe to make a very simplistic gui. I have no idea how to start out in code to make one so I need your help. What I want the gui to be used for is I have written a program that I want to be to use it on other computers that already don'... | How to make a gui in python | 0 | 0 | 1 | 0 | 0 | 104,449 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 71,692,901 | 0 | 34 | 0 | false | 0 | 0 | if .\venv\Scripts\activate does not work neither and you find this error
\Activate.ps1 cannot be loaded because running scripts is disabled on this system
you can simple type set-executionpolicy remotesigned in powershell and the error must be gone.
powershell should run as administrator | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 4 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 62,498,657 | 0 | 34 | 0 | false | 0 | 0 | Open your powershell as admin
Enter "Set-ExecutionPolicy RemoteSigned -Force
Run "gpedit.msc" and go to >Administrative Templates>Windows Components>Windows Powershell
Look for "Activate scripts execution" and set it on "Activated"
Set execution directive to "Allow All"
Apply
Refresh your env | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0.023525 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 65,636,990 | 0 | 34 | 0 | false | 0 | 0 | If you are using windows, just run .\Scripts\activate. Mind that the backslash plays the trick! | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | -1 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 71,559,922 | 0 | 34 | 0 | false | 0 | 0 | Some people are having trouble with vscode i assume as all the above methods dont work.
Its simply because by default vscode uses powershell not cmd...
click on the little arrow beside it and select cmd and run the command. | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | -0.005882 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 1 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 71,215,993 | 0 | 34 | 0 | false | 0 | 0 | The steps for activating virtualenv using Python3 on windows are:
python3 -m venv env
.\env\bin\activate | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0.005882 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 60,413,441 | 0 | 34 | 0 | false | 0 | 0 | Open your project using VS code editor .
Change the default shell in vs code terminal to git bash.
now your project is open with bash console and right path, put
"source venv\Scripts\activate" in Windows | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 2 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 67,224,356 | 0 | 34 | 0 | false | 0 | 0 | For windows Microsoft Tech Support it might be a problem with Execution Policy Settings. To fix it, you should try executing
Set-ExecutionPolicy Unrestricted -Scope Process | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0.011764 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 71,382,806 | 0 | 34 | 0 | false | 0 | 0 | It's been a while without usign Django, so when I got back to my old project I run into the same issue on Windows 10
and this worked for me:
venv/Scripts/activate | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 71,376,740 | 0 | 34 | 0 | false | 0 | 0 | Use These it worked for meenv\Scripts\activate | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 59,298,771 | 0 | 34 | 0 | false | 0 | 0 | If you are using windows OS then in Gitbash terminal use the following command $source venv/Scripts/activate. This will help you to enter the virtual environment. | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 21 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 47,483,536 | 0 | 34 | 0 | false | 0 | 0 | For activation you can go to the venv your virtualenv directory
by cd venv.
Then on Windows, type dir (on unix, type ls).
You will get 5 folders include, Lib, Scripts, tcl and 60
Now type .\Scripts\activate to activate your virtualenv venv.
Your prompt will change to indicate that you are now operating within the vi... | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 1 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 61,607,988 | 0 | 34 | 0 | false | 0 | 0 | Navigate to your virtualenv folder eg ..\project1_env>
Then type
source scripts/activate
eg ..\project1_env>source scripts/activate | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 61,962,316 | 0 | 34 | 0 | false | 0 | 0 | If some beginner, like me, has followed multiple Python tutorials now possible has multiple Python versions and/or multiple versions of pip/virtualenv/pipenv...
In that case, answers listed, while many correct, might not help.
The first thing I would try in your place is uninstall and reinstall Python and go from the... | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 2 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 25,353,183 | 0 | 34 | 0 | false | 0 | 0 | I have a hell of a time using virtualenv on windows with git bash, I usually end up specifying the python binary explicitly.
If my environment is in say .env I'll call python via ./.env/Scripts/python.exe …, or in a shebang line #!./.env/Scripts/python.exe;
Both assuming your working directory contains your virtualen... | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0.011764 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 2 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 48,840,058 | 0 | 34 | 0 | false | 0 | 0 | You can run the source command on cygwin terminal | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0.011764 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 1 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 53,059,234 | 0 | 34 | 0 | false | 0 | 0 | If you see the 5 folders (Include,Lib,Scripts,tcl,pip-selfcheck) after using the virtualenv yourenvname command, change directory to Scripts folder in the cmd itself and simply use "activate" command. | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0.005882 | 1 | 0 | 0 | 352,338 |
8,921,188 | 2012-01-19T04:54:00.000 | 0 | 0 | 1 | 1 | 0 | python,virtualenv | 0 | 58,090,444 | 0 | 34 | 0 | false | 0 | 0 | If you’re using Windows, use the command "venv\Scripts\activate" (without the word source) to activate the virtual environment. If you’re using PowerShell, you might need to capitalize Activate. | 17 | 190 | 0 | 0 | I created a virtualenv around my project, but when I try to activate it I cannot.
It might just be syntax or folder location, but I am stumped right now.
You can see below, I create the virtualenv and call it venv. Everything looks good, then I try to activate it by running source venv/bin/activate
I'm thinking it migh... | Issue with virtualenv - cannot activate | 0 | 0 | 1 | 0 | 0 | 352,338 |
8,935,191 | 2012-01-20T00:08:00.000 | 1 | 0 | 0 | 0 | 0 | python,security,amazon-s3 | 0 | 8,935,272 | 0 | 3 | 0 | false | 0 | 0 | Even though version 4 UUIDs are supposed to incorporate random data, I wouldn't want to rely on the fact that the RNG used by Python's uuid.uuid4() being securely random. The Python docs make no mention about the quality of the randomness, so I'd be afraid that you might end up with guessable UUID's.
I'm not a crypto e... | 1 | 1 | 0 | 0 | I need to provide individuals with their financial statement, and I am using S3. So far what I am doing is making the file public-read and creating a unique Key, using uuid.uuid4().
Would this be acceptable, or how else could I make this more secure? Sending authentication keys for each individual is not an option. | Sending 'secure' financial statements on S3 | 0 | 0.066568 | 1 | 1 | 0 | 260 |
8,953,991 | 2012-01-21T15:03:00.000 | 2 | 0 | 0 | 0 | 0 | python,matrix,numerical-methods | 0 | 8,954,018 | 0 | 3 | 0 | true | 0 | 0 | scipy and numpy is the obvious way to go here.
Note that numpy uses the famous (and well-optimized) BLAS libraries, so it is also very fast. Much faster than any "pure python" will ever be. | 2 | 0 | 1 | 1 | I know how to implement least-squares with elementary matrix decomposition and other operations, but how can I do it in Python? (I've never tried to use matrices in Python)
(clarification edit to satisfy the shoot-first-and-ask-questions-later -1'er)
I was looking for help to find out how to use numerical programming ... | python: least-squares estimation? | 0 | 1.2 | 1 | 0 | 0 | 819 |
8,953,991 | 2012-01-21T15:03:00.000 | 1 | 0 | 0 | 0 | 0 | python,matrix,numerical-methods | 0 | 8,954,011 | 0 | 3 | 0 | false | 0 | 0 | Have a look at SciPy. It's got matrix operations. | 2 | 0 | 1 | 1 | I know how to implement least-squares with elementary matrix decomposition and other operations, but how can I do it in Python? (I've never tried to use matrices in Python)
(clarification edit to satisfy the shoot-first-and-ask-questions-later -1'er)
I was looking for help to find out how to use numerical programming ... | python: least-squares estimation? | 0 | 0.066568 | 1 | 0 | 0 | 819 |
8,963,987 | 2012-01-22T19:31:00.000 | 1 | 0 | 0 | 0 | 0 | python,dijkstra,path-finding,a-star | 0 | 8,964,029 | 0 | 2 | 0 | true | 0 | 0 | You could suppose that the zombies can see everything within a particular range (radius or perhaps be more clever) and then have the human look for a spot that he thinks the zombies can't see. Pick the closest spot the zombie can't see and use the A* algorithm to find a path if one exists, else try a different one. Loo... | 2 | 0 | 0 | 0 | I'm developing a small game in python. I am using a 2D rectangular grid. I know that for pathfinding I can use A* and the likes, I know how this works, but the problem I have is a bit different.
Let's say we have a computer controlled human and some computer controlled zombies. When the human spots a zombie, it should ... | Get away from an object in a 2D-grid | 0 | 1.2 | 1 | 0 | 0 | 239 |
8,963,987 | 2012-01-22T19:31:00.000 | 0 | 0 | 0 | 0 | 0 | python,dijkstra,path-finding,a-star | 0 | 8,964,083 | 0 | 2 | 0 | false | 0 | 0 | Just off the top of my head, you'll probably be able to do some vector math and have the human run in the normal vector to the zombies.
I don't know how well this will work (or how it will scale to the number of zombies you have), but you could do something like:
For each zombie, compute the distance to the human and... | 2 | 0 | 0 | 0 | I'm developing a small game in python. I am using a 2D rectangular grid. I know that for pathfinding I can use A* and the likes, I know how this works, but the problem I have is a bit different.
Let's say we have a computer controlled human and some computer controlled zombies. When the human spots a zombie, it should ... | Get away from an object in a 2D-grid | 0 | 0 | 1 | 0 | 0 | 239 |
8,968,884 | 2012-01-23T08:35:00.000 | 0 | 0 | 1 | 0 | 0 | python,serialization,pickle | 0 | 55,150,034 | 0 | 4 | 0 | false | 0 | 0 | I find it to be particularly useful with large and complex custom classes. In a particular example I'm thinking of, "Gathering" the information (from a database) to create the class was already half the battle. Then that information stored in the class might be altered at runtime by the user.
You could have another gro... | 1 | 98 | 0 | 0 | I understood that Python pickling is a way to 'store' a Python Object in a way that does respect Object programming - different from an output written in txt file or DB.
Do you have more details or references on the following points:
where are pickled objects 'stored'?
why is pickling preserving object representation... | Python serialization - Why pickle? | 1 | 0 | 1 | 0 | 0 | 53,631 |
8,970,713 | 2012-01-23T11:12:00.000 | 3 | 0 | 0 | 0 | 0 | python,http,wsgi,webob | 0 | 8,975,702 | 0 | 2 | 1 | true | 1 | 0 | It would depend on your front-end server. If it has any configuration to block big request even before it goes into your app, use it.
If you want to block this with your code I see two approaches:
Look ate the Content-Length HTTP Header. If it's bigger than you can handle, deny the request right away.
Don't trust the ... | 1 | 5 | 0 | 0 | I'm trying to get an understanding of the best way of handling file uploads safely in a wsgi app. It seems a lot of solutions involve using FieldStorage from the cgi module to parse form data. From what I understand about FieldStorage it performs a bit of 'magic' behind the scenes by streaming data into a tempfile.
Wha... | How do you restrict large file uploads in wsgi? | 0 | 1.2 | 1 | 0 | 0 | 1,729 |
8,971,115 | 2012-01-23T11:47:00.000 | 2 | 1 | 0 | 0 | 0 | python,session,authorization,pyramid | 0 | 8,973,728 | 0 | 1 | 0 | true | 1 | 0 | If you've figured out how to do this for authenticated users, it should be obvious how to do it for anonymous users as well. They will have the pyramid.security.Everyone principal, which you can use in your ACLs to assign various permissions.
Route factories will allow you to assign custom ACLs to individual routes. Th... | 1 | 0 | 0 | 0 | I'm setting up a pyramid application where access to ressources can be shared across registered users.
I would also like to give access to non-members, using non-trivial links to files or directories.
While I see how to do this for registered members, I'm not sure how to do this with anonymous users. Do I need to crea... | url-enabled access to ressources with pyramid | 0 | 1.2 | 1 | 0 | 0 | 88 |
8,989,328 | 2012-01-24T15:22:00.000 | 0 | 0 | 1 | 1 | 0 | python,ctypes | 0 | 8,989,530 | 0 | 2 | 0 | false | 0 | 1 | CPython doesn't contain C++ code and thus there is no requirement with regards to the C++ compiler used to compile a C++ library loaded into a CPython process. However, the C layer and the C++ library must generally be compiled with the same C++ compiler. And if the C++ library or the C layer link against libpython, ... | 2 | 2 | 0 | 0 | I'm running into some really weird problems with ctypes. I'm using ctypes to interface to a C++ library that has a C interface. The library has lots of parallel functionality. More often than not, the parallel calls tend to end up with a segfault from the C++ layer, but I've run into them with some serial code too. ... | ctypes - does python need to be compiled with same version as C library? | 0 | 0 | 1 | 0 | 0 | 337 |
8,989,328 | 2012-01-24T15:22:00.000 | 4 | 0 | 1 | 1 | 0 | python,ctypes | 0 | 8,989,579 | 0 | 2 | 0 | true | 0 | 1 | There's no requirement at all that the native library that you call with ctypes has to be built with a matching runtime. In fact there's not even a requirement that the native library even uses a C runtime.
For example you can use ctypes to call code written in other languages, e.g. Delphi. Or you can use ctypes to cal... | 2 | 2 | 0 | 0 | I'm running into some really weird problems with ctypes. I'm using ctypes to interface to a C++ library that has a C interface. The library has lots of parallel functionality. More often than not, the parallel calls tend to end up with a segfault from the C++ layer, but I've run into them with some serial code too. ... | ctypes - does python need to be compiled with same version as C library? | 0 | 1.2 | 1 | 0 | 0 | 337 |
8,999,047 | 2012-01-25T07:16:00.000 | 0 | 0 | 0 | 0 | 0 | python,arcmap | 0 | 10,212,782 | 0 | 2 | 0 | false | 0 | 0 | Saving the output in a file geodatabase (which is probably what your default output location is) will create a feature class, which by default adds the shape_length and shape_area columns. Saving the output into a regular folder will create a shapefile, which does not create these fields by default. If your python sc... | 1 | 0 | 0 | 0 | I just encounter a little bug, maybe someone can help me.
I'm creating Thiessen Polygons.
I define my shapefile in Input Features, and in Output Feature Class, then I have to possibilities either keep the default file or save my output where I want.
When I save my output in the Default file, and then I open the attrib... | Bug output feature class | 0 | 0 | 1 | 0 | 0 | 172 |
9,007,456 | 2012-01-25T17:45:00.000 | 3 | 0 | 1 | 0 | 0 | python,http,asynchronous,urllib2,urllib | 0 | 13,502,466 | 0 | 3 | 0 | false | 0 | 0 | As we've been talking already I made such one using PycURL.
The one, and only one, thing I had to do was pycurl_instance.setopt(pycurl_instance.NOSIGNAL, 1) to prevent crashes.
I did use APScheduler to fire requests in the separate threads. Thanks to your advices of changing busy waiting while True: pass to while True:... | 1 | 6 | 0 | 0 | In order to download files, I'm creating a urlopen object (urllib2 class) and reading it in chunks.
I would like to connect to the server several times and download the file in six different sessions. Doing that, the download speed should get faster. Many download managers have this feature.
I thought about specifying ... | Parallel fetching of files | 0 | 0.197375 | 1 | 0 | 1 | 10,489 |
9,019,949 | 2012-01-26T14:52:00.000 | 1 | 0 | 0 | 0 | 0 | python,statistics,matplotlib | 0 | 9,020,306 | 0 | 2 | 0 | false | 0 | 0 | I think what you want is a variance plot. Create a dictionary for distinct x values. Put each distinct value of y in a list associated with each x. Find the stdev (np.std) of the list associated with each x say "s". Plot the s vs. x. | 1 | 2 | 1 | 0 | i apologize in advance for not being very precise, as a i dont know the mathematical expression for what i want.
i am using matplotlib to analyze a large dataset. What i have now is a distribution of x,y points. I want to find out the cases in which the x values of my function are the same, but y differs the greatest.... | Finding 'edge cases' in a dataset | 0 | 0.099668 | 1 | 0 | 0 | 960 |
9,027,884 | 2012-01-27T01:25:00.000 | 1 | 1 | 0 | 0 | 0 | python,twitter,twitter-oauth,tweepy | 0 | 9,056,152 | 0 | 3 | 0 | true | 0 | 0 | I used the .filter function then filtered for the user I was looking for. | 2 | 0 | 0 | 0 | I am looking through the Tweepy API and not quite sure how to find the event to register for when a user either send or receives a new tweet. I looked into the Streaming API but it seems like that is only sampling the Twitter fire house and not really meant for looking at one indvidual user. What I am trying to do is... | How to register an event for when a user has a new tweet? | 0 | 1.2 | 1 | 0 | 1 | 183 |
9,027,884 | 2012-01-27T01:25:00.000 | 1 | 1 | 0 | 0 | 0 | python,twitter,twitter-oauth,tweepy | 0 | 9,028,060 | 0 | 3 | 0 | false | 0 | 0 | I don't think there is any event based pub-sub exposed by twitter. You just have to do the long polling. | 2 | 0 | 0 | 0 | I am looking through the Tweepy API and not quite sure how to find the event to register for when a user either send or receives a new tweet. I looked into the Streaming API but it seems like that is only sampling the Twitter fire house and not really meant for looking at one indvidual user. What I am trying to do is... | How to register an event for when a user has a new tweet? | 0 | 0.066568 | 1 | 0 | 1 | 183 |
9,034,799 | 2012-01-27T14:31:00.000 | 0 | 0 | 1 | 1 | 0 | python,cmd | 0 | 9,034,986 | 0 | 3 | 0 | false | 0 | 0 | You can run it through IDLE, the built-in editor. It may not be much helpful if you have to provide command-line args.
An alternate option may be making the code wait for a keypress using raw_input(), as Insidi0us said.
You can also print the errors to a file.
Another option may be running the command prompt first, the... | 2 | 1 | 0 | 0 | I have no idea why python run every script in a new command window.
For example I run: python testfile.py, it is show new window and close immediately, so I can't look the traceback.
Python 2.7 32-bit at the same machine works normally | Python run .py in separate windows (Windows 7, Python 2.6.6 64-bit) | 0 | 0 | 1 | 0 | 0 | 390 |
9,034,799 | 2012-01-27T14:31:00.000 | 0 | 0 | 1 | 1 | 0 | python,cmd | 0 | 9,034,871 | 0 | 3 | 0 | false | 0 | 0 | Did you try adding raw_input() at the end of testfile.py ? | 2 | 1 | 0 | 0 | I have no idea why python run every script in a new command window.
For example I run: python testfile.py, it is show new window and close immediately, so I can't look the traceback.
Python 2.7 32-bit at the same machine works normally | Python run .py in separate windows (Windows 7, Python 2.6.6 64-bit) | 0 | 0 | 1 | 0 | 0 | 390 |
9,036,653 | 2012-01-27T16:26:00.000 | 0 | 0 | 0 | 0 | 0 | python,ole,opc | 0 | 9,213,366 | 0 | 2 | 0 | true | 0 | 0 | You can install some tryout opc servers. google opc simulation. The python OpenOPC client is what i try to use.
My problems was that I did not have a plc on my desk. You need a plc on your desk connected to your actual siemens s7 engineering station to have the siemens opc server show the tags in the plc. | 1 | 0 | 0 | 0 | I am trying to do some stuff with siemens PLC using OPENOPC using python. I am wondering how I will get OPC server that I can communicate using PYOPC. Is there any open OPC server available or am I not understanding some of the key concepts here? Since I am a newbie, I hope to get some down-to-earth suggestions. | OpenOPC using Python | 0 | 1.2 | 1 | 0 | 0 | 2,203 |
9,038,505 | 2012-01-27T18:52:00.000 | 3 | 0 | 1 | 0 | 0 | java,python,jython | 0 | 9,047,483 | 0 | 2 | 0 | true | 1 | 0 | Jython supports loading Java classes as if they were Python modules. It searches the directories in sys.path for .class files.
First, make sure your Java class has already been compiled with javac.
Then, do a sys.path.append(d), where d is the directory containing the package. So if your class says package foo.bar; at ... | 1 | 2 | 0 | 0 | I have made a java class that calls other java classes and then prints to a screen. i am trying to build a python interface that calls my java class, runs the one method within it, and terminates. i cannot get access to my method. i have used the line "import directory.directory2.myClass.java (and .jar and .class) i ma... | How to import a java class i created in jython and call a method | 0 | 1.2 | 1 | 0 | 0 | 5,286 |
9,040,618 | 2012-01-27T21:57:00.000 | 4 | 0 | 1 | 0 | 1 | python,string,json,unicode | 0 | 9,040,643 | 0 | 3 | 0 | false | 0 | 0 | You should use the json module to load the JSON data into a Python object. It will take care of this for you, and you'll have Unicode strings. Then you can encode them to match your output device, and print them. | 1 | 2 | 0 | 0 | I get a Json object from a URL which has values in the form like above:
title:'\u05d9\u05d7\u05e4\u05d9\u05dd'
I need to print these values as readable text however I'm not able to convert them as they are taken as literal strings and not unicode objects.
doing unicode(myStr) does not work
doing a = u'%s' % myStr does ... | convert a String '\u05d9\u05d7\u05e4\u05d9\u05dd' to its unicode character in python | 0 | 0.26052 | 1 | 0 | 0 | 1,062 |
9,045,888 | 2012-01-28T14:16:00.000 | 1 | 0 | 0 | 0 | 0 | python,charts,reportlab,curve-fitting | 0 | 9,046,880 | 0 | 1 | 0 | true | 0 | 0 | I would recommend using MatPlotLib. This is exactly the sort of thing it's designed to handle and it will be much easier than trying to piece together something in ReportLab alone, especially since you'll have to do all the calculation of the line on your own and figure out the details of how to draw it in just the ri... | 1 | 0 | 1 | 0 | I'm preparing a set of reports using open source ReportLab. The reports contain a number of charts. Everything works well so far.
I've been asked to take a (working) bar chart that shows two series of data and overlay a fitted curve for each series.
I can see how I could overlay a segmented line on the bar graph by c... | Fitted curve on chart using ReportLab | 0 | 1.2 | 1 | 0 | 0 | 447 |
9,045,937 | 2012-01-28T14:21:00.000 | 2 | 0 | 0 | 0 | 0 | python,pdf,reportlab | 0 | 9,046,943 | 0 | 2 | 1 | false | 0 | 0 | At what point do you need this information? It becomes available as the document is constructed, so you can get it after rendering by overriding methods such as afterPage, afterDrawPage, and afterFlowable. You can then get the page number from the DocTemplate class (I believe there's a class variable called something... | 1 | 2 | 0 | 0 | How to determine on what page(need a page number) will be each flowable after rendering to pdf. I was thinking to add a custom id attribute to flowable, so i will know what flowable is it. But how can i determine on what page it will be placed?
What is the best way to achieve this? | How to know on what page number flowable was placed during rendering a pdf with reportlab | 0 | 0.197375 | 1 | 0 | 0 | 1,281 |
9,048,513 | 2012-01-28T20:52:00.000 | 0 | 0 | 0 | 0 | 0 | python,django,google-app-engine,internationalization,django-templates | 1 | 9,054,738 | 0 | 2 | 0 | false | 1 | 0 | There is an earlier error that you did not yet fix:
Error Importing data store piston.gae_store OAuth: "No module named piston.gae_store"
This does not seem to be related to the lines that you change. It will probably even occur when your remove the {% url ...%} completely, right? Try to fix the existing error first. | 1 | 1 | 0 | 0 | I have a problem using the tag {% url%} in Django on GAE, I found the problem applying internationalization in JavaScript files, writing:
{% url django.views.i18n.javascript_catalog %}
Django throws the error:
TemplateSyntaxError at / view / test /
Caught ImproperlyConfigured while rendering: Error Importing data
st... | {% url %} not work in Django | 0 | 0 | 1 | 0 | 0 | 417 |
9,065,936 | 2012-01-30T15:04:00.000 | 2 | 1 | 1 | 0 | 0 | python,logging | 0 | 9,065,992 | 0 | 1 | 0 | false | 0 | 0 | If you have no idea where it fails you could run a debugging session with input that you know causes the error, and step through the code if that is an option.
Another pretty obvious option is to log all exceptions at the entrance of your script and then drill down from there, but I honestly don't think that there is a... | 1 | 1 | 0 | 0 | I need to add logging to a milter that I wrote a few months back. It is occasionally rejecting some messages, but I'm not sure why. I know how to add logging to a Python script from the HowTo, but is it necessary for me to add log output commands at every point in my script, or is there a way Python automatically han... | How to automate python logging | 1 | 0.379949 | 1 | 0 | 0 | 540 |
9,091,252 | 2012-02-01T05:31:00.000 | 0 | 0 | 1 | 0 | 0 | python,data-structures | 0 | 9,091,268 | 0 | 4 | 0 | false | 0 | 0 | Given that all data structures exist in memory, and memory is effectively just a list (array)... there is no data structure that couldn't be expressed in terms of the basic Python data structures (with appropriate code to interact with them). | 1 | 2 | 1 | 0 | Python has a lot of convenient data structures (lists, tuples, dicts, sets, etc) which can be used to make other 'conventional' data structures (Eg, I can use a Python list to create a stack and a collections.dequeue to make a queue, dicts to make trees and graphs, etc).
There are even third-party data structures that ... | Data structures with Python | 1 | 0 | 1 | 0 | 0 | 2,410 |
9,095,796 | 2012-02-01T12:27:00.000 | 1 | 0 | 0 | 0 | 0 | python,wxpython,python-2.5 | 0 | 9,095,942 | 0 | 2 | 0 | false | 0 | 1 | Instead of pickling the object, pickle the necessary attributes of the object required to reconstruct a new instance of the object. | 1 | 0 | 0 | 0 | how to pickle wx.frame(python GUI) object and unpickle it? | how to pickle wx.frame(python GUI) object and unpickle it? | 0 | 0.099668 | 1 | 0 | 0 | 460 |
9,099,523 | 2012-02-01T16:34:00.000 | 0 | 0 | 1 | 0 | 0 | python,string,unicode,beautifulsoup | 1 | 41,417,621 | 0 | 2 | 0 | false | 1 | 0 | There should not be any problem just using python's str() method on the navigable string object you have. From my experience with NavigableString's they are already in unicode so if you want a string on which .lower will work then you need to cast it to a python string (UTF-8) then recast it back to unicode. | 1 | 2 | 0 | 0 | When I run the following code:
if substr in movie.lowercase:
I get the following error
AttributeError: 'NavigableString' object has no attribute 'lowercase'
movie is from here:
movie = row.td.div.h4.string
I tried to change it to (without success)
movie = row.td.div.h4.string.string
or
movie = unicode(row.td.div.h4.str... | converting NavigableString to unicode string | 0 | 0 | 1 | 0 | 0 | 7,115 |
9,125,997 | 2012-02-03T08:56:00.000 | 9 | 0 | 1 | 0 | 0 | python | 0 | 9,126,238 | 0 | 5 | 0 | false | 0 | 0 | The point behind a subclass is that it extends and alters the behaviour of the superclass. The superclass can't know how a subclass will extend it.
Edit: But it is well possible that the superclass knows, that the subclass will extend it. Not sure, if this is good design, though. | 1 | 14 | 0 | 0 | I want to know how to call subclass methods in the superclass. | How to call subclass methods in a superclass in Python | 0 | 1 | 1 | 0 | 0 | 32,346 |
9,134,491 | 2012-02-03T19:38:00.000 | -1 | 1 | 0 | 0 | 0 | python,gmail,oauth-2.0,gmail-imap,imaplib | 0 | 11,414,012 | 0 | 4 | 0 | false | 0 | 0 | IMAP does not support accessing inbox without password -> so imaplib doesnt | 1 | 12 | 0 | 0 | I am using Google's Oauth 2.0 to get the user's access_token, but I dont know how to use it with imaplib to access inbox. | Access Gmail Imap with OAuth 2.0 Access token | 0 | -0.049958 | 1 | 0 | 1 | 6,657 |
9,148,782 | 2012-02-05T11:17:00.000 | 0 | 0 | 1 | 0 | 0 | python,pyqt4,python-2.7 | 0 | 9,148,796 | 0 | 2 | 0 | false | 0 | 1 | There's no way to do this automatically. You'll just have to give each B a reference to A when you create it, something like b_instance.parent = a_instance. | 1 | 0 | 0 | 0 | I have a question.
There are two classes: A and B. A creates object of type B. So from A, it is easy to access methods of B, but how can I access methods of object A from object B? I am trying to use bidirectional signal-slot mechanism in Qt. A can easily have a slot for a signal in B, but B cannot see signals in A.
I ... | How to reference creator object in Python? | 0 | 0 | 1 | 0 | 0 | 298 |
9,171,080 | 2012-02-07T04:38:00.000 | 1 | 0 | 0 | 1 | 0 | python,google-app-engine | 0 | 9,171,764 | 0 | 1 | 0 | true | 1 | 0 | Wouldn't it be easier to write a user model rather than access it with the Google accounts API? That way you could define user groups and access without having to rely on Google.
The Google Accounts API in the example is really for low-level init debugging. | 1 | 0 | 0 | 0 | We are trying to develop a project in google app engine for a senior project, and its set up in such a way that only a subset of user at our college should be able to login to it. Our college uses google domains for email, so that is currently out login requirement (a college email though google that is), but how can ... | Only allow a subset of users to access a google app project | 1 | 1.2 | 1 | 0 | 0 | 122 |
9,173,794 | 2012-02-07T09:28:00.000 | 3 | 0 | 1 | 0 | 0 | python,modularity | 0 | 9,180,449 | 0 | 3 | 1 | false | 0 | 0 | Others have suggested studying other experienced programmers' code from open source projects, etc. and from tutorials and textbooks, which is sound advice. Sometimes a similar example is all you need to set you on the right path.
I also suggest to use your own frustration and experience as feedback to help yourself im... | 2 | 1 | 0 | 1 | I've written a few little things in python, and I am ramping up to build something a little more challenging.
The last project I made basically ingested some text files, did some regex over each file and structured the data in an useful way so I could investigate some data I have.
I found it quite tough near the end ... | Python 'theory' - constructing a multifunction program - how to plan a basic flow | 1 | 0.197375 | 1 | 0 | 0 | 953 |
9,173,794 | 2012-02-07T09:28:00.000 | 4 | 0 | 1 | 0 | 0 | python,modularity | 0 | 9,174,984 | 0 | 3 | 1 | true | 0 | 0 | (1) It is possible to write a fine programme in a single .py file
(2) In any style of programming, it is always (apart from special, hardware-driven cases) best to break your code up into short functions (or methods) that accomplish a discrete task.
(3) Experienced programmers will frequent write their code one way, d... | 2 | 1 | 0 | 1 | I've written a few little things in python, and I am ramping up to build something a little more challenging.
The last project I made basically ingested some text files, did some regex over each file and structured the data in an useful way so I could investigate some data I have.
I found it quite tough near the end ... | Python 'theory' - constructing a multifunction program - how to plan a basic flow | 1 | 1.2 | 1 | 0 | 0 | 953 |
9,185,443 | 2012-02-07T23:09:00.000 | -1 | 0 | 1 | 0 | 0 | python,list | 0 | 53,438,736 | 0 | 14 | 0 | false | 0 | 0 | numbers = []
while True:
try:
num = int(input('Enter the number: '))
if num == 0:
break
else:
numbers.append(num)
except:
print('Not a valid digit')
odd = [i for i in numbers if i % 2 != 0]
if odd:
print('The largest odd number is: ', max(odd))
else:
... | 3 | 3 | 0 | 0 | If you have a list of numbers, how do you return only the max odd integer without using the max() function?
I'm assuming it will have something to do with int % 2 != 0, but I'm not sure what else.
I also have to return the overall max integer without using max(), but I got around that by sorting my list and using list... | In Python, what's the method for returning only the max odd integer in a list? | 0 | -0.014285 | 1 | 0 | 0 | 4,845 |
9,185,443 | 2012-02-07T23:09:00.000 | 2 | 0 | 1 | 0 | 0 | python,list | 0 | 9,185,488 | 0 | 14 | 0 | false | 0 | 0 | Have a look at 'filter' built-in function | 3 | 3 | 0 | 0 | If you have a list of numbers, how do you return only the max odd integer without using the max() function?
I'm assuming it will have something to do with int % 2 != 0, but I'm not sure what else.
I also have to return the overall max integer without using max(), but I got around that by sorting my list and using list... | In Python, what's the method for returning only the max odd integer in a list? | 0 | 0.028564 | 1 | 0 | 0 | 4,845 |
9,185,443 | 2012-02-07T23:09:00.000 | 0 | 0 | 1 | 0 | 0 | python,list | 0 | 9,185,613 | 0 | 14 | 0 | false | 0 | 0 | The easiest approach is to separate the problem into subproblems. You can safely ignore every even number, so you have to be able to identify even numbers, you have to ignore numbers that satisfy the condition of being even and on the result - a list of odd numbers - you just have to find the highest number.
So, find o... | 3 | 3 | 0 | 0 | If you have a list of numbers, how do you return only the max odd integer without using the max() function?
I'm assuming it will have something to do with int % 2 != 0, but I'm not sure what else.
I also have to return the overall max integer without using max(), but I got around that by sorting my list and using list... | In Python, what's the method for returning only the max odd integer in a list? | 0 | 0 | 1 | 0 | 0 | 4,845 |
9,187,578 | 2012-02-08T03:42:00.000 | 1 | 0 | 0 | 1 | 0 | python,cloud | 0 | 9,187,618 | 0 | 3 | 0 | false | 0 | 0 | One of the most popular systems for processing large amounts of data in a cluster is Hadoop (http://hadoop.apache.org/)
You can write functions in python using the MapReduce programming pattern (google it), upload your program to the cluster, and it will process your data.
Take a look and read up. It's a huge topic - t... | 3 | 0 | 0 | 0 | Let's say I had a cloud cluster with Python or C or something and I want to execute my function (as a client) in the cloud. How could I possibly pass the function I wrote locally up to the server?
I've seen this elsewhere and I not only don't know how to do it but I want to see if there are many ideas for it.
Thanks,
... | Cloud Computing Passing a Function to Server | 0 | 0.066568 | 1 | 0 | 0 | 124 |
9,187,578 | 2012-02-08T03:42:00.000 | 0 | 0 | 0 | 1 | 0 | python,cloud | 0 | 9,187,637 | 0 | 3 | 0 | false | 0 | 0 | Well if you wrote it locally you probably wont be executing anything that require compilation in realtime (I assume your looking for efficiency and will be exchanging a whole series of computations in the cloud) which in that case you looking to send it something like a ruby file on the fly?
But that doesn't seem very ... | 3 | 0 | 0 | 0 | Let's say I had a cloud cluster with Python or C or something and I want to execute my function (as a client) in the cloud. How could I possibly pass the function I wrote locally up to the server?
I've seen this elsewhere and I not only don't know how to do it but I want to see if there are many ideas for it.
Thanks,
... | Cloud Computing Passing a Function to Server | 0 | 0 | 1 | 0 | 0 | 124 |
9,187,578 | 2012-02-08T03:42:00.000 | 0 | 0 | 0 | 1 | 0 | python,cloud | 0 | 9,337,324 | 0 | 3 | 0 | false | 0 | 0 | Code mobility is a largely unexplored field with more questions than answers. Generally you cannot move arbitrary code around at runtime. There are a few programming languages that historically supported code mobility (e.g. Kali Scheme), but it is not something that would be ready for main stream use.
Concerning functi... | 3 | 0 | 0 | 0 | Let's say I had a cloud cluster with Python or C or something and I want to execute my function (as a client) in the cloud. How could I possibly pass the function I wrote locally up to the server?
I've seen this elsewhere and I not only don't know how to do it but I want to see if there are many ideas for it.
Thanks,
... | Cloud Computing Passing a Function to Server | 0 | 0 | 1 | 0 | 0 | 124 |
9,189,795 | 2012-02-08T08:23:00.000 | 0 | 0 | 0 | 0 | 0 | python,django | 0 | 9,189,836 | 0 | 1 | 0 | false | 1 | 0 | In short, you can't (or, at least, it would be fairly tricky and magical).
In longer: apart from performing the checks in the apps themselves, you might want to consider creating a router app which handles the requests, then decides which sub-app should be responsible for them.
If you can give some more details, it wou... | 1 | 0 | 0 | 0 | I am developing a large Django site where some of the users are going to have specific needs. So I am looking for a way to overload part of a Django app if the user meets specific conditions.
I would prefer to be able to dynamically load a user tailored version of an app, instead of loading the standard app all togethe... | Overloading a part of or entire Django app for a specific User | 1 | 0 | 1 | 0 | 0 | 53 |
9,197,668 | 2012-02-08T16:44:00.000 | 0 | 0 | 1 | 0 | 0 | python,import | 0 | 9,197,871 | 0 | 2 | 0 | false | 0 | 0 | I think the best way to workaround, would be to change the name of the toplevel directory, unless other packages depend on that package.
You can do this by altering the setup.py or just change the name folder in site-packages directly. The egg is just meta data.
As far as setting sys.path, it's better to use the site m... | 1 | 7 | 0 | 0 | I have two packages that install different packages with the same name. They are both "packages" in that they have top-level setup.py files which specify package=['foo'] in the setup command.
If I install using distutils.core, the last to be installed overwrites the previous one (but I think wouldn't overwrite unless ... | Python: Two packages with the same name; how do you specify which is loaded? | 0 | 0 | 1 | 0 | 0 | 4,345 |
9,206,627 | 2012-02-09T06:56:00.000 | 0 | 0 | 1 | 1 | 0 | python | 0 | 12,851,137 | 0 | 1 | 0 | false | 0 | 0 | Trying running WHERE PYTHON (or WHERE PYTHON.EXE) to figure out where the python executable is at.
It may be that python v2.4.5 is as part of another program. | 1 | 1 | 0 | 0 | major noob question:
when I run python on the windows command line, it says I have 2.4.5... however, it's not in my PATH environment variable (or anywhere in my environment variables), and, Python27 IS in PATH! Anyone know how I can get Python27 up and running in windows cmd? | getting python 2.4.5 out of my environment variables | 0 | 0 | 1 | 0 | 0 | 104 |
9,212,350 | 2012-02-09T14:09:00.000 | 1 | 0 | 0 | 0 | 0 | python,pygtk,gedit,pygobject | 0 | 9,213,736 | 0 | 1 | 0 | true | 0 | 1 | Either empty the current tree store and fill it again from the new directory, or call set_model(new_treestore) on the tree view widget. It will update itself. | 1 | 0 | 0 | 0 | I'm writing my first gedit plugin, a directory browser for the sidebar.
Show sidepanel with content of the cwd.
self._side_widget = self.get_dir() #returns a Gtk.Treestore obj
self.side_panel = self.window.get_side_panel()
self.side_panel.add_item(self._side_widget, "dir-browser", "Directory
Browser", None)
self.sid... | Update Gedit side panel | 0 | 1.2 | 1 | 0 | 0 | 543 |
9,217,687 | 2012-02-09T19:49:00.000 | 0 | 0 | 0 | 1 | 1 | python,pythonbrew | 0 | 9,245,490 | 0 | 1 | 0 | true | 0 | 0 | Finally I just ditched pythonbrew and did a multi install of python.
Thereafter I used bash and profile to switch between my python environments. | 1 | 0 | 0 | 0 | I am using pythonbrew to install 2.7.2 on my CentOS.
It has worked before but this time on a separate clean system I am running into an issue.
After installing pythonbrew (which I had to --force since it complained in make test about distutils) I switched to 2.7.2
When I run easy_install setuptools it tries to go sys... | how to install additional python packages with pythonbrew | 0 | 1.2 | 1 | 0 | 0 | 399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.