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
29,566,947
2015-04-10T17:03:00.000
1
0
0
1
python-3.x,system,kivy
35,697,811
4
false
0
1
This happened to me because an old zlib1.dll was being loaded from somewhere in my PATH. I copied a new version to system32 and it solved the problem.
2
5
0
I installed (extracted) Kivy (Kivy-1.9.0-py3.4-win32-x86.exe) on my PC (Win7 32bit). Now whenever trying to run a file using kivy-3.4.bat getting an error message within a window... python.exe- Entry point not found The procedure entry point inflateReset2 could not be located in the dynamic link library zlib1.dll. On...
Python | Python.exe- Entry point not found
0.049958
0
0
12,725
29,566,947
2015-04-10T17:03:00.000
4
0
0
1
python-3.x,system,kivy
34,912,630
4
false
0
1
Yes, I know this post is a bit old, but maybe someone else searches this. I got the same error. And really, I just tried to start the python script via MS Powershell instead of CMD. I just wanted to use the PS one time. And it worked, at least for me. So, if you encounter this error, try to use the Powershell :)
2
5
0
I installed (extracted) Kivy (Kivy-1.9.0-py3.4-win32-x86.exe) on my PC (Win7 32bit). Now whenever trying to run a file using kivy-3.4.bat getting an error message within a window... python.exe- Entry point not found The procedure entry point inflateReset2 could not be located in the dynamic link library zlib1.dll. On...
Python | Python.exe- Entry point not found
0.197375
0
0
12,725
29,567,051
2015-04-10T17:10:00.000
0
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
67,039,753
12
false
0
0
This is a fresh install. It works with firewall disabled. As this was a fresh install any answer that deals with AppData does not apply. Nor does any answer dealing with deleting *.py files. If you are using a third party firewall - uninstall it and use Windows firewall. The main offender here is Avast/AVG. If you real...
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
0
0
1
111,264
29,567,051
2015-04-10T17:10:00.000
0
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
56,508,508
12
false
0
0
Just to note my particular issue, this happens for me when my RAM gets full and my CPU gets busy. The problem is because of a network socket timeout on the IPC pipes between the RPC subprocess. It's a poor design (insecure and prone to failure) that's commonly used for IPC instead of process pipes. The fix is to clear ...
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
0
0
1
111,264
29,567,051
2015-04-10T17:10:00.000
0
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
56,134,431
12
false
0
0
My problem was that the .py file wasn't on my local machine. It was on a shared directory. After moving the file to my local machine, I quit getting the error.
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
0
0
1
111,264
29,567,051
2015-04-10T17:10:00.000
3
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
36,233,988
12
false
0
0
Simple...rename your .py file with some name different from any keyword name like 'random.py' which already exists in python package. Eg. I named one file as "random.py". The same error popped up. I renamed it to "random_demo.py". It worked. The different naming discards the problem of ambiguity between an already exis...
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
0.049958
0
1
111,264
29,567,051
2015-04-10T17:10:00.000
3
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
33,713,257
12
false
0
0
I fixed it, I needed to run IDLE with admin privileges. (I am using Windows 7 x64). Hope this helps.
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
0.049958
0
1
111,264
29,567,051
2015-04-10T17:10:00.000
0
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
33,092,815
12
false
0
0
Just had the same issue. So uninstalled and reinstalled which fixed it and took 10 minutes. The key with Windows machines is delete the old directory (C:\Python27\ because windows does seem to actually delete things) and when reinstalling specify a new directory (C:\Python279\ or whatever you choose to call it). I am...
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
0
0
1
111,264
29,567,051
2015-04-10T17:10:00.000
0
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
32,435,420
12
false
0
0
I had a similar problem with a file called "test.py" and Python 2.7.9 - renaming the file to something else solved my issue. After checking, I noticed that there is a file with the same name under the Python27\Lib folder. Seems to be a bug in IDLE.
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
0
0
1
111,264
29,567,051
2015-04-10T17:10:00.000
0
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
36,227,282
12
false
0
0
Go to C:/Users/[your user]/AppData/Local/Programs/Python/Python35-32 and delete or rename every *.py file in this directory which is named after a certain method, function, module or library. Then run IDLE. Should work. Hope I could help
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
0
0
1
111,264
29,567,051
2015-04-10T17:10:00.000
29
0
0
0
python,user-interface,runtime-error,subprocess,python-idle
32,142,364
12
true
0
0
Delete all newely created .py files in the directory with Python. for example random.py, end.py - that was my problem that caused the same notification window. Reason in filename conflicts.
9
20
0
I am new to programming and i decided to learn Python first, so; I installed Python, latest version 3.4. and I am trying to open Python IDLE(GUI) mode, so when I open I get message "IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection.". My firewall is ...
Python error - IDLE's subprocess didn't make connection. Either IDLE can't start or personal firewall software is blocking connection
1.2
0
1
111,264
29,568,952
2015-04-10T19:06:00.000
0
0
0
0
javascript,python,django,backbone.js,frontend
29,569,455
1
false
1
0
Backbone is a really nice frontend framework that allows you to work with websockets and the like. Backbone is a frontend framework that does not need "direct" access to the db. It will work with django models using either django rest framework, or websockets(redis, tornado, etc.). Backbone models can be just represen...
1
0
0
I'm building a crud app using Python and Django. I want to use Backbone to access the api, grab the user data and render it accordingly. I'm new to Backbone and had some questions on a high level: 1) What advantage does Backbone provide that I can't do with regular Javascript? 2) I understand that Models and Collection...
Understanding how to integrate Backbone JS with a Python crud app
0
0
0
313
29,572,608
2015-04-11T00:22:00.000
0
0
0
1
java,python,amazon-web-services,amazon-ec2
29,572,952
1
false
1
0
Since you're just making a command line call to the Java app, the path of least resistance would just be to make that call from another server using ssh. You can easily adapt the command you've been using with subprocess.call to use ssh -- more or less, subprocess.call(['ssh', '{user}@{server}', command]) (although hav...
1
1
0
I am working on some machine learning for chemical modelling in python. I need to run a java app (from command line through python subprocess.call) and a python webserver. Is this possible on AWS EC2? I currently have this setup running on my mac but I am curious on how to set it up on aws. Thanks in advance!
Is it possible to run java command line app from python in AWS EC2?
0
0
0
211
29,575,034
2015-04-11T06:52:00.000
1
0
0
0
python,parsing,nlp,neural-network,stanford-nlp
29,593,497
1
true
0
0
I don't know of any such wrapper at the moment, and there are no plans at Stanford to build one. (Maybe the NLTK developers would be up for the challenge?)
1
1
1
I know about the Python wrappers for Stanford CoreNLP package but this package does not seem to contain neural net based dependency parser model. Rather it is present in Stanford-parser-full-****-- package for which I can't find any Python wrapper. My Question: Is there a Python wrapper that would parse using Stanford ...
Is there a Python wrapper for Stanford Neural Net based dependency parser?
1.2
0
0
207
29,577,287
2015-04-11T11:21:00.000
1
0
0
0
python,websocket,event-handling,serial-port,blocking
29,577,603
2
false
1
0
Simply start a subprocess that listens to the serial socket and raises an event when it has a message. Have a separate sub-process for each web port that does the same.
1
1
0
I am busy developing a Python system that uses web-sockets to send/received data from a serial port. For this to work I need to react to data from the serial port as it is received. Problem is to detect incoming data the serial port needs to queried continuously looking for incoming data. Most likely a continuous loop....
Python: how to host a websocket and interact with a serial port without blocking?
0.099668
0
1
1,800
29,581,436
2015-04-11T18:19:00.000
0
0
1
1
python,linux,pycharm,ubuntu-14.04
29,581,633
2
true
0
0
hi Pedro in ubuntu you need to install the files using the command prompt even if you downloaded the files you need to install them using command, unlike windows in linux when some software is downloaded you need to install them manually by using commands like sudo apt-get python install.. for further help you can cons...
1
0
0
I am running Ubuntu 14.04/GNOME 3.8.4 on 15 MBP Duel Boot. I am new to Linux and Python(Pycharm ide) I have downloaded the Pycharm "files" from the software center but cannot run the program.The icon comes up in the side bar but when i click it nothing happens. I have tried "./" and only the code appers in "gedit" Ple...
Pycharm (Ubuntu) program not opening
1.2
0
0
3,197
29,584,270
2015-04-11T23:33:00.000
1
0
0
1
python,macos,exe
29,584,289
2
false
0
0
You can run python scripts through OS X Terminal. You just have to write a python script with an editor, open your Terminal and enter python path_to_my_script/my_script.py
1
8
0
My google searching has failed me. I'd like to know how to make an executable Python file on OS X, that is, how to go about making an .exe file that can launch a Python script with a double click (not from the shell). For that matter I'd assume the solution for this would be similar between different scripting language...
How do you make a Python executable file on Mac?
0.099668
0
0
17,211
29,584,840
2015-04-12T01:10:00.000
0
0
1
1
macos,python-3.x
37,517,408
3
false
0
0
I have found that making the 'python' alias replace the default version of python that the system comes with is a bad idea. When you install a new version of python (3.4 for instance), these two new commands are installed, specifically for the version you installed: pip3.4 python3.4 If you're using an IDE that wants y...
2
0
0
I'm on OSX, and I installed IDLE for Python 3.4. However, in Terminal my python -V and pip --version are both Python 2.7. How do I fix this? I really have no idea how any of this works, so please bear with my lack of knowledge.
I don't know how to update my Python version to 3.4?
0
0
0
113
29,584,840
2015-04-12T01:10:00.000
0
0
1
1
macos,python-3.x
29,584,868
3
false
0
0
Try python3 or python3.4. It should print out the right version if correctly installed. Python 3.4 already has pip with it. You can use python3 -m pip to access pip. Or python3 -m ensurepip to make sure that it's correctly installed.
2
0
0
I'm on OSX, and I installed IDLE for Python 3.4. However, in Terminal my python -V and pip --version are both Python 2.7. How do I fix this? I really have no idea how any of this works, so please bear with my lack of knowledge.
I don't know how to update my Python version to 3.4?
0
0
0
113
29,587,822
2015-04-12T09:15:00.000
1
0
0
0
python,linux,windows,macos,sqlite
29,589,262
1
false
0
0
Your tool runs with the permissions of the user. Any file created by it can also be delete by the same user. You can ask the administrator to protect your files, but on most Mac/Windows/Linux PCs, the user is the administrator. There is no place that is safe from the user that controls your tool's execution environment...
1
0
0
I have a command-line tool that I'm creating and I'm looking for a safe place to put my sqlite database so it doesn't get overwritten or deleted by the user by accident in mac,windows,or linux and be accessible by my application.
Where to put sqlite database in python command-line project
0.197375
1
0
64
29,590,228
2015-04-12T13:58:00.000
1
0
1
0
python,arrays,numpy
29,590,423
1
false
0
0
Since a 64 bit float occupies 8 bytes, you can easily estimate a lower bound at 24,000 * 1500 * 8 = 288,000,000 bytes which is about 0.3 GB. I don't know about the overhead created by a numpy array, but I'm guessing it's not significant for an array that size. According to the answer I linked to in the comment above, y...
1
0
0
I have written a cython function using numpy.array to execute some calculation on a big array for example the array has 24000x1500 size. Then I got MemoryError. I am wondeing what is the ultimate size of a two-dimensional array with float64 components in python? Is this error occurring due to the size of my array? W...
What is the ultimate size of a two-dimensional array with float64 components
0.197375
0
0
309
29,590,978
2015-04-12T15:14:00.000
0
0
0
0
python,int,division,python-2.x,floating-point-precision
29,591,000
1
true
1
0
104101/2.0 104101/float(2) Or use Python 3
1
0
0
I'm trying to get precise division with Python without success. 104101/2 gives 52050 whereas I need 52050.5 I also tried "%0.2f" % (104101/2) which is giving me '52050.00'. Javascript equivalent works. Any idea what's wrong with me?
How to get precise division?
1.2
0
0
395
29,591,189
2015-04-12T15:34:00.000
1
0
0
1
python,google-app-engine,redirect,webapp2
29,591,301
1
false
1
0
Redirect takes a URL. You probably want to self.redirect("/") but without knowing your URL mappings, that's just a guess.
1
2
0
I'm having troubles with redirect function. When I call it with self.redirect("/index.html") the server goes to http://localhost:10080/index.html and alert 404 page not found. Log: HTTP/1.1" 304 - INFO 2015-04-12 12:32:39,029 module.py:737] default: "POST /subscribe HTTP/1.1" 302 - INFO 2015-04-12 12:32:39,046 ...
Webapp2 redirect 404 error
0.197375
0
0
237
29,593,223
2015-04-12T18:46:00.000
1
0
1
1
python-2.7,pygame,ubuntu-14.10
30,444,254
1
false
0
1
If you open up the terminal type in sudo apt-get install python-pygame It should download and install the dependencies required for pygame.
1
0
0
I want to install pygame library on Ubunbu 14.10. I am using Python 2.7.x. At this time I found dependences problems with python-numpy dependence., because it uses a previous version of gcc that 14.10 uses that's why I am stuck with this, my question is: is there any way to install pygame on 14.10? best
install python pygame on ubuntu 14.10
0.197375
0
0
386
29,594,889
2015-04-12T21:31:00.000
1
1
1
0
python,django,unit-testing,pillow,circleci
29,603,469
2
true
1
0
Have you specified the Python version in your circle.yml? If Python version is not specified, the virtualenv might not get created for you.
1
0
0
Can anyone point me to why this error keeps showing up during circleci testing? Neither Pillow nor PIL could be imported: No module named Image python manage.py test returned exit code 1 For the record, I followed every resource I had in terms of installation instructions for pillow. Can anyone PLEASE help me? I...
Django circleci and the pillow library
1.2
0
0
287
29,595,382
2015-04-12T22:27:00.000
1
0
0
0
python,django,django-models,django-orm
29,596,796
2
true
1
0
Also all 3rd-party packages rely on get_user_model(), so looks like if I don't use custom user model, all your relations should go to User, right? But I still can't add methods to User, so if User has friends relation, and I want to add recent_friends method, I should add this method to UserProfile. I have gone down t...
2
0
0
I know how to make custom user models, my question is about style and best practices. What are the consequences of custom user model in Django? Is it really better to use auxiliary one-to-one model? And for example if I have a UserProfile models which is one-to-one to User, should I create friends relationship (which ...
Custom user model in Django?
1.2
0
0
138
29,595,382
2015-04-12T22:27:00.000
1
0
0
0
python,django,django-models,django-orm
29,595,803
2
false
1
0
I would definitely recommend using a custom user model - even if you use a one-to-one with a profile. It is incredibly hard to migrate to a custom user model if you've committed to the default user model, and there's almost always a point where you want to add at least some custom logic to the user model. Whether you u...
2
0
0
I know how to make custom user models, my question is about style and best practices. What are the consequences of custom user model in Django? Is it really better to use auxiliary one-to-one model? And for example if I have a UserProfile models which is one-to-one to User, should I create friends relationship (which ...
Custom user model in Django?
0.099668
0
0
138
29,596,204
2015-04-13T00:21:00.000
2
0
1
0
python,datetime,epoch,mktime
29,596,282
1
true
0
0
time.mktime converts a time tuple in local time to seconds since the Epoch. Since time.gmtime(0) returns GMT time tuple, and the conversion assumes it was in your local time, you see this discrepancy.
1
2
0
I am expecting the following code will return 0 but I get -3600, could someone explains why? and how to fix it? thanks import datetime import time ts = time.mktime(time.gmtime(0)) print time.mktime(datetime.datetime.fromtimestamp(ts).timetuple())
how to make time.mktime work consistently with datetime.fromtimestamp?
1.2
0
0
709
29,596,604
2015-04-13T01:24:00.000
1
0
0
0
python,session,websocket,serial-port
29,596,782
1
false
1
0
Specify a variable like serial_usage which has an initial value False. When a new client connected to your WebSocket server, check the serial_usage variable. If serial port is not being used at that moment (serial_usage == False), make the connection happen, set serial_usage True. When the client disconnects, set seria...
1
0
0
I am building a Python Flask webpage that uses websockets to connect to a single serial port(pySerial). The webpage will collect a list of commands to be executed(user input) and send that to the serial port via websockets. The problem I am facing is that as soon as the webpage has been opened multiple times commands c...
How to restrict a webpage to only one user(Browser Tab)
0.197375
0
1
124
29,598,769
2015-04-13T06:05:00.000
0
0
0
0
python,arrays,numpy
29,637,968
1
false
0
0
Since you are attempting a rather customized moving window average convolution, it is unlikely that you will find it in an existing library. Instead you can implement this in a straightforward way with loops. Then use Cython, f2py or numba, etc to speed this up to a level comparable with a native C/Fortran implementat...
1
1
1
I would like to perform a basic moving average convolution of an array where each pixel is replaced by the average of its surrounding pixels. But my problem scenario goes like this : I have two arrays valueArray and radiiArray. Both the arrays have the same shape. I need to apply the moving average to the valueArra...
Moving Window Average Convolution with different Radii - Python
0
0
0
267
29,598,848
2015-04-13T06:12:00.000
1
0
0
0
python,opencv
29,605,232
2
false
0
0
Try to use BGR2GRAY(and so on - BGR2HSL etc) instead of RGB2GRAY - OpenCV usually use BGR channel order, not RGB.
1
0
1
Here i have one RGB image where i need want extract plane of intensity. I have tried HSL, in this i took L Luminosity but its not similar with Intensity, and tried RGB2GRAY but this also little bit similar but not actual. so is there any special code to get intensity of the image? or is there any calculation of Intensi...
How to convert RGB to Intensity in Python 2.7 using Opencv
0.099668
0
0
954
29,607,222
2015-04-13T14:01:00.000
0
0
0
0
python,postgresql,pandas
68,004,057
2
false
0
0
For sql alchemy case of read table as df, change df, then update table values based on df, I found the df.to_sql to work with name=<table_name> index=False if_exists='replace' This should replace the old values in the table with the ones you changed in the df
1
25
1
I have a PostgreSQL db. Pandas has a 'to_sql' function to write the records of a dataframe into a database. But I haven't found any documentation on how to update an existing database row using pandas when im finished with the dataframe. Currently I am able to read a database table into a dataframe using pandas read_sq...
Update existing row in database from pandas df
0
1
0
11,070
29,610,806
2015-04-13T16:53:00.000
0
0
0
1
python,rabbitmq,celery,kombu
50,602,825
1
false
0
0
I understand that to communicate with RabbitMQ, you would require any lib that abides by AMQP specification. Kombu is one such lib which can bind to the RabbitMQ exchange, listen and process messages by spawning numerous consumers. Celery is nothing but an asynchronous task generator which has numerous add-ons like in...
1
1
0
Is it possible for a kombu producer to queue a message on rabbitmq to be processed by celery workers? It seems the celery workers do not understand the message put by the kombu producer.
kombu producer and celery consumer
0
0
0
673
29,611,273
2015-04-13T17:21:00.000
2
0
0
0
python,sqlalchemy
29,611,824
1
true
0
0
You can pass extra data at the info param in Column initializer Column(...., info={'data': 'data'})
1
0
0
In SQLAlchemy, is there a way to store arbitrary metadata in an column object? For example, I want to store a flag on each column that says whether or not that column should be serialized, and then access this information via inspect( Table ).attrs.
Storing arbitrary metadata in SQLAlchemy column
1.2
1
0
95
29,612,149
2015-04-13T18:09:00.000
0
0
1
0
python,python-3.x,ipython,canopy
29,613,442
1
true
0
0
I just removed iPython from my Mac with Canopy and installed it again, now it works perfect!
1
0
0
I always used iPython notebook with Python 2.7.6 on Mac OS X Yosemite. Now I have a notebook I only can use with Python 3. I installed Python 3.4.3 and tried to launch notebook with the command "ipython3 notebook", but this doesn't work... I also updated the iPython package with Canopy. Can anyone help me?
iPython Notebook Python 3
1.2
0
0
766
29,615,953
2015-04-13T22:11:00.000
0
0
1
0
python,regex
29,615,982
2
true
0
0
Use the regexp ^[^[]* to match everything up to the first [.
1
0
0
I can't figure out how to get "any text" from the string any text [monkey bars][fancy swing][1002](special) after a lot of trying I've made (.*)[\(*]|[\[*] but it doesn't seem to work very well I'm using the python regex engine
can't find substring in regex
1.2
0
0
48
29,617,210
2015-04-14T00:27:00.000
5
0
0
0
python,postgresql,unicode,sqlalchemy,python-2.x
35,273,011
1
false
0
0
In 99.99% of the cases go for Unicode and if possible use Python 3 as it would make your life easier.
1
14
0
I apologize in advance for my lack of knowledge concerning character encoding. My question is: are there any inherent advantages/disadvantages to using the 'Unicode' type, rather than the 'String' type, when storing data in PostgreSQL using SQLAlchemy (or vice-versa)? If so, would you mind elaborating?
'Unicode' vs. 'String' with SQLAlchemy and PostgreSQL
0.761594
1
0
3,572
29,621,193
2015-04-14T07:08:00.000
1
0
1
1
python,shell
29,621,377
2
true
0
0
What if you make a 'master' shell script that would execute all the others in sequence? This way you'll only have to create a single sub-process yourself, and the individual scripts will share the same environment. If, however, you would like to interleave script executions with Python code, then you would probably ha...
2
0
0
I need to execute several shell scripts with python, some scripts would export environment parameters, so I need to execute them in the same process, otherwise, other scripts can't see the new environment parameters in one word, I want to let the shell script change the environment of the python process so I should not...
how to execute shell script in the same process in python
1.2
0
0
1,004
29,621,193
2015-04-14T07:08:00.000
1
0
1
1
python,shell
29,621,636
2
false
0
0
No, you cannot run more than one program (bash, python) in the same process at the same time. But you can run them in sequence using exec in bash or one of the exec commands in python, like os.execve. Several things survive the "exec boundary", one of which is the environment block. So in each bash script you exec...
2
0
0
I need to execute several shell scripts with python, some scripts would export environment parameters, so I need to execute them in the same process, otherwise, other scripts can't see the new environment parameters in one word, I want to let the shell script change the environment of the python process so I should not...
how to execute shell script in the same process in python
0.099668
0
0
1,004
29,621,557
2015-04-14T07:31:00.000
1
0
1
0
python,printing,pycharm
29,817,209
1
false
0
0
I have turned off autocomplete with space under Preferences>Editor>General>Code Completion, checkbox "Insert selected variant by typing dot, space. etc." This way I can still autocomplete with the Tab key and just type "print" and not have it turn into "print()" when hitting space. While this answer does not make autoc...
1
1
0
As the title says, when using autocomplete in Pycharm the only autocomplete option shown is: print(args,kwargs) builtin I expect autocomplete to complete with "print" as this is what I usually use. I'm using Pycharm version 4.06 and anaconda python 2.7.
pycharm autocompletes "print()" and not "print"
0.197375
0
0
871
29,622,322
2015-04-14T08:16:00.000
2
0
1
1
python-3.x,pandas,pip,python-idle
29,668,903
1
true
0
0
I asked some questions in a comments. However, starting Idle with python3 -m idlelib will start Idle with whatever python is started with python3. Since you say that python3 starts 3.4.3, the above should run Idle 3.4.3.
1
0
0
I have python3.4.0 installed on my system. Today, I want to install python3.4.3, so I download the source code and install it. However, my idle is still python3.4.0 while when I type python3 in terminal, it shows python3.4.3. I also have pandas installed on my old version, it still can be used on my idle (linked with 3...
python3 not linked with idle
1.2
0
0
267
29,638,924
2015-04-14T23:11:00.000
2
0
1
0
python,pycharm
29,658,481
1
true
0
0
Please check Settings | Editor | File Types | Text | Registered patterns. This file name may have gotten mapped to the "Plain text" file type; if you remove the erroneous mapping, everything will start working correctly. (This is a bug in PyCharm, but unfortunately we don't know the exact steps to reproduce it.)
1
3
0
It has a different icon and is shown with Text and Data tabs in the bottom. It seems somehow related to its name: test_events.py. Only if I name it this way, PyCharm exhibits this behavior. Using text_eventz.py is OK. How do I fix it?
One of files in my project is not treated as Python code file by PyCharm
1.2
0
0
77
29,640,093
2015-04-15T01:31:00.000
0
1
1
0
python,git,newrelic,inotify
29,640,265
1
false
0
0
First, it's not clear what problem you are trying to solve. Is the 15-year git history slowing things down when cloning? If so, maybe just do a shallow git clone instead? (i.e. A shallow cone doesn't download the history.) As Thilo pointed out, cutting the repo in half isn't going to make things that much faster. But i...
1
0
0
My company has a single git repository which is over 15 years and is really massive with about 60% of it which can be archived. I want to find these scripts (python, perl, ruby, java etc) and create a new git repository with only frequently used scripts. The scripts also have cross dependencies. One solution that I tho...
Cleanup Huge Git Repository
0
0
0
95
29,642,697
2015-04-15T06:08:00.000
0
0
0
0
python,export-to-excel
29,658,155
1
false
0
0
You can use the .offset() method of a cell to get a cell a particular number of rows or cells away.
1
0
0
I am using the openpyxl module for my Python scripts to create and edit .xlsx files directly from the script. Now I want to save a not known amount of number on after the other. How can I increase the cell number? So if the last input was made in A4, how can I say that the next should be in A5?
openpyxl for Python dynamic lines
0
1
0
90
29,647,683
2015-04-15T10:21:00.000
0
0
0
0
python,neural-network,genetic-algorithm
30,931,808
1
false
0
0
Since I can't comment yet I will just answer taking some assumptions. (I'm also starting to experiment with NN and GA in Python too (MultiNEAT), so not an expert either ;) ) The problem could be poor feedback to the genetic algorithm, so it can't select the best individuals. Try making your fitness score more fine gra...
1
0
0
I am attempting to create a program that can find the best solution for winning a game using NN and I was hoping to get some help from the wonderful community here. The game is a strategy war game, you have your soldiers and a land you need to conquer. There is also the opponent's soldiers you need to be aware from the...
Defining inputs and fitness in ANN with GA Python
0
0
0
167
29,649,147
2015-04-15T11:35:00.000
0
1
0
1
python,indexing,whoosh
29,650,121
1
false
0
0
Is it possible that Whoosh overflows to RAM of your computer by loading the 27Gb file?
1
1
0
I'm using a 32-bit Ubuntu machine. I'm trying to create a Whoosh index of a 27GB file. But my system is crashing after index size of 3GB. Is there any size constraint on Whoosh index size? If not then what can be the problem.
Maximum Whoosh Index size?
0
0
0
677
29,649,743
2015-04-15T12:04:00.000
1
0
0
0
python,turtle-graphics
29,649,944
1
true
0
1
Quickly glancing over the turtle documentation, nope, there's no way to detect colors. You should probably keep a record of which spaces you have drawn so far, adding to the collection whenever you draw a new space. Then, when you want to know the color of an old space, you only need to search through the collection. W...
1
0
0
Is there any way to detect the color that the turtle is standing on in python? For example if the the turtle is on a black colored space, he moves forward.
Turtle graphics color detection
1.2
0
0
1,770
29,653,803
2015-04-15T15:02:00.000
1
0
0
0
python,odoo,odoo-8
29,665,261
1
true
1
0
It's because you have specified that mode_reglement this field is mandatory in account.invoice so you have to provide value for that or set default value for that field in account.invoice model. You should provide mandatory fields on UI because user can create invoice from other options as well.
1
0
0
I have a problem when i try to convert order in invoice just after choice that i want to invoice (all/percent/ect ...) in a custom field "mode_reglement" I have no problem in my development environment but in production : The trace : > Odoo Server Error Traceback (most recent call last): File > "/var/www/o...
Error when try to convert order in invoice
1.2
0
0
727
29,655,449
2015-04-15T16:13:00.000
4
0
1
0
python,for-loop
29,655,512
2
false
0
0
It's unpacking a tuple returned from the items() call into the method and config variables.
1
6
0
I have come across a for-loop that is unusual to me. What does method mean in this for-loop? for method, config in self.myList.items():
What does extra parameter mean in this for-loop in Python?
0.379949
0
0
90
29,656,381
2015-04-15T17:02:00.000
1
0
1
1
workflow,argparse,python-idle
29,657,355
3
false
0
0
With some editors you can define the 'execute' command, For example with Geany, for Python files, F5 is python2.7 %f. That could be modified to something like python2.7 %f dummy parameters. But I use an attached terminal window and its line history more than F5 like commands. I'm an Ipython user, so don't remember m...
2
0
0
So I'm writing Python with IDLE and my usual workflow is to have two windows (an editor and a console), and run my script with F5 to quickly test it. My script has some non-optional command line parameters, and I have two conflicting desires: If someone launches my script without passing any parameters, I'd like him t...
How to cleanly pass command-line parameters when test-running my Python script?
0.066568
0
0
1,305
29,656,381
2015-04-15T17:02:00.000
1
0
1
1
workflow,argparse,python-idle
39,773,753
3
false
0
0
Thanks for your question. I also searched for a way to do this. I found that Spyder which is the IDE I use has an option under Run/Configure to enter the command line parameters for running the program. You can even configure different ones for the different editors you have open.
2
0
0
So I'm writing Python with IDLE and my usual workflow is to have two windows (an editor and a console), and run my script with F5 to quickly test it. My script has some non-optional command line parameters, and I have two conflicting desires: If someone launches my script without passing any parameters, I'd like him t...
How to cleanly pass command-line parameters when test-running my Python script?
0.066568
0
0
1,305
29,656,422
2015-04-15T17:04:00.000
-1
0
0
1
python,mysql,redis,cloud,storage
29,656,524
3
false
0
0
Store your logs in MySQL. Just make a table like this: x***time*****source*****action ---------------------------- ****unixtime*somemodule*error/event Your temporary storage should be enough for temporary files :)
1
11
0
I am working on a Python/MySQL cloud app with a fairly complex architecture. Operating this system (currently) generates temporary files (plain text, YAML) and log files and I had intended to store them on the filesystem. However, our prospective cloud operator only provides a temporary, non-persistent filesystem to ap...
How/where to store temp files and logs for a cloud app?
-0.066568
1
0
976
29,659,755
2015-04-15T20:00:00.000
0
0
0
1
python,twisted
29,664,919
1
false
0
0
Things get garbage collected when there are no more references to them, so I can't say when objects in your program will be collected. However, I can tell you about the references kept from Twisted. A Protocol connected to a Transport will have a reference that goes globals→reactor→transport→protocol. When the transpo...
1
1
0
Suppose I have a python twisted app with the standard Factory and Protocol subclasses. My Protocol subclass connectionMade() method launches a loopingCall that runs (say) every 5 minutes. I have two questions: Suppose the connection gets lost. Yes I know that this will result in the connectionLost() method being calle...
Questions on Twisted Protocols and loopingCall
0
0
0
174
29,660,467
2015-04-15T20:39:00.000
0
0
1
0
python,github,markdown,wiki,docstring
70,147,344
2
false
0
0
Pydoc doesn't generate markdown, it generates an ad-hoc text markup that only occasionally by luck matches markdown. You would need to have an ad-hoc text to markdown converter, which will fail a lot, same as using the raw ad-hoc text as if it already were markdown.
1
20
0
The title says it all. What I imagine is to have docstrings for all of my modules, classes and functions and somehow nicely navigate the doc via github (wiki?). Also, the doc should be in sync with latest code meaning it should be updated/re-generated on push. Is that possible?
Automatically Generate GitHub Wiki Documentation from Python Docstrings
0
0
0
4,963
29,660,487
2015-04-15T20:40:00.000
0
0
0
1
java,python,hadoop,import
29,679,539
1
false
0
0
Ok, I figured this one out by myself. The problem the python process runs into is that the HDFS uses symlinks. Python on the other hand does not accept symlinks as valid files so will not import from them if in the same directory. Instead of adding each file to the Distributed Cache, you can add the directory to the ca...
1
0
0
Ok, I am writing a java based Hadoop MR task. Part of the task is calling an outside python script as a new Process, passing it information and reading it back the resut. I have done this a few times before without problems when not working with hadoop. I can also call a single python script as a new process in hadoop ...
Python imports in Hadoop
0
0
0
77
29,661,974
2015-04-15T22:23:00.000
1
0
1
0
python,python-2.7
29,662,319
1
true
0
0
Clearly, if you have ten counters, it is better to put them in a dictionary (or a list, but dictionaries have meaningful keys). To use the dictionary in your function, the three usual solutions are global variable, argument or class variable. Argument is probably the clearer way.
1
0
0
Within my function I want to increment various counts which are established outside of the function. These are count for different scenarios (e.g. count of successful completions, and various forms of errors). In total I have about 10 different counts i use. While Python allows e.g. appending values to lists which were...
Best practice for incrementing a number from within a function in Python
1.2
0
0
196
29,662,290
2015-04-15T22:49:00.000
1
0
1
0
python,virtualenv,pylint
29,663,226
2
false
0
0
Usually python modules for different major versions don't interfer with each other. The only problem is utilities. So the recipe is as follows: Create a virtual environment for a python2, then go to the bin/ folder of the created environment and rename all created scripts/wrappers/binaries so that all of them would ha...
1
2
0
I have a codebase that includes both python2 and python3 code. I want to make one script that will run pylint on all python2 and all python3 files, ideally from within a single virtualenv. I can figure out which version of pylint to run by annotating the directories (eg, adding a .pylint3 file to directories that need...
How to install pylint for python2 and python3 side by side
0.099668
0
0
3,773
29,663,838
2015-04-16T01:30:00.000
0
0
1
0
python,multithreading,locking,queue
29,663,998
2
false
0
0
It sounds like you will have potentially more than one thread writing to a single output file, so you want to make the writes thread-safe, while allowing another output file to be created and written to if a subject is added. I would recommend having each thread simply lock the output file during the write. This would ...
1
0
1
I am working on Python multi-threading application. The scenario is: The source data(thousands of small files per hour) contains data about many subjects(range 1-100). Each row starts with "subject1|col1|col2|...|coln|". Right now users are interested in only 10(example) subjects. But in future they can add(or remove)...
Python (instantiate) locks to multiple outputs
0
0
0
184
29,664,759
2015-04-16T03:20:00.000
3
0
1
0
python,format
29,664,890
2
false
0
0
{0:6} is just going to take the 0th argument (date) and print it with a minimum of 6 characters. It can be an integer, a string, ... Nothing else special there. It is a guess at what format was intended for date (ie. May1st, 5/1, ...) You are correct about the interpretation of the {1:02d} which is the hour field pr...
1
1
0
I am new in python. In the following line '{0:6}{1:02d}'.format(date, hour) I figured out that hour should be 0 filled to two digits. But I can't figure out what it is formatting date to be. afaik, both date and hour are int values here.
python syntax for formatting integer
0.291313
0
0
71
29,669,631
2015-04-16T08:44:00.000
2
0
0
0
python,internet-explorer,bokeh
33,106,115
3
false
1
0
I ran into a similar issue with a Bokeh figure at work not showing in Internet Explorer, but the figure worked fine in other browsers. For me the problem seemed to be that intranet sites were shown in Compatability View (I must admit I don't know what Compatability View means...). The fix was to choose the options icon...
1
1
0
I've been making plots in Bokeh, they work fine in Chrome, but I just get blank pages in IE. I thought this was because my company uses IE8 by default, but we've now been upgraded to IE11 and I see the same problem. The IE debug console reports that the page targets document mode 7, so it may be an issue with the meta...
Make a plot visible in IE
0.132549
0
0
1,486
29,669,838
2015-04-16T08:55:00.000
0
0
0
0
python-2.7,network-programming,ip-address
29,670,007
1
false
0
0
If you are able to get the IP and the Subnetmask, you could simply calculate the Broadcastadress, by binary ORing the IP adress and the inverted subnetmask. BC = ipadress || inv(subnetmask)
1
0
0
I am using Python 2.7 on Linux. I need to get local IP address (here it is 172.16.x.x). I can get IP address and it's corresponding netmask address but I'm not able to get broadcast IP address for the same IP.
How to find Broadcast IP address from local IP address?
0
0
1
1,652
29,678,123
2015-04-16T14:40:00.000
0
0
1
0
python,three.js,blender
30,998,316
1
true
0
0
Well i forgot to post the answer i found : the 'strange behaviour' was in cases i had no objects selected actually, that is why the exporter was not available. I dont know if this condition existed in the previous exporter too, maybe that was what lead me to ask.
1
1
0
I have recently found a strange behaviour in Blender: sometimes when I delete certain objects in the scene, the JSON exporter becomes unavailable. For example in my actual scene, if I delete a specific plane it becomes unavailable, but not for any other meshes. Impossible to delete that plane. However I can delete it w...
Trouble with blender exporter for three.js
1.2
0
0
96
29,679,264
2015-04-16T15:24:00.000
3
0
1
0
python,kivy
29,679,556
1
false
0
1
Why not just use a TextInput field? change the appearance parameters so it looks like a label and disable input to the field.
1
4
0
i'm trying to create chatbox on kivy python. one of the most difficult is to create class with super class Label, which can support select its text like a TextInput class. Can somebody help me?
Label with selectable text
0.53705
0
0
891
29,682,897
2015-04-16T18:16:00.000
0
0
1
0
python,neo4j,type-conversion,py2neo
29,683,003
2
false
0
0
can you int(), float() str() on the __str__() method that looks to be outputting the value you want in your example?
1
2
0
I am using py2neo and I would like to extract the information from query returns so that I can do stuff with it in python. For example, I have a DB containing three "Person" nodes: for num in graph.cypher.execute("MATCH (p:Person) RETURN count(*)"): print num outputs: >> count(*) 3 Sorry for shitty formatting, it ...
How to convert neo4j return types to python types
0
1
0
2,448
29,683,036
2015-04-16T18:25:00.000
0
0
0
0
python,shopify
43,496,363
4
false
1
0
product = shopify.Product.find(pr_id) metafields = product.metafields()
1
3
0
Is there a way to GET the metafields for a particular product if I have the product ID? Couldn't find it in the docs.
Shopify Python API GET Metafields for a Product
0
0
1
1,518
29,683,652
2015-04-16T18:56:00.000
1
0
1
1
python,macos,bash,virtualenv
29,683,947
2
false
0
0
You can have as many as you like and put them where it's convenient. A common arrangement is to have a dedicated environment for each project; then if each project is in ~/projects/<project> you could have a virtualenv directory in each project's respective root directory. So ~/projects/foo/.env for the virtualenv fo...
1
0
0
I am transferring a Python based development system from PC to Mac. I need to create a virtualenv / directory to store this system. Where is a good place to put the directory (somewhere easily accessible from a terminal window)? I am not so savvy on the Mac as the PC, although I could probably write a bash script to...
Where to put a virtualenv directory on Mac OS X?
0.099668
0
0
3,129
29,691,344
2015-04-17T05:50:00.000
1
0
0
1
python,linux,bash,shell,unix
29,691,432
2
false
0
0
You might be looking for the readlink command. You can use readlink -m "some/path" to convert a path to the canonical path format. It's not quite path.join but it does provide similar functionality. Edit: As someone pointed out to me readlink is actually more like os.path.realpath. It is also a GNU extension and not av...
1
1
0
I'm looking for a Bash equivalent of Python's os.path.join. I'm trying to prompt the user for a directory path, which then will be used (with the help of path join equivalent) to do other stuff.
Shell: Prompt user to enter a directory path
0.099668
0
0
1,873
29,692,575
2015-04-17T07:11:00.000
4
0
1
0
python,pandas
29,692,821
2
false
0
0
use datetime.datetime.fromtimestamp(float("1.424304064E9"))
1
0
1
My data is in this format - "1.424304064E9" I have tried pandas.to_datetime(df['ts']) but no success. What am I missing?
How to convert string like 1.424304064E9 to datetime in pandas dataframe?
0.379949
0
0
298
29,694,344
2015-04-17T08:41:00.000
1
0
0
1
python,multithreading,tcpclient
29,695,958
1
false
0
0
Calling for a best way or code examples is rather off topic, but this is too long to be a comment. There are three general ways to build those terminal emulator like applications : multiple processes - the way the good old Unix cu worked with a fork multiple threads - a variant from the above using light way threads i...
1
0
0
I need to write python script which performs several tasks: read commands from console and send to server over tcp/ip receive server response, process and make output to console. What is the best way to create such a script? Do I have to create separate thread to listen to server response, while interacting with use...
Whats the best way to implement python TCP client?
0.197375
0
1
78
29,696,126
2015-04-17T10:01:00.000
2
1
1
0
python,module,scipy,portability,pyd
29,698,782
1
false
0
0
There are several possibilities if you want to distribute only a subset SciPy code with your code (and in particular scipy.optimize.fsolve), Look at the SciPy source code and copy only the files that are needed for the fsolve function. After a quick glance that would be at least, scipy/optimize/optimize.py, scipy/opti...
1
3
0
I'm developing a small tool which uses mainly NumPy and one SciPy module (scipy.optimize.fsolve). My idea of sharing it with others is that it comes in package with Portable Python so that theoretically everyone can run it. The whole SciPy package weighs a lot (about 80 mb). Is it possible to compile only 1 module int...
Compiling single SciPy module to *.pyd
0.379949
0
0
371
29,698,896
2015-04-17T12:13:00.000
0
0
1
0
python,algorithm
29,699,268
3
false
0
0
When I had to implement Dijkstra's algorithm in php to find the shorter way between 2 tables of a database, I constructed the matrix with 3 values : 0 if the 2 points are the same, 1 if they are linked by an edge, -1 otherwise. After that the algorithm just worked as intended.
1
0
1
How can I use Dijkstra's algorithm on an adjacency matrix with no costs for edges in Python? It has 1 if there is an edge between 2 vertices and 0 otherwise. The explanations that I've found on the internet are all for graphs with costs.
Dijkstra's algorithm on adjacency matrix in python
0
0
0
2,624
29,703,047
2015-04-17T15:11:00.000
2
0
1
0
python,debugging,pyscripter
29,703,594
1
true
0
0
Yes, PyScripter can do this. It is called conditional breakpoint. Put a breakpoint, open Breakpoints tab, right-click on your breakpoint to bring context menu where you can add a condition (python expression)
1
0
0
My question may seem bizarre. I am debugging a program in python with portable python, pyscripter. Is it possible to ask pyscripter to do this? : "Run the program until my_variable 's value become equal to 10, then stop at that point, and let me debug it line by line (using F7 or F8)" I want some sort of breakpoint tha...
How to put a conditional break point while debugging in pyscripter?
1.2
0
0
1,177
29,704,766
2015-04-17T16:30:00.000
0
1
0
1
python,windows,file,wmi,remote-access
29,705,179
2
false
0
0
I've done some work with WMI before (though not from Python) and I would not try to use it for a project like this. As you said WMI tends to be obscure and my experience says such things are hard to support long-term. I would either work at the Windows API level, or possibly design a service that performs the desired a...
1
1
0
I'm about to start working on a project where a Python script is able to remote into a Windows Server and read a bunch of text files in a certain directory. I was planning on using a module called WMI as that is the only way I have been able to successfully remotely access a windows server using Python, But upon furthe...
python copying directory and reading text files Remotely
0
0
0
693
29,706,559
2015-04-17T18:11:00.000
0
0
1
0
qpython
30,407,110
1
false
0
1
You can only press-and-hold the console and then select the "Copy All" option. At least I am doing so. I think there is no way to copy specific text.
1
0
0
I would like to copy the console output to ask a question about a program that's not working. but it seems the normal way of holding down text doesn't highlight the text for selection like in the editor. Is there a way to copy the text from qpython console?
How do you copy text from qpython console?
0
0
0
471
29,712,962
2015-04-18T04:39:00.000
0
0
1
0
python,string,list,python-2.7,dictionary
29,713,014
5
false
0
0
You can eval() but only with safe data. Otherwise, if you parse unsafe data, take a look into safer ast.literal_eval(). JSON parser is also a possibility, most of python dicts and lists have the same syntax.
2
7
0
I have strings such as: '[1, 2, 3]' and "{'a': 1, 'b': 2}" How do I convert them to list/dict? Someone mentions that ast.literal_eval or eval can parse a string that converts to list/dict. What's the difference between ast.literal_eval and eval?
How can I convert string to dict or list?
0
0
0
27,779
29,712,962
2015-04-18T04:39:00.000
1
0
1
0
python,string,list,python-2.7,dictionary
29,716,341
5
false
0
0
You can convert string to list/dict by ast.literal_eval() or eval() function. ast.literal_eval() only considers a small subset of Python's syntax to be valid: The string or node provided may only consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, and None. Passin...
2
7
0
I have strings such as: '[1, 2, 3]' and "{'a': 1, 'b': 2}" How do I convert them to list/dict? Someone mentions that ast.literal_eval or eval can parse a string that converts to list/dict. What's the difference between ast.literal_eval and eval?
How can I convert string to dict or list?
0.039979
0
0
27,779
29,713,533
2015-04-18T03:10:00.000
0
0
0
0
python,html
29,713,745
2
false
1
0
No, your python process does not care about the JPG at all. It just generates html asking the browser to fetch the JPG. Then it's the browser, fetching the JPG by making another request to the webserver. Therefore it is very likely that your python script needs to live in a different directory than the JPG. Have a look...
1
0
0
The generated HTML page works fine for text. But does not find the file and displays the alt text instead. I know the HTML works because "view source" in the browser can be copied into a file, which then works locally when the .jpg is in the same directory. On the remote site, the .jpg file is in the same directory as...
My Python program generates an HTML page; how do I display a .jpg that's in the same directory?
0
0
0
61
29,714,743
2015-04-18T08:18:00.000
1
0
1
0
python-2.7,profiler,spyder
29,744,117
1
true
0
0
Hmm it seems like this is a bug, can you post it in the Spyder issue tracker? You can post an issue from within Spyder itself in the help menu click on "Report issue
1
1
0
I am using a virtualenv, but I would like to use an IDE. So I pull up spyder and easily I can change the python interpreter to .virtualenv/myenv/.../python But, when I go to "F10" for to profile my code, Spyder identifies the interpreter in usr/lib/. I couldn't find anywhere in preferences to change this. How can I mak...
spyder profiler uses wrong python
1.2
0
0
642
29,715,249
2015-04-18T09:13:00.000
2
0
1
0
python,python-3.x,pycharm
37,708,513
5
false
0
0
You can do it in Pycharm by going to Settings and project interpreter. Select all the Packages with their Version and latest. Then copy all this data into a MS word document. The MS word will treat it as a table. Delete the middle column of this table. Now copy all this data into a notepad++. Search for double spaces '...
1
42
0
I want to output the requirements.txt for my Python 3 project in PyCharm. Any ideas?
Is there any way to output requirements.txt automatically?
0.07983
0
0
39,278
29,716,502
2015-04-18T11:14:00.000
0
0
1
1
python,eclipse,pydev
29,908,351
3
false
0
0
It'll be either the default interpreter (the top one at the preferences > pydev > interpreter) or the one that's configured for the project (if you select the project > alt+enter > pydev-interpreter/grammar you can let 'default' or select a different one). After you've done a launch, you can go to run > run configurati...
1
0
0
When I press CTRL+F9 to run tests in Pydev, which interpreter does it use? For example, I have Python 2.7 and Python 3.3 installed. When I run scripts in the console by pressing CTRL+Shift+Enter, a window pops up that lets me choose interpreter. But this does not happen when running tests.
Which Python Environment Does Pydev Use?
0
0
0
45
29,716,972
2015-04-18T11:54:00.000
14
0
0
0
python,sql-server,django,database,postgresql
55,397,481
2
false
1
0
You can use Materialized view with postgres. It's very simple. You have to create a view with query like CREATE MATERIALIZED VIEW my_view as select * from my_table; Create a model with two option managed=false and db_name=my_view in the model Meta like this MyModel(models.Model): class Meta: managed ...
1
13
0
I need to use some aggregate data in my django application that changes frequently and if I do the calculations on the fly some performance issues may happen. Because of that I need to save the aggregate results in a table and, when data changes, update them. Because I use django some options may be exist and some mayb...
using materialized views or alternatives in django
1
1
0
6,549
29,721,897
2015-04-18T19:35:00.000
2
0
0
0
python,django
29,722,220
2
false
1
0
One of the possible solutions would be to use separate daemonized lightweight python script to perform all the in-game business logic and left django be just the frontend to your game. To bind them together you might pick any of high-performance asynchronous messaging library like ZeroMQ (for instance to pass player's ...
1
3
0
I'm working on creating a browser-based game in Django and Python, and I'm trying to come up with a solution to one of the problems I'm having. Essentially, every second, multiple user variables need to be updated. For example, there's a currency variable that should increase by some amount every second, progressively ...
Django/Python - Updating the database every second
0.197375
0
0
782
29,723,704
2015-04-18T22:37:00.000
5
0
0
0
python,tornado,gevent,rethinkdb
29,727,792
1
false
0
0
If you're using a non-blocking library, one connection should be sufficient in RethinkDB 2.0 (prior to 2.0 there was less per-connection parallelism). Per-connection overhead is pretty low, though. Some people open a connection per query and even that isn't too slow, so you should just do whatever's easiest. EDIT: Th...
1
3
0
I'm starting out with rethinkdb in python, and taking a look at the different approaches: Blocking approach with threads Non-blocking, callback-based approach with Tornado Greenlet-based approach with gevent In the first case, the natural thing to do is to give each thread a connection object. In the second and third...
RethinkDB: how many connections?
0.761594
0
0
373
29,725,130
2015-04-19T02:29:00.000
3
0
0
0
python,scrapy
29,725,359
1
true
1
0
Go to that directory where your project is located and from there execute scrapy shell command. That would do the trick.
1
2
0
I had set proxy in settings, but I want to test some in scrapy shell, so what should I do?
How to set proxy in scrapy shell, not in settings.py
1.2
0
0
2,036
29,725,915
2015-04-19T04:48:00.000
6
1
1
0
python,windows,ipython,nose
47,507,335
1
true
0
0
I guess you create your virtual environment with --system-site-packages. Try following steps: Exit virtual environment: deactivate Switch to superuser: su root Install jupyter outside the virtual environment: sudo pip3 install jupyter Then enter your virtual environment and try again.
1
4
0
I'm trying to install ipython notebook on my win8 laptop. I follow the following steps to install ipython. I installed "pip". Then I install the pywin32. Then I used pip to install ipython "pip install ipython[all]" But when I test the ipython using "iptest" The test can not proceed due to the following error. ERRO...
ipython iptest ImportError( no module named ipython)
1.2
0
0
6,302
29,726,821
2015-04-19T07:02:00.000
0
0
0
0
php,python-2.7,magento-1.9
29,727,058
1
false
1
0
Ok. Great. I found the issue. I had not noticed another javascript line at the end of my html file's tag. so I am home and dry. Cheers.
1
0
0
I am trying to use the Magento Custom Menu extension in a django project. I have modified the menucontent.phtml, but yet my menu items are not reflecting the appropriate captions. Does anyone know how does the extension work to generate the menu?
Magento 1.9 Custom Menu Extension Use in django
0
0
0
65
29,728,131
2015-04-19T09:34:00.000
0
0
1
1
python-3.x,virtualenv
56,749,854
1
false
0
0
The purpose of the virtual env is to allow the use of required version as default. That's why you see the symbolic link created. If you want both (i.e no symbolic link python -> /usr/bin/python3) then do not create virtual env
1
0
0
I develop Python3 on GNU/Linux, but my system has two interpreters installed: python2 -> /usr/bin/python python3 -> /usr/bin/python3 (AFAIK: This is normal on a Linux box, other installed applications frequently depend upon different versions of Python: either 2 or 3.) When I create new virtual environments for Pytho...
How to disable creation of $VIRTUAL_ENV/bin/python for python3 virtualenvs?
0
0
0
160
29,728,777
2015-04-19T10:46:00.000
0
0
0
0
python,linux,ubuntu,robotframework
29,758,844
2
true
0
0
Best way to solve it, it's running Remote Library on virtual machine or on other network device.
1
0
0
I'm using a proprietary library for traffic generator that working only in 2.7.5-32bit. My system is ubuntu-64bit and all other components are using installed python 2.7.6 (64bit). Is there any way to configure explicitly for this library to use another version of python?
Specify different python version for library // RobotFramework
1.2
0
0
527
29,730,330
2015-04-19T13:13:00.000
1
0
1
1
python,python-2.7,ubuntu,ubuntu-14.04
29,730,474
2
false
0
0
Version 2.x and 3.x happily live together - that is no problem. But the versions in /usr/bin and /usr/local/bin will give you problems: The 'home'compiled version always installs in /usr/local/bin unless you specify the prefix on compilation. System-installed version normally install in /usr/bin. If you call python3, ...
2
1
0
In Ubuntu, I used to have (two hours ago) three versions of python : 2.7 and 3.4.0 installed by default in 'usr/bin' 3.4.3 that I built manually from the official source-code, which I found was in 'usr/local/bin' (that means, at a certain point i was able to run the tree versions of python at the same time) But now, ...
Multiple versions of Python in Ubuntu
0.099668
0
0
14,313
29,730,330
2015-04-19T13:13:00.000
0
0
1
1
python,python-2.7,ubuntu,ubuntu-14.04
29,730,405
2
false
0
0
The version 2.7 and 3.4 are your distribution official pythons. To upgrade their versions, Ubuntu should release new packages for them. When you install a new python by yourself it goes to /usr/local/bin. I don't recommend having two similar pythons on your system, it will probably be difficult to know whether a packa...
2
1
0
In Ubuntu, I used to have (two hours ago) three versions of python : 2.7 and 3.4.0 installed by default in 'usr/bin' 3.4.3 that I built manually from the official source-code, which I found was in 'usr/local/bin' (that means, at a certain point i was able to run the tree versions of python at the same time) But now, ...
Multiple versions of Python in Ubuntu
0
0
0
14,313
29,733,653
2015-04-19T17:58:00.000
0
0
0
0
javascript,python,html,web-scraping
29,791,337
2
false
1
0
There's wget on the robot, you could use it... (though I'm not sure I understand where is really the problem...)
1
0
0
I am currently working on a HTML presentation, that works well, but I need the presentation to be followed simultaneously with a NAO robot who reads a special html tag. I somehow need to let him know, which slide I am on, so that he can choose the correct tag. I use Beautiful Soup for scraping the HTML, but it does s...
Is there a way to get current HTML from browser in Python?
0
0
1
307
29,735,766
2015-04-19T20:57:00.000
0
0
1
0
python,scikit-learn,random-forest
30,233,155
2
true
0
0
The problem was that I had the 64bit version of Anaconda and the 32bit sklearn.
1
2
1
I've installed Anaconda Python distribution with scikit-learn. While importing RandomForestClassifier: from sklearn.ensemble import RandomForestClassifier I have the following error: File "C:\Anaconda\lib\site-packages\sklearn\tree\tree.py", line 36, in <module> from . import _tree ImportError: cannot import name _...
RandomForestClassifier import
1.2
0
0
10,431
29,737,928
2015-04-20T01:26:00.000
0
1
0
0
python,ubuntu,bluetooth,shutter
29,983,309
1
false
0
0
Most of the selfie sticks use HID profile (confirmed as "type keyboard"), and send a Volume Up button press (keyboard report or consumer report). You will need to listen for this key, and not RFCOMM data.
1
1
0
I need to use a bluetooth remote shutter as the ones that come with many selfie sticks in order to make a push-to-talk button for starting and stopping audio recordings in Python. I have tried using pyBluez module (vs 0.21), but the most I have got is to detect the device and its address, but I cannot see which are its...
Detecting events from a bluetooth remote shutter to control audio recording in Python
0
0
0
910
29,738,029
2015-04-20T01:41:00.000
1
0
0
0
python,django
29,738,237
1
false
1
0
Under Site Administration: Add a new "Group"; then select which permissions you want to give any user assigned to that group. After creating the new group, then assign the user to that group.
1
1
0
In Django, i have extend the AdminSite class into a UserAdminSite class. But there is a problem: Any Admin who has access to the UserAdminSite would also have a "is_staff = True" status and could therefore access the default admin site for the entire website. How do I separate the access permission for these two admin ...
Create separate Django Admin sites and separate permissions
0.197375
0
0
114
29,740,212
2015-04-20T05:55:00.000
0
0
0
1
python,svn
29,740,532
2
false
0
0
You need to recheck that the files on your laptop and make sure: The files actually exist / are the correct files. They are in the directory you are trying to access them from. The file names are spelled correctly. If the system could not find the file specified it means something is missing / misplaced, or the file ...
2
0
0
I have checked out a folder from SVN to my desktop. Actually I need to extract the information like SVN revision no, URL and status for the specific file in the local working copy. Here is the line of code which I am using to extract those info. file = svn.local.LocalClient(filePath[i][j]) fileInfo = file.info() This w...
svn 0.3.33 module : Windows Error: [Error 2] : The system cannot find the file specified
0
0
0
1,099
29,740,212
2015-04-20T05:55:00.000
0
0
0
1
python,svn
29,762,407
2
false
0
0
I got the solution for this. Actually the problem was with subversion command line client version. The client version need to be higher than the TortoiseSVN server version, whereas mine was a lower version which created this problem. Now it works fine :)
2
0
0
I have checked out a folder from SVN to my desktop. Actually I need to extract the information like SVN revision no, URL and status for the specific file in the local working copy. Here is the line of code which I am using to extract those info. file = svn.local.LocalClient(filePath[i][j]) fileInfo = file.info() This w...
svn 0.3.33 module : Windows Error: [Error 2] : The system cannot find the file specified
0
0
0
1,099
29,741,887
2015-04-20T07:40:00.000
0
0
1
0
python,encryption,des,gzip
29,742,083
1
false
0
0
Well, it all depends on the way the file was transformed, and there are two possible ways (in your case is #1): first create the zip, then encrypt the zip first encrypt the file, then zip it The extension of the file tells you the order of operations, by reading them from left to right: comdty_option_namr.out is th...
1
0
0
I'm trying to decrypt Bloomberg data files that I know are DES encrypted. FileName = 'comdty_option_namr.out.gz.enc' What is the right order to do things: Open the file and decompress and then decrypt or vice-versa?
What should I do first? Decrypt or Decompress? Python
0
0
0
1,257
29,744,940
2015-04-20T10:09:00.000
2
0
1
1
python,windows,variables
29,747,013
2
false
0
0
Each process has its own environment. When a process starts another process, the new process gets a (eventually modified) copy of its parent environment. The rule is : a process can modify its own environment - this modifications will be inherited by child processes started later a process can modify (at start time) t...
2
1
0
i have a Python script here and it is called from the Windows CMD. It is executing some commands and also changing the Windows environment variables. Now after i changed them with the command "setx". I have to restart another Shell so the new variables are loaded into it. Is it possible that the main shell from which...
Python change Windows Path (refresh Shell)
0.197375
0
0
2,683
29,744,940
2015-04-20T10:09:00.000
1
0
1
1
python,windows,variables
29,746,276
2
true
0
0
You can't change the value of a environment variable. Allow me to clarify: environment variables represent the variables set on the environment of a process when that process starts. From the point-of-view of the new process, its environment is unchanging. Changing a variable on the environment (the process' parent) w...
2
1
0
i have a Python script here and it is called from the Windows CMD. It is executing some commands and also changing the Windows environment variables. Now after i changed them with the command "setx". I have to restart another Shell so the new variables are loaded into it. Is it possible that the main shell from which...
Python change Windows Path (refresh Shell)
1.2
0
0
2,683
29,754,112
2015-04-20T17:08:00.000
1
0
0
0
python,web-scraping,scrapy
29,783,461
4
false
1
0
set DOWNLOAD_DELAY = some_number where some_number is the delay (in seconds) you want for every request and RANDOMIZE_DOWNLOAD_DELAY = False so it can be static.
2
1
0
My use case is this: I have 10 spiders and the AUTO_THROTTLE_ENABLED setting is set to True, globally. The problem is that for one of the spiders the runtime WITHOUT auto-throttling is 4 days, but the runtime WITH auto-throttling is 40 days... I would like to find a balance and make the spider run in 15 days (3x the o...
How to Set Scrapy Auto_Throttle Settings
0.049958
0
0
5,769