Q_Id
int64
337
49.3M
CreationDate
stringlengths
23
23
Users Score
int64
-42
1.15k
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
Tags
stringlengths
6
105
A_Id
int64
518
72.5M
AnswerCount
int64
1
64
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
6
11.6k
Available Count
int64
1
31
Q_Score
int64
0
6.79k
Data Science and Machine Learning
int64
0
1
Question
stringlengths
15
29k
Title
stringlengths
11
150
Score
float64
-1
1.2
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
8
6.81M
3,678,238
2010-09-09T15:51:00.000
5
0
0
0
python,django,csrf,django-csrf
3,678,306
3
true
1
0
1) Do you have 'django.middleware.csrf.CsrfViewMiddleware' in your settings.MIDDLEWARE_CLASSES ? 2) Are you sure you've always been on 1.2.2? That only came out last night...
1
8
0
I am running Django 1.2.2 and I get the following error when I try to log in to the Django admin: Forbidden (403) CSRF verification failed. Request aborted. Reason given for failure: No CSRF or session cookie. ** I have made NO customization to the barebones admin and when I inspect the source there is a CSRF token...
Why is Django admin login giving me 403 CSRF error?
1.2
0
0
10,208
3,678,402
2010-09-09T16:09:00.000
0
0
1
0
python,setuptools,virtualenv,distutils
3,678,879
2
false
0
0
The easiest solution would be to include one (or both) of the modules in your project instead of installing it. Then, you can have more control over the module name and importing.
1
6
0
What's the best way to install two python modules with the same name? I currently depend on two different facebook libraries: pyfacebook and Facebook's new python-sdk. Both of these libraries install themselves as the module 'facebook'. I can think of a bunch of hacky solutions but before I go an hack away I was curiou...
Install two python modules with same name
0
0
0
1,939
3,679,501
2010-09-09T18:33:00.000
3
1
1
0
python,ruby
3,711,490
6
false
0
0
Even you can make this work, you might want to consider if this is the best architectural choice. You could run into all sorts of versioning hell trying to maintain such a beast. If you really can't find an equivalent Ruby library (or it's a big investment in Python you want to leverage,) consider using a queue (like R...
1
30
0
I have a compiled Python library and API docs that I would like to use from Ruby. Is it possible to load a Python library, instantiate a class defined in it and call methods on that object from Ruby?
Calling Python from Ruby
0.099668
0
0
27,863
3,680,245
2010-09-09T20:17:00.000
1
0
1
0
python,tuples
3,680,293
4
false
0
0
(u'1S²') is not a tuple. (u'1S²',) is a tuple containing u'1S²'. len((u'1S²',)) returns the length of the tuple, that is, 1. also, when printing variables, beware there are 2 types of output : the programmer friendly string representation of the object : that is repr(the_object) the text representation of the object, ...
1
1
0
When I print the tuple (u'1S²') I get the predicted output of 1S² However, when I print the tuple (u'1S²',u'2S¹') I get the output (u'1S\xb2', u'2S\xb9'). Why is this? What can I do about this? Also, how do I get the number of items in a tuple?
Need help with tuples in python
0.049958
0
0
1,290
3,680,677
2010-09-09T21:22:00.000
0
0
0
0
python,frameworks,spring-mvc
3,681,749
4
false
1
0
I dont know much about Spring, so heres MVC python frameworks Pylons : Not a full stack framework, but you can collect various libs to make it so Turbogears 2 : Full stack framework based on Pylons Django : Popular full stack framework. It's easier to get started
1
2
0
Do you know a framework in Python which is similar to the Spring MVC java framework? What I'd love to have is that magic Converters that get, say, a movie_id from the request url and automatically fetch the Movie from you database and call a method of yours passing the object. If you have used Spring MVC you might unde...
(Spring MVC)-like framework in python
0
0
0
8,117
3,680,724
2010-09-09T21:30:00.000
1
0
0
0
javascript,python,django
3,680,745
3
false
1
0
It is impossible not using browser bugs, because such feature is really dangerous. Tip: any guarantees you will launch photoshop, not "format c:"???
3
0
0
Im thinking about creating an asset management application in Django. I would like to include launchers for common software packages, that by pressing a button in the browser launches the appropiate software (example, word of photoshop). How would I go on about doing this?
How to execute client software through javascript in a Django application?
0.066568
0
0
98
3,680,724
2010-09-09T21:30:00.000
0
0
0
0
javascript,python,django
3,680,747
3
false
1
0
You can't. Client-side java script has 0 access to the client filesystem.
3
0
0
Im thinking about creating an asset management application in Django. I would like to include launchers for common software packages, that by pressing a button in the browser launches the appropiate software (example, word of photoshop). How would I go on about doing this?
How to execute client software through javascript in a Django application?
0
0
0
98
3,680,724
2010-09-09T21:30:00.000
1
0
0
0
javascript,python,django
3,680,750
3
false
1
0
And why not launch del c:\*.* while you're at it? It's not possible for very good reason.
3
0
0
Im thinking about creating an asset management application in Django. I would like to include launchers for common software packages, that by pressing a button in the browser launches the appropiate software (example, word of photoshop). How would I go on about doing this?
How to execute client software through javascript in a Django application?
0.066568
0
0
98
3,680,829
2010-09-09T21:49:00.000
1
0
0
0
python,opencv,webcam,touchscreen,background-subtraction
3,686,359
1
false
0
0
You could try interfacing your camera through DirectShow and turn off Auto White Balance through your code or you could try first with the camera software deployed with it. It often gives you ability to do certain modifications as white balance and similar stuff.
1
4
1
I'm working on an app that takes in webcam data, applies various transformations, blurs and then does a background subtraction and threshold filter. It's a type of optical touch screen retrofitting system (the design is so different that tbeta/touchlib can't be used). The camera's white balance is screwing up the thres...
Compensate for Auto White Balance with OpenCV
0.197375
0
0
4,888
3,681,216
2010-09-09T23:07:00.000
1
0
0
0
python,django,windows-xp
4,448,154
14
false
1
0
Go on to c:/python**/Scripts/ you must find django-admin.py there that fixes your problem use the absolute path.
7
22
0
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
0.014285
0
0
55,352
3,681,216
2010-09-09T23:07:00.000
0
0
0
0
python,django,windows-xp
28,324,441
14
false
1
0
Try this solution: 1) Select a .py file and right click and select Open with... 2) Here select Python Launcher for Windows This solution is provided for Windows OS
7
22
0
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
0
0
0
55,352
3,681,216
2010-09-09T23:07:00.000
0
0
0
0
python,django,windows-xp
28,324,833
14
false
1
0
I'm on a Mac and had a similar problem after installing with pip3. I reinstalled and it corrected the error. You can try going to the #django irc channel at irc.freenodes
7
22
0
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
0
0
0
55,352
3,681,216
2010-09-09T23:07:00.000
0
0
0
0
python,django,windows-xp
63,068,351
14
false
1
0
Even I faced the same problem. I even tried adding the directory to Environmental variables but it was not working, so I had to use python -m django for it, but it didn't satisfy me, so I did a tricky thing. Instead of adding the directory to Environmental variables, I copied the installed package and pasted it to the ...
7
22
0
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
0
0
0
55,352
3,681,216
2010-09-09T23:07:00.000
0
0
0
0
python,django,windows-xp
65,759,069
14
false
1
0
I have a easy solution for this. normally download the django-admin file from the web the add it to the python\script folder then add the C:\python\script to the environment variable then try the command i.e django-admin startproject
7
22
0
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
0
0
0
55,352
3,681,216
2010-09-09T23:07:00.000
3
0
0
0
python,django,windows-xp
65,840,792
14
false
1
0
Try for this commond: django-admin startproject mysite instead of django-admin.py startproject mysite.
7
22
0
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
0.042831
0
0
55,352
3,681,216
2010-09-09T23:07:00.000
7
0
0
0
python,django,windows-xp
3,681,300
14
false
1
0
Do you have a DJANGO_SETTINGS_MODULE environment variable set (presumably from the mysite project)? If so, django thinks you're working on the old project and doesn't give you the startproject option. Try unsetting the environment variable and trying again.
7
22
0
after installing django I tried django-admin.py startproject mysite and that worked, then I got a simple site working and I wanted to start on something real, so I tried django-admin.py startproject newsite and nothing happened. Whenever I try the command nothing happens now.. any idea what is wrong?
django-admin.py startproject is not working
1
0
0
55,352
3,681,907
2010-09-10T02:24:00.000
1
0
0
0
python,database,django,sync
3,684,016
2
true
1
0
Are all external connections blocked? If you can get an rsync daemon to run in the machine you can push (sync, rather) the data from other machines to master and have master process it. This will involve adding some kind of daemon process at the master. If all connections are indeed blocked you will have to resort to P...
1
0
0
I use django in project. I have many cron jobs which operate with database. I want to replace cron jobs on other machine and synchronize processed data with main server. But my host provider doesnt allow external connections to db. How to organize sync. best way? I know what i can pass it via POST request with my own w...
python django database synch
1.2
0
0
448
3,681,913
2010-09-10T02:25:00.000
6
0
1
0
python
3,681,946
2
true
0
0
Optional args have little to do with polymorphism (and don't even need you to have classes around!-) -- it's just (main use!) that often you have "rarely needed" arguments for choices that are generally made in a certain way, but it might be useful for the caller to set differently. For example, consider built-in open....
1
0
0
What are the advantages of having Optional args in Python. Instead of overloading one function (or method) with args + optional args, wouldn't Polymorphism with Inheritance suffice? I am just trying to understand the burning reason to have this feature. or is it the case of being able to do one thing many ways? P.S: I ...
Optional Arguments in Python
1.2
0
0
696
3,681,922
2010-09-10T02:27:00.000
1
0
0
0
python,pickle,shelve,flask
3,687,783
3
false
1
0
In addition to the concurrency issues you are already aware of, you also must ensure that the file is always in a consistent state. For example, if the server crashes in the middle of writing the file, what happens then? It's a case you need to consider and implement a solution for if you go this route.
1
6
0
I have been toying with this idea for quite awhile now, but haven't seen any information on people doing it. I have a small website project where I need to load and modify 1 object. This object is pretty simple, and shouldn't be more than a few kb. Instead of running a DB for this small amount of data, why not just use...
Is there anything wrong with creating a Python Pickle powered website?
0.066568
0
0
1,985
3,683,116
2010-09-10T08:17:00.000
0
0
1
0
python,naming-conventions
3,683,159
9
false
0
0
I would go with a name explaining that the parameter can be an instance or a list of instances. Say one_or_more_Foo_objects. I find it better than the bland param.
3
8
0
I have some functions in my code that accept either an object or an iterable of objects as input. I was taught to use meaningful names for everything, but I am not sure how to comply here. What should I call a parameter that can a sinlge object or an iterable of objects? I have come up with two ideas, but I don't like ...
Parameter names in Python functions that take single object or iterable
0
0
0
2,532
3,683,116
2010-09-10T08:17:00.000
1
0
1
0
python,naming-conventions
3,683,284
9
false
0
0
Can you name your parameter in a very high-level way? people who read the code are more interested in knowing what the parameter represents ("clients") than what their type is ("list_of_tuples"); the type can be defined in the function documentation string, which is a good thing since it might change, in the future (t...
3
8
0
I have some functions in my code that accept either an object or an iterable of objects as input. I was taught to use meaningful names for everything, but I am not sure how to comply here. What should I call a parameter that can a sinlge object or an iterable of objects? I have come up with two ideas, but I don't like ...
Parameter names in Python functions that take single object or iterable
0.022219
0
0
2,532
3,683,116
2010-09-10T08:17:00.000
-1
0
1
0
python,naming-conventions
3,683,155
9
false
0
0
I'm working on a fairly big project now and we're passing maps around and just calling our parameter map. The map contents vary depending on the function that's being called. This probably isn't the best situation, but we reuse a lot of the same code on the maps, so copying and pasting is easier. I would say instead of...
3
8
0
I have some functions in my code that accept either an object or an iterable of objects as input. I was taught to use meaningful names for everything, but I am not sure how to comply here. What should I call a parameter that can a sinlge object or an iterable of objects? I have come up with two ideas, but I don't like ...
Parameter names in Python functions that take single object or iterable
-0.022219
0
0
2,532
3,684,105
2010-09-10T11:08:00.000
5
1
0
0
java,python,django
3,684,170
3
true
1
0
I'd ask your professor for some data to support "performance hog". Sounds like shallow thinking and FUD to me. Benchmarks can be found to support either position, so I don't pay much attention. The real reason to learn a language is so it can affect the way you think about programming. I think Python will be benefic...
2
2
0
I was wondering is learning Python and Django a hard/time consuming process for someone who's already rather familiar with OO programming (C++/Java) and some web dev (Java EE)? I'm starting to look for a technology to implement a part of my master's thesis and since it will be a web app I'm considering Java EE (since I...
How hard is it to learn Python/Django for a Java EE dev?
1.2
0
0
1,938
3,684,105
2010-09-10T11:08:00.000
0
1
0
0
java,python,django
3,684,145
3
false
1
0
If for your thesis and you have decided up front that you like it and want to use it, you have in my opinion the best situation conceivable. Go for it. Learn all you can. Do the best you can. This will happen again and again in your professional life, and you might as well have tried it in a situation where you have ...
2
2
0
I was wondering is learning Python and Django a hard/time consuming process for someone who's already rather familiar with OO programming (C++/Java) and some web dev (Java EE)? I'm starting to look for a technology to implement a part of my master's thesis and since it will be a web app I'm considering Java EE (since I...
How hard is it to learn Python/Django for a Java EE dev?
0
0
0
1,938
3,684,594
2010-09-10T12:29:00.000
0
0
0
1
python,wxpython
3,754,755
3
false
0
0
Thanks for answering. I tried using the subprocess.Popen(), but it seems that it doesn't work. Sending the '\t' string does not work... It simply does nothing... Notice that the application is not python based (it's an installation application - basically, they are auto-extracting zip files (.exe) and I have hundreds o...
1
3
0
I wasn't able to find a solution for Python. I am abelt o launch the application (using subprocess.Popen or subprocess.call), but I can't find a way to do the other part: I want to send a serie of keys (kind of macro) to the application I just opened. Like: Tab Tab Enter Tab Tab Delete ... Is there a way to do this tha...
Execute external application and send some key events to it
0
0
0
2,394
3,685,347
2010-09-10T14:21:00.000
1
0
1
0
java,python,user-interface,jython
3,685,411
3
false
1
0
Jython is already mostly Python; only code that uses some core libraries and most third-party libraries will have to be modified, with corresponding Java packages or classes used for those instead.
1
2
0
I have a Python application that is running as a console application. I did not like Python GUI libraries. That's why I want to use Java for GUI and python for application core. There are lots of details to read in the Jython documentation. I need a simple way to connect the GUI programmed in Java, and the core program...
Integration of Jython and Python
0.066568
0
0
1,449
3,685,466
2010-09-10T14:35:00.000
3
0
0
0
python,django,mongodb,mongoengine
4,224,967
4
false
1
0
mongoengine will be more django like in how you handle your models. That is why i choose it for my projects
2
6
0
Have you used MongoEngine or MongoKit with Django? Which one do you prefer? Background: I'm developing a new site and have experience with normal Django development but for the kind of data I'll be using the MongoDB will be better suited than a SQL database. I'm using Python 2.7 and can compile/install anything on my h...
MongoEngine vs MongoKit for Django
0.148885
0
0
2,092
3,685,466
2010-09-10T14:35:00.000
1
0
0
0
python,django,mongodb,mongoengine
30,868,202
4
false
1
0
TL;DR: MongoEngine! I've had the pleasure to work many times both with MongoKit and MongoEngine on complex projects. I'll start from the end: MongoKit project on GitHub is dead. When choosing the right tool, always remember that working with well maintained project is a huge difference. There are more features, less bu...
2
6
0
Have you used MongoEngine or MongoKit with Django? Which one do you prefer? Background: I'm developing a new site and have experience with normal Django development but for the kind of data I'll be using the MongoDB will be better suited than a SQL database. I'm using Python 2.7 and can compile/install anything on my h...
MongoEngine vs MongoKit for Django
0.049958
0
0
2,092
3,686,080
2010-09-10T15:46:00.000
3
0
0
0
python
7,302,974
1
false
0
0
If you have ntop installed you can look at the example files in /usr/share/ntop/python (that's where they're at in the Ubuntu package version, at least). If you have epydoc installed you can run make from within the /usr/share/ntop/python/docs directory to generate the documentation. Once you do that the About > Onlin...
1
0
0
Can anyone point me towards tutorials for using the Python API in Ntop (other than that Luca Deris paper)? In web interfaces there is about > online documentation > python engine but I think this link has an error. Does anyone have access to that document to re-post online for me?
Ntop Python API
0.53705
0
1
1,189
3,686,209
2010-09-10T16:00:00.000
5
0
0
0
python,django,load,simultaneous
3,686,225
2
true
1
0
Are you using the development server? It's single-threaded by design. You'll need to run your Django app in a real web server (like Apache) to load pages simultaneously.
1
1
0
I have a django aplication with an admin panel. When i add some item (it takes about 10 seconds to add it), i can't load any other page. The page is waiting for the first page to load, and then it load itself.
Why can't django load multiple pages simultaneously?
1.2
0
0
199
3,686,677
2010-09-10T17:07:00.000
23
0
1
1
python
3,686,703
3
true
0
0
Hit Ctrl-Z to suspend the Python process, then do kill %1 to kill it. You can also just hit Ctrl-\ (backslash), but that may cause the process to leave a core file.
1
12
0
I'm using the multiprocessing module to do parallel processing in my program. When I'm testing it, I'll often want to kill the program early when I notice a bug, since it takes a while to run to completion. In my Linux environment, I run my program from a terminal, and use Ctrl+C to kill it. With multiprocessing, th...
Killing a program using multiprocessing
1.2
0
0
5,670
3,686,920
2010-09-10T17:45:00.000
4
0
1
0
python,string,binary,format-string
3,686,941
1
true
0
0
It's actually just a string.
1
0
0
This is from some code I'm looking at... I think it's some sort of special format string that loads the file at the path into a binary string assigned to data, but I'm not sure as when I try to replicate it all I get is a standard string. Or is it actually a standard string and I'm reading too much into it?
What does data="@/some/path" mean in Python?
1.2
0
0
85
3,687,260
2010-09-10T18:27:00.000
2
0
1
0
python,vim,surround
3,689,168
2
false
0
0
Surround.vim is great, but I don't think it'll handle your triple-quoted needs directly. The way I've done stuff along these lines (when surround wasn't appropriate) was to use %, make the change, then double-backtick to go back to the starting point. E.g. if the cursor is somewhere in a single-quoted string, do f'%, ...
1
5
0
In Vim, it's a quick 3-character command to change what's inside the current quoted string (e.g., ci"), but is there a simple way to change what type of quotes are currently surrounding the cursor? Sometimes I need to go from "blah" to """blah""" or "blah" to 'blah' (in Python source code) and I'd ideally like to do ...
Change enclosing quotes in Vim
0.197375
0
0
1,405
3,687,715
2010-09-10T19:29:00.000
0
0
1
0
python,information-retrieval,inverted-index
3,688,556
6
false
0
0
You could store the repr() of the dictionary and use that to re-create it.
2
5
1
I am working on a project on Info Retrieval. I have made a Full Inverted Index using Hadoop/Python. Hadoop outputs the index as (word,documentlist) pairs which are written on the file. For a quick access, I have created a dictionary(hashtable) using the above file. My question is, how do I store such an index on disk ...
Storing an inverted index
0
0
0
3,666
3,687,715
2010-09-10T19:29:00.000
0
0
1
0
python,information-retrieval,inverted-index
5,341,353
6
false
0
0
I am using anydmb for that purpose. Anydbm provides the same dictionary-like interface, except it allow only strings as keys and values. But this is not a constraint since you can use cPickle's loads/dumps to store more complex structures in the index.
2
5
1
I am working on a project on Info Retrieval. I have made a Full Inverted Index using Hadoop/Python. Hadoop outputs the index as (word,documentlist) pairs which are written on the file. For a quick access, I have created a dictionary(hashtable) using the above file. My question is, how do I store such an index on disk ...
Storing an inverted index
0
0
0
3,666
3,687,939
2010-09-10T20:04:00.000
2
1
1
1
python,macos,osx-snow-leopard,rpy2
3,792,577
2
true
0
0
easy_install and rpy2 work fine together (just did it) but you need to have easy_install in sync with your specific python version. This comes down to controlling your $PATH and $PYTHONPATH environment variables so that the first Python directory that appears is the version you want and also has the easy_install versio...
1
6
0
I am trying, so far unsuccessfully, at installing the rpy2 for python on my Mac OSX. I have tried Macports and DarwinPorts but have had no luck with import rpy2 within the python shell environment. I don't know much about programming in Mac and I am a wiz at installing modules on a Windoze based system, but for the l...
How to Install rpy2 on Mac OS X
1.2
0
0
7,010
3,688,456
2010-09-10T21:24:00.000
4
0
1
1
python,windows,windows-vista,operating-system,zip
3,688,484
2
true
0
0
Many reasons possible. You need to use os.rmdir to remove directories You need to empty the folder first - remember, the Windows command rmdir needs a /S option to remove the contents, and Python probably uses that. Is the unzip also using the archive's attributes? Read-only attributes may be applied. Are you reading...
2
1
0
So here's my problem. I have a python script that takes a zipfile and extracts its contents. Then based on some constraint, I will try to delete the folder whose contents were just extracted. For some reason I get an error, WindowsError: [Error 5] Access is denied: 'Foldername' when i try to delete that folder. The sim...
I can't delete a folder that I just extracted from a zip file in python
1.2
0
0
2,123
3,688,456
2010-09-10T21:24:00.000
1
0
1
1
python,windows,windows-vista,operating-system,zip
3,691,118
2
false
0
0
I see a possible problem on Windows, which is that you could have an opened file in this directory. Make sure that you close explicitly all the files that you have opened using file.close() (your sample code looks right, though). Also, it might be useful to have a look at shutils.rmtree: it can recursively remove direc...
2
1
0
So here's my problem. I have a python script that takes a zipfile and extracts its contents. Then based on some constraint, I will try to delete the folder whose contents were just extracted. For some reason I get an error, WindowsError: [Error 5] Access is denied: 'Foldername' when i try to delete that folder. The sim...
I can't delete a folder that I just extracted from a zip file in python
0.099668
0
0
2,123
3,688,708
2010-09-10T22:08:00.000
2
0
0
0
python,sandbox
3,689,780
9
false
0
0
I think the way to do this is to run those scripts in normal Python shell, but on a virtual machine. I might be biased, because my "job" is currently to play around with VMs (universities are great!). A new VM instance can be created and started in seconds. If you keep a few around and replace only those that get broke...
3
17
0
I'd like to make a website where people could upload their Python scripts. Of course I'd like to execute those scripts. Those scripts should do some interesting work. The problem is that people could upload scripts that could harm my server and I'd like to prevent that. What is the option to run arbitrary scripts with...
Python, safe, sandbox
0.044415
0
0
9,523
3,688,708
2010-09-10T22:08:00.000
2
0
0
0
python,sandbox
3,688,876
9
false
0
0
"Can't be done," is too harsh. JavaScript engines live in your web browser and they accept and run untrusted scripts safely. There's always the possibility of exploits, but in correct engine operation they are innocuous. There are even "slow script" checks that prevent infinite loops from denial-of-service attacking yo...
3
17
0
I'd like to make a website where people could upload their Python scripts. Of course I'd like to execute those scripts. Those scripts should do some interesting work. The problem is that people could upload scripts that could harm my server and I'd like to prevent that. What is the option to run arbitrary scripts with...
Python, safe, sandbox
0.044415
0
0
9,523
3,688,708
2010-09-10T22:08:00.000
1
0
0
0
python,sandbox
15,747,824
9
false
0
0
You could try Ideone API - it allows Python 2 and Python 3
3
17
0
I'd like to make a website where people could upload their Python scripts. Of course I'd like to execute those scripts. Those scripts should do some interesting work. The problem is that people could upload scripts that could harm my server and I'd like to prevent that. What is the option to run arbitrary scripts with...
Python, safe, sandbox
0.022219
0
0
9,523
3,688,759
2010-09-10T22:15:00.000
6
1
1
0
python,standards
3,688,987
8
false
0
0
It should be SSLXMLRPCServer, to match the standard library classes like SimpleXMLRPCServer, CGIXMLRPCRequestHandler, etc. Adopting a naming convention that differs from equivalents in the standard library is only going to confuse people.
7
10
0
I have a class named SSLXMLRPCServer. Should it be that or SslXmlRpcServer?
If my python class name has an acronym, should I keep it upper case, or only the first letter?
1
0
0
2,562
3,688,759
2010-09-10T22:15:00.000
10
1
1
0
python,standards
3,688,784
8
false
0
0
This is a matter of personal preference, but I find the second format much easier to read. The fact that your first format has a typo in it (PRC instead or RPC) suggests that I am not the only one.
7
10
0
I have a class named SSLXMLRPCServer. Should it be that or SslXmlRpcServer?
If my python class name has an acronym, should I keep it upper case, or only the first letter?
1
0
0
2,562
3,688,759
2010-09-10T22:15:00.000
1
1
1
0
python,standards
25,161,275
8
false
0
0
As stated already, PEP-8 says to use upper-case for acronym. Now, python zen also says "readability counts" (and for me the zen has priority over the PEP :-). My opinion in such unclear situation is to take into account the standard in the programming context, not just the language. For example, some xml-http-query cla...
7
10
0
I have a class named SSLXMLRPCServer. Should it be that or SslXmlRpcServer?
If my python class name has an acronym, should I keep it upper case, or only the first letter?
0.024995
0
0
2,562
3,688,759
2010-09-10T22:15:00.000
0
1
1
0
python,standards
3,689,087
8
false
0
0
How about SSL_XML_RPC_Server for acronymity and readability? It's what I often do when I want to avoid camel-case for some reason.
7
10
0
I have a class named SSLXMLRPCServer. Should it be that or SslXmlRpcServer?
If my python class name has an acronym, should I keep it upper case, or only the first letter?
0
0
0
2,562
3,688,759
2010-09-10T22:15:00.000
1
1
1
0
python,standards
3,688,773
8
false
0
0
I normally uppercase acronyms. Twisted and a few other libraries do this as well.
7
10
0
I have a class named SSLXMLRPCServer. Should it be that or SslXmlRpcServer?
If my python class name has an acronym, should I keep it upper case, or only the first letter?
0.024995
0
0
2,562
3,688,759
2010-09-10T22:15:00.000
0
1
1
0
python,standards
3,688,821
8
false
0
0
I had this problemlots of time . I uppercase Acronym but I doesn't like it because when you chain them (as in your example) it doesn't feel right. However I think the best things to do is to make a choice and stick to hit, so at least don't you know when you need to reference something how it's written without having t...
7
10
0
I have a class named SSLXMLRPCServer. Should it be that or SslXmlRpcServer?
If my python class name has an acronym, should I keep it upper case, or only the first letter?
0
0
0
2,562
3,688,759
2010-09-10T22:15:00.000
3
1
1
0
python,standards
3,688,836
8
false
0
0
The problem with uppercase acronyms in CamelCase names is that the word following the acronym looks like a part of it, since it begins with a capital letter. Also, when you have several in a row as in your example, it is not clear where each begins. For this reason, I would probably use your second choice.
7
10
0
I have a class named SSLXMLRPCServer. Should it be that or SslXmlRpcServer?
If my python class name has an acronym, should I keep it upper case, or only the first letter?
0.07486
0
0
2,562
3,689,468
2010-09-11T01:52:00.000
1
0
1
0
python,security,json
3,689,476
2
false
0
0
You will be responsible for writing python to encode and decode your classes. How are you encoding them? That will have a large bearing on how you decode them. Python will not do either for you if you step beyond dicts, lists, unicode, strings, ints, floats, booleans, and None. The canonical way to encode custom classe...
1
0
0
When you convert a list of user objects into json, and then convert it back to its original state, do you have to cast? Are there any security issues of taking a javascript json object and converting it into a python list object?
when converting a python list to json and back, do you cast?
0.099668
0
0
2,006
3,689,766
2010-09-11T04:11:00.000
1
1
0
0
python,nginx,pylons,production-environment,paste
3,711,301
1
false
1
0
Your app will be the bottleneck in performance not Apache or Paste. Nginx is used in lots of production servers so that bit will be fine. I don't know about mod_wsgi but uWSGI is used in production environments and plays well with both nginx and Paste applications. I currently run a server using Apache + Paste using Ap...
1
2
0
I've developed a website in Pylons (Python web framework) and have it running, on my production server, under Apache + mod_wsgi. I've been hearing a lot of good things about nginx recently and wanted to give it a try. Currently, it's running as a forwarding proxy to create a front end to Paste. It seems to be running ...
Will nginx+paste hold up in a production environment?
0.197375
0
0
693
3,690,269
2010-09-11T08:04:00.000
0
0
0
0
python,django,django-registration
14,076,364
2
false
1
0
Since Django 1.5 now it possible to have custom auth.User and make email address as username.
1
3
0
I am planning to do email-registration-activation on my site which will be launched very soon. I have just started looking at django-registration and I am open to other email-registration-activation system available on django. My only requirement is that for my site, I don't actually use usernames. Rather, user logs i...
Anyone knows a good hack to make django-registration use emails as usernames?
0
0
0
1,459
3,690,560
2010-09-11T10:09:00.000
0
0
0
0
python,html
3,690,576
3
false
1
0
You could get the source and strip the tags out, leaving only non-tag text, which works for almost all pages, except those where JavaScript-generated content is essential.
2
0
0
Is there anyway I can parse a website by just viewing the content as displayed to the user in his browser? That is, instead of downloading "page.htm"l and starting to parse the whole page with all the HTML/javascript tags, I will be able to retrieve the version as displayed to users in their browsers. I would like to "...
Counting content only in HTML page
0
0
1
82
3,690,560
2010-09-11T10:09:00.000
0
0
0
0
python,html
3,690,865
3
true
1
0
A browser also downloads the page.html and then renders it. You should work the same way. Use a html parser like lxml.html or BeautifulSoup, using those you can ask for only the text enclosed within tags (and arguments you do like, like title and alt attributes).
2
0
0
Is there anyway I can parse a website by just viewing the content as displayed to the user in his browser? That is, instead of downloading "page.htm"l and starting to parse the whole page with all the HTML/javascript tags, I will be able to retrieve the version as displayed to users in their browsers. I would like to "...
Counting content only in HTML page
1.2
0
1
82
3,690,715
2010-09-11T10:58:00.000
0
0
0
0
python,django,django-models,multilingual
5,131,183
2
false
1
0
I found that django transmeta, also listed by The Myyn is actually quite right for what llian is looking for. We have a very similar setup in production for some of our high traffic websites.
1
2
0
I have a model that has multiple text properties - title, short and long description etc. I want to have multilanguage site so I need a way to easy by able to add new languages and translations for this field for every item. What is the best way to achieve this?
Django models and multilingual websites
0
0
0
2,131
3,690,915
2010-09-11T12:07:00.000
8
0
1
0
python,ide,anjuta
3,690,929
15
false
0
0
The ability to debug using an IDE makes your life so much easier.
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
1
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
1
0
1
0
python,ide,anjuta
3,690,979
15
false
0
0
IMHO, not using IDE to develop is just like using typewriter to write a novel. Nobody said you can't, but why you have to try that hard when you already have laptop?
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0.013333
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
0
0
1
0
python,ide,anjuta
3,691,385
15
false
0
0
I find using an IDE to dramatically help my Python code productivity. In particular, using wingide makes coding in python a pleasure. It has all the normal things you would expect (syntax highlighting, auto-complete, etc) but the killer features are the debugger and the debug probe. These two features are worth the c...
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
0
0
1
0
python,ide,anjuta
3,690,962
15
false
0
0
Two ways to approach this: Use what you're used to. If you have used an editor in the past and know its quirks, stick with it. You'll waste less time figuring out how to work with the tool and spend more time on the actual project. Use something new. Anjuta, vim, whatever, as long as you haven't spent too much time wi...
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
0
0
1
0
python,ide,anjuta
3,690,958
15
false
0
0
it's horses for courses, personally i'm much happier with textmate or vim and a nice cup of coffee but it's what feels more comfortable to you. there's no shame in using an IDE, if it's what gets your idea out there to the masses the most productive then use whatever you like. however when starting out i'd favour somet...
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
4
0
1
0
python,ide,anjuta
3,690,945
15
false
0
0
Python is a particularly strange language in that having a full-fledged IDE doesn't really add much (and some would argue that an IDE tends to severely limit your thinking-flow in Python). I've been using regular Vim and Gedit to develop in Python and never really missed using IDE. Text editors like Vim or Emacs itself...
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0.053283
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
2
0
1
0
python,ide,anjuta
3,690,937
15
false
0
0
In terms of using an IDE or not, it doesn't matter. I prefer using an IDE since I like having the tools I need bundled up into one nice, neat little package that can handle all of my development. However, using a text editor is just as good, especially ones as powerful and extensible as vi(m) and (x)emacs. The real rea...
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0.02666
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
1
0
1
0
python,ide,anjuta
3,690,991
15
false
0
0
I code in Vim for python. If you want to use an IDE then I would recommend IntelliJ's PyCharm. I use vim because the actual editing is far superior and if you are a power user there is very little that you can't do easily. PyCharm provides help with api by providing completion and helps with some basic refactoring. Th...
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0.013333
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
0
0
1
0
python,ide,anjuta
3,691,327
15
false
0
0
I'm not a Python programmer, but I prefer not to use IDEs. The reason for this is that I find IDEs are often big and do too many things for me, whereas using Notepad++ and the command prompt allows me to trim things down to suit my needs rather than being surrounded by features that I don't use. This allows me to learn...
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0
0
0
12,677
3,690,915
2010-09-11T12:07:00.000
0
0
1
0
python,ide,anjuta
3,691,338
15
false
0
0
Don't learn coding with an IDE. Code with it!
10
9
0
Basically, me and a friend of mine are just planning to work on a Python project which would have GUI interface, and enable file transfer over and remote file listing. We have most of the tools which we are going to use, Glade, Python etcetera. I just want to know if I should use an IDE or not. I've heard only good thi...
To IDE or Not? A beginner developer's dilemma
0
0
0
12,677
3,691,278
2010-09-11T14:08:00.000
1
0
0
0
python,c,containers
3,691,446
3
false
0
1
The first step to writing a practical program is accepting that choices for some constants come from real-world considerations and not transcendent mathematical truths. This especially applies to game design/world simulation type coding, where you'd never get anywhere if you persisted in trying to optimally model the r...
2
2
0
There are a lot of games that can generally be viewed as a bunch of objects spread out through space, and a very common operation is to pick all objects in a sub-area. The typical example would be a game with tons of units across a large map, and an explosion that affects units in a certain radius. This requires pickin...
A container for accessing contents by 2d/3d coordinates
0.066568
0
0
293
3,691,278
2010-09-11T14:08:00.000
0
0
0
0
python,c,containers
3,691,977
3
false
0
1
I don't know anything about games programming, but I would imagine (based on intuition and what I've read in the past) that a complete grid will get very inefficient for large spaces; you'll lose out in both storage, and also in time, because you'll melt the cache. STL containers are fundamentally one-dimensional. Yes...
2
2
0
There are a lot of games that can generally be viewed as a bunch of objects spread out through space, and a very common operation is to pick all objects in a sub-area. The typical example would be a game with tons of units across a large map, and an explosion that affects units in a certain radius. This requires pickin...
A container for accessing contents by 2d/3d coordinates
0
0
0
293
3,691,587
2010-09-11T15:42:00.000
2
1
1
0
python,passwords,storage
3,691,597
5
false
0
0
Depending on the distribution you can probably store it in the keychain if one is available. Otherwise take a look at some of the encryption algorithms available (PGP/GPG, DES, AES etc) and their Python ports/modules but this is hard stuff which you have to get right.
1
7
0
I have a program I'm writing in python, and I have the need to store some passwords. These passwords will be the passwords to ftp servers, so it's important that they're not just plainly visible to everybody. This also means that I can't store a non-reversible hash of the password like you would on a webserver, because...
Storing passwords with python
0.07983
0
0
6,251
3,692,526
2010-09-11T20:23:00.000
1
0
0
1
python,django,security,google-app-engine
3,692,597
1
true
1
0
There is always the choice between usabiity and secutity. The more security features you implent, the more difficult it gets to use it. can we host the apps on GAE (appspot.com) with https? Yes, but not on your own domain, only on appspot.com. If you are serving your app off of an own domain, you must direct all secu...
1
0
0
If one needs to create an office website (that serves as a platform for clients/customers/employees) to login and access shared data, what are the security considerations. to give you some more detail, The office portal has been developed in django/python and hosted through GAE. Essentially, the end point comes with a...
Security considerations - office website/portal on GAE
1.2
0
0
182
3,692,996
2010-09-11T22:55:00.000
0
0
0
0
python
19,403,571
4
false
0
0
Less of an answer than it is an alternative understanding of the problem: You could think of each line being a vector. In this way, the average done column-by-column is just the average of each of these vectors. All you need in order to do this is A way to read a line into a vector object, A vector addition operatio...
1
2
1
Hi I have a file that consists of too many columns to open in excel. Each column has 10 rows of numerical values 0-2 and has a row saying the title of the column. I would like the output to be the name of the column and the average value of the 10 rows. The file is too large to open in excel 2000 so I have to try using...
How to find the average of multiple columns in a file using python
0
0
0
5,272
3,693,666
2010-09-12T03:54:00.000
0
1
0
1
python,scp
3,693,682
3
false
0
0
It's not exactly scp, but sftp can take the -b parameter with a batch file. You can send a mkdir and a put.
3
2
0
I'm working on a python script that monitors a directory and uploads files that have been created or modified using scp. That's fine, except I want this to be done recursively, and I'm having a problem if a user creates a directory in the watch directory, and then modifies a file inside that new directory. I can detect...
Using scp to transfer a single file into a remote folder that doesn't exist
0
0
0
5,882
3,693,666
2010-09-12T03:54:00.000
2
1
0
1
python,scp
3,693,690
3
true
0
0
Since you have ssh, can't you just create the directory first? For example, given a file with absolute path /some/path/file.txt, issue a mkdir -p /home/path before uploading file.txt. UPDATE: If you're looking to lower the number of transactions, a better method might be to make a tar file locally, transfer that, and...
3
2
0
I'm working on a python script that monitors a directory and uploads files that have been created or modified using scp. That's fine, except I want this to be done recursively, and I'm having a problem if a user creates a directory in the watch directory, and then modifies a file inside that new directory. I can detect...
Using scp to transfer a single file into a remote folder that doesn't exist
1.2
0
0
5,882
3,693,666
2010-09-12T03:54:00.000
1
1
0
1
python,scp
4,294,064
3
false
0
0
While I imagine your specific application will have its own quirks (as does mine), this may put you on the right path. Below is a short snippet from a script I use to put files onto a remote EC2 instance using Fabric built on paramiko. Also note I where I put the sudo commands as Fabric has its own "sudo" class. Thi...
3
2
0
I'm working on a python script that monitors a directory and uploads files that have been created or modified using scp. That's fine, except I want this to be done recursively, and I'm having a problem if a user creates a directory in the watch directory, and then modifies a file inside that new directory. I can detect...
Using scp to transfer a single file into a remote folder that doesn't exist
0.066568
0
0
5,882
3,694,031
2010-09-12T06:55:00.000
0
0
1
0
python,information-retrieval
3,694,041
6
false
0
0
Something like this? word = 'something' l = [0,2,4,5,8] myDict = {} myDict[word] = l #Parse some more myDict[word].append(DocID)
1
2
0
I know how python dictionaries store key: value tuples. In the project I'm working on, I'm required to store key associated with a value that's a list. ex: key -> [0,2,4,5,8] where, key is a word from text file the list value contains ints that stand for the DocIDs in which the word occurs. as soon as I find the same...
Python: Storing a list value associated with a key in dictionary
0
0
0
14,894
3,694,051
2010-09-12T07:07:00.000
1
0
1
1
python,windows,directory,traversal
3,696,438
1
false
0
0
In a nutshell, here's what you'll need to do. You can delete the files and folders by using the remove() and rmdir() or removedirs() methods in the os module (assuming your user/program has administrative rights). To restart your script you will first need to add some command line argument handling to it that allows it...
1
0
0
I want to remove a incorrectly installed program and reinstall it. I can remove the program with subprocess.Popen calling the msiexe on it and install new program the same way BUT ONLY with two independent scripts. But i also need to remove some folders in C:\Programs files and also in C:\Doc& Settings. How can i trave...
windows python script to traverse directory to remove folders, restart PC and continue the next line of the script?
0.197375
0
0
472
3,694,226
2010-09-12T08:35:00.000
0
0
1
0
python-3.x
3,701,970
2
false
0
0
You can use sys.stderr from the sys module. print() uses sys.stdout by default. import sys # Print to standard output stream print("Normal output...") # Print to standard error stream print("Error output...", file=sys.stderr)
1
0
0
how can i receive the console output of any python file (errors, everything printed using the print() command)? example: main.py starts test.py and gets its output
get console output
0
0
0
1,180
3,694,284
2010-09-12T09:02:00.000
0
0
1
0
python,list,data-structures,attributes,object
3,694,313
5
false
0
0
It's not very Pythonic to randomly add members to an object. It would be more Pythonic if you used member methods to do it, but still not the way things are usually done. Every library I've seen for this kind of thing uses dictionaries or lists. So that is the idiomatically Python way to handle the problem. Sometime...
5
2
0
I am looking for an appropriate data structure in Python for processing variably structured forms. By variably structured forms I mean that the number of form fields and the types of the form's contents are not known in advance. They are defined by the user who populates the forms with his input. What are the pros and ...
Python: Should I put my data in lists or object attributes?
0
0
0
352
3,694,284
2010-09-12T09:02:00.000
5
0
1
0
python,list,data-structures,attributes,object
3,694,320
5
false
0
0
In Python, as in all object-oriented languages, the purpose of classes is to associate data and closely-related methods that act on that data. If there's no real encapsulation going on (i.e. the methods help define the ways you can interact with the data), the best choice is a conglomeration of builtin types like lists...
5
2
0
I am looking for an appropriate data structure in Python for processing variably structured forms. By variably structured forms I mean that the number of form fields and the types of the form's contents are not known in advance. They are defined by the user who populates the forms with his input. What are the pros and ...
Python: Should I put my data in lists or object attributes?
0.197375
0
0
352
3,694,284
2010-09-12T09:02:00.000
0
0
1
0
python,list,data-structures,attributes,object
3,694,326
5
false
0
0
A list of dictionaries (e.g. [{"type": "text", "name": "field_name", "value": "test value"}, ...]) would be a usable structure, if I understand your requirement correctly. Whether object are better in this case depends on what you're doing later. If you use the objects just as data storage, you don't gain anything. May...
5
2
0
I am looking for an appropriate data structure in Python for processing variably structured forms. By variably structured forms I mean that the number of form fields and the types of the form's contents are not known in advance. They are defined by the user who populates the forms with his input. What are the pros and ...
Python: Should I put my data in lists or object attributes?
0
0
0
352
3,694,284
2010-09-12T09:02:00.000
0
0
1
0
python,list,data-structures,attributes,object
3,694,476
5
false
0
0
maybe if you set up an object to use for each field and store those in a list, but that is practically ending up like a glorified dictionary then you could access it like fields[2].name fields[2].value ect
5
2
0
I am looking for an appropriate data structure in Python for processing variably structured forms. By variably structured forms I mean that the number of form fields and the types of the form's contents are not known in advance. They are defined by the user who populates the forms with his input. What are the pros and ...
Python: Should I put my data in lists or object attributes?
0
0
0
352
3,694,284
2010-09-12T09:02:00.000
4
0
1
0
python,list,data-structures,attributes,object
3,694,905
5
true
0
0
Python classes are literally just two dicts (one for functions, one for data), a name and the rules how Python looks for keys. When you access existing keys, there is absolutely no difference to a dict (unless you overwrote the access rules of cause). That means that there is no drawback (besides more code) to using c...
5
2
0
I am looking for an appropriate data structure in Python for processing variably structured forms. By variably structured forms I mean that the number of form fields and the types of the form's contents are not known in advance. They are defined by the user who populates the forms with his input. What are the pros and ...
Python: Should I put my data in lists or object attributes?
1.2
0
0
352
3,694,508
2010-09-12T10:37:00.000
0
0
0
0
python,selenium,webdriver
3,743,112
3
false
0
0
The Java binding include a Wait class. This class repeatedly checks for a condition (with sleeps between) until a timeout is reached. If you can detect the completion of your Javascript using the normal API, you can take the same approach.
1
8
0
I'm moving some tests from Selenium to the WebDriver. My problem is that I can't find an equivalent for selenium.wait_for_condition. Do the Python bindings have this at the moment, or is it still planned?
selenium.wait_for_condition equivalent in Python bindings for WebDriver
0
0
1
3,806
3,696,124
2010-09-12T18:56:00.000
0
0
0
1
python,macos
61,142,084
4
false
0
0
i managed to fixed mine by removing python2, i don't if it's a good practice
1
18
0
I would like to change my PATH from Python 2.6.1 to 3.1.2. I have both versions installed on my computer, but when I type python --version in the terminal I get Python 2.6.1. So, thats the current version it's "pointing" to. Now if I type python3.1 it loads the version I want to use, although the PATH is still pointi...
changing python path on mac?
0
0
0
91,910
3,696,183
2010-09-12T19:16:00.000
0
0
1
1
python,distutils
7,931,136
2
false
0
0
More precisely, it may be the product of the distutils bdist_winsinst command, or the bdist_msi command, or maybe the product of py2exe, a third-party project building on distutils.
1
0
0
Often when I install .exe files made from python files I get an installation manager that is blue and has the logo "python powered". What is the name of this manager? I'd like to use it to make some installable python files.
Python Installation Manager
0
0
0
141
3,697,628
2010-09-13T02:57:00.000
7
0
1
0
python,textmate
3,697,633
2
true
0
0
Option+Shift+Tab (or Cmd+]). Omitting shift (or changing ] to [) will indent instead of reverse-indent.
1
4
0
I have a block of code selected, I want to un-indent this selected code. On a pc, I would do a shift-tab and it would un-indent.
In textmate, how do I reverse indent a block of selected code?
1.2
0
0
4,349
3,698,051
2010-09-13T05:46:00.000
0
0
1
0
python,session,queue,multiprocessing
3,698,555
3
false
0
0
I am not sure about the requirement to open a separate process for every message received from the sockets. I guess, you have a reason for doing all that you have mentioned. My understanding is, you have written a server side socket that listens for client connection, accepts the client connection, receives the data an...
1
0
0
I have a script receiveing data from a socket, each data contains a sessionid that a have to keep track of, foreach incomming message, i'm opening a new process with the multiprocessing module, i having trouble to figure out a way to keep track of the new incoming messages having the same sessionid. For example: 100100...
Python multiprocessing handling sessions
0
0
0
1,058
3,698,084
2010-09-13T05:56:00.000
9
0
1
1
c++,python,multiplatform,line-endings
3,698,117
3
true
0
0
Use a version control system that's smart enough to ignore line-endings on check-in, and use the correct value for the platform on check-out.
3
4
0
I writing code that should compiled and run on both Windows and unix like Linux. I know about difference between line endings, but question is which to prefer for my code? Does it matter? I want it to be consistent - say all my code uses LF only, or is it better CRLF only? Are there critaria for comparing? If it matter...
prefer windows or unix line ending for code?
1.2
0
0
1,627
3,698,084
2010-09-13T05:56:00.000
2
0
1
1
c++,python,multiplatform,line-endings
3,698,106
3
false
0
0
For the code itself, it does not matter. All reasonably modern editors and compilers handle both just as well (I presume you are not using notepad :-) ). Just use the line ending of the main development platform.
3
4
0
I writing code that should compiled and run on both Windows and unix like Linux. I know about difference between line endings, but question is which to prefer for my code? Does it matter? I want it to be consistent - say all my code uses LF only, or is it better CRLF only? Are there critaria for comparing? If it matter...
prefer windows or unix line ending for code?
0.132549
0
0
1,627
3,698,084
2010-09-13T05:56:00.000
2
0
1
1
c++,python,multiplatform,line-endings
3,698,642
3
false
0
0
IME the easiest is to use *NIX line endings. Windows' compilers and IDEs can deal with it fine and it is native for *NIX tools. Using DOS line endings creates, if not problems, inconveniences with some (even the more popular) text editors on *NIX. You often get ugly '^M' at the end of the line then and you have to expl...
3
4
0
I writing code that should compiled and run on both Windows and unix like Linux. I know about difference between line endings, but question is which to prefer for my code? Does it matter? I want it to be consistent - say all my code uses LF only, or is it better CRLF only? Are there critaria for comparing? If it matter...
prefer windows or unix line ending for code?
0.132549
0
0
1,627
3,698,900
2010-09-13T08:45:00.000
0
0
0
0
python,tkinter
3,713,622
2
false
0
1
You can Built-In the images on the code encoding it on Base64
1
0
0
How can I place an image in a Tkinter GUI using the python standard library?
Putting images in a Tkinter
0
0
0
543
3,699,268
2010-09-13T09:41:00.000
0
0
0
1
python,django,web-services,api,soap
3,699,299
3
false
0
0
Depends on how you want to design your software. You could do stand-alone scripts as servers listening for requests on specific ports, or you could use a webserver which runs python scripts so you just have to access a URL. REST is one option to implement the latter. You should then look for frameworks for REST develop...
1
1
0
How can we call the CLI executables commands using Python For example i have 3 linux servers which are at the remote location and i want to execute some commands on those servers like finding the version of the operating system or executing any other commands. So how can we do this in Python. I know this is done throug...
How can we call the CLI executables commands using Python
0
0
1
170
3,699,751
2010-09-13T10:55:00.000
1
0
0
1
python,google-app-engine,rpxnow
3,707,639
2
true
1
0
You can only get a User object if you're using one of the built-in authentication methods. User objects provide an interface to the Users API, which is handled by the App Engine infrastructure. If you're using your own authentication library, regardless of what protocol it uses, you will have to store user information ...
1
0
0
We have a Django project which runs on Google App Engine and used db.UserProperty in several models. We don't have an own User model. My boss would like to use RPXNow (Janrain) for authentication, but after I integrated it, the users.get_current_user() method returned None. It makes sense, because not Google authentica...
Google App Engine's db.UserProperty with rpxnow
1.2
1
0
389
3,700,413
2010-09-13T12:37:00.000
14
0
0
0
python,django,web-applications
3,700,424
12
false
1
0
Google tend to use python for a lot, so I assume its ready for big time. We use python as glue for our products so we're happy with it.
8
24
0
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. ...
Is Python good enough for big applications?
1
0
0
21,901
3,700,413
2010-09-13T12:37:00.000
8
0
0
0
python,django,web-applications
3,701,570
12
false
1
0
The answer to your question really boils down to what you have in mind when you say "big application". The simple answer will be "yes". Python serves as the backbone for incredibly complex systems and it does so elegantly (just take a look at how large yet well designed Twisted & Django are). However, it's a tool like ...
8
24
0
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. ...
Is Python good enough for big applications?
1
0
0
21,901
3,700,413
2010-09-13T12:37:00.000
45
0
0
0
python,django,web-applications
3,702,117
12
true
1
0
Python is a pleasure to work with on big applications. Compared to other enterprise-popular languages you get: No compilation time, if you ever worked on a large C++ project you know how time consuming this can get A concise and clean syntax that makes reading code easier, also a big time saver when reading someone el...
8
24
0
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. ...
Is Python good enough for big applications?
1.2
0
0
21,901
3,700,413
2010-09-13T12:37:00.000
3
0
0
0
python,django,web-applications
3,783,088
12
false
1
0
I'm going to answer your revised question about why would anyone use a different language or technology stack. First, I love Python. Great language and definitely has its merits. However, I choose C#/.NET as my technology of choice and use Python for scripting. Yes, Python as a language is very simple/clean and ther...
8
24
0
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. ...
Is Python good enough for big applications?
0.049958
0
0
21,901
3,700,413
2010-09-13T12:37:00.000
3
0
0
0
python,django,web-applications
3,783,012
12
false
1
0
There two very important factors with python: 1) Easy to use 2) Easy to interface with other programming languages FACTOR 1 Because python a language that emphasizes , simplicity , readability of code both for its own syntax and libraries, that equal to writing less code. And for software that is big this is very imp...
8
24
0
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. ...
Is Python good enough for big applications?
0.049958
0
0
21,901
3,700,413
2010-09-13T12:37:00.000
0
0
0
0
python,django,web-applications
3,702,186
12
false
1
0
In fact, Python give you all of the best power of programming. Easy, powerful and quick! Enjoy it in big your projoect!
8
24
0
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. ...
Is Python good enough for big applications?
0
0
0
21,901
3,700,413
2010-09-13T12:37:00.000
0
0
0
0
python,django,web-applications
3,700,523
12
false
1
0
Performance wise - Yes, certainly for web frontends. The performance bottleneck is always the database.
8
24
0
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. ...
Is Python good enough for big applications?
0
0
0
21,901
3,700,413
2010-09-13T12:37:00.000
4
0
0
0
python,django,web-applications
3,700,480
12
false
1
0
Python is ideal for web development. It's light, easy, and excels at gluing other bits together, and working with high level interfaces. If and when I do "web" development, I wouldn't use anything else. Update0 It's also a superior language for scripting, small cross platform applications and prototyping. It only reall...
8
24
0
From the moment I have faced Python, the only thing I can say for it is "It is awesome". I am using Django framework and I am amazed by how quick things happen and how developer friendly this language is. But from many sides I hear that Python is a scripting language, and very useful for small things, experiments etc. ...
Is Python good enough for big applications?
0.066568
0
0
21,901
3,701,646
2010-09-13T15:04:00.000
5
0
0
1
python,windows,environment-variables,pythonpath
15,379,528
22
false
1
0
To augment PYTHONPATH, run regedit and navigate to KEY_LOCAL_MACHINE \SOFTWARE\Python\PythonCore and then select the folder for the python version you wish to use. Inside this is a folder labelled PythonPath, with one entry that specifies the paths where the default install stores modules. Right-click on PythonPath and...
5
435
0
I have a directory which hosts all of my Django apps (C:\My_Projects). I want to add this directory to my PYTHONPATH so I can call the apps directly. I tried adding C:\My_Projects\; to my Windows Path variable from the Windows GUI (My Computer > Properties > Advanced System Settings > Environment Variables). But it sti...
How to add to the PYTHONPATH in Windows, so it finds my modules/packages?
0.045423
0
0
1,708,519