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
8,841,705
2012-01-12T20:19:00.000
2
0
0
0
python,django
8,841,829
5
false
1
0
I would suggest it's possible, but definitely steepens the learning curve. When learning a new language, I usually enjoy using it to actually do something useful rather than just writing Hello World programs. Learning Django while learning Python at the same time might be a good way to do this. I did learn Ruby at th...
5
4
0
I am coming from procedural PHP with fair amount of knowledge on it. I want to learn Django but I don't have initial knowledge of Python. Can I learn Django at the same time also learning Python? Thank you so much!
Is learning Django without initial knowledge of Python possible?
0.07983
0
0
7,541
8,841,705
2012-01-12T20:19:00.000
1
0
0
0
python,django
8,841,861
5
false
1
0
Short answer: no. Long answer: Learning a framework for a particular language is essentially taking the basic syntax with its nuances, and adding a new level of complexity to it. You're coming from a different language with a different semantic structure, so you would require time to both understand what Python's do...
5
4
0
I am coming from procedural PHP with fair amount of knowledge on it. I want to learn Django but I don't have initial knowledge of Python. Can I learn Django at the same time also learning Python? Thank you so much!
Is learning Django without initial knowledge of Python possible?
0.039979
0
0
7,541
8,841,705
2012-01-12T20:19:00.000
0
0
0
0
python,django
25,205,713
5
false
1
0
Learning Python through Django is like learning PHP through wordpress. You will learn python, but Django is it's own beast. If you are experienced in another language or web programming then you will be fine jumping into Django. If this is your first language then you need to learn basic python first. I also recommen...
5
4
0
I am coming from procedural PHP with fair amount of knowledge on it. I want to learn Django but I don't have initial knowledge of Python. Can I learn Django at the same time also learning Python? Thank you so much!
Is learning Django without initial knowledge of Python possible?
0
0
0
7,541
8,841,705
2012-01-12T20:19:00.000
6
0
0
0
python,django
8,842,267
5
false
1
0
Yes! It's called 'immersion.' You learn Spanish by speaking Spanish. You learn Python by writing Python. Having a concrete project ("I'm going to make webapp that does xyz in Django") in mind gives you something to work on and towards. If you have the time and the determination to stick with it, and useful resources at...
5
4
0
I am coming from procedural PHP with fair amount of knowledge on it. I want to learn Django but I don't have initial knowledge of Python. Can I learn Django at the same time also learning Python? Thank you so much!
Is learning Django without initial knowledge of Python possible?
1
0
0
7,541
8,841,705
2012-01-12T20:19:00.000
11
0
0
0
python,django
8,841,721
5
true
1
0
No. You'll be writing Python code. In Python. You'll have to learn Python. A little bit of your project will be CSS, JavaScript and HTML with template tags inserted. Most of your project will be Python.
5
4
0
I am coming from procedural PHP with fair amount of knowledge on it. I want to learn Django but I don't have initial knowledge of Python. Can I learn Django at the same time also learning Python? Thank you so much!
Is learning Django without initial knowledge of Python possible?
1.2
0
0
7,541
8,843,333
2012-01-12T22:32:00.000
2
0
1
0
python,enthought
8,843,701
2
false
0
0
It all depends on which python libraries you are hoping to use. My own experience on OS X is that most python modules that require compilation work, but I've had issues with them occasionally. Especially if I need to match the architecture of the system Python which is compiled as universal binary. Honestly, I just ...
1
0
0
Compare and contrast using Enthought and installing individual libraries. I am not clear on the benefits each option offers.
Compare and Contrast using Enthought and installing individual libraries
0.197375
0
0
329
8,845,456
2012-01-13T03:15:00.000
2
0
1
0
python,elementtree
8,848,549
3
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
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
1.2
0
1
6,654
8,847,266
2012-01-13T07:31:00.000
5
0
0
1
java,python,google-app-engine,go,hybrid
8,847,345
1
true
1
0
You can deploy several "versions" of the same application at once. Each version will be accessible using a fully qualified URL, and they can all be in different languages.
1
1
0
Can one write a hybrid Go-Python/Java application and run it on Google App Engine as one application, or do they need to be split into two apps and communicate with each other through HTTP calls? Is there any tutorial or example on something like this being done?
Google App Engine Go-Python/Java hybrid application
1.2
0
0
469
8,848,285
2012-01-13T09:21:00.000
4
0
0
0
java,python,desktop-application
8,848,472
2
false
1
0
It is entirely possible to build a SWING GUI application with Python. Look for Jython, which is Python for the JVM. Any pure Python (no compiled C code) libraries for Python will work with Jython including most of the Python standard libraries. Also, because Jython is a JVM language, it has access to objects provided b...
1
15
0
My company is revamping the IT infrastructure and systems, so we are at the middle of finalizing the technology for developing the new system. We have come to two candidates; Java & Python. The main criteria of the choice is the language must be complete; in a sense that it must be able to use for web & desktop applica...
Python in Desktop Application Development
0.379949
0
0
14,031
8,850,273
2012-01-13T12:02:00.000
8
0
0
0
python,django,django-admin
9,381,961
2
true
1
0
If you want to open a popup, simply create a link to your 'add' view with the following attribute on that link onclick='return showAddAnotherPopup(this);'
1
2
0
Is there any ready apps for django admin, that allows to edit model in popup? I want next functionallity: View edit form for model in popup. On model save - update row in list of models. Motivation: reduce page reloads. Also, if there any solutions oriented on massive manual data updates for django? I've taken a l...
Django. Edit model form in popup in admin
1.2
0
0
8,165
8,853,553
2012-01-13T16:10:00.000
1
0
0
0
python,pdf,svg,reportlab
11,892,537
5
false
0
0
rst2pdf uses reportlab for generating PDFs. It can use inkscape and pdfrw for reading PDFs. pdfrw itself has some examples that show reading PDFs and using reportlab to output. Addressing the comment by Martin below (I can edit this answer, but do not have the reputation to comment on a comment on it...): reportlab kn...
2
12
0
I'm creating some SVGs in batches and need to convert those to a PDF document for printing. I've been trying to use svglib and its svg2rlg method but I've just discovered that it's absolutely appalling at preserving the vector graphics in my document. It can barely position text correctly. My dynamically-generated SVG ...
Convert SVG to PDF (svglib + reportlab not good enough)
0.039979
0
1
8,568
8,853,553
2012-01-13T16:10:00.000
-1
0
0
0
python,pdf,svg,reportlab
63,741,596
5
false
0
0
When using svglib or cairosvg, the text in the svg cannot be rendered properly. My solution is import the svg file to draw.io and then export it as a pdf.
2
12
0
I'm creating some SVGs in batches and need to convert those to a PDF document for printing. I've been trying to use svglib and its svg2rlg method but I've just discovered that it's absolutely appalling at preserving the vector graphics in my document. It can barely position text correctly. My dynamically-generated SVG ...
Convert SVG to PDF (svglib + reportlab not good enough)
-0.039979
0
1
8,568
8,853,685
2012-01-13T16:18:00.000
0
0
0
0
python,selenium,webdriver
8,864,912
2
false
0
0
Can't you just grep the output log of the Selenium hub with the sessionID, you'll then see which node executed the test.
1
3
0
I have a several webdriver nodes connecting to a single hub with nearly identical configuration. I have a simple test that loads a URL and takes a screen shot. Sometimes a test will fail on one run and pass on the next. The only difference should be which node executes the test. The problem is I don't know which ran th...
How to get diagnostic information from a Selenium hub when a node is failing?
0
0
1
1,809
8,858,306
2012-01-13T22:47:00.000
0
1
0
0
python,hp-quality-center
13,123,269
1
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
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
0
2,376
8,858,525
2012-01-13T23:14:00.000
4
0
1
0
python
8,878,268
5
false
0
0
Instead of monkey patching, you can create a proxy class: Make a proxy class that inherit from dict/list/set whatever Intercept attribute setting, and if the value is a dict/list/set, wrap it into the proxy class In proxy class __getattribute__, make sure the method is called on the wrapped type, but take care of trac...
1
18
0
I have a class where the instances of this class needs to track the changes to its attributes. Example: obj.att = 2 would be something that's easily trackable by simply overriding the __setattr__ of obj. However, there is a problem when the attribute I want to change is an object itself, like a list or a dict. How woul...
Track changes to lists and dictionaries in python?
0.158649
0
0
5,144
8,858,946
2012-01-14T00:11:00.000
0
0
0
0
python
8,858,983
4
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
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
0
18,146
8,859,532
2012-01-14T01:57:00.000
4
1
0
0
python,mongodb,heroku,mlab
8,859,701
5
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
The documentation only talks about how to do it from ruby.
How can I use the mongolab add-on to Heroku from python?
0.158649
0
0
6,640
8,859,774
2012-01-14T02:53:00.000
1
0
1
0
python,reference
8,859,821
3
false
0
0
I'm not aware of any python tool that will deepcopy only basic types and keep other elements as references. I think you should be able to write a small recursive function for that (under 20 lines).
1
4
0
Is it posible to only deep copy a certain types of object, such as a list, a dict, or a tuple Example: [[1, <SomeObj>], <OtherObj>] I want to deep copy the first list (and of course.. the 1), but not SomeObj or OtherObj. Those should stay as refereces. Is that possible to do that with some function that i'm not familia...
Python deepcopy.. kind of
0.066568
0
0
268
8,860,192
2012-01-14T04:40:00.000
0
0
0
0
python,qt,model,pyqt
9,890,722
2
false
0
1
I've used QTreeView to view a simple table with many columns - it works well - you can adjust the column count by sending it the columnCountChanged signal. So I'm not sure you need to do what you are asking. But I've used ItemDelegates too: use my_treeview.setItemDelegate() to point the treeview to your item delegate....
1
2
0
A simple question, (hopefully with a simple answer). QTreeView will pass Qt.DisplayRole to the model's data function when fetching rows for display, by default. But say I wanted to pass 'MyAwesomeTreeDisplayRole' instead of Qt.DisplayRole, what would I need to do? I can't seem to find anything about where the view deci...
Using custom role in QTreeView instead of DisplayRole
0
0
0
1,128
8,860,214
2012-01-14T04:46:00.000
3
0
0
1
python,hadoop,mapreduce,hadoop-streaming
8,860,677
2
true
0
0
b) I dont want to store intermediate files c) I dont want to install packages like Cascading, Yelp, Oozie. Any reason why? Based on the response, a better solution could be provided. Intermediates files cannot be avoided, because the o/p of the previous Hadoop job cannot be streamed as i/p to the next job. Create a s...
1
3
0
I am using Python and have to work on following scenario using Hadoop Streaming: a) Map1->Reduce1->Map2->Reduce2 b) I dont want to store intermediate files c) I dont want to install packages like Cascading, Yelp, Oozie. I have kept them as last option. I already went through the same kind of discussion on SO and elsewh...
Can we cascade multiple MapReduce jobs in Hadoop Streaming (lang: Python)
1.2
0
0
1,886
8,861,406
2012-01-14T09:45:00.000
0
0
1
0
python,windows,virtualenv
8,863,614
1
true
0
0
Yes, it is possible. You just need to call the activation script prior starting your program (installed as Scripts/activate.bat under Windows).
1
2
0
Is it possible to make 3rd party external executable to use instance of python created by virtualenv? Thing is application i am using wants to use modified and old version of pyside, and i need to use new version for my own needs. Virtualenv should solve the problem if only i could make this 3rd party application use i...
external app using python instance created by virtualenv? (windows)
1.2
0
0
134
8,862,731
2012-01-14T14:13:00.000
2
0
0
0
python,jinja2
16,856,530
7
false
1
0
I thought of an interesting way to do this: Set up a dictionary Wrap a DictLoader around it (but keep a reference to the dictionary around) Pass a ChainLoader with the DictLoader and your normal Loader to the environment Implement a custom filter that adds its parameters to the aforementioned dictionary Use the includ...
1
9
0
Say I have actual jinja template code in a variable X. Let us say the content of X is "{{ some_other_variable }}". How can I display X while also rendering its content? e.g., this does not work: {{ X }} As it simply renders this to screen "{{ some_other_variable }}" rather than the contents of some_other_variable. The ...
Jinja nested rendering on variable content
0.057081
0
0
9,958
8,864,599
2012-01-14T19:03:00.000
0
0
0
0
python,netcdf
9,473,690
7
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
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
0
8,951
8,866,046
2012-01-14T22:52:00.000
3
0
1
0
python,math,rounding
8,866,058
10
false
0
0
If your int is x: x + 100 - x % 100 However, as pointed in comments, this will return 200 if x==100. If this is not the expected behavior, you can use x + 100*(x%100>0) - x%100
1
99
0
Seems that should have already been asked hundreds (pun are fun =) of times but i can only find function for rounding floats. How do I round up an integer, for example: 130 -> 200 ?
Python round up integer to next hundred
0.059928
0
0
109,498
8,866,301
2012-01-14T23:33:00.000
4
0
0
0
c#,python,graphics,simulator
8,866,408
3
true
0
1
If you don't have much time you should choose the language you know better. Personally I'd go for python because I think it's a very productive language. To do the rendering I'd rely on the module pygame. Nevertheless there are numerous possible libraries that can do what you need. I've used XNA a while ago and it was...
1
0
0
As the title suggests it, I`m looking for the best solution for creating a 2D or a 3D graphic simulator. I need to build a program that simulates the behavior of some custom solar panels (how the rays fall on the surface of the panels, what happens if the panels are rotated etc). The main problem is that it has to be d...
C# vs. Python - Best choice for a 2D/3D graphic simulator
1.2
0
0
1,475
8,869,918
2012-01-15T13:21:00.000
1
0
0
0
python,django,django-forms
8,869,942
1
true
1
0
You will need to provide your own clean method to deal with the non-validating fields, and prevent cleaned_data being clobbered. You will need to also provide your own save method which knows to only save the right fields.
1
2
0
What is the recommended way of handling a "save"-style form submission (created from a ModelForm) when: A non-empty subset of the form's fields validate A non-empty subset of the form's fields do not validate I want to save the subset of fields that are valid to the instance in question, and not the invalid ones. I'm...
Django - saving fields in invalid form submissions
1.2
0
0
739
8,870,261
2012-01-15T14:10:00.000
-1
0
1
0
python,algorithm,text,split
8,870,341
16
false
0
0
It seems like fairly mundane backtracking will do. Start at the beggining of the string. Scan right until you have a word. Then, call the function on the rest of the string. Function returns "false" if it scans all the way to the right without recognizing a word. Otherwise, returns the word it found and the list of wor...
1
135
0
Input: "tableapplechairtablecupboard..." many words What would be an efficient algorithm to split such text to the list of words and get: Output: ["table", "apple", "chair", "table", ["cupboard", ["cup", "board"]], ...] First thing that cames to mind is to go through all possible words (starting with first letter) ...
How to split text without spaces into list of words
-0.012499
0
0
94,208
8,873,219
2012-01-15T20:43:00.000
3
0
0
0
python,image,pygame
8,873,270
4
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
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?
0.148885
0
0
36,330
8,874,032
2012-01-15T22:47:00.000
0
0
0
0
python
8,874,160
3
false
0
0
Yes, Python would be suitable for this. (Next time, just try it--it's trivial.)
3
0
0
I want to create a ping service, that would make a http/https/ping/tcp connection to a website to see if the service is up or not. Would python be suitable for this, seeing as I want to build it to be able to ping 1K endpoints per minute.
Writing a ping service to ping 1K websites per minute
0
0
1
284
8,874,032
2012-01-15T22:47:00.000
0
0
0
0
python
8,874,210
3
false
0
0
Practically all, if not all, modern programming languages are capable of that speed of execution easily. The network itself would be the bottleneck, and depending on how many actual pings you want to do of each service, they could get backed up. If I was doing this, I would use Python with a Java frontend if necessary....
3
0
0
I want to create a ping service, that would make a http/https/ping/tcp connection to a website to see if the service is up or not. Would python be suitable for this, seeing as I want to build it to be able to ping 1K endpoints per minute.
Writing a ping service to ping 1K websites per minute
0
0
1
284
8,874,032
2012-01-15T22:47:00.000
2
0
0
0
python
8,874,364
3
false
0
0
Would python be suitable for this, seeing as I want to build it to be able to ping 1K endpoints per minute. Python has all you need, but there are two bottlenecks, first is OS and the other is network. While planning for such a program, I would do some research on the limit of the IP stack of your target OS and the re...
3
0
0
I want to create a ping service, that would make a http/https/ping/tcp connection to a website to see if the service is up or not. Would python be suitable for this, seeing as I want to build it to be able to ping 1K endpoints per minute.
Writing a ping service to ping 1K websites per minute
0.132549
0
1
284
8,874,580
2012-01-16T00:18:00.000
1
0
0
0
python,google-app-engine
8,875,514
1
true
1
0
You could override __del__, but this is dangerous (can introduce GC loops and uncollectable objects), and doesn't gain you anything. You don't gain anything because the App Engine runtime does not return the response to the user until the WSGI application has returned, which does not happen until all user code has fini...
1
1
0
webapp.RequestHandler based Handlers can override initialize () to carry out setup. Is there a similar finalize() ? Could I override del() to achieve this ? Basically, I am looking to making some journal entries after the post/get functions have completed such that this is not in the critical path of the Response back ...
Is there RequestHandler an equivalent of finalize() call for python?
1.2
0
0
88
8,875,043
2012-01-16T01:52:00.000
2
0
1
0
python,oop,inheritance,design-patterns,class-factory
8,878,104
5
false
0
0
Third scenario: You may want to consider a third scenario: Put the code inside the method Rules.__call__. Instantiating Result like: result = rules(data) Pros: Results can be totally unaware of the Rules that generates them (and maybe even of the original Data). Every Rules sub-class can customize its Result creatio...
4
9
0
(Using Python 3.2, though I doubt it matters.) I have class Data, class Rules, and class Result. I use lowercase to denote an instance of the class. A rules object contains rules that, if applied to a data object, can create a result object. I'm deciding where to put the (rather complicated and evolving) code that actu...
pros and cons of using factory vs regular constructor
0.07983
0
0
1,830
8,875,043
2012-01-16T01:52:00.000
1
0
1
0
python,oop,inheritance,design-patterns,class-factory
8,877,036
5
false
0
0
Can you make ResultFactory a pure function? It's not useful to create a singleton object if all you need is a function.
4
9
0
(Using Python 3.2, though I doubt it matters.) I have class Data, class Rules, and class Result. I use lowercase to denote an instance of the class. A rules object contains rules that, if applied to a data object, can create a result object. I'm deciding where to put the (rather complicated and evolving) code that actu...
pros and cons of using factory vs regular constructor
0.039979
0
0
1,830
8,875,043
2012-01-16T01:52:00.000
1
0
1
0
python,oop,inheritance,design-patterns,class-factory
8,875,109
5
false
0
0
Why not put the rules in their own classes? If you create a RuleBase class, then each rule can derive from it. This way, polymorphism can be used when Data needs rules applied. Data doesn't need to know or care which Rule instances were applied (unless Data itself is the one who knows which rules should be applied). Wh...
4
9
0
(Using Python 3.2, though I doubt it matters.) I have class Data, class Rules, and class Result. I use lowercase to denote an instance of the class. A rules object contains rules that, if applied to a data object, can create a result object. I'm deciding where to put the (rather complicated and evolving) code that actu...
pros and cons of using factory vs regular constructor
0.039979
0
0
1,830
8,875,043
2012-01-16T01:52:00.000
0
0
1
0
python,oop,inheritance,design-patterns,class-factory
8,875,075
5
false
0
0
Well, the second is downright silly, especially with all the singletonness. If Result requires Rules to create an instance, and you can't create one without it, it should take that as an argument to __init__. No pattern shopping necessary.
4
9
0
(Using Python 3.2, though I doubt it matters.) I have class Data, class Rules, and class Result. I use lowercase to denote an instance of the class. A rules object contains rules that, if applied to a data object, can create a result object. I'm deciding where to put the (rather complicated and evolving) code that actu...
pros and cons of using factory vs regular constructor
0
0
0
1,830
8,875,081
2012-01-16T02:03:00.000
1
0
0
0
python,timeout
8,875,106
1
true
0
0
I would advise asking the hosting service about it. Generally there will be a way to run scripts on the server.
1
0
0
I have a website hosted by 1and1. On the server there is a folder with about 5,300 pictures. I have a python script that does some image processing. I want to run the python script on all of the pictures in the folder. The only way I know to make the server run the script is to put the file on my site and then go to ww...
Prevent Server side Python Timeout?
1.2
0
1
288
8,876,388
2012-01-16T06:17:00.000
0
0
1
0
python,module,wrapper
8,890,963
2
false
0
0
Renamed delaunay.dll to delaunay.pyd and got this error: ImportError: DLL load failed: The specified module could not be found. This sounds like delaunay.pyd depends on some other dll that is not found.
2
0
0
I have an algorithm written in C++ that I want to use in ArcGIS. Arc supports python scripting, so I figured I'd write a python wrapper. I built python on my development PC and then built a module (called "delaunay", to calculate Delaunay triangulations) to wrap the algorithm. On that PC I was using cygwin with mingw g...
ImportError when moving custom python module between PCs
0
0
0
350
8,876,388
2012-01-16T06:17:00.000
0
0
1
0
python,module,wrapper
8,888,245
2
false
0
0
Run python -vvv and you'll see import debug info. You are probably mixing 32-bit and 64-bit binaries. Binaries from different Python builds are incompatible.
2
0
0
I have an algorithm written in C++ that I want to use in ArcGIS. Arc supports python scripting, so I figured I'd write a python wrapper. I built python on my development PC and then built a module (called "delaunay", to calculate Delaunay triangulations) to wrap the algorithm. On that PC I was using cygwin with mingw g...
ImportError when moving custom python module between PCs
0
0
0
350
8,878,210
2012-01-16T09:50:00.000
1
0
1
0
python,virtualenv,pip
10,285,156
1
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
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.2
0
0
227
8,879,102
2012-01-16T11:04:00.000
0
1
0
0
python,git,aptana
8,897,929
1
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
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
0
308
8,880,138
2012-01-16T12:37:00.000
5
0
0
0
python,django,rss,escaping
8,880,484
1
true
1
0
€ is a perfectly valid utf-8 character. You are almost certainly creating utf-8 output, therefore it doesn't need escaping.
1
2
0
I've made a rss-feed in django and i wish to turn € into &euro;. I already use |escape to escape link tags and such. But somehow |escape doesn't work on €. Does anybody now a way to also escape € ?
Django RSS-feed escaping €
1.2
0
0
196
8,880,652
2012-01-16T13:26:00.000
56
0
0
0
python,django,pycharm
8,880,818
1
true
1
0
File » Settings » Template language, do you have Template language setting set to django?
1
32
0
I've just installed PyCharm, and have opened an existing project with multiple apps. When I open django templates, they are highlighted as if plain HTML, i.e. {% block %} elements and {{variable}} references are not treated specially. Is there any way I can force it to use the django template syntax highlighter for t...
PyCharm: Forcing Django Template Syntax Highligting
1.2
0
0
8,350
8,885,544
2012-01-16T19:55:00.000
2
0
0
0
python,webdriver
8,886,515
1
false
0
0
driver.get(url) already waits for the page to load. You could use selenium.webdriver.support.ui.WebDriverWait() to explicitly wait for a condition. ChromeDriver 18.0.995.0 doesn't support taking a page screenshot on Linux.
1
4
0
I am using a Chrome Driver, writing in Python, accessing pages that each require a login. After login I would like the program to wait for the entire page to load before taking a screenshot of the page. Can you help with this wait procedure?
Python WebDriver wait for page to load
0.379949
0
1
1,946
8,888,567
2012-01-17T01:19:00.000
51
0
1
0
python,regex
8,888,615
4
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
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
1.2
0
0
55,780
8,888,567
2012-01-17T01:19:00.000
7
0
1
0
python,regex
8,888,619
4
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
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
1
0
0
55,780
8,890,199
2012-01-17T05:40:00.000
0
1
0
0
python,doxygen,shebang
8,892,855
2
false
0
0
that sounds to me like a scripting problem and not like a conflict between Shebang and doxygen
2
0
0
Does doxygen doesn't work properly on python script with a shebang? I tried one python script with shebang to my company's tool directory and ran doxygen. It was not able to display namespace (functions) at all. Please share if you guys faced similar experience.
Shebang conflict with doxygen
0
0
0
221
8,890,199
2012-01-17T05:40:00.000
1
1
0
0
python,doxygen,shebang
9,170,986
2
true
0
0
enable EXTRACT_ALL to YES in the config file, doxygen will generate proper desired results. But the question still remains, why doxygen failed to generate documentation file for python with EXTRACT_ALL = NO. Anyone with better answer can help me here.
2
0
0
Does doxygen doesn't work properly on python script with a shebang? I tried one python script with shebang to my company's tool directory and ran doxygen. It was not able to display namespace (functions) at all. Please share if you guys faced similar experience.
Shebang conflict with doxygen
1.2
0
0
221
8,891,091
2012-01-17T07:36:00.000
8
0
1
0
python-imaging-library,libjpeg
8,984,514
2
true
0
0
I found the solution. one has to use easy_install PIL instead of pip install PIP in Windows. easy_install finds local installation or installs the libjpeg from the source and connects it to PIL while pip cannot do that.
1
2
0
I want to install PIL package on windows, its easy. but decoder jpeg not available. which packages are needed to download and installed befor PIL so it gets work?
how to install PIL package with JPEG support in windows
1.2
0
0
5,008
8,892,357
2012-01-17T09:39:00.000
2
0
0
1
python,perl,windows-phone-7,powershell,smartphone
8,893,061
4
false
0
0
You can use Powershell in the service layer, adding System.Management.Automation and Microsoft.PowerShell.Commands.Utility to the service project.
1
7
0
In Windows Mango OS , is there any scripting environment that is supported? Does it have support for powershell or python or perl?
Is there any scripting support on Windows Phone?
0.099668
0
0
4,362
8,895,942
2012-01-17T14:05:00.000
0
0
0
0
python,sqlobject
8,896,107
2
false
1
0
Try the pyramid, it does not impose anything you like as opposed to Django. And has a wealth of features for building Web applications at any level.
1
0
0
I have a regular desktop application which is written in Python/GTK and SQLObject as ORM. My goal is to create a webinterface where a user can login and sync/edit the database. My application is split up in different modules, so the database and gtk code are completly separate, so I would like to run the same database ...
Choosing Python/SQLObject webframework
0
1
0
375
8,898,662
2012-01-17T17:02:00.000
0
0
0
0
macos,tkinter,python-2.7
8,900,000
2
false
0
1
You cannot do this with Tkinter. Tkinter can only send events to its own windows.
1
1
0
I have a window that is opened up in a Python script (NOT THROUGH Tkinter), and all I want is to send an "enter" (keypress) command to that window. I was hoping I could do this with Tkinter, but I'm at a bit of a loss as to how to send this command to the current focused window.
Tkinter keypress on current focused window
0
0
0
260
8,899,336
2012-01-17T17:55:00.000
0
1
0
0
python,audio,fft,amplitude
8,903,087
3
false
0
0
You're operating under a couple of misconceptions. You can't get the frequency of a wave at a particular point in time. You need to select a window of time, including many points before and after the point of interest. The more points you include, the more resolution you'll have in your frequency breakdown. You'll need...
1
1
0
I would like to access the array with something like array[5000][440] meaning 5000ms from the start and 440hz and it would give me a value of the frequency's amplitude at this very position. I could not find something like that here, if there is, please point me to it.
How do I make python load a big(2hours) wave-file and convert it's contents into a time-frequency array?
0
0
0
521
8,904,318
2012-01-18T02:12:00.000
3
0
0
0
java,python,jython,hdf5,pytables
8,904,389
2
false
1
0
For me is not cool writing scripts from Java using java.io.*. Same here -- you have already parsed the data from the XML into some internal representation in Java, and then you re-write this data into a Python script, and then the Python interpreter will re-parse the data into an internal representation for writing to...
1
2
0
I'm a newbie in Python, PyTables and HDF5. I'm looking for simple and best solution for my problem. Problem is next. On one side I have many XML files with data. I just wanna parse these files and put data in hdf5 file on other side. Later, I will use this data trough some search criteria.Why HDF5? Because need to put...
Simple and effective solution for combining Java, Python, PyTables and HDF5
0.291313
0
0
1,638
8,905,128
2012-01-18T04:19:00.000
1
0
0
0
python,gtk,widget,gnome
8,906,510
3
false
0
1
I have used the 3 following toolkits. wxPython is a popular choice. It supports Windows, Mac and Linux but may be tricky to install on some of these platforms (that's what i've recently noticed on 64 bits MAC and Ubuntu). It has a lot of nice widgets which can be seen with the demo app that can be downloaded separatel...
1
0
0
What is the best framework to use for building the GUI on a python widget? I'm currently using gnome 3, but would prefer it to be independent of the desktop environment.
Python Widget/GUI framework
0.066568
0
0
1,565
8,905,620
2012-01-18T05:29:00.000
1
0
1
0
python,list,dictionary
8,905,693
4
false
0
0
To touch on a few things: Adding a dict to a list. mylist = [] mylist.append({'key1': 'val1'}) Adding a list to a set. myset = set() myset.add({'key1': 'val1'}) # Error - dicts are mutable, therefore not hashable. Keeping track of distinct dictionaries. mydicts = set([id(d) for d in mylist]) Retrieving elements. # Wit...
1
1
0
Just getting started with python, trying to nest a dict inside other data structures, lists, sets, etc. When I nest the dict (like, if I create a list of dicts), I cant seem to reference the keys or values inside the individual dicts anymore. Is this a design feature or am I totally boning it?
Beginner Python Problems
0.049958
0
0
476
8,906,265
2012-01-18T06:48:00.000
1
0
1
0
python,design-patterns
8,908,454
2
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
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?
1.2
0
0
83
8,906,766
2012-01-18T07:44:00.000
5
0
0
0
javascript,jquery,python,web.py
8,906,825
2
true
1
0
Don't use Ajax to do this. If posting data to the server should result in a new page being displayed, just use the traditional model. You gain nothing by using Ajax in this case.
2
0
0
I have a problem with web.py. Basically the user clicks a button, which makes a POST request to the server. The POST request returns "render.edit()", which is short hand for rendering the "edit" template. However, since I'm making the POST request via jQuery, the HTML of the page is simply in the callback function and ...
Rendering a page after jQuery POST
1.2
0
0
376
8,906,766
2012-01-18T07:44:00.000
0
0
0
0
javascript,jquery,python,web.py
8,924,998
2
false
1
0
you can also try raise web.seeother('URL') inside the POST of python script, but in this case it will also run all GET instructions of the class.
2
0
0
I have a problem with web.py. Basically the user clicks a button, which makes a POST request to the server. The POST request returns "render.edit()", which is short hand for rendering the "edit" template. However, since I'm making the POST request via jQuery, the HTML of the page is simply in the callback function and ...
Rendering a page after jQuery POST
0
0
0
376
8,909,342
2012-01-18T11:29:00.000
0
0
0
0
python,xlrd
43,124,531
4
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
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
1
0
27,320
8,910,770
2012-01-18T13:17:00.000
0
1
0
1
python,apache2,cgi
8,911,061
2
false
0
0
please make sure: the file you are calling itself has enough permission the file you are calling has an extension that is is in the .htaccess file (see newtover's answer) specify how you want to run the script in the first line of the file. If you are calling foo.pl, make sure #!/usr/bin/perl is in the first line.
1
1
0
I have a standard Apache2 installation on an Ubuntu server. The default settings use ScriptAlias to refer /cgi-bin/ to /usr/lib/cgi-bin/. If I place my Python CGI script in /usr/lib/cgi-bin/ it executes. I created /var/www/cgi-bin/ with appropriate permissions, removed the ScriptAlias line, changed the Directory entry ...
Execute Python CGI from /cgi-bin/ folder
0
0
0
3,691
8,912,327
2012-01-18T15:03:00.000
1
0
1
0
python,user-interface
8,913,722
10
false
0
1
If you're more into gaming you can use PyGame for GUIs.
2
23
0
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.019997
0
0
104,449
8,912,327
2012-01-18T15:03:00.000
0
0
1
0
python,user-interface
8,912,460
10
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
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
0
104,449
8,914,644
2012-01-18T17:36:00.000
1
0
0
0
python,zope,zodb
8,916,946
1
false
0
0
This is likely not a good setup. Your best bet is to work-around NFS in spite of it: maybe a loopback ext3 filesystem mounted on a regular file on the NFS volume -- NFSv3 should have few practical limits to filesize that you won't have natively. Only you will be able to measure if this performs well enough. Otherwis...
1
0
0
We recently moved a Zeo instance over to a new server environment and one of the changes was the file system now has the database files stored on an NFS share. When trying to start zeo, we've been getting lock file errors which after researching seems to be because of a known issue of lock files being created on an NFS...
Zeo/ZODB lock file location, possible to change?
0.197375
1
0
260
8,915,042
2012-01-18T18:04:00.000
2
0
0
1
python,json,google-app-engine,url,blob
8,915,133
2
false
1
0
This wouldn't on the development server (but will work on the production server) because its single threaded and you can't do a request to yourself from within a request. There are several workarounds for your issue: Use the file write API to store the data. Use the multithread dev_server (required to switch to pyth...
1
1
0
I am using Blobs to store json files for my application. What I am trying to achieve is to request an internal url of my application in order to get the relevant file. I have tried urllib, urllib2, urlfetch but every time I am getting a 5 second DeadlineExceededError: 5 timed out error. Is there a way to retrieve my bl...
How I can request a local url in my app engine application?
0.197375
0
0
165
8,917,800
2012-01-18T21:34:00.000
1
1
0
0
python,m2crypto
8,945,972
1
true
0
0
First, the problem was that python attempted to load the non-debug version of __m2crypto.pyd, which failed, because it lacked dependent components. This caused python to terminate - not because the module was not found, but because one if its children was not found. This is a critical error for python, and whether this...
1
1
0
I've built python 2.7 debug with MSVC 2008 to debug a script that imports M2Crypto. When I run my script, python_d correctly creates a Python_Eggs cache, and copies both the __m2crypto.pyd and __m2crypto_d.pyd into it. But then it attempts to load the non-debug python module from the cache, and terminates because it co...
python_d 2.7 will not load __m2crypto_d.pyd
1.2
0
0
394
8,917,885
2012-01-18T21:43:00.000
4
0
1
1
python,version,windows-server
60,124,084
24
false
0
0
Typing where python on Windows into a Command Prompt may tell you where multiple different versions of python are installed, assuming they have been added to your path. Typing python -V into the Command Prompt should display the version.
4
529
0
I have to run a Python script on a Windows server. How can I know which version of Python I have, and does it even really matter? I was thinking of updating to the latest version of Python.
Which version of Python do I have installed?
0.033321
0
0
1,459,615
8,917,885
2012-01-18T21:43:00.000
3
0
1
1
python,version,windows-server
45,665,525
24
false
0
0
If you have Python installed then the easiest way you can check the version number is by typing "python" in your command prompt. It will show you the version number and if it is running on 32 bit or 64 bit and some other information. For some applications you would want to have a latest version and sometimes not. It de...
4
529
0
I have to run a Python script on a Windows server. How can I know which version of Python I have, and does it even really matter? I was thinking of updating to the latest version of Python.
Which version of Python do I have installed?
0.024995
0
0
1,459,615
8,917,885
2012-01-18T21:43:00.000
-2
0
1
1
python,version,windows-server
44,818,859
24
false
0
0
Open a command prompt window (press Windows + R, type in cmd, and hit Enter). Type python.exe
4
529
0
I have to run a Python script on a Windows server. How can I know which version of Python I have, and does it even really matter? I was thinking of updating to the latest version of Python.
Which version of Python do I have installed?
-0.016665
0
0
1,459,615
8,917,885
2012-01-18T21:43:00.000
24
0
1
1
python,version,windows-server
8,917,940
24
false
0
0
When I open Python (command line) the first thing it tells me is the version.
4
529
0
I have to run a Python script on a Windows server. How can I know which version of Python I have, and does it even really matter? I was thinking of updating to the latest version of Python.
Which version of Python do I have installed?
1
0
0
1,459,615
8,918,183
2012-01-18T22:06:00.000
5
1
0
0
c++,python
8,918,813
1
true
0
1
To me it sounds like you just want to write a user interface for interactive creation of lilypond files. I don't see what all this has to do with compilation. Your python script will need to write a file in lilypond notation and afterwards your script needs to call lilypond on that file (e.g. with os.system). You could...
1
0
0
EDIT: Solved, thanks everyone! What I would like to be able to do in simple terms is take user input from one programming language, convert it into another programming language and have it compiled automatically. For example (simplified and not precisely what I want to do but along similar lines): 1) Write a python sc...
Automatic compiling between languages
1.2
0
0
161
8,918,773
2012-01-18T22:59:00.000
2
0
1
0
python,memory-leaks,numpy,scipy
8,959,115
2
false
0
0
Yes, there is clearly a memory leak here. I ran the nlsp demo, that uses SNLE with interalg, using valgrind and found that 295k has been leaked from running the solver once. This should be reported to them.
1
2
1
Whenever I run the solver 'interalg' (in the SNLE function call from OpenOpt) in a loop my memory usage accumulates until the code stops running. It happen both in my Mac Os X 10.6.8 and in Slackware Linux. I would really appreciate some advice, considering that I am not extremely literate in python. Thank you! Daniel
'Memory leak' when calling openopt SNLE in a loop
0.197375
0
0
143
8,919,011
2012-01-18T23:22:00.000
0
0
0
0
python,https,http-headers
8,919,354
2
false
0
0
It depends on what you are going to do with the result. httplib.HTTPSConnection has set_debuglevel method which allows printing the response data to stdout (though each line is prefixed). For debugging purposes that was exactly what I needed. Not sure, it is what you need.
1
0
0
How would you go about getting a completely unparsed response to a HTTPS request? Are there any HTTP libraries that will allow you to get at the raw response, or is constructing a request manually using sockets the only way? I'm specifically trying to see what newline characters the server is sending.
Getting a raw, unparsed response to a HTTPS GET request
0
0
1
2,108
8,919,392
2012-01-19T00:08:00.000
0
0
1
0
python,flash,actionscript-3,actionscript
8,921,276
1
false
0
0
The first nightmare would be nested symbols. Try some basics using onEnterFrame and see if you can iterate (is there a mechanism to discover all the stage members) the symbols/sprites on the stage and get their properties.
1
1
0
We're working on a project right now where our animator is creating animations in Flash (the tool in which he's most comfortable) which we need to export for our application. He's using separate sprites (for a person, we'd use eyes, mouth, hair, feet, etc.) and transforming them appropriately. So, if his head is rockin...
Exporting Flash/Actionscript animation to PNGs and transform data?
0
0
0
222
8,919,468
2012-01-19T00:20:00.000
1
0
1
0
python,multithreading,thread-safety,queue
8,919,508
4
false
0
0
Yes - there is no getting around that there will be some overhead. The Queue has no way to know that it will only be used in one thread!
2
2
0
Multi-threading usually means locking critical sections, etc. So I can't help but wonder, in a single-threaded program or a multi-threaded program but where the queue is just used in one particular thread, is there some (unnecessary) locking type of overhead? For instance when you call put or get or qsize, etc, does i...
Does the multi-threaded support of Queue exhibit overthread even when used for just one thread?
0.049958
0
0
115
8,919,468
2012-01-19T00:20:00.000
1
0
1
0
python,multithreading,thread-safety,queue
8,919,561
4
false
0
0
Acquiring and releasing an uncontended lock is extremely cheap on most modern hardware. It's one of the first things hardware designers optimize because the vast majority of lock operations are on uncontended locks.
2
2
0
Multi-threading usually means locking critical sections, etc. So I can't help but wonder, in a single-threaded program or a multi-threaded program but where the queue is just used in one particular thread, is there some (unnecessary) locking type of overhead? For instance when you call put or get or qsize, etc, does i...
Does the multi-threaded support of Queue exhibit overthread even when used for just one thread?
0.049958
0
0
115
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
71,692,901
34
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
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
0
352,338
8,921,188
2012-01-19T04:54:00.000
4
0
1
1
python,virtualenv
62,498,657
34
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
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.023525
0
0
352,338
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
65,636,990
34
false
0
0
If you are using windows, just run .\Scripts\activate. Mind that the backslash plays the trick!
17
190
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
0
352,338
8,921,188
2012-01-19T04:54:00.000
-1
0
1
1
python,virtualenv
71,559,922
34
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
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.005882
0
0
352,338
8,921,188
2012-01-19T04:54:00.000
1
0
1
1
python,virtualenv
71,215,993
34
false
0
0
The steps for activating virtualenv using Python3 on windows are: python3 -m venv env .\env\bin\activate
17
190
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.005882
0
0
352,338
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
60,413,441
34
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
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
0
352,338
8,921,188
2012-01-19T04:54:00.000
2
0
1
1
python,virtualenv
67,224,356
34
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
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.011764
0
0
352,338
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
71,382,806
34
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
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
0
352,338
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
71,376,740
34
false
0
0
Use These it worked for meenv\Scripts\activate
17
190
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
0
352,338
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
59,298,771
34
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
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
0
352,338
8,921,188
2012-01-19T04:54:00.000
21
0
1
1
python,virtualenv
47,483,536
34
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
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
1
0
0
352,338
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
61,607,988
34
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
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
0
352,338
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
61,962,316
34
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
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
0
352,338
8,921,188
2012-01-19T04:54:00.000
2
0
1
1
python,virtualenv
25,353,183
34
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
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.011764
0
0
352,338
8,921,188
2012-01-19T04:54:00.000
2
0
1
1
python,virtualenv
48,840,058
34
false
0
0
You can run the source command on cygwin terminal
17
190
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.011764
0
0
352,338
8,921,188
2012-01-19T04:54:00.000
1
0
1
1
python,virtualenv
53,059,234
34
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
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.005882
0
0
352,338
8,921,188
2012-01-19T04:54:00.000
0
0
1
1
python,virtualenv
58,090,444
34
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
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
0
352,338
8,929,284
2012-01-19T16:06:00.000
0
0
1
0
python,list,set
8,929,331
8
false
0
0
A list must be searched one by one, where a set or dictionary has an index for faster searching.
5
101
0
The python wiki says: "Membership testing with sets and dictionaries is much faster, O(1), than searching sequences, O(n). When testing "a in b", b should be a set or dictionary instead of a list or tuple." I've been using sets in place of lists whenever speed is important in my code, but lately I've been wondering why...
What makes sets faster than lists?
0
0
0
52,275
8,929,284
2012-01-19T16:06:00.000
2
0
1
0
python,list,set
57,924,362
8
false
0
0
Basically, Depends on the operation you are doing … *For adding an element - then a set doesn’t need to move any data, and all it needs to do is calculate a hash value and add it to a table. For a list insertion then potentially there is data to be moved. *For deleting an element - all a set needs to do is remove the h...
5
101
0
The python wiki says: "Membership testing with sets and dictionaries is much faster, O(1), than searching sequences, O(n). When testing "a in b", b should be a set or dictionary instead of a list or tuple." I've been using sets in place of lists whenever speed is important in my code, but lately I've been wondering why...
What makes sets faster than lists?
0.049958
0
0
52,275
8,929,284
2012-01-19T16:06:00.000
212
0
1
0
python,list,set
8,929,445
8
false
0
0
list: Imagine you are looking for your socks in your closet, but you don't know in which drawer your socks are, so you have to search drawer by drawer until you find them (or maybe you never do). That's what we call O(n), because in the worst scenario, you will look in all your drawers (where n is the number of drawers...
5
101
0
The python wiki says: "Membership testing with sets and dictionaries is much faster, O(1), than searching sequences, O(n). When testing "a in b", b should be a set or dictionary instead of a list or tuple." I've been using sets in place of lists whenever speed is important in my code, but lately I've been wondering why...
What makes sets faster than lists?
1
0
0
52,275
8,929,284
2012-01-19T16:06:00.000
4
0
1
0
python,list,set
8,929,452
8
false
0
0
While I have not measured anything performance related in python so far, I'd still like to point out that lists are often faster. Yes, you have O(1) vs. O(n). But always remember that this gives information only about the asymptotic behavior of something. That means if your n is very high O(1) will always be faster - t...
5
101
0
The python wiki says: "Membership testing with sets and dictionaries is much faster, O(1), than searching sequences, O(n). When testing "a in b", b should be a set or dictionary instead of a list or tuple." I've been using sets in place of lists whenever speed is important in my code, but lately I've been wondering why...
What makes sets faster than lists?
0.099668
0
0
52,275
8,929,284
2012-01-19T16:06:00.000
-1
0
1
0
python,list,set
68,699,664
8
false
0
0
Actually sets are not faster than lists in every scenario. Generally the lists are faster than sets. But in the case of searching for an element in a collection, sets are faster because sets have been implemented using hash tables. So basically Python does not have to search the full set, which means that the time comp...
5
101
0
The python wiki says: "Membership testing with sets and dictionaries is much faster, O(1), than searching sequences, O(n). When testing "a in b", b should be a set or dictionary instead of a list or tuple." I've been using sets in place of lists whenever speed is important in my code, but lately I've been wondering why...
What makes sets faster than lists?
-0.024995
0
0
52,275
8,929,695
2012-01-19T16:32:00.000
2
0
0
0
python,django,python-imaging-library,reportlab
8,930,498
2
false
1
0
PIL should be installed before library which uses it. I got similar problem with libimaging - PIL wasn't installed before libimaging so libimaging was compiled without it. Solution was uninstall libimaging and install it again with PIL already present in system.
1
0
0
I'm trying to push a django app to the production server, but for some reason it fails and says: ImportError: The _imaging C module is not installed The weird part is that when I use the development server on the same machine, it works just fine. PIL is installed, and I can import the _imaging module by hand in the ...
Reportlab can't find _imaging module using production server
0.197375
0
0
847
8,930,460
2012-01-19T17:24:00.000
0
0
0
0
python,gtk,pygtk,gtktreeview
8,931,266
3
false
0
1
In a gtk.TreeView object there's an append_column method, so yes, you can programmatically add a column to a gtk.TreeView. However, I'm not aware of any method for adding a new column to an existing model or using multiple models for the same gtk.TreeView. Anyway, I guess you can create a new model with an extra column...
2
5
0
I have a treeview that is populated from a treemodel. I would like to add a colum to the treeview. Is it possible to draw the data for that column from a separate treemodel or can I append at runtime a column to the existing treemodel?
Can I add a column to an existing treemodel in gtk?
0
0
0
1,854