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
31,003,994
2015-06-23T13:22:00.000
2
0
1
0
python,python-2.7,pip,anaconda
61,646,022
10
false
0
0
You should find installed packages in : anaconda's directory / lib / site_packages That's where i found mine.
7
103
0
After installing a package in an anaconda environment, I'll like to make some changes to the code in that package. Where can I find the site-packages directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages
Anaconda site-packages
0.039979
0
0
179,229
31,003,994
2015-06-23T13:22:00.000
0
0
1
0
python,python-2.7,pip,anaconda
65,584,502
10
false
0
0
I encountered this issue in my conda environment. The reason is that packages have been installed into two different folders, only one of which is recognised by the Python executable. ~/anaconda2/envs/[my_env]/site-packages ~/anaconda2/envs/[my_env]/lib/python2.7/site-packages A proved solution is to add both folders to python path, using the following steps in command line (Please replace [my_env] with your own environment): conda activate [my_env]. conda-develop ~/anaconda2/envs/[my_env]/site-packages conda-develop ~/anaconda2/envs/[my_env]/lib/python2.7/site-packages (conda-develop is to add a .pth file to the folder so that the Python executable knows of this folder when searching for packages.) To ensure this works, try to activate Python in this environment, and import the package that was not found.
7
103
0
After installing a package in an anaconda environment, I'll like to make some changes to the code in that package. Where can I find the site-packages directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages
Anaconda site-packages
0
0
0
179,229
31,003,994
2015-06-23T13:22:00.000
4
0
1
0
python,python-2.7,pip,anaconda
31,637,998
10
false
0
0
You could also type 'conda list' in a command line. This will print out the installed modules with the version numbers. The path within your file structure will be printed at the top of this list.
7
103
0
After installing a package in an anaconda environment, I'll like to make some changes to the code in that package. Where can I find the site-packages directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages
Anaconda site-packages
0.07983
0
0
179,229
31,003,994
2015-06-23T13:22:00.000
6
0
1
0
python,python-2.7,pip,anaconda
55,619,141
10
false
0
0
I installed miniconda and found all the installed packages in /miniconda3/pkgs
7
103
0
After installing a package in an anaconda environment, I'll like to make some changes to the code in that package. Where can I find the site-packages directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages
Anaconda site-packages
1
0
0
179,229
31,003,994
2015-06-23T13:22:00.000
111
0
1
0
python,python-2.7,pip,anaconda
31,004,084
10
true
0
0
You can import the module and check the module.__file__ string. It contains the path to the associated source file. Alternatively, you can read the File tag in the the module documentation, which can be accessed using help(module), or module? in IPython.
7
103
0
After installing a package in an anaconda environment, I'll like to make some changes to the code in that package. Where can I find the site-packages directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages
Anaconda site-packages
1.2
0
0
179,229
31,003,994
2015-06-23T13:22:00.000
2
0
1
0
python,python-2.7,pip,anaconda
66,036,836
10
false
0
0
At least with Miniconda (I assume it's the same for Anaconda), within the environment folder, the packages are installed in a folder called \conda-meta. i.e. C:\Users\username\Miniconda3\envs\environmentname\conda-meta If you install on the base environment, the location is: C:\Users\username\Miniconda3\pkgs
7
103
0
After installing a package in an anaconda environment, I'll like to make some changes to the code in that package. Where can I find the site-packages directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages
Anaconda site-packages
0.039979
0
0
179,229
31,003,994
2015-06-23T13:22:00.000
5
0
1
0
python,python-2.7,pip,anaconda
67,448,916
10
false
0
0
One more option using the interpreter: import site; print(''.join(site.getsitepackages())) And using a terminal/prompt: python -c "import site; print(''.join(site.getsitepackages()))" Also in this case you can easily print one of the directory (in case there are more than one) using own filter
7
103
0
After installing a package in an anaconda environment, I'll like to make some changes to the code in that package. Where can I find the site-packages directory containing the installed packages? I do not find a directory /Users/username/anaconda/lib/python2.7/site-packages
Anaconda site-packages
0.099668
0
0
179,229
31,005,233
2015-06-23T14:13:00.000
0
1
0
0
python,twitter
31,005,344
1
false
0
0
Use of Stream API could help you. You can collect the real time information there and using some clustering algorithms and data mining techniques can solve it.
1
0
0
I am doing some research of spam detection on Twitter where my program is dynamic enough which can built a tree of datastructure of metadata of user and his tweets just taking a parameter as Screen_name or Twitter id but collecting legitimate user name and spammer name is a manual task. (If there is any other way please suggest me.)
Is there any way to get current legitimate user list from Twitter in 5000 to 10000
0
0
1
73
31,008,719
2015-06-23T16:46:00.000
0
0
0
1
python-2.7,google-app-engine,go
31,039,704
1
false
1
0
I re-installed Python (the module_test and other tests failed) and updated the gae-go sdk. This fixed my problem. I believe that a recently identified Flash exploit had something to do with it as I experienced a number of Flash crashes in web page ads just before the problems began.
1
0
0
I've been successfully using go for months - last night my app started 404 page not found errors but only on pages that use Templates. Those that don't use the Template system work fine. I re-installed the Go sdk and discovered that the Guestbook demo ( also uses Templates) doesn't work either. ... and then I noticed that links to the log files weren't appearing on the Instance page of the dev console - but when I click the "default" link it displayed the guestbook templated page that I had just requested and got the 404. It seems that the system can't find template folder and that is causing the 404s My configuration seems to have broken and I haven't been able to figure out why - hope someone can help... ...After messing with environment variables and stuff for a while with no success, I ran "test_Python" file. These all generated Errors: test_too_big_rewrite, module_test, python_sandbox_test all generated errors - the process hung up on "test_serve" This is causing my problems? Is there a way to correct? Uninstall and reinstall Python? Will I have to uninstall/reinstall Go SDK ? thanks!
GAE golang templates stopped working
0
0
0
50
31,009,284
2015-06-23T17:16:00.000
2
0
0
0
python,csv
31,009,436
1
true
0
0
I believe the write will immediately write to the disk, so there isn't any benefit that I can see from closing and reopening the file. The file isn't stored in memory when it's opened, you just get essentially a pointer to the file, and then load or write a portion of it at a time. Edit To be more explicit, no, opening a large file will not use a large amount of memory. Similarly writing a large amount of data will not use a large amount of memory as long as you don't hold the data in memory after it has been written to the file.
1
3
1
I am writing a program with a while loop, which would write giant amount of data into a csv file. There maybe more than 1 million rows. Considering running time, memory usage, debugging and so on, what is the better option between the two: open a CSV file, keep it open and write line by line, until the 1 million all written Open a file, write about 100 lines, close(), open again, write about 100 lines, ...... I guess I just want to know would it take more memories if we're to keep the file open all the time? And which one will take longer? I can't run the code to compare because I'm using a VPN for the code, and testing through testing would cost too much $$ for me. So just some rules of thumb would be enough for this thing.
When writing large data into .csv file, is it better to open and close file often?
1.2
0
0
2,830
31,009,555
2015-06-23T17:30:00.000
0
0
0
0
python,django,selenium,functional-testing
31,042,109
2
true
1
0
I've decided that I am just going to call the method of the nightly methods directly, instead of making a truly functional test.
1
0
0
I am learning TDD and am using Django and Selenium to do some functional testing. I wanted to make it so that a user selects a checkbox that essentially says "add 1 to this number nightly". Then, for all of the users that have this setting on, a nightly process will automatically increment the number on these accounts. I want to be able to test this functionality in my functional test in selenium, but I don't know how I would go about it. I obviously don't want to wait a day for the test to finish either. Can someone help me think about how I can get started?
Django Functional Test for Time Delayed Procedure
1.2
0
0
74
31,014,137
2015-06-23T21:49:00.000
15
0
1
0
python,command-prompt,pyinstaller
31,014,207
2
true
0
0
Manually open a command prompt (Start > Run > cmd), navigate to the folder containing your program (cd C:/Users/Ladmerc/python_programs), and then run the program (my_program.exe). The terminal window will stay open after the program exits.
1
3
0
I know there are lots of questions on this topic, however none so far is the result of a pyinstaller package. I used pyinstaller to package a python file. It runs well before packaging, but when I open the exe, it briefly displays an error and closes before I get the chance to read. How can I stop the command prompt from doing so, or how else can I view this log?
Command prompt closing too quickly
1.2
0
0
3,802
31,014,858
2015-06-23T22:57:00.000
0
1
1
1
python,python-2.7
31,015,074
3
false
0
0
Thanks, @JoranBeasley, @barunsthakur, @PadraicCunningham, and all. I had PYTHONSTARTUP set in .bashrc. May help forgetful people in the future.
2
0
0
I'm taking a python course, I save exercise scripts in /this/is/where/I save/exercises/exercise.py. Now whenever I type python in terminal it immediately gives me this: IOError: [Errno 2] No such file or directory: '/this/is/where/I save/exercises/exercise.py' I know it's not found since I deleted the file. But why is python running that script whenever it runs? It's annoying. INFO Linux OS Python2 and Python3 both show same error
Typing 'python' in terminal runs a python script and spits error
0
0
0
64
31,014,858
2015-06-23T22:57:00.000
-1
1
1
1
python,python-2.7
31,014,929
3
false
0
0
Python has a special script that is run on startup. On my platform it is located at /usr/lib/python2.5/site-packages/sitecustomize.py IIRC. You may want to check that file for any script calls to that directory. Also, if you are on a linux machine you could check /etc/bashrc or /etc/profile.d. If that doesn't help, try to update your question with more specific information.
2
0
0
I'm taking a python course, I save exercise scripts in /this/is/where/I save/exercises/exercise.py. Now whenever I type python in terminal it immediately gives me this: IOError: [Errno 2] No such file or directory: '/this/is/where/I save/exercises/exercise.py' I know it's not found since I deleted the file. But why is python running that script whenever it runs? It's annoying. INFO Linux OS Python2 and Python3 both show same error
Typing 'python' in terminal runs a python script and spits error
-0.066568
0
0
64
31,015,556
2015-06-24T00:13:00.000
7
1
0
1
python,recovery
31,015,993
3
true
0
0
As far as I know, Python doesn't keep the source in memory, and the method presented in the comment only keeps executables alive, not scripts. Dumping the memory of the program probably allows you to get to the bytecode, but I have no idea how much effort that might require. Instead, I'd first try a non-Python-specific approach that I've succesfully used to recover Python sources that I've accidentally deleted. This assumes the filesystem is ext2/3/4 and that you have root access. The first step (in any recovery) is obviously to try to avoid writing any files on the system so as to not overwrite the data that you are looking for. On a home system I'd probably personally remount the partition as read-only if possible to avoid any more writes going through. I've heard other people recommend just quickly pulling the plug, which might prevent the OS/disk cache from being written to the disk and perhaps save you some additional data (or even prevent the deletion) if you're really quick about it. On a remote system, neither of these is probably a good idea (unless the data is really important and you can get the disk shipped to you or something) since the system might not like it if something goes read-only all of a sudden. The second step is to execute debugfs /dev/sdXY, where /dev/sdXY is the partition that the deleted file was on. In the prompt, say blocks /path/to/the/directory/the/removed/file/was/in. Then, give the blocks command paths to other existing files in the directory. Now, exit the program by saying quit, and hope that the block numbers you saw were close to each other. If the directory is old and the block numbers scattered, start with a recent file's block numbers. (That is, one that has been last modified as close in time to the removed file's last modification time as possible) We will try to scan the contents of the partition near the other files in the directory under the assumption that the files was stored close to them. Execute dd if=/dev/sdXY bs=4096 skip=BLOCKNUMBER count=COUNT |grep -C APPROXIMATE_LINE_COUNT_OF_THE_REMOVED_FILE WORD, where BLOCKNUMBER is a number somewhere before the first block number, COUNT is some suitable number of blocks to search and WORD is a word that was contained in the source file. If you don't get anything, try fishing near another file's blocks. If time is not an issue, and you can think of a string that only occurred in the removed file (so you don't get too many false positives), you might just skip all that and scan the whole disk with grep -a WORD -C LINECOUNT /dev/sdXY. Another method (that you should try before the other one) that probably won't work for you since IIRC recent versions of Ubuntu (and probably other systems too) by default configure the kernel to block access to /dev/mem, is trying to scan the memory for the file. Just do grep -a WORD -C LINECOUNT /dev/mem to scan memory instead of the partition. (This can also save your day if you've written a long text in a form field and you misclick and your browser empties the field)
1
5
0
Help, I screwed up. I have a somewhat complex python script that is currently running in a putty window to a Ubuntu server. I accidentally overwrote the script using another putty window, so the copy on the hard drive is now gone, but the script is still running from memory in the first window. This happened before I had a chance to run my backups for this folder. Is there a way I can get the script, (that is currently running) from the memory in the first putty window? I haven't stopped the script, my guess is once I stop it it will be gone forever. Can I send it to a background process somehow (some hot key,) then glean the script from a memory dump or something. I assume something like this would have to happen from the actual window from which the script is running. It would be nice if I could get the .py back, I heard Python compiles the script before running, if that is the case, the human readable part may be gone. Sigh, it has been a stressful day. Thanks for any help, Mark.using
Recover Python script from memory, I screwed up
1.2
0
0
17,971
31,017,006
2015-06-24T03:16:00.000
0
0
1
1
python,macos,python-2.7,python-3.x
36,225,388
2
false
0
0
I have similar issue with pip install. However, if I do "sudo su -" then do my pip install 'fileName', that solve the problem for me.
1
0
0
I have just installed Python 3.4.3 on my MAC (Yosemite). I need to install a couple of lxml, however everytime I type in: pip install /""/, I get error messages. I have followed multiple tutorials and pip is installed. MAC already had Python 2.7., but I installed the 3.4.3. version, not sure if that is the issue. The error message is: Brunos-MacBook-Pro:~ BrunoPaesLeme$ pip install /Macintosh HD/Users//Downloads/pycairo-1.10.0-cp27-none-win_amd64.whl Exception: Traceback (most recent call last): File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/basecommand.py", line 223, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/commands/install.py", line 268, in run wheel_cache File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/basecommand.py", line 268, in populate_requirement_set wheel_cache=wheel_cache File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/req/req_install.py", line 207, in from_line wheel_cache=wheel_cache) File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/req/req_install.py", line 66, in init req = pkg_resources.Requirement.parse(req) File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/pkg_resources/init.py", line 2960, in parse reqs = list(parse_requirements(s)) File "/Library/Python/2.7/site-packages/pip-7.0.3-py2.7.egg/pip/_vendor/pkg_resources/init.py", line 2891, in parse_requirements raise ValueError("Missing distribution spec", line) ValueError: ('Missing distribution spec', '/Macintosh') Anybody knows what I could be doing wrong? Any help would be appreciated.
Python pip install error
0
0
0
1,929
31,019,164
2015-06-24T06:29:00.000
1
0
0
0
python,django,django-models,django-admin
31,019,876
1
false
1
0
Superusers are special as their permission system returns True on every permission request (it is hardcoded). There is no "super group". You can simply create a group and give it all permissions (so add, change and delete permission to every model).
1
0
0
I am making an app. In which multiple superusers are there and beneath these super user we have multiple user. I am able to make superuser.But I am not able to add user in that for that super user.I am relatively new in django.
Making group in django app.
0.197375
0
0
53
31,020,766
2015-06-24T07:49:00.000
0
0
0
0
python,excel,openpyxl
31,022,634
2
true
0
0
This is currently (version 2.2) not possible.
1
1
0
I'm using openpyxl to write to an existing file and everything works fine. However after the data is saved on the file, graphs disappear. I understand Openpyxl currently only supports chart creation within a worksheet only. Charts in existing workbooks will be lost. Are there any alternate libraries in Python to achieve this. I just want to feed a few values, so all the graphs and calculation happen in excel. Thank you.
Graphs lost while overwriting to existing excel file in Python
1.2
1
0
2,336
31,022,379
2015-06-24T09:09:00.000
0
0
0
0
python,pandas
31,022,952
4
false
0
0
You can not use any of these chars in the file name ; /:*?\"|
1
0
1
I want to save a dataframe to a .csv file with the name '123/123', but it will split it in to two strings if I just type like df.to_csv('123/123.csv'). Anyone knows how to keep the slash in the name of the file?
How to save a dataframe as a csv file with '/' in the file name
0
0
0
373
31,023,793
2015-06-24T10:11:00.000
1
1
1
0
pdf,python-3.x,pdf-parsing,pdfminer
52,716,999
3
false
0
0
For python3, you can download pdfminer as: python -m pip install pdfminer.six
1
3
0
The texts in the pdf files are text formats, not scanned. PDFMiner does not support python3, is there any other solutions?
PDF text extract with Python3.4
0.066568
0
0
3,008
31,024,852
2015-06-24T11:04:00.000
0
0
1
0
python
31,025,251
1
false
0
0
There's no way to "listen" for changes other than repeatedly requesting that URL to check if something has changed; i.e. classic "pull updates". To get actual live notifications of changes, that other server needs to offer a way to push such a notification to you. If it's just hosting the file and is not offering any active notifications of any sort, then repeatedly asking is the best you can do. Try not to kill the server when doing so.
1
0
0
I am new to python. I want to read JSON data from URL and if there is any change in JSON data on server, I want to update in my JSON file which is on client. How can I do that through python? Actually i am ploting graph on django using JSON data which is on another server. That JSON data is updated frequently. So here i want to update my charts based on updated json data. For that i has to listen to URL link for change. So how can i do that.....i know with select() system call i can but need some another way
Asynchronous way to listen web service for data change
0
0
1
190
31,025,169
2015-06-24T11:20:00.000
0
1
0
0
python,photoshop
31,025,935
1
false
0
0
It seems this is due to a change in the Photoshop API. You may want to report it to them and get the right feedback. Since most of the stackflow user might be more "code-oriented", it is likely that you won't get effective answer.
1
0
0
I have used python to write script for Photoshop using versions from CS6 to CC 2014 and my scripts have worked flawlessly. Last week I updated my Photoshop to CC 2015 and my scripts stopped working. I got error messages about missing attributes. I thought this was due to CC 2015 having changed something about the COM interface. When I checked the available attributes, I noticed that only a small subset of all the attributes was avilabe. I then reinstalled the CC 2014 but the problem did not disappear, I still see just a small subset of the attributes, all the rest gave the same error message. I noticed the splash screen had changed from my previous version of CC 2014 which may mean that some changes has been made in my newer CC 2014 as well. I can still run the script on my old machine with CS6. I have of course run makepy prior to using the new Ps version. I have tried two approaches: win32com and comtypes. Neither works. I get different sets of exported methods for the win32com and comtypes approaches which is surprising. I am very dependent on my scripts and would like to find a solution. If you are using Photoshop CC 2014 with python, I recommend you don't upgrade until this problem is solved.
Python and Photoshop
0
0
0
2,211
31,025,392
2015-06-24T11:31:00.000
4
1
0
1
python,bash,unix,crontab
31,025,417
2
true
0
0
The working directory of the cron is different from the directory you run the script directly. Make your bash script to use absolute path for python script files. Or make the bash script to change directory to where you run the script directly.
1
1
0
I have a bash script to automate few things I do. The bash calls 2 python scripts, If I run the bash script normally, everything runs, no errors what so ever. I set up a cron job to Automate this and when I checked the logs I noticed the python scripts don't run at all. It gives me the following error. python: can't open file 'movefiles.py': [Errno 2] No such file or directory python: can't open file 'create_log_shimmer.py': [Errno 2] No such file or directory Both these files exist and runs when calling the bash script directly.
Crontab, python script fails to run
1.2
0
0
1,804
31,027,840
2015-06-24T13:24:00.000
3
0
1
0
python,arrays,linked-list,dynamic-arrays
31,028,040
1
true
0
0
Yes, it does. Removing a link from a linked list is O(1), while it is linear for a dynamic array. Suppose you want to build a data structure for an LRU. Typically, you would have a hash-table for "touch" operations, plus a sequence array to see what has aged. When an item is accessed, the hash table finds it in the sequence, and moves it to the end. If an item needs to be evicted, then the first item in the sequence is used to find the item in the hash table, which is then removed. In this example, using a linked-list for the sequence operation means that everything works in (expected) O(1) time. With dynamic vectors, everything would be linear. Linked lists still have their uses.
1
2
0
Does a linked list have any value in a language which has dynamic arrays, such as Python (which, of course, has the list data structure)? I currently understand a list in python to really just be a static array which, as more data is inserted, redefines itself as a new array (larger in size) copying the data from the old into the new (thus making it dynamic). is this correct? I also understand how a list and linked list stores data in memory differently (lists in a contiguous manner and linked lists in a non-contiguous manner), but does this provide any major advantages?
Does a linked list have any value in a language which has dynamic arrays?
1.2
0
0
66
31,028,239
2015-06-24T13:40:00.000
0
1
0
0
python,json,tweepy
31,028,615
1
false
0
0
There is no specific GETfeature that would allow that. What you'll need to do is create a search for that keyword and Get search/tweets and use the since_id and max_id like you have and look at time_created_at from the JSON and filter yet again using that. The problem with the previous step is that you're limited to 180 tweets /15 minutes. Another solution is to use the streaming API since it'll give you recent information most are within 5 minutes and you'll be able to filter by keywords as well.
1
2
0
Im using tweepy to search for a keyword in all tweets in the last 5 minutes. But I couldn't find a way to do this. I saw the since_id and max_id arguments, but they only work if I know the tweet_id before 5 minutes.
Using tweepy: how to retrieve all tweets within past 5 minutes
0
0
1
3,078
31,029,523
2015-06-24T14:35:00.000
1
0
1
0
python,python-2.7
31,029,658
1
true
0
0
You can’t do this with time.sleep(). However, you can use the output of time.time() which gives you the number of seconds since Jan, 1st 1970, based on your computer’s clock. It’s then easy to store this value in variables when you start and stop the timer and to compare them to get the elapsed time.
1
0
0
I've found a lot of similar questions to this, and maybe a more astute mind would have been able to figure this out through inference. Unfortunately I have very limited experience in Python, bear with me. What I'm trying to do is create a Pomodoro timer, which in itself is very simple, but I can't seem to find out how to STOP the countdown before it runs the whole 25 minutes. Essentially what I'm trying to do is keep documentation of my study time, and I don't want to include when I get up to use the restroom in that time so I'd like to be able to pause it and then resume the countdown of the remaining time right where it left off. Like the title implies I'm using the time.sleep() function for the countdown, and the end goal is to apply start and pause to some buttons and a simple time display as a ui.
How to pause Python's time.sleep() function?
1.2
0
0
641
31,031,503
2015-06-24T16:03:00.000
-11
0
1
0
python,function,module,python-import
31,031,981
5
false
0
0
1.Open in editor 2. Find the definition 3. Copy paste the old fashioned away Simplest solution is sometimes the dirtiest.
1
14
0
I need to import only a single function from another python file which runs stuff in it, but when I import the function, it runs the entire code instead of importing just the function I want. Is there anyway to only import a single function from another .py file without running the entire code?
Import a python module without running it
-1
0
0
22,060
31,035,318
2015-06-24T19:27:00.000
0
0
0
0
python,django,httpresponse
31,035,689
2
false
1
0
Yes that's a way to parse HTML into a DOM tree. If other people don't do that, they might have other requirements. In general your idea is not bad, it might require more CPU time then other testing method (for example regular expressions. But if it fits your needs for testing, just do it. Performance it rarely a problem at testing time.
1
0
0
I want to do a unit test on a html page which is returned as a byte string in an HttpResponse object... e.g. "find_elements_by_tag_name". Is the solution simply to xml.dom.minidom.parseString the bytes of response.content? I couldn't find any examples of people doing this online or in Django manuals or tutorials, which makes me wonder if there's a reason for not doing it this way? If it's bad practice and there's a better way to do this please can you say why and what?
Django get a DOM object from an HttpResponse
0
0
1
627
31,037,748
2015-06-24T21:51:00.000
2
0
0
0
android,python,scale,kivy,screen-density
31,038,234
1
false
0
1
Using size_hint alone already guarantees a degree of scale independence, as (as you note) all the sizes will be relative. Kivy internally checks some resolution related values of the device, and this is basically the point of dp; something like dp(10) for instance should be the same actual size on any device, in terms of real size on the screen in e.g. centimetres. This won't actually be quite right, if nothing else I think devices don't report precisely right results, but unless this is very important it will already take care of making things mostly look the same anywhere. I'm not sure what you mean about setting the App size - in Android's window manager an App just fills the screen (at least in most cases).
1
1
0
I am trying to get my game to look/scale well across different devices. I am attempting to introduce the dp and sp metrics into my apps as much as possible, but in this case I am refactoring a game to use these metrics for layout and widget sizing. Where before, my layouts were sized using size_hint in order to have everything get it's size relative to it's parent(the app itself is not given a size, nor is the window, but the root widget/layout has size_hint=(1, 1)), I am now faced with replacing this system with dp values, and can't figure out what they should be. I am thinking, that if I just size the root widget, App itself, or Window with dp, then I could continue to use size_hinting, as this would have a trickle down effect and scale everything correctly from the top on down, so to speak. And for this, It seemed like getting the resolution or density of a devices screen would be a great help(so I could use it to size my root widget/App/Window, per device). Is that possible with Kivy? Will this work? Is there a better way? What would you do? Thanks
Proper usage of metrics with Kivy(So GUI scales well across devices)
0.379949
0
0
766
31,045,708
2015-06-25T08:59:00.000
1
1
0
0
python,selenium,robotframework,xvfb
36,692,169
2
false
1
0
Yes there is with Xvfb installed. In very short: /usr/bin/Xvfb :0 -screen 0 1024x768x24& export DISPLAY=:0 robot your_selenium_test
1
3
0
I prepare some test suites for an e-commerce web site, so i use Selenium2Library which requires a running browser on a display. I am able to run these test on my local machine but i had to run them on remote server which does not have an actual display. I tried to use xvfb to create a virtual display but it did not worked, tried all solutions on some answers here but nothing changed. So i saw pyvirtualdisplay library of Python but it seems like helpful with tests written in Python. I'd like to know that if I am able to run test suites that i wrote in robotframework (which are .txt formatted and could be runnned via pybot) via Python so i can use pyvirtualdisplay? Sorry about my English, thanks for your answers...
Is there anyway to run robot framework tests without a display?
0.099668
0
1
2,600
31,054,656
2015-06-25T15:30:00.000
4
0
0
0
python,twitter,tweepy
31,058,208
2
false
0
0
If you're only concerned with tweets, use on_status(). This will give you what you needed without the added information and doing so will not hinder your limit. If you want detailed information use on_data(). --That's rarely the case unless you're doing heavy analysis.
1
10
0
I just started using tweepy library to connect with streaming api of twitter. I encountered both on_status() and on_data() methods of the StreamListener class. What is the difference? Total noob here!
What is the difference between on_data and on_status in the tweepy library?
0.379949
0
1
7,894
31,058,446
2015-06-25T18:49:00.000
0
0
0
0
python,3d,geometry,computational-geometry
31,058,586
2
true
0
0
Get the normal vector of the plane. (you can make a cross product between two non parallel vectors in the plane for that). Take the velocity vector components relative to the normal vector and: Make parallel component negative Keep perpendicular components the same. Following an approach similar to @jacdeh: Normalize the normal vector Make the inner product of velocity with unit normal (that is the scalar speed against the surface) Multiply the inner product with unit normal (that is the parallel component I mentioned). Subtract 2 times that component from velocity and this is the result.
2
2
1
I am trying to simulate a particle bouncing off the sides of a cylinder (inside) or any closed curved surface in 3 dimensions. At the moment of interaction with the surface, I have the position vector, the velocity vector, and the plane tangent to the surface at the intersection, and I am looking to derive the new velocity vector. Currently coding in Python, but pseudocode/general algorithm would be immensely helpful as well.
How to model particle bouncing off of a curved surface in 3D?
1.2
0
0
222
31,058,446
2015-06-25T18:49:00.000
0
0
0
0
python,3d,geometry,computational-geometry
31,058,674
2
false
0
0
Compute normal vector as cross product of two tangent vectors to your surface Normalize it to get unit normal Compute inner product (dot product) of minus velocity and normal vector Multiply inner product with unit normal to get projection on normal Subtract projection on normal from minus velocity Add that to projection to get new speed vector
2
2
1
I am trying to simulate a particle bouncing off the sides of a cylinder (inside) or any closed curved surface in 3 dimensions. At the moment of interaction with the surface, I have the position vector, the velocity vector, and the plane tangent to the surface at the intersection, and I am looking to derive the new velocity vector. Currently coding in Python, but pseudocode/general algorithm would be immensely helpful as well.
How to model particle bouncing off of a curved surface in 3D?
0
0
0
222
31,059,562
2015-06-25T19:52:00.000
0
0
0
1
python,windows-7,scheduled-tasks
31,075,460
1
false
0
0
While I had the Task Scheduler open, the screen was showing "running". After I closed the screen and let it run the next day, everything worked fine. It must be something to do with the refresh on the task scheduler. So my solution was to close the Task Scheduler and let it run as scheduled.
1
1
0
I'm a noobie to python and have over the past few days tested and created a .PY file that runs perfectly from the command prompt either with the D:\Python34 or just as Its pretty basic. Gets info from web and places it in a spreadsheet - I import requests, BeautifulSoup and openpyxl. The last statement is to save the workbook. I'm figuring that Python closes itself as does the workbook. I wish to run it daily. So I used the Windows Task Scheduler on my Windows 7 Ultimate. I have it running only when I am logged in. I have tried the following: 1) using python directly with complete paths 2) using only the full path and the 3) using a batch file that does #1 above and has an EXIT 4) using a batch file that does #2 above and has an EXIT When running the batch from the command file OR Task Scheduler, the command window opens, it does its thing and the command window closes. The problem is when I run it via the Task Scheduler in any of the above ways, it does its thing, but continues to say "RUNNING" in the scheduler. I have tried to run the Windows Process Monitor using some filters I found on the web, however nothing shows up. Extremely frustrating --Any suggestions would be appreciated. Jerry
python script via windows 7 scheduler still running
0
0
0
627
31,060,517
2015-06-25T20:48:00.000
5
1
1
0
python
31,061,329
1
true
0
0
Look at sys.excepthook. As its name suggests, it's a hook into the exception. You can use it to send you an email when exceptions are raised.
1
5
0
i have a scenario where some unknown exceptions may be raised during program execution and i can't except most of them and i want every time any exception will raise an email should send to me as exceptions cause program to terminate if not properly catch! so i have read about python provide atexit module but it did not work with exceptions so my question is , is there any way to make atexit work with exceptions?? so every any exception raised and programs terminates it should send me a mail? thanks
how to use atexit when exception is raised
1.2
0
0
2,151
31,062,620
2015-06-25T23:43:00.000
6
0
1
0
python,scikit-learn
31,062,641
1
true
0
0
Use the __module__ attribute, i.e.: Ridge.__module__ If you want to know it from an instance of the class: inst.__class__.__module__ If you need the module object (not just the name as string): sys.modules[Ridge.__module__]
1
4
1
Is there any way to determine where a class is coming from in python (especially sklearn)? I want to determine if a class is from sklearn.linear_models or sklearn.ensemble. As an example, I would like to be able to determine if Ridge() is a member of sklearn.linear_model. The fit function is a bit different depending on the model so formulas fed to each via patsy need to be different.
Determine where a class is imported from in python
1.2
0
0
62
31,066,456
2015-06-26T06:33:00.000
0
0
0
0
php,python,ios,server,backend
31,067,192
2
false
1
0
No it should not cause an error, you are requesting the server with an HTTP method(POST) which serves every request from a new user as a new request because HTTP is a stateless protocol it doesn't save user states(unless you are managing user sessions explicitly) So if 100 users are requesting at the same time, they are different, each request is different and same will be the response(different) for each user. And as others said, its completely dependent on the server how it handles the request.
1
2
0
I have an iOS app that is send a POST request to my server and then it runs a function and returns some data back to the app. My question is if my app has lets say 100 people using it at the same time and make the POST request in quick succession, is this going to case an error? I am on a shared server if that matters.
Send multiple POST requests a once
0
0
1
1,192
31,067,386
2015-06-26T07:25:00.000
1
0
0
0
python,django,authentication,django-socialauth
31,069,180
1
true
1
0
To override the default django user model use AUTH_USER_MODEL. To use django-social-auth with the new model point to it by using SOCIAL_AUTH_USER_MODEL. Both use auth.User by default.
1
0
0
A bit frustrated about this. What the difference between those options? Which I need to use to override default django user model? What the value SOCIAL_AUTH_USER_MODEL has by default?
What the difference between SOCIAL_AUTH_USER_MODEL(django-social-auth) and AUTH_USER_MODEL(Django)?
1.2
0
0
1,091
31,068,381
2015-06-26T08:23:00.000
0
0
0
1
python,google-app-engine,virtual-machine,google-cloud-platform
31,260,767
1
true
1
0
Sticking with the described POST request using urllib2. We decided we might move this part of the project to a different provider so better to not use Google Cloud only methods.
1
1
0
My website runs on Python on Google App Engine, and I've setup a Virtual Machine to use libraries that weren't supported by the default App Engine environment. Now I need to send data from my app to the VM and retrieve the response. Data in this case will be an email address and an email message. Currently I am testing with a POST request through urllib2. Is there a better way to do this?
Processing data from Google App Engine on a Google Virtual Machine
1.2
0
0
47
31,068,690
2015-06-26T08:43:00.000
0
0
0
0
python,flask,scalability,binaryfiles
31,069,570
2
false
1
0
Pickle files is good way to load data in python. By the way consider using the C implementation: cPickle. If you want to scale, using pickle files. Ideally you want to look for a partition key, that fits for your data and your project needs. Let's say for example you have historical data, instead of having a single file with all historical data, you can create a pickle file per date.
1
2
0
I am working on my first web application. I am doing it in Python with Flask, and I want to run a piece of Python code that takes an object, with Pickle, from a (binary) file of several MB which contains all the necessary data. I have been told that so using Pickle in a web app is not a good idea because of scalability; why? Obviously, for a given purpose it's better to take just the necessary data. However, if I do this, with an Elasticsearch database and in the fastest way I can, the whole process takes about 100 times more time than if I take all the data at once from the binary; once the binary is unpickled, which will take at most one second, the computations are very fast, so I am wondering if I should use the binary file, and if so, how to do it in a scalable way.
Is it feasible to unpickle large amounts of data in a Python web app that needs to be scalable?
0
0
0
1,053
31,069,347
2015-06-26T09:16:00.000
1
0
0
0
python,html,django,if-statement
31,069,665
4
false
1
0
There is no if-then control explanation in HTML, or whatever other programming capacities. HTML is a markup dialect. Writing computer programs isn't conceivable. Css will permit you to pick between styles in light of classes and IDs. You can do this sort of thing with JavaScript, yet you can keep it straightforward with CSS.
2
0
0
I have a Django project that consists of many html pages. I want to add an if else condition inside my html tag to return "None" whenever the time stamp = 0000-00-00 00:00:00 and return the time when it's not. My code is shown below, I used a tag to get the time in date format. <td>{{ table.start_time|date:"Y-m-d G:i:s"}}</td>
If, Else inside html using Django templates
0.049958
0
0
4,761
31,069,347
2015-06-26T09:16:00.000
2
0
0
0
python,html,django,if-statement
31,070,870
4
true
1
0
I just used another tag: <td>{{ table.start_time|date:"Y-m-d G:i:s"|default:"None"}}</td> Thanks all!!
2
0
0
I have a Django project that consists of many html pages. I want to add an if else condition inside my html tag to return "None" whenever the time stamp = 0000-00-00 00:00:00 and return the time when it's not. My code is shown below, I used a tag to get the time in date format. <td>{{ table.start_time|date:"Y-m-d G:i:s"}}</td>
If, Else inside html using Django templates
1.2
0
0
4,761
31,069,449
2015-06-26T09:20:00.000
0
0
0
0
python,django,cloud
31,069,855
2
false
1
0
Developing directly in production environment is highly discouraged. You should develop locally using version control systems (git) and test suites to check everything works before the deploy. Once you've checked everything works, you can pull changes from the remote repository to apply the modifications or use something like jenkins for continuous integration. But, if you still want to modify your code directly in the cloud. Pycharm is a nice IDE that allows you to work with remove projects. I don't know if this is possible with Sublime.
1
0
0
I have been working with Django on Linux with Sublime Text for a while, but I constantly switch to Windows for graphics design and gaming. I wonder what's the most effective way to develop Django completely in the cloud without having to setup new Django environment for every OS I touch. It would be fantastic if I can just sync the project files from DigitalOcean and edit them on Sublime Text, since online IDEs/terminal from PythonAnywhere, Cloud9, etc. are quite slow and unresponsive.
How to fully develop Django projects in the cloud?
0
0
0
134
31,073,993
2015-06-26T13:07:00.000
0
1
0
1
python,git,salt-stack
31,254,893
3
true
0
0
If you need the highstate on the minion to cause something to occur on the master than you are going to want too look into using salt's Reactor (which is designed to do exactly this kind of multi-machine stuff).
2
0
0
I allow myself to write to you, due to a block on my part at Salt. I made a bash script that adds a host in my zabbix monitoring server. it works perfectly when I run .sh the idea is that I want to automate this configuration through salt. I am when I do a highstate my state that contains the script runs in the master before minion because there's my login authentication in my bash script. Is there's a special configuration for its? is what you have ideas how to do like this kind of setup? according to my research I found that to be used as the salt-runner but I do not know if this is good or not; In anticipation of your return, I wish you a good weekend.
Run script bash on saltstack master before minion
1.2
0
0
905
31,073,993
2015-06-26T13:07:00.000
0
1
0
1
python,git,salt-stack
31,083,687
3
false
0
0
Run a minion on the same box as your master, then you can run the script on your master's minion and then on the other server.
2
0
0
I allow myself to write to you, due to a block on my part at Salt. I made a bash script that adds a host in my zabbix monitoring server. it works perfectly when I run .sh the idea is that I want to automate this configuration through salt. I am when I do a highstate my state that contains the script runs in the master before minion because there's my login authentication in my bash script. Is there's a special configuration for its? is what you have ideas how to do like this kind of setup? according to my research I found that to be used as the salt-runner but I do not know if this is good or not; In anticipation of your return, I wish you a good weekend.
Run script bash on saltstack master before minion
0
0
0
905
31,074,329
2015-06-26T13:22:00.000
2
0
1
1
python,windows,pycparser
31,080,381
1
true
0
0
The documentation is one and the same. You cannot effectively use pycparser without a basic understanding of how the C compilation pipeline works - sorry! The documentation actually addresses Windows directly. The only difference is that instead of relying on a system C compiler (on Linux) you have to explicitly download one for Windows - and the documentation even gives you a link. Once you download Clang for Windows, which gives you preprocessing on Windows, everything else is platform-agnostic.
1
1
0
We can support new typedefs , #includes and #defines , by preprocessing it with the help of pycparser parse_file . I also went through the documentation: README page and the blog post , but all the documentation was written for linux systems.I have no clue about linux systems and would love to get the documentation for windows.
Including Fake-headers via pycparser in Windows?
1.2
0
0
261
31,074,551
2015-06-26T13:32:00.000
-1
0
1
0
python,executable
31,074,610
1
false
0
0
There are several such utilities I've used py2exe from py2exe.org
1
0
0
which might not even have Python. I'm making dozens of scripts for my company but it only just now dawned on me that people might not even be able to use them. I'm asking here because I'm not sure what keywords I would use on Google. So the question is - can I somehow package Python+external libraries into one executable? Or do you know of another way to cirucmvent this?
Launch python script from other computers
-0.197375
0
0
62
31,075,271
2015-06-26T14:04:00.000
1
0
1
0
ironpython
31,115,541
1
true
0
0
somestring[:-1] is a correct answer also for IronPython
1
0
0
How to remove last char from string in IronPyhon ? I am looking for a Substring method or sth similar.
How to remove last char from string in IronPyhon?
1.2
0
0
572
31,075,818
2015-06-26T14:30:00.000
1
0
1
1
python-2.7,pip
31,088,517
1
true
0
0
I have solved my problem: When I have tried to run get-pip, I have right-clicked on the file get-pip.py and I have chosen "Python Launcher for Windows" to run it. Instead, I should have opened the command prompt in the right folder and I should have written "python get-pip.py".
1
1
0
I have installed Python2.7 on Windows. I tried to install pip, so I downloaded get-pip, then I run it but it didn't install anything in "scripts" in python27, neither in Python27/Tools/Scripts
Why haven't I got "Scripts" in Python27 on Windows?
1.2
0
0
1,848
31,077,965
2015-06-26T16:27:00.000
2
0
0
0
django,facebook,python-social-auth
31,138,364
2
false
1
0
I did wrong Facebook app setup. In the Security / Server IP Whitelist I put 127.0.0.1 address. The problem was gone after removing this address (blank space is okey).
2
0
0
I am trying to implement website login using Facebook credentials. I see different responses when I press Cancel on Facebook widget or Okay. When I press Cancel I see the following Environment: Request Method: GET Request URL: http://wakevent.com/complete/facebook/?redirect_state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT&error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied&state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT Django Version: 1.8.2 Python Version: 2.7.6 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'mainapp', 'social.apps.django_app.default') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'social.apps.django_app.middleware.SocialAuthExceptionMiddleware') Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view 58. return view_func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/utils.py" in wrapper 51. return func(request, backend, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/views.py" in complete 28. redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/actions.py" in do_complete 43. user = backend.complete(user=user, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/backends/base.py" in complete 41. return self.auth_complete(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/utils.py" in wrapper 229. return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/backends/facebook.py" in auth_complete 68. self.process_error(self.data) File "/usr/local/lib/python2.7/dist-packages/social/backends/facebook.py" in process_error 60. super(FacebookOAuth2, self).process_error(data) File "/usr/local/lib/python2.7/dist-packages/social/backends/oauth.py" in process_error 363. raise AuthCanceled(self, data.get('error_description', '')) Exception Type: AuthCanceled at /complete/facebook/ Exception Value: Authentication process canceled Which is predicatble. But when I press Okay I see another error. Environment: Request Method: GET Request URL: http://wakevent.com/complete/facebook/?redirect_state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT&code=AQBe5WWQYk9BJE2fvNIt0RWVYxLaddhXT6t3UQwtF3aJcvbbLrVwsMlxsKEgwulVAtV4WHlYG5lG1HbEHk_cjFhMfWEHy9B8dedrOZagw0AWyGVyvaFtRqOn8_3G8nQb2nEe-DZMdG13V7Jgzrebtu6QXxGuyNzZPVXRnbPiKGUz8jW2p-r_wWB7QAuW-6rdZuII8_1ePBBoGgzmLlKLvMLfZoCqI62h0slF5t2IoAraHahRtnkWeIeH6AVf5u4vzZ8qXatz9fuun8ZK-8rqv5p5HDWZOdydNGm7ZtNh0g1OSpZU4TFAGxAqWbo0LpgiCRs&state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT Django Version: 1.8.2 Python Version: 2.7.6 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'mainapp', 'social.apps.django_app.default') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'social.apps.django_app.middleware.SocialAuthExceptionMiddleware') Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view 58. return view_func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/utils.py" in wrapper 51. return func(request, backend, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/views.py" in complete 28. redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/actions.py" in do_complete 43. user = backend.complete(user=user, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/backends/base.py" in complete 41. return self.auth_complete(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/utils.py" in wrapper 232. raise AuthCanceled(args[0]) Exception Type: AuthCanceled at /complete/facebook/ Exception Value: Authentication process canceled I am running the website locally on Ubuntu 14.04 apache web server with 80 port. I suspect wrong Facebook app setup but do not know what to debug. Also, I can mention that Twitter login is working on the same setup. Please advise!
Django Python Social Auth, Authentication Canceled by Facebook app
0.197375
0
0
3,048
31,077,965
2015-06-26T16:27:00.000
0
0
0
0
django,facebook,python-social-auth
36,288,484
2
false
1
0
Check the redirect URL. I had wrongly specified redirect URL along with client ID while making post request. For Facebook redirect URI is optional. Try removing that and it will work fine.
2
0
0
I am trying to implement website login using Facebook credentials. I see different responses when I press Cancel on Facebook widget or Okay. When I press Cancel I see the following Environment: Request Method: GET Request URL: http://wakevent.com/complete/facebook/?redirect_state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT&error=access_denied&error_code=200&error_description=Permissions+error&error_reason=user_denied&state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT Django Version: 1.8.2 Python Version: 2.7.6 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'mainapp', 'social.apps.django_app.default') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'social.apps.django_app.middleware.SocialAuthExceptionMiddleware') Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view 58. return view_func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/utils.py" in wrapper 51. return func(request, backend, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/views.py" in complete 28. redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/actions.py" in do_complete 43. user = backend.complete(user=user, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/backends/base.py" in complete 41. return self.auth_complete(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/utils.py" in wrapper 229. return func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/backends/facebook.py" in auth_complete 68. self.process_error(self.data) File "/usr/local/lib/python2.7/dist-packages/social/backends/facebook.py" in process_error 60. super(FacebookOAuth2, self).process_error(data) File "/usr/local/lib/python2.7/dist-packages/social/backends/oauth.py" in process_error 363. raise AuthCanceled(self, data.get('error_description', '')) Exception Type: AuthCanceled at /complete/facebook/ Exception Value: Authentication process canceled Which is predicatble. But when I press Okay I see another error. Environment: Request Method: GET Request URL: http://wakevent.com/complete/facebook/?redirect_state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT&code=AQBe5WWQYk9BJE2fvNIt0RWVYxLaddhXT6t3UQwtF3aJcvbbLrVwsMlxsKEgwulVAtV4WHlYG5lG1HbEHk_cjFhMfWEHy9B8dedrOZagw0AWyGVyvaFtRqOn8_3G8nQb2nEe-DZMdG13V7Jgzrebtu6QXxGuyNzZPVXRnbPiKGUz8jW2p-r_wWB7QAuW-6rdZuII8_1ePBBoGgzmLlKLvMLfZoCqI62h0slF5t2IoAraHahRtnkWeIeH6AVf5u4vzZ8qXatz9fuun8ZK-8rqv5p5HDWZOdydNGm7ZtNh0g1OSpZU4TFAGxAqWbo0LpgiCRs&state=cvZGNl42bKvgcDDDezBy14VJ1Eit5OmT Django Version: 1.8.2 Python Version: 2.7.6 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'mainapp', 'social.apps.django_app.default') Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'social.apps.django_app.middleware.SocialAuthExceptionMiddleware') Traceback: File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py" in get_response 132. response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py" in _wrapped_view_func 57. response = view_func(request, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/csrf.py" in wrapped_view 58. return view_func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/utils.py" in wrapper 51. return func(request, backend, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/apps/django_app/views.py" in complete 28. redirect_name=REDIRECT_FIELD_NAME, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/actions.py" in do_complete 43. user = backend.complete(user=user, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/backends/base.py" in complete 41. return self.auth_complete(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/social/utils.py" in wrapper 232. raise AuthCanceled(args[0]) Exception Type: AuthCanceled at /complete/facebook/ Exception Value: Authentication process canceled I am running the website locally on Ubuntu 14.04 apache web server with 80 port. I suspect wrong Facebook app setup but do not know what to debug. Also, I can mention that Twitter login is working on the same setup. Please advise!
Django Python Social Auth, Authentication Canceled by Facebook app
0
0
0
3,048
31,079,888
2015-06-26T18:30:00.000
0
0
1
0
python,excel,parsing,openpyxl
31,088,239
1
false
0
0
This will be possible in version 2.3.
1
0
1
I'm writing a parsing script in python and am curious as to how I could create a graph with two axis's under different data ranges. Is this possible in openpyxl?
Multi-Axis Graph using the OpenPyxl library in Python
0
0
0
196
31,080,295
2015-06-26T18:56:00.000
0
0
1
0
python,file-io
31,080,371
4
false
0
0
File objects are generators, so they will continue from the next line.
2
0
0
I am passing a file object as an argument to a function in Python. Inside this function I want to read the content of the file passed as an argument. Will I be able to read the file from the beginning or will it continue from the last line read before passing it to the current function ?
Python File Object
0
0
0
879
31,080,295
2015-06-26T18:56:00.000
6
0
1
0
python,file-io
31,080,353
4
false
0
0
This is something you could easily find out yourself by testing. The filehandle remembers it's current line so it will continue reading where it left of.
2
0
0
I am passing a file object as an argument to a function in Python. Inside this function I want to read the content of the file passed as an argument. Will I be able to read the file from the beginning or will it continue from the last line read before passing it to the current function ?
Python File Object
1
0
0
879
31,080,544
2015-06-26T19:12:00.000
2
0
0
0
python,flask,flask-admin
31,249,046
1
false
1
0
This option was removed because you can explicitly add id field to the create and edit forms.
1
0
0
Previous version of Flask-Admin had a hide_backrefs option which could be set to False if you wanted to show them in the admin view. The current version seems to have it no longer. Does it go by some other name? If I want to display backreferences in the admin list view, is there a better solution than just manually setting columns_list?
Where did Flask-Admin's `hide_backrefs` option go? How to display backrefs in admin list view?
0.379949
0
0
115
31,082,231
2015-06-26T21:12:00.000
0
0
1
0
python,algorithm
31,084,184
1
false
0
0
I just don't see how I can find the exact intervals where there are anomalies using windows. You can't. How do you know there aren't two anomalies? Is there an approximation method that anyone can come up with? For each interval of windows where there is continuously an anomaly detected, assume that there is an anomaly lasting from the last day of the first window to the first day of the last window.
1
0
0
I've been trying to determine how to detect point-anomalies given window-anomalies. In more detail, I know for each 30-day window whether it contains an anomaly. For example, window 1 starts at 1/1/2009, window 2 at 1/2/2009, and so on. Now I'm trying to use this knowledge to determine which dates these anomalies lie. If I have an anomaly on dates 1/5/2009 to 1/8/2009, my window will raise a signal for windows from a window with a last day of 1/8/2009 to a window starting on 1/5/2009. I just don't see how I can find the exact intervals where there are anomalies using windows. Is there an approximation method that anyone can come up with? Feel free to include some code in Python if you'd like. Thanks!
how to determine point anomalies given window anomalies?
0
0
0
43
31,092,232
2015-06-27T18:41:00.000
0
0
1
0
python,matplotlib,import,module,importerror
52,132,286
1
false
0
0
Try pip uninstall matplotlib then python -mpip install matplotlib see if it helps. Otherwise, i'd recommend using a virtual environment which you can install using sudo easy_install virtualenv or pip install virtualenv This way you could just install and use matplotlib by following these steps: Create a new virtual environment : user@yourmac$ virtualenv .env (.env can be any name or directory) Activate it by doing : user@yourmac$ source .env/bin/activate Then once it's activated just do a pip install matplotlib and use it to your satisfaction. Hopefully this should solve your problem.
1
1
1
I installed matplotlib using (pip install --user matplotlib) and the installation was successful. when I try to import it using (import matplotlib) in python shell I get this error: Traceback (most recent call last): File "", line 1, in import matplotlib ImportError: No module named matplotlib I couldn't find another question similar to mine because I'm not using anaconda.
Cant import matplotlib on python 2.7.5
0
0
0
3,341
31,093,986
2015-06-27T22:05:00.000
0
0
0
0
python,numpy,mpmath,gmpy
31,280,601
3
false
0
0
As far as I'm aware, there is no existing Python library that supports vectorized array operations on multiple precision values. There's unfortunately no particularly efficient way to use multiple precision values within a numpy ndarray, and it's extremely unlikely that there ever will be, since multiple precision values are incompatible with numpy's basic array model. Each element in a floating point numpy ndarray takes up the same number of bytes, so the array can be represented in terms of the memory address of the first element, the dimensions, and a regular byte offset (or stride) between consecutive array elements. This scheme has significant performance benefits - adjacent array elements are located at adjacent memory addresses, so sequential reads/writes to an array benefit from better locality of reference. Striding is also very important for usability, since it allows you to do things like operating on views of the same array without creating new copies in memory. When you do x[::2], you are really just doubling the stride over the first axis of the array, such that you address every other element. By contrast, an array containing multiple precision values would have to contain elements of unequal size, since higher precision values would take up more bytes than low-precision values. A multiple precision array therefore cannot be regularly strided, and loses out on the benefits mentioned above. In addition to the problems with constructing arrays, even plain arithmetic on multiple precision scalars is likely to be much slower than for floating point scalars. Almost all modern processors have specialized floating point units, whereas multiple precision arithmetic must be implemented in software rather than hardware. I suspect that these performance issues might be a big part of the reason why there isn't already a Python library that provides the functionality you're looking for.
1
1
1
Numpy is a library for efficient numerical arrays. mpmath, when backed by gmpy, is a library for efficient multiprecision numbers. How do I put them together efficiently? Or is it already efficient to just use a Numpy array with mpmath numbers? It doesn't make sense to ask for "as efficient as native floats", but you can ask for it to be close to the efficiency of equivalent C code (or, failing that, Java/C# code). In particular, an efficient array of multi-precision numbers would mean that you can do vectorized operations and not have to look up, say, __add__ a million times in the Global Interpreter. Edit: To the close voter: My question is about an efficient way of putting them together. The answer in the possible duplicate specifically points out that the naive approach is not efficient. Having a numpy array of dtype=object can be a liitle misleading, because the powerful numpy machinery that makes operations with the standard dtypes super fast, is now taken care of by the default object's python operators, which means that the speed will not be there anymore
Efficient multiple precision numerical arrays
0
0
0
807
31,096,527
2015-06-28T05:43:00.000
1
0
1
0
python,powershell,virtualenvwrapper
37,604,982
2
false
0
0
You need to paste the VirtualEnvWrapper folder in the following directory. It works for me ** ` C:\Windows\System32\WindowsPowerShell\v1.0\Modules ` **
1
1
0
I am using powershell. I successfully installed virtualenvwrapper-powershell. But when I typed 'Import-Module virtualenvwrapper', I got an error as following: PS C:\Python27> Import-Module virtualenvwrapper Import-Module : The specified module 'virtualenvwrapper' was not loaded because no valid module file was found in any module directory. At line:1 char:1 Import-Module virtualenvwrapper ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CategoryInfo : ResourceUnavailable: (virtualenvwrapper:String) [Import-Module], FileNotFoundException FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand It would be great if you could give me some advice...
Import-Module virtualenvwrapper
0.099668
0
0
3,277
31,096,849
2015-06-28T06:33:00.000
2
0
0
0
python,matlab
31,097,467
1
false
0
0
Matlab comes with it's own python Installation which is located in your Matlab installation directory. There these 3rd party libraries are probably not installed. Go to the python folder inside the Matlab installation directory, search for pip and use it to install the libraries you need.
1
2
1
As matlab2015a has been able to support python. But it seems it can only call standard library in matlab. If I want to import other library such as numpy, scipy or sklearn, what should I do? And can I execute the python script directly. Unfortunately, the offical document of matlab has not given enough explanations. If anyone can explain, I will be really appreciated!
call python from matlab2015a
0.379949
0
0
88
31,098,228
2015-06-28T09:40:00.000
2
0
0
0
python,numpy,matrix,equation-solving
48,433,206
3
false
0
0
You could add a row consisting of ones to A and add one to B. After that use result = linalg.lstsq(A, B)[0] Or you can replace one of A's rows to row consisting of ones, also replace value in B to one in the same row. Then use result = linalg.solve(A, B)
1
7
1
I want to solve some system in the form of matrices using linalg, but the resulting solutions should sum up to 1. For example, suppose there are 3 unknowns, x, y, z. After solving the system their values should sum up to 1, like .3, .5, .2. Can anyone please tell me how I can do that? Currently, I am using something like result = linalg.solve(A, B), where A and B are matrices. But this doesn't return solutions in the range [0, 1].
Solving system using linalg with constraints
0.132549
0
0
9,737
31,098,786
2015-06-28T10:33:00.000
0
0
1
0
python,window,parent
31,100,428
3
false
0
1
I don't think you will be able to do this easily. Notepad is using its own toolkit which, most probably, is not compatible with the one you are using. If you want to open eg. an editor, look for a widget in the toolkit of your choice which does what you want (or nearly). Eg. if you want an editor, use the GtkTextView in GTK, or, if you want something that can do code editing, look at GtkSourceView, etc. Same goes for media applications. The 'include' applications as part of a project works only to a certain point. You can eg, include text-mode applications in a terminal window, but graphical apps are much harder.
2
0
0
I am new to python and want to learn this from the basic. I want to open two other application like notepad in a single window. I searched for any examples by using "tkinter". Any idea for implementing this using "tkinter". PS: two tabs one in left and one in right so that one tab will be having notepad and other will have a media player (let say) and i should be able to close the single parent window for closing this child windows.
Opening other application in single window using python
0
0
0
509
31,098,786
2015-06-28T10:33:00.000
-1
0
1
0
python,window,parent
31,098,854
3
false
0
1
For what you need, you will have to use libraries like tkinter or pyqt. As you want to learn it from the basic, I would suggest you to pick a GUI library and start learning it. Eventually you will know how to get the result that you desire.
2
0
0
I am new to python and want to learn this from the basic. I want to open two other application like notepad in a single window. I searched for any examples by using "tkinter". Any idea for implementing this using "tkinter". PS: two tabs one in left and one in right so that one tab will be having notepad and other will have a media player (let say) and i should be able to close the single parent window for closing this child windows.
Opening other application in single window using python
-0.066568
0
0
509
31,105,836
2015-06-28T23:24:00.000
0
0
1
0
python,tkinter,optionmenu
31,127,939
2
false
0
1
Try using the fg(or foreground) and bg(or background) options. If a is the menu, use: a.entryconfig( optionindex , bg=" color_name " ) for the background, and a.entryconfig( optionindex , bg= " color_name " ) for the foreground.
1
1
0
I am trying to make a Drop Down Menu of colors. Red Green Blue Yellow. I want the words inside the option box to be colored with their respected name. So the when the user clicks the arrow to open the optionMenu, Option red will have red letters. blue will have blue letters and so forth. Is this Possible? Thanks.
How do you change the color of the words in a Python Tkinter OptionMenu
0
0
0
439
31,106,242
2015-06-29T00:32:00.000
0
0
0
0
python,oop
31,106,283
2
false
1
0
That method is defined as def SetStrength(self, strength):. That means that, in addition to the self which is passed automatically, you need to provide an additional argument - in this case, the new strength value you'd like to set. It works very similarly to setName, which you call with an argument on the previous line. That said, the code you're working with is Java/C++/etc. code translated into Python, which balloons the size of the code for no good reason.
1
0
0
Error fixed - I only needed one parameter in the headers of the setters. Thanks
TypeError: SetStrength() missing 1 required positional argument: 'strength'
0
0
0
84
31,106,542
2015-06-29T01:26:00.000
1
0
0
0
python,xlwings
31,110,844
1
false
0
0
Ok, based on your comments I think I can answer your question: Actually, yes, xlwings can handle various instances. But workbooks from untrusted locations (like downloaded from the internet or sometimes on shared network drives) don't play nicely. So in your case you could try to add the network location to File > Options > Trust Center > Trust Center Settings... > Trusted Locations or, under Trusted Documents, tick the checkbox Allow documents on a network to be trusted. If you don't have the previlegies to change these options, then I guess you're left with the options of running the tools locally or indeed, open them in the 1st instance...
1
1
0
Is this a known limitation that will be addressed at some point, or is this just something that I need to accept? If this is not possible with xlwings, I wonder if any of the other alternatives out there supports connecting to other instances. I'm specifically talking about the scenario where you are calling python from within Excel, so the hope is that the getCaller() function will be able to figure out which instance of the Excel is actually calling it.
Does xlwings only work with the first instance of Excel?
0.197375
1
0
1,096
31,109,330
2015-06-29T06:44:00.000
0
0
0
0
python,bytearray
31,109,570
1
false
0
0
I think you should use the struct and namedtuple from collections module. Collect logical units into a namedtuple and use struct to pack/unpack those namedtuples. That's one of the most 'readable' and 'maintainable' ways of going about it. Another thing to keep in mind is to read the file in binary mode and use read instead of readlines and tell and seek to read only the things of your interest.
1
0
0
I am currently doing work which programmatically attempts to manipulate PE files. The approach so far has been to parse out all the information (headers, variables within the headers, etc) from a raw array of bytes, representing the PE file. As a result of this I currently have approximately 70 variables each pointing to a different byte slice of the array, which represents data about the PE. The issue comes with trying to now manipulate the array, and change the file. Lets say I wish to insert / add data at an arbitrary point along the byte array. 35 variables are before it, while 35 variables are after the insertion point. The earlier variables will be unaffected. What is the best way to update these 35 variables their position has been offset by N bytes? Current information the variables have is a) Their value at the location they are at (typically a 4 byte little endian value), and b) Their absolute offset from the beginning of the PE file. Cheers.
Updating Variables for Increased Bytearray Size
0
0
0
94
31,111,488
2015-06-29T08:53:00.000
4
1
0
0
python,eclipse,pydev
34,672,189
1
true
0
0
It seems I've found the solution: Open Window -> Preferences, goto PyDev -> Editor -> Code Style -> File Types, look for "Valid source files (comma-separated)" and append ", log". The file extensions listed in this filed are evaluated by FileTypesPreferencesPage.java:getDottedValidSourceFiles(), which is called by PythonPathHelper.java:isValidSourceFile(), which is called by PyGoToDefinition.java:doOpen(), which is the method raising the error message. Now my *.log file opens when I click on a hyperlink to it in the Text-Editor.
1
2
0
In Eclipse, I have the following Console output Logfile: File "C:\temp2\file1.log", line 1 Testimplementierung: File "A:\TestSafety\file2.py", line 222 Both paths are shown as hyperlinks. When I click these hyperlinks in Eclipse Kepler, the files are openend in the Python Text Editor (this is what I want). When I click these hyperlinks in Eclipse Luna or Mars, it works for the second file. For the first file, I get a dialog "The definition was found at: C:\temp2\file1.log (which cannot be opened because it is a compiled extension)" Whats going wrong here? Note: A:\TestSafety is my Eclipse Project. C:\temp2 is outside of my Eclipse workspace. Somebody told me I should add a "Link to existing source" into my Eclipse project, which seemed to work for a file, now it is broken again and I don't know why.
Eclipse PyDev error message "compiled extension"
1.2
0
0
914
31,112,366
2015-06-29T09:37:00.000
1
0
0
0
java,python,tomcat,java-web-start
31,113,115
1
false
1
0
Java WebStart will install a desktop application into the cache of the client. That will run on the client not on the server, however you can easily create a webapplication as a service, i.e. on Tomcat. The webapp will be able to receive client requests, i.e. via RMI, RESTfull service or webservice, call the proprietary programm and return the results.
1
0
0
I have a Java application that needs to run the proprietary software PowerWorld on the server and then return output to the client side Web Start window. Is this possible? How do I go about doing this? I am using Apache Tomcat to run the server. My Java code uses Runtime.exec() to run a Python script that runs PowerWorld. I made sure that the python script, powerworld file and java app are all in the same directory and reference each other using relative file paths
Can Java Web Start be used to run server-side programs?
0.197375
0
1
94
31,113,114
2015-06-29T10:17:00.000
1
0
1
1
windows,batch-file,python-3.x
31,158,200
2
true
0
0
I solved the problem by removing the path from normal python installation. I also uninstalled the normal python distribution. I also made a path to the python version in WinPython. Now I can use the normal cmd to run the program. :-)
1
4
0
How do I write an batch file that will execute a commando "python my_program.py" from the WinPython Command Prompt? Not from the cmd.exe!
Make an batch file that runs commando in WinPython Command Prompt
1.2
0
0
4,820
31,117,704
2015-06-29T14:01:00.000
1
0
1
0
python,error-handling,multiprocessing
31,117,998
1
false
0
0
If the error occurs in the communication process, you could use your existing socket to send a special task that asks the receiver to close. This would be received by one worker, that notifies the communication process (through some socket) that it is exiting, and then exits. The communication process could basically fill the pipeline with n sockets if no queuing at workers are done, or k*n + one in a while if queuing is done. This is done until all workers are done. An error at a worker could be sent to the communication process through the earlier mentioned channel that an error has occurred. The channel could for example be a push/pull socket, or maybe a pub/sub with a proxy. (I guess you are using a push/pull to get the results back. In that case use that.)
1
0
0
I have an application that creates one multiprocessing process for communication and n for workers. I would need to find a way to exit the whole application when there is an error somewhere or the user presses control-C. // the agents are connected via zmq
Exiting a multiprocessing program on error
0.197375
0
0
35
31,118,164
2015-06-29T14:22:00.000
0
0
0
1
python,windows
31,119,681
1
false
0
0
The solution I came up with uses two batch files. One to run Load with an argument of 105 that is in the startup folder and the other batch file will be put on the desktop with a time of 45. Not my favorite solution, but it gets the job done and it's fairly easy to understand.
1
1
0
I wrote a program called load, to show a loading bar for 0:45 seconds while another program is starting which has no indication that it is loading. It works exactly as I want when the system is already running, but I have it so it runs at startup which causes the program to take a 1:45 to start. I am trying to figure out a way to check if it is a fresh system start. I don't have any code yet since I don't know where to start. The only solutions I've thought of are just making a load1 and load2 where load1 has a loading bar of 1:45 that is run at startup and load2 is 0:45. My other idea is trying to schedule a task if that is possible. The only problem with that is that it would display nothing for 1:00 which kind of defeats the purpose. I don't really like either of these solutions. Another possibility that would work is if I can check if I am calling it from the desktop or the startup folder. I'm having no luck with that though.
How to tell if windows processes have started
0
0
0
34
31,118,668
2015-06-29T14:44:00.000
0
0
0
0
python,events,grid,wxpython,wxwidgets
31,124,993
1
true
0
1
Adding event.Skip() at the end of my custom handler passes the event to the default handler.
1
0
0
In the program I'm writing, the user needs to be able to select a cell in the grid and edit its value. The program also shows what the value of the currently selected value is in hexadecimal (so (0,0) is 0x00, (1,3) is 0x19, etc.) I originally had this display be updated through a binding to the wx.grd.EVT_GRID_SELECT_CELL event. However, upon doing this, the GridCursor would no longer move, it would stay on (0,0). So, I added a SetGridCursor statement to the handler to have it move the cursor when the handler was called. However, this generated an infinite loop, as apparently SetGridCursor generates an EVT_GRID_SELECT_CELL command when called. My question is, how do I have code that executes when a new cell is selected while still maintaining the old cell selection functionality?
In wxPython Grid, creating event handler for Cell Selection disables moving the GridCursor
1.2
0
0
137
31,122,778
2015-06-29T18:18:00.000
0
0
1
0
ipython-notebook,jupyter
66,611,829
2
false
1
0
Try refreshing the web page and download as .py should show up.
1
0
0
After I open Jupyter and write down codes, I want to download it as .py file, but it is always downloaded as HTML. How can I fix it?
IPython notebook Jupyter cannot download as .py
0
0
0
1,573
31,123,293
2015-06-29T18:50:00.000
0
0
1
0
python,pyqt
31,123,417
2
false
0
1
It depends on what you are looking to do. I have done it and it worked but there are other questions that can factor in like who will maintain or update the code, and do they know Python. You can look at cx_freeze for making a windows executable out of a python program as one of many options.
2
0
0
I'm wondering if python is a good choice to develop a desktop application for a small business. Is it possible to build something using PyQT or even Swing + Jython ? How I can make a executable file at the end?
Is python a good choice to build a desktop application?
0
0
0
2,859
31,123,293
2015-06-29T18:50:00.000
8
0
1
0
python,pyqt
31,123,686
2
true
0
1
I've found Python to be an excellent choice for developing a broad scala of applications including desktop applications. I've developed in C++ for many years, and for parts that are really time critical I sometimes use it still, but for most of my code Python helps me get results much faster. There are several ways to get an executable. Py2exe is one of them, Cython another option allowing easy combination with C++ if you need raw speed, interfacing with 3rd party libaries or low level control of devices. It also makes reverse engineering a bit harder, if that's a concern in your project. By the way, when I started out with Python I was very concerned about performance and (being a quality manager at that time) almost blocked its introducion in our company for its lack of strickt typing. I was wrong about both. Since especially the rich set of built in datastructures as well as many of its standard modules are written in C++ and have been carefully optimized, it isn't so easy to beat on speed and memory efficiency as one might think. And the dynamic typing (only recently introduced in a language like C#) proved a very powerful means to write concise, readable, reliable and compact code. I don't have shares (since Python is open source anyhow) but from all the languages I've used in the past (Algol, Pascal, Modula II, Assembler, Basic, Fortran, Cobol, C, C++, C#, Java, JavaScript) it's the one I prefer rightnow to earn a living with.
2
0
0
I'm wondering if python is a good choice to develop a desktop application for a small business. Is it possible to build something using PyQT or even Swing + Jython ? How I can make a executable file at the end?
Is python a good choice to build a desktop application?
1.2
0
0
2,859
31,123,357
2015-06-29T18:54:00.000
1
0
0
0
jira,jira-plugin,jql,python-jira
31,676,903
2
false
0
0
One way of doing this stuff what you want to do is with Excel directly. 0. create the filter in JIRA 1. create a VBA for Excel script which will Open the Exported to Excel filter from JIRA. In order to do that you have to copy the link from JIRA, -> export -> Excel current fields. 2. Most probably you will have to login first to JIRA from EXCEL VBA, so I recommend you to do this by logging in with REST requests from excel. 3. Copy all the information from the exported JIRA query to your other worksheet 4. After copying you can then process as you wish easily with VBA the list of tickets. I know this is not the straight forward way of doing this stuff, but I hope it helped you a little to go further into your searches.
1
1
0
I have limited experience with Jira and Jira query language. This is regarding JIRA Query language. I have a set of 124 rows (issues) in Jira that are under a certain 'Label' say 'myLabel'. I need to extract columns col1, col2 and col5 for all of the above 124 rows where the Label field is 'myLabel'. Once I have the above result I need to export it to an excel sheet. Is there a JIRA query that I can fire to do this ? Or Is there some other way that this can be done, like maybe exporting all of the 124 rows with all the n columns to a SQL table and then doing an SQL query on top of it to retrieve the results that is needed ? Also there is something python-jira. Can that be of some help ?
JQL to retrive specific columns for a cetain label
0.099668
1
0
1,804
31,123,896
2015-06-29T19:24:00.000
0
0
0
0
python,mongodb,cursor,pymongo
31,413,796
2
true
0
0
So far this has been my "slice/batch" solution and it has been much more effective than individually iterating each document from the cursor: Keep note of the id field last document you have grabbed Open a cursor with the query "Greater than _id of last doc" and with a limit of whatever your batch_size is Now you should have a cursor with your desired number of documents in a batch Make this cursor into a python list by doing list(cursor) Insert_many on this list Update last grabbed, and delete the list to free up ram You can adjust your batch size to accommodate your RAM limitations. This is a pretty good solution because it reduces the bottleneck of cursor iteration, and also doesn't take too much ram as you are constantly deleting the batches as you go on.
1
1
0
I am interested in using a cursor to duplicate a database from one mongod to another. I want to limit the amount of insert requests sent so instead of inserting each document in the cursor individually I want to do an insert_many of each cursor batch. Is there a way to do this in pymongo/python? I have tried converting the cursor to a list and then calling insert_many and this works, but if the collection is over the amount of ram that I have then it won't work. Any ideas on how to grab a batch from a cursor and convert it to a list would be appreciated Thanks!
How to insertmany from a cursor using Pymongo?
1.2
1
0
1,052
31,124,088
2015-06-29T19:35:00.000
2
0
1
0
python
31,124,233
4
false
0
0
If the file is not fixed length, you are out of luck. Some function will have to read the file. If the file is fixed length, you can open the file, use the function file.seek(line*linesize). Then read the file from there.
1
2
0
I am working with a very large text file (tsv) around 200 million entries. One of the column is date and records are sorted on date. Now I want to start reading the record from a given date. Currently I was just reading from start which is very slow since I need to read almost 100-150 million records just to reach that record. I was thinking if I can use binary search to speed it up, I can do away in just max 28 extra record reads (log(200 million)). Does python allow to read nth line without caching or reading lines before it?
Python goto text file line without reading previous lines
0.099668
0
0
791
31,124,202
2015-06-29T19:41:00.000
6
0
0
0
python,django
31,124,296
3
false
1
0
If you are using the runserver command, you will see the output of print-statements in that command prompt, like a live logging.
1
2
0
I'm a near-total newbie to Django, and am trying to debug a piece of code which is returning a null list to a template even though it should be returning a list with items in it. Is there any way to print the list to the console from within views.py for debugging purposes? I obviously can't run python views.py as the info I want is stored in a SQLite database, but if I try to include a print statement within the view I'm using, nothing prints when I refresh the page (and the server contacts my code). Is there a solution? I've looked around for a long time and can't find anything.
How do I print a list from views.py to the console?
1
0
0
18,314
31,125,113
2015-06-29T20:36:00.000
0
0
1
1
python,macos,bash,installation
31,131,268
1
false
0
0
Are you using python2 or python3? Dependencies for scapy differ.
1
0
0
I'm writing what is a relatively small desktop application, but I'm using several technologies/languages and not sure the best way to create a installer script. I have a python script which uses tornado and scapy (which also requires pcapy), and have a kernel extension that needs to be installed. This python script is executed and works in conjunction with a node-webkit (nw) app I'm writing. Any suggestions on the easiest way to ensure all of the dependencies are met, and properly installed without the user having to touch the command line? Using python setuptools or pyinstaller? Package it together with nw? Use OS X packagemaker? Writing a bash script? Should I distribute these dependancies with my actual app?
Installer script for OSX, python + node
0
0
0
35
31,128,435
2015-06-30T02:07:00.000
1
0
1
0
python,module,installation,pip
31,128,500
2
false
0
0
The easiest way is writting: pip install beautifulsoup on the cmd or powershell Another way: Extract the file *.tar.gz open the folder of the extractor on cmd execute python setup.py install
1
0
0
I am completely new to python, and am unable to install python modules using pip install, and from ____ import _____. I want to use BeautifulSoup, and I have the tar.gz file in my directory: C:\Python27\Lib I don't have administrator's access to my laptop, but I can get someone who has it. Would this be a problem from installing modules? I'm actually not sure if this is where it should be, or how to proceed from here. Would appreciate any help very much, because I can't even get started. Thank you.
Unable to install python modules
0.099668
0
0
176
31,128,840
2015-06-30T03:02:00.000
-3
0
1
1
python,python-2.7,ubuntu,tkinter,versions
31,129,540
3
false
0
0
You can delete the whole /usr/local directory and the system won't be affected because /usr/local is the directory defined by the user solely. When you freshly install Ubuntu /usr/local is empty
1
2
0
So apparently I have 2 Pythons (same version) installed in different folders...one is in /usr/bin/ and the other one is in /usr/local/bin but the one the shell uses when I type in python is the one in /usr/local/bin. I'd like to use the /usr/bin/ version because is the one that works with many imports I've been dealing with such as numpy,matplotlib and Tkinter. I've tried using pyenv but with this I cannot run Tkinter because Tkinter is installed only for the /usr/bin/ version. Is there a safe way I can delete/uninstall one of those versions without breaking my whole Ubuntu? Is there a way to tell the shell to use the /usr/bin/ version of Python? Is there a way I can install python-tk for any envpy version? Something like sudo apt-get install python-tk in-desired-folders or similar? Answer for any of those 3 questions would solve my problem, I think. Thank you all in advice!
Remove 1 version of Python in Ubuntu
-0.197375
0
0
2,398
31,129,801
2015-06-30T04:50:00.000
1
0
0
0
javascript,php,python,node.js,api
31,129,923
3
false
0
0
There is definitely not 'the one and only' way to create an API. However, checking the type of client is definitely not the way to go, as it would mean checking headers, which can be forged when sending the request. For authentication, if you want to use different methods, your best bet is probably to have different authentication strategies, and try them one after the other. If the first fail, you run the next, etc. A common way to implement this is to add an authentication middleware, which tries each available strategy to authenticate the client, and stops the request if it could not. This does mean that even if you want your strategy A to work only for the browser, it could also be used to login from a mobile app, but there is no way to prevent this, and anyway it should not lead to any security issue either. If it does, the issue is probably somewhere else.
1
0
0
I want to create an api that various clients can connect to it like Web, Mobile platforms etc. My problem is that sometimes things are different with each client. For example i use different method for authentication for Web and Mobile platforms and my question is: I have to create different files for each type of client or use if else statements to detect client type and do proper functions in the same class? I want to create clean and standard API. I know this can have a lots of answers and its a broad question, But i just have a clue in this.
Creating clean and standard API with different type of clients
0.066568
0
1
71
31,130,348
2015-06-30T05:37:00.000
2
0
0
0
python,r,database,csv
31,130,479
3
false
0
0
Depending how much data is in each column and if you're planning to do statistical analysis, I would definitely go with R. If no analysis then python with pandas is a good solution. Do not use office for those files, it'll give you a headache. If you're brave and your data is going to increase, implement MongoDB with either R or python depending on previous need.
1
1
1
I have a CSV file with approximately 700 columns and 10,000 rows. Each of these columns contains attribute information for the object in column 1 of each row. I would like to search through this "database" for specific records that match a set of requirements based on their attribute information. For instance, one column contains state information in the 2 letter abbreviation form. Another column might contain an acronym referring to a certain geographic characteristic. Suppose I'm looking for all rows where the state is NY, and the acronym in GRG. What packages should I use to handle this work/data anlaysis in R? If there are no good packages in R, for handling such a large dataset, what should I look to using? I am familiar with R, Python, Office and some SQL commands. Edit: I am not going to modify the dataset, but record (print out or create a subset from) the results of the querying. I'll have a total of 10-12 queries at first to determine if this dataset truly serves my need. But I may possibly have hundreds of queries later - at which point I'd like to switch from manual querying of the dataset to an automated querying (if possible).
Does it make sense to use R to read in and search through extremely large CSV file?
0.132549
0
0
104
31,130,960
2015-06-30T06:18:00.000
1
0
1
1
python,windows,python-2.7,executable
33,310,327
4
false
0
0
Use VBScript: 1-> create anyname.vbs with this data: Set wvbs=CreateObject("Wscript.Shell") wvbs.run "full location of your File",0 2-> copy anyname.vbs file in C:\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup this folder Now when windows start it will run your file in hidden mode
1
2
0
I am developing a key-logger on Python (only for curiosity sake). And the script will be an executable. Without access to the computer so the process should not need a UI or user interaction. Is there any way, even in another executable to make the key-logger start at start-up ?
Run a Python program at start-up on Windows
0.049958
0
0
11,230
31,131,855
2015-06-30T07:13:00.000
1
0
0
0
python,scala,apache-spark
31,134,116
1
false
0
0
If your data doesn't have newlines in then a simple text-based format such as TSV is probably best. If you need to include binary data then a separated format like protobuf makes sense - anything for which a hadoop InputFormat exists should be fine.
1
0
1
I have python scripts (no Spark here) producing some data files, that I want to be readable easily as Dataframes in a scala/spark application. What's the best choice ?
A file format writable by python, readable as a Dataframe in Spark
0.197375
0
0
57
31,137,204
2015-06-30T11:37:00.000
2
0
0
0
python,scapy,man-in-the-middle
31,139,789
1
false
0
0
What you need sounds more like a proxy. What kind of protocol you try to inject into? If it was HTTP it would be easy - take any HTTP proxy and mitm away. Or you can use something like socksify, but I am not aware of anything working on Windows. Or you need something that works as a network driver. You cannot easily achieve this with scapy if packets originate from YOUR computer. Example with scapy-arp-mitm is performing mitm on other computer communication.
1
2
0
I want to catch a packet my computer is sending, modify it and send it. I can't use sniff, because it gives me a copy of the packet. The packet itself is sent. I want to stop the sending of the packet, change it and then send it forward - MitM attack. How can I do it using scapy?
Python - Man in the Middle
0.379949
0
1
1,594
31,142,810
2015-06-30T15:46:00.000
1
0
1
0
ipython-notebook,jupyter
31,546,622
2
false
0
0
If you are handy with jQuery, you can edit IPython's static files and customize the "tree" page you are referring to. On my Ubuntu machine I could manipulate the page by editing the file /usr/local/lib/python2.7/dist-packages/IPython/html/static/tree/js/notebooklist.js
1
7
1
How can I change the sort order of files in the notebook list? I would like it to be alphabetical for all file types and not case sensitive. Directories can appear before files or within the files. Currently my list is sorted as follows: - Directories (starting with upper case) - directories (starting with lower case) - IPython notebooks (starting with upper case) - ipython noteooks (starting with lower case) - Other files (starting with upper case) - other files (staring with lower case) I'm using Jupyter 3.0.0-f75fda4
Sort (sorting) order of files in notebook list
0.099668
0
0
2,153
31,145,860
2015-06-30T18:35:00.000
5
0
1
0
python,regex
31,145,877
1
true
0
0
Don't use regexes for that. s.split(',') will do exactly what you want.
1
0
0
There are several questions regarding this topic, but none of them seem to answer this question specifically. If I have the pattern p='([0-9]+)(,([0-9]+))*' and s='1,2,3,4,5' and I run m = re.match(p, s, 0) I get a match (as expected). However, I would like to be able to print the list ('1', '2', '3', '4', '5'). I can't seem to do this with the re.match output. It gives me ('1', ',5', '5'). Also, how do I get the number of matches (in this case 5)?
How to match and print list of comma separated numbers in python?
1.2
0
0
507
31,148,582
2015-06-30T21:11:00.000
4
0
0
0
python,r,nlp,nltk,wordnet
31,157,260
5
false
0
0
Your best bet is probably is to label the clusters manually, especially if there are few of them. This a difficult problem even for humans to solve, because you might need a domain expert. Anyone claiming they could do that automatically and reliably (except in some very limited domains) is probably running a startup and trying to get your business. Also, going through the clusters yourself will have benefits. 1) you may discover you had the wrong number of clusters (k parameter) or that there was too much junk in the input to begin with. 2) you will gain qualitative insight into what is being talked about and what topic there are in the data (which you probably can't know before looking at the data). Therefore, label manually if qualitative insight is what you are after. If you need quantitative result too, you could then train a classifier on the manually labelled topics to 1) predict topics for the rest of the clusters, or 2) for future use, if you repeat the clustering, get new data, ...
1
9
1
The context is : I already have clusters of words (phrases actually) resulting from kmeans applied to internet search queries and using common urls in the results of the search engine as a distance (co-occurrence of urls rather than words if I simplify a lot). I would like to automatically label the clusters using semantics, in other words I'd like to extract the main concept surrounding a group of phrases considered together. For example - sorry for the subject of my example - if I have the following bunch of queries : ['my husband attacked me','he was arrested by the police','the trial is still going on','my husband can go to jail for harrassing me ?','free lawyer'] My study deals with domestic violence, but clearly this cluster is focused on the legal aspect of the problem so the label could be "legal" for example. I am new to NPL but I have to precise that I don't want to extract words using POS tagging (or at least this is not the expected final outcome but maybe a necessary preliminary step). I read about Wordnet for sense desambiguation and I think that might be a good track, but I don't want to calculate similarity between two queries (since the clusters are the input) nor obtain the definition of one selected word thanks to the context provided by the whole bunch of words (which word to select in this case ?). I want to use the whole bunch of words to provide a context (maybe using synsets or categorization with the xml structure of the wordnet) and then summarize the context in one or few words. Any ideas ? I can use R or python, I read a little about nltk but I don't find a way to use it in my context.
How to automatically label a cluster of words using semantics?
0.158649
0
0
3,398
31,165,248
2015-07-01T15:13:00.000
1
0
1
1
python,windows,neo4j
31,165,664
1
false
0
0
py2Neo is a library which you can generate/configure/manipulate Neo4j graph database. It is not an executable application. As far as your Python works on Windows, py2neo should work as well. You can download py2neo via pip install as you can download many libraries as well.
1
0
0
I would like to use Neo4j from Python in Windows 7 operating system. Which library can I install? Py2Neo seems to work for Linux and Mac but not for Windows.
Neo4j from Python in Windows 7
0.197375
0
0
340
31,167,283
2015-07-01T16:50:00.000
0
0
1
0
python,dependencies,pyqt4,setuptools,setup.py
31,167,583
1
false
0
1
A search of the Python Package Index reveals it's actually python-qt. Annoying, but I suppose it works. EDIT: Actually, it's not. See the comments below.
1
1
0
I'm creating a setup.py install script for my upcoming PyQt application. The PyQt modules are all spelled with camel case as opposed to the standard module name conventions, and I can't find what name to use in the setup script. What is the name of the PyQt4 module to be used in the install_requires field of setup()?
PyQt4 as dependency in setup script
0
0
0
432
31,167,457
2015-07-01T16:59:00.000
2
0
0
0
python,django
31,168,478
1
false
1
0
In short, yes. You need to know which users need to change their password. If you don't want to use a custom User model, I would recommend having another model to store the users that need to change their password. You would add the users to this table upon user registration/creation. Then you could write a very simple middleware to check the current logged user (place it after AuthenticationMiddleware in your settings.py). If the user is flagged as requiring a password change, you could force a HttpResponse (in the middleware) to a custom view with a PasswordChangeForm (which comes out of the box in Django, in django.contrib.auth.forms.PasswordChangeForm), after which you could remove the flag to the user, and redirect them to the home page.
1
1
0
I would like to force the user to change their password on first login. Can I do this with the default django authentication system?
Require the user to change their password on first login?
0.379949
0
0
2,193
31,167,717
2015-07-01T17:14:00.000
-1
0
1
0
python,list,iterator,listiterator
31,167,984
1
false
0
0
Iterating order is guaranteed for lists, but not for dictionaries or sets. This holds for both python 2 and 3, and is VERY unlikely to be ever changed.
1
1
0
As far as I can see in Python 2.7, the iterator of a list traverse the list in an increasing-index order. I would like to know if this order is guaranteed by Python 2/3, or is this order clearly defined as the behavior of a list iterator. In other words, if I want to traverse the list in an increasing-index order (and I require it to be in such order), and simply use the iterator for that purpose, is it possible that in some later version of Python the behavior be changed?
Does Python guarantee the traversal order of a list iterator?
-0.197375
0
0
1,278
31,169,430
2015-07-01T18:54:00.000
0
0
1
0
python,matrix,virtual-machine,sage
31,186,231
1
true
0
0
Sage can only use its own Python, if that makes sense. On Windows there are a lot of problems with certain components of Sage compiling properly (non-Python components, of course) which is why there is not a 'native port', though Cygwin should work okay if that is an option for you. From what I hear it's not too difficult to set up an Ubuntu partition on a Windows machine, though I have no personal experience with this. (By the way, it's possible that Octave would be a good choice for you, based on your description, or R, which is actually a component of Sage.)
1
0
0
I'm writing code that is really heavy on linear algebra, specifically matrix operations. Because the matrices I'm using are very large, I'm running out of memory when I use the SymPy library. I think I can do what I want to in with Sage, but for my purposes I can't run my code in a VM. It has to be on my host OS. Without going so far as to install Ubuntu or something, is there a way I could add Sage to use as a library in my Python code? My Python version is 3.4, OS is Windows 7. Thanks.
Using Sage as a Python library (Windows)
1.2
0
0
152
31,171,941
2015-07-01T21:22:00.000
8
0
1
0
python,multiprocessing,python-multiprocessing
31,356,196
1
true
0
0
When you create a Pool of worker processes, new processes are spawned from the parent one. This is a very fast operation but it has its cost. Therefore, as long as you don't have a very good reason, for example the Pool breaks due to one worker dying unexpectedly, it's better to always use the same Pool instance. The reason for the hang is hard to tell without inspecting the code. You might not have clean the previous instances properly (call close()/stop() and then always call join()). You might have sent too big data through the Pool channel which usually ends up with a deadlock and so on. Surely a pool does not break if you submit less tasks than workers. The pool is designed exactly to de-couple the number of tasks from the number of workers.
1
8
0
I'm trying to understand the best practices with Python's multiprocessing.Pool object. In my program I use Pool.imap very frequently. Normally every time I start tasks in parallel I create a new pool object and then close it after I'm done. I recently encountered a hang where the number of tasks submitted to the pool was less than the number of processes. What was odd was that it only occurred in my test pipeline which had a bunch of things run before it. Running the test as a standalone did not cause the hand. I assume it has to do with making multiple pools. I'd really like to find some resources to help me understand the best practices in using Python's multiprocessing. Specifically I'm currently trying to understand the implications of making several pool objects versus using only one.
Should I create a new Pool object every time or reuse a single one?
1.2
0
0
3,782
31,172,195
2015-07-01T21:41:00.000
3
0
1
0
python
31,172,218
2
false
0
0
In computer science, the term "flush" doesn't mean to erase what's already in a buffer; rather, it means to take the unwritten contents of a buffer in memory (like the stdout buffer) and write it, in this case to the screen. So when you tell the program to "flush stdout", you're really just telling it to "take what's in stdout and make sure it's all displayed on the screen."
1
1
0
What I'm trying to do is have some 'progress text' on the bottom of a script that I've creating. If I for loop a list [1,2,3,4,5] and print i, then it simply prints 1,2,3,4, and 5 on separate lines. How about if I want to print 1 out to the screen, sleep 5 seconds, clear that out and then print 2? I've tried using stdout.write("text"), sleep, flush, stdout.write("aetlkjetjer"), sleep, and it just simply adds on to that "text" statement instead of flushing the output. Am I misunderstanding something with the way stdout.flush works? Isn't it supposed to flush/erase the output of the previous print?
Stdout and flush? It's appending and not flushing
0.291313
0
0
353
31,173,867
2015-07-02T00:39:00.000
0
0
1
0
python,selenium,pycharm
31,180,054
2
false
0
0
Maybe you use python 2.x and 3.x on your computer and you configured in pycharm other then the one you use in console? If it is so then pip could install selenium to python 2.x and in pycharm you are using 3.x or the other way round.
2
3
0
I installed Selenium on my system using 'pip install selenium' and it works great on Mac Console. But when I tried using selenium in my project on Pycharm, I got an error that No module named Selenium exists. What am I doing wrong?
Selenium not working on Pycharm
0
0
1
5,003
31,173,867
2015-07-02T00:39:00.000
1
0
1
0
python,selenium,pycharm
31,191,965
2
true
0
0
So I found what I was doing wrong. My Mac Terminal and Pycharm were using different Python that I installed on my system, so I changed the path on Pycharm interpreter to the local path where Selenium was installed.
2
3
0
I installed Selenium on my system using 'pip install selenium' and it works great on Mac Console. But when I tried using selenium in my project on Pycharm, I got an error that No module named Selenium exists. What am I doing wrong?
Selenium not working on Pycharm
1.2
0
1
5,003