Title
stringlengths 15
150
| A_Id
int64 2.98k
72.4M
| Users Score
int64 -17
470
| Q_Score
int64 0
5.69k
| ViewCount
int64 18
4.06M
| Database and SQL
int64 0
1
| Tags
stringlengths 6
105
| Answer
stringlengths 11
6.38k
| GUI and Desktop Applications
int64 0
1
| System Administration and DevOps
int64 1
1
| Networking and APIs
int64 0
1
| Other
int64 0
1
| CreationDate
stringlengths 23
23
| AnswerCount
int64 1
64
| Score
float64 -1
1.2
| is_accepted
bool 2
classes | Q_Id
int64 1.85k
44.1M
| Python Basics and Environment
int64 0
1
| Data Science and Machine Learning
int64 0
1
| Web Development
int64 0
1
| Available Count
int64 1
17
| Question
stringlengths 41
29k
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows Error in Google App Engine
| 15,538,956
| 2
| 2
| 1,412
| 0
|
google-app-engine,python-2.7
|
I updated GAE SDK to 1.7.6 from 1.7.5, since then I started getting this error. I reverted back to 1.7.5, the application is functioning normally :)
| 0
| 1
| 0
| 0
|
2013-03-20T17:39:00.000
| 5
| 0.07983
| false
| 15,530,866
| 0
| 0
| 1
| 3
|
This is my first program in GAE. I'm working with latest GAE SDK, and Python 2.7 on Windows XP 32 bit. All was working fine; but to my surprise I'm getting the following error:
2013-03-20 22:48:26 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=9080', '--admin_port=8001', u'B:\\AppEngg\\huddle-up']"
INFO 2013-03-20 22:48:27,236 devappserver2.py:401] Skipping SDK update check.
WARNING 2013-03-20 22:48:27,253 api_server.py:328] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2013-03-20 22:48:27,283 api_server.py:152] Starting API server at: http://localhost:1127
INFO 2013-03-20 22:48:27,299 api_server.py:517] Applying all pending transactions and saving the datastore
INFO 2013-03-20 22:48:27,299 api_server.py:520] Saving search indexes
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 194, in
_run_file(__file__, globals())
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 190, in _run_file
execfile(script_path, globals_)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 545, in
main()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 538, in main
dev_server.start(options)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 513, in start
self._dispatcher.start(apis.port, request_data)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\dispatcher.py", line 95, in start
servr.start()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\server.py", line 827, in start
self._watcher.start()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\win32_file_watcher.py", line 74, in start
raise ctypes.WinError()
WindowsError: [Error 6] The handle is invalid.
2013-03-20 22:48:27 (Process exited with code 1)
I Googled it; but it seems that most of the people getting this error have something wrong in there PATH config or in x64 Windows.
|
Windows Error in Google App Engine
| 25,406,846
| 0
| 2
| 1,412
| 0
|
google-app-engine,python-2.7
|
I got exactly the same problem with SDK 1.99 on Windows 8.
I was running a test script .yaml and .go file from Google Go's own working directory.
Moving my code to its own subdirectory solved the problem.
| 0
| 1
| 0
| 0
|
2013-03-20T17:39:00.000
| 5
| 0
| false
| 15,530,866
| 0
| 0
| 1
| 3
|
This is my first program in GAE. I'm working with latest GAE SDK, and Python 2.7 on Windows XP 32 bit. All was working fine; but to my surprise I'm getting the following error:
2013-03-20 22:48:26 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=9080', '--admin_port=8001', u'B:\\AppEngg\\huddle-up']"
INFO 2013-03-20 22:48:27,236 devappserver2.py:401] Skipping SDK update check.
WARNING 2013-03-20 22:48:27,253 api_server.py:328] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2013-03-20 22:48:27,283 api_server.py:152] Starting API server at: http://localhost:1127
INFO 2013-03-20 22:48:27,299 api_server.py:517] Applying all pending transactions and saving the datastore
INFO 2013-03-20 22:48:27,299 api_server.py:520] Saving search indexes
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 194, in
_run_file(__file__, globals())
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 190, in _run_file
execfile(script_path, globals_)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 545, in
main()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 538, in main
dev_server.start(options)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 513, in start
self._dispatcher.start(apis.port, request_data)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\dispatcher.py", line 95, in start
servr.start()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\server.py", line 827, in start
self._watcher.start()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\win32_file_watcher.py", line 74, in start
raise ctypes.WinError()
WindowsError: [Error 6] The handle is invalid.
2013-03-20 22:48:27 (Process exited with code 1)
I Googled it; but it seems that most of the people getting this error have something wrong in there PATH config or in x64 Windows.
|
Windows Error in Google App Engine
| 15,578,142
| 1
| 2
| 1,412
| 0
|
google-app-engine,python-2.7
|
I had the same issue with GAE SDK 1.7.6, downgrading to 1.7.5 solved it for me too.
| 0
| 1
| 0
| 0
|
2013-03-20T17:39:00.000
| 5
| 0.039979
| false
| 15,530,866
| 0
| 0
| 1
| 3
|
This is my first program in GAE. I'm working with latest GAE SDK, and Python 2.7 on Windows XP 32 bit. All was working fine; but to my surprise I'm getting the following error:
2013-03-20 22:48:26 Running command: "['C:\\Python27\\pythonw.exe', 'C:\\Program Files\\Google\\google_appengine\\dev_appserver.py', '--skip_sdk_update_check=yes', '--port=9080', '--admin_port=8001', u'B:\\AppEngg\\huddle-up']"
INFO 2013-03-20 22:48:27,236 devappserver2.py:401] Skipping SDK update check.
WARNING 2013-03-20 22:48:27,253 api_server.py:328] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2013-03-20 22:48:27,283 api_server.py:152] Starting API server at: http://localhost:1127
INFO 2013-03-20 22:48:27,299 api_server.py:517] Applying all pending transactions and saving the datastore
INFO 2013-03-20 22:48:27,299 api_server.py:520] Saving search indexes
Traceback (most recent call last):
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 194, in
_run_file(__file__, globals())
File "C:\Program Files\Google\google_appengine\dev_appserver.py", line 190, in _run_file
execfile(script_path, globals_)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 545, in
main()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 538, in main
dev_server.start(options)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 513, in start
self._dispatcher.start(apis.port, request_data)
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\dispatcher.py", line 95, in start
servr.start()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\server.py", line 827, in start
self._watcher.start()
File "C:\Program Files\Google\google_appengine\google\appengine\tools\devappserver2\win32_file_watcher.py", line 74, in start
raise ctypes.WinError()
WindowsError: [Error 6] The handle is invalid.
2013-03-20 22:48:27 (Process exited with code 1)
I Googled it; but it seems that most of the people getting this error have something wrong in there PATH config or in x64 Windows.
|
Error when configuring Python interpreter for PyDev in Eclipse
| 18,466,358
| 0
| 1
| 362
| 0
|
python,eclipse,configuration,pydev,interpreter
|
I've faced same problem. The solution was reinstalling Aptana (or Eclipse, tested also on Kepler 4.2.x).
The source of problem was in path to your eclipse/aptana installition. I think that trouble here is determined by diacritic symbols in your name 'Andres Diaz', according to your username here))) (my case is: cyrillic username and user's home folder 'Михаил' in Windows8). Path to your python interpreter does not matter here.
The cure is: move/reinstall your Eclipse to folder with the path which does not contain any non-acsii character. In my case I've moved Aptana Studio from C:\Users\Михаил\Aptana3 to C:\Aptana3 and (maybe it's not necesarry, I don't know) its' workspace also to root C:\ folder.
P.S. I think it can be useful for those who also faced such problem cause I was not able to find any answer about how to solve this troubles but a lot of similar questions.
P.P.S. Sorry for my English, languages are not my leading skill)))
| 0
| 1
| 0
| 1
|
2013-03-21T03:17:00.000
| 1
| 0
| false
| 15,538,867
| 0
| 0
| 0
| 1
|
I just recently installed the PyDev 2.6 plugin for Eclipse (I run Eclipse SDK 4.2.1) and when I try to configure the Python interpreter to the path: > C:\Python27\python.exe , it gives me an "Error info on interpreter" and in error log it says:
com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: unvalid Byte 2 of the sequence UTF-8 of 3 bytes
I have read other similar questions on this website about the same issue but the solutions do not suit my situation, as I don't have any unicode char in my path. I run Python 2.7.3. I would really appreciate any help or advice on how to solve this issue, as I would really love to start coding Python in Eclipse soon. Cheers.
|
Accessing nose verbosity programmatically
| 15,581,683
| 1
| 4
| 930
| 0
|
python,nose
|
It looks like the expected way to handle this in nose is to use the logger framework within your tests, and then control the level to be captured with the --logging-level option.
By default nose will capture all logs made by the tests, but a filter can be specified using --logging-filter config parameter.
| 0
| 1
| 0
| 1
|
2013-03-21T18:35:00.000
| 2
| 1.2
| true
| 15,555,468
| 0
| 0
| 0
| 1
|
I've got some tests which log to stdout, and I'd like to change the log level in my test script based on the verbosity that nose is running on.
How can I access the verbosity of the running nose instance, from within one of the tests being run?
|
Exclude Directories when using Pstorm in PhpStorm
| 16,013,655
| 1
| 1
| 174
| 0
|
python,phpstorm
|
Use Settings | File Types | Ignore Files and Folders to exclude directories by name or pattern.
| 0
| 1
| 0
| 1
|
2013-03-22T12:34:00.000
| 1
| 1.2
| true
| 15,570,452
| 1
| 0
| 0
| 1
|
I was wondering if anyone knew a code fix to the pstorm python script where you could exclude directories from being indexed in a directory when you open it from the command line.
I know this is not currently a feature in the IDE but maybe there is a work around someone knows of.
Thanks
|
Good Call Hierarchy in Eclipse/PyDev
| 15,580,217
| 14
| 12
| 4,318
| 0
|
python,eclipse,pydev
|
PyDev has a find references with Ctrl+Shift+G (not sure that'd be what you're calling a call hierarchy).
| 0
| 1
| 0
| 1
|
2013-03-22T14:04:00.000
| 1
| 1.2
| true
| 15,572,295
| 0
| 0
| 0
| 1
|
Is there a way to get a good call hierarchy in PyDev?
I want to be able to select a function and see in which files it is called and eventually by which other functions. I tried the Hierarchy View in Eclipse by pressing F4, but it does not output what I want.
|
Python3: Looking for alternatives to gevent and pylibmc/python-memcached
| 20,068,405
| 1
| 10
| 5,262
| 0
|
python,python-3.x,gevent,python-memcached
|
for memcached you probably know alternative: redis+python3
| 0
| 1
| 0
| 1
|
2013-03-25T06:29:00.000
| 4
| 0.049958
| false
| 15,608,933
| 0
| 0
| 0
| 1
|
So, I have decided to write my next project with python3, why? Due to the plan for Ubuntu to gradually drop all Python2 support within the next year and only support Python3. (Starting with Ubuntu 13.04)
gevent and the memcached modules aren't officially ported to Python3.
What are some alternatives, already officially ported to Python3, for gevent and pylibmc or python-memcached?
|
Bridging between different programming languages
| 15,610,243
| 1
| 2
| 1,376
| 0
|
java,c++,python,c,thrift
|
If your C/C++ code already exists, your best bet is to publish it as a service, with an API matching what functionality you already have. You can then write new services in the language of your choice, matching the API you need, and they can call the C/C++ services.
If your C/C++ code does not exist yet, and you are set to create the majority of code in a higher level language such as Java or C#, consider implementing the performance critical parts initially in that language as well. Only after profiling shows a particular performance problem, and after you exhaust the most basic optimization techniques within the language, such as avoiding allocations inside the hottest loops, you should consider rewriting the bits that have been proven to consume the most cycles into another language using glue such as JNI.
In other words, do not optimize until you have numbers in hand. There is also no fundamental reason why you couldn't squeeze out (almost) the same performance level from Java as you can from C++, with enough trying. You have a real chance to end up with a simpler architecture than you expect.
| 0
| 1
| 0
| 1
|
2013-03-25T07:43:00.000
| 4
| 0.049958
| false
| 15,609,918
| 0
| 0
| 0
| 1
|
This is more of a design question.
I was planning on writing some web-services which implement CPU intensive algorithms. The problem that I am trying to solve is - higher level languages such as python, perl or java make it easy to write web services. While lower level languages such as C, C++ make it possible to fine tune the performance of your code.
So I was looking at what I could do bridge two languages. Here's the options I came up with:
Language specific bindings
Use something like perl-xs or python's ctypes/loadlibrary or java's JNI. The up-side is that I can write extensions which can execute in the same process. There is small overhead of converting between the native language types to C and back.
Implement a separate daemon
Use something like thrift / avro and have a separate daemon that runs the C/C++ code. The upside is, it's loosely coupled from the higher level language. I can quickly replace the high level language. The downside being that the overhead of serializing and local unix domain sockets might be higher than executing the code in the same address space (offered by the previous option.)
What do you guys think?
|
How to change drive in IPython under windows
| 68,152,780
| 0
| 3
| 3,953
| 0
|
windows,ipython
|
I have a Win 10 machine with Anaconda 2020.11 python installed, out of the box no updates. ipython 7.19.0. The only way I can cd to somewhere on another drive letter is
cd d:/
No other permutation works: cd d:, cd d:, cd d:\, cd 'd:', cd 'd:', etc.
So there's an answer but it's quite annoying to figure out.
| 0
| 1
| 0
| 0
|
2013-03-25T12:03:00.000
| 2
| 0
| false
| 15,614,465
| 1
| 0
| 0
| 1
|
How can I change drive letter while in IPython under windows?
For example, !cd W: does not make W: the current path, it just changes the path if you would change to drive W.
Changing to a dos shell with !cmd and then changing to W: does not have any effect to the IPython shell.
|
Running thrift server as daemon
| 15,634,347
| 3
| 2
| 1,136
| 0
|
python,thrift
|
Daemonizing processes has nothing to do with thrift. Thrift only provides the communication layer for different platforms and you can run the server in one of the several programming languages thrift supports (that is - great majority of what you can think of). No matter if you write the server in Java, C++ (I've tried those so far) or python, none of them will create a daemon. This feature is not supported (e.g. PHP natively doesn't support neither multithreading nor daemonizing).
I've just seen supervisord, didn't play with it much, but it seems to be a good choice to manage processes like thrift servers.
| 0
| 1
| 0
| 1
|
2013-03-26T01:18:00.000
| 2
| 1.2
| true
| 15,627,698
| 0
| 0
| 0
| 2
|
Right now I'm testing the waters with Apache Thrift, and I'm currently using a TThreadedServer written in Python, but when I run the server, it is not daemonized. Is there any way to make it run as a daemon, or is there another way to run thrift in a production environment?
|
Running thrift server as daemon
| 15,873,194
| 1
| 2
| 1,136
| 0
|
python,thrift
|
I think you are looking for this:
nohup hbase thrift start &
This is the only way I found to keep thrift working after my disconnect from Linuxsession.
| 0
| 1
| 0
| 1
|
2013-03-26T01:18:00.000
| 2
| 0.099668
| false
| 15,627,698
| 0
| 0
| 0
| 2
|
Right now I'm testing the waters with Apache Thrift, and I'm currently using a TThreadedServer written in Python, but when I run the server, it is not daemonized. Is there any way to make it run as a daemon, or is there another way to run thrift in a production environment?
|
GAE: Data is lost after dev server restart
| 15,641,028
| 2
| 0
| 322
| 0
|
python,google-app-engine,google-cloud-datastore
|
This is answered, but to explain a little further - the local datastore, by default writes to the temporary file system on your computer. By default, the temporary file is emptied any time you restart the computer, hence your datastore is emptied. If you don't restart your computer, your datastore should remain.
| 0
| 1
| 0
| 0
|
2013-03-26T11:27:00.000
| 2
| 0.197375
| false
| 15,635,888
| 0
| 0
| 1
| 1
|
I'm running App Engine with Python 2.7 on OS X. Once I stop the development server all data in the data store is lost. Same thing happens when I try to deploy my app. What might cause this behaviour and how to fix it?
|
SSH Server status in Python
| 15,639,004
| 0
| 0
| 1,422
| 0
|
python,python-2.7,ssh,openssh
|
Run service sshd status (e.g. via Popen()) and read what it tells you.
| 0
| 1
| 0
| 1
|
2013-03-26T13:56:00.000
| 2
| 0
| false
| 15,638,882
| 0
| 0
| 0
| 1
|
I wanted to know if there is a way to find out the status of the ssh server in the system using Python. I just want to know if the server is active or not (just yes/no). It would help even if it is just a linux command so that I can use python's popen from subprocess module and run that command.
Thanks
PS: I'm using openssh-server on linux (ubuntu 12.04)
|
A way to "pipe" gnu screen output to a running python process?
| 25,355,763
| 0
| 2
| 1,489
| 0
|
python,linux,cherrypy,gnu-screen
|
You can use syslog or even better you can configure it to send all logs to a database!
| 0
| 1
| 0
| 0
|
2013-03-27T08:43:00.000
| 3
| 0
| false
| 15,654,714
| 0
| 0
| 0
| 2
|
I'm developing a small piece of software, that is able to control (start, stop, restart and so on - with gnu screen) every possible gameserver (which have a command line) and includes a tiny standalone webserver with a complete webinterface (you can access the gnu screen from there, like if you're attached to it) on linux.
Almost everything is working and needs some code cleanup now.
It's written in python, the standalone webserver uses cherrypy as a framework.
The problem is, that the gnu screen output on the webinterface is done via a logfile, which can cause high I/O when enabled (ok, it depends on what is running).
Is there a way to pipe the output directly to the standalone webserver (it has to be fast)? Maybe something with sockets, but i dont know how to handle them yet.
|
A way to "pipe" gnu screen output to a running python process?
| 15,661,154
| 1
| 2
| 1,489
| 0
|
python,linux,cherrypy,gnu-screen
|
Writing to a pipe would work but it's dangerous since your command (the one writing the pipe) will block when you're not fast enough reading the data from the pipe.
A better solution would be create a local "log server" which publishes stdin on a socket. Now you can pipe the output of your command to the log server which reads from stdin and sends copy of the input to anyone connected to it's socket.
When no one is connected, then the output is just ignored.
Writing such a "log server" is trivial (about 1h in Python, I'd guess).
An additional advantage would be that you could keep part of the log file in memory (say the last 100 lines). When your command crashes, then you could still get the last output from your log server.
For this to work, you must not terminate the log server when stdin returns EOF. The drawback is that you need to clean up stale log servers yourself. When you use sockets, you can send it a "kill" command from your web app.
| 0
| 1
| 0
| 0
|
2013-03-27T08:43:00.000
| 3
| 0.066568
| false
| 15,654,714
| 0
| 0
| 0
| 2
|
I'm developing a small piece of software, that is able to control (start, stop, restart and so on - with gnu screen) every possible gameserver (which have a command line) and includes a tiny standalone webserver with a complete webinterface (you can access the gnu screen from there, like if you're attached to it) on linux.
Almost everything is working and needs some code cleanup now.
It's written in python, the standalone webserver uses cherrypy as a framework.
The problem is, that the gnu screen output on the webinterface is done via a logfile, which can cause high I/O when enabled (ok, it depends on what is running).
Is there a way to pipe the output directly to the standalone webserver (it has to be fast)? Maybe something with sockets, but i dont know how to handle them yet.
|
Datastore vs spreadsheet for provisioning Google apps
| 15,671,792
| 0
| 0
| 248
| 1
|
python,google-app-engine,google-sheets,google-cloud-datastore
|
If you use the Datastore API, you will also need to build out a way to manage users data in the system.
If you use Spreadsheets, that will serve as your way to manage users data, so in that way managing the data would be taken care of for you.
The benefits to use the Datastore API would be if you'd like to have a seamless integration of managing the user data into your application. Spreadsheet integration would remain separate from your main application.
| 0
| 1
| 0
| 0
|
2013-03-27T23:37:00.000
| 1
| 0
| false
| 15,671,591
| 0
| 0
| 1
| 1
|
In my company we want to build an application in Google app engine which will manage user provisioning to Google apps. But we do not really know what data source to use?
We made two propositions :
spreadsheet which will contains users' data and we will use spreadsheet API to get this data and use it for user provisioning
Datastore which will contains also users' data and this time we will use Datastore API.
Please note that my company has 3493 users and we do not know too many advantages and disadvantages of each solution.
Any suggestions please?
|
API Key for GCM from GAE
| 17,506,596
| 4
| 4
| 907
| 0
|
google-app-engine,python-2.7,google-cloud-messaging
|
You can check the IP easily by doing a ping from the command line to the domain name, as in "ping appspot.com". With this you will obtain the response from the real IP. Unfortunately this IP will change over time and won't make your GCM service work.
In order to make it work you only need to leave the allowed IPs field blank.
| 0
| 1
| 1
| 0
|
2013-03-28T16:13:00.000
| 2
| 1.2
| true
| 15,686,853
| 0
| 0
| 1
| 1
|
I have implemented GCM using my own sever. Now I'm trying to do the same using Python 2.7 in Google App Engine. How can I get the IP address for the server hosting my app? (I need it for API Key). Is IP-LookUp only option? And if I do so will the IP address remain constant?
|
What happens in the CPU when there is no user code to run?
| 15,688,958
| 3
| 4
| 2,611
| 0
|
operating-system,task,cpu,python-idle,rtos
|
There's always code to run, the idle task is the code if there's nothing else. It may execute a special CPU instruction to power down the CPU until a hardware interrupt arrives. On x86 CPUs it's hlt (halt).
| 0
| 1
| 0
| 0
|
2013-03-28T17:56:00.000
| 4
| 0.148885
| false
| 15,688,887
| 1
| 0
| 0
| 2
|
It sounds reasonable that the os/rtos would schedule an "Idle task". In that case, wouldn't it be power consuming? (it sounds reasonable that the idle task will execute: while (true) {} )
|
What happens in the CPU when there is no user code to run?
| 15,689,206
| 5
| 4
| 2,611
| 0
|
operating-system,task,cpu,python-idle,rtos
|
Historically it's been a lot of different schemes, especially before reducing power consumption in idle was an issue.
Generally there is an "idle" process/task that runs at the lowest priority and hence always gets control when there's nothing else to do. Many older systems would simply have this process run a "do forever" loop with nothing of consequence in the loop body. One OS I heard of would run machine diagnostics in the idle process. A number of early PCs would run a memory refresh routine (since memory needed to be cycled regularly or it would "evaporate").
(A benefit of this scheme is that 100% minus the % CPU used by the idle process gives you the % CPU utilization -- a feature that was appreciated by OS designers.)
But the norm on most modern systems is to either run a "halt" or "wait" instruction or have a special flag in the process control block that even more directly tells the processor to simply stop running and go into power-saving mode.
| 0
| 1
| 0
| 0
|
2013-03-28T17:56:00.000
| 4
| 0.244919
| false
| 15,688,887
| 1
| 0
| 0
| 2
|
It sounds reasonable that the os/rtos would schedule an "Idle task". In that case, wouldn't it be power consuming? (it sounds reasonable that the idle task will execute: while (true) {} )
|
Using Twisted on a server without installation privileges?
| 15,705,793
| 1
| 1
| 93
| 0
|
python,installation,twisted
|
Use virtualenv to create your private Python libraries installation.
| 0
| 1
| 0
| 0
|
2013-03-28T19:10:00.000
| 2
| 0.099668
| false
| 15,690,201
| 0
| 0
| 0
| 1
|
I have a server that I'd like to use to maintain persistent connections with a set of devices, just so that they can pass simple messages back and forth. It's a trivial task, but selecting a server-side platform has been suprrisingly difficult (especially since I have no administrative privileges - it's a dedicated commercial server).
My best idea so far is to write a TCP server in Python. The Twisted platform seems suitable for the task, and has a lot of good reviews. However, my server has Python 2.7 but not Twisted, and the admins have been reluctant to install it for me.
Is there any way that I can just upload a Twisted package to the server and reference it in my libraries without installing it as a framework?
|
Not Having to Specify Command-Line Options Each Time
| 16,347,496
| 0
| 1
| 59
| 0
|
python,scons
|
I made it to work bu just setting an environment variable on Windows, TEST ="OS=win7 CPU=x86_64" and then running the scons script as scons %TEST%
| 0
| 1
| 0
| 0
|
2013-03-28T21:56:00.000
| 3
| 0
| false
| 15,692,874
| 1
| 0
| 0
| 1
|
I am using scons to build on windows. My SConscript file takes certain command line options to build like OS=win7 CPU=x86_64 etc. Every time I run scons from command line I have to type these options, Is there a way I can put them in SConscript file or set an environment variable so that I don't have to type them every time I build.
I tried setting SCONSFLAGS but it didn't seem to work.
Thanks in advance.
|
Shell scripts have different behavior when launched by Jenkins
| 15,693,722
| 1
| 1
| 1,510
| 0
|
python,testing,jenkins,distributed
|
To debug this:
Add set -x towards the top of your shell script.
Set a PS4 which prints the line number of each line when it's invoked: PS4='+ $BASH_SOURCE:$FUNCNAME:$LINENO:'
Look in particular for any places where your scripts assume environment variables which aren't set when Hudson is running.
If your Python scripts redirect stderr (where logs from set -x are directed) and don't pass it through to Hudson (and so don't log it), you can redirect it to a file from within the script: exec 2>>logfile
There are a number of tools other than Jenkins for kicking off jobs across a number of machines, by the way; MCollective (which works well if you already use Puppet), knife ssh (which you'll already have if you use Chef -- which, in my not-so-humble opinion, you should!), Rundeck (which has a snazzy web UI, but shouldn't be used by anyone until this security bug is fixed), Fabric (which is a very good choice if you don't have mcollective or knife already), and many more.
| 0
| 1
| 0
| 1
|
2013-03-28T22:53:00.000
| 2
| 0.099668
| false
| 15,693,565
| 0
| 0
| 0
| 1
|
I have a ton of scripts I need to execute, each on a separate machine. I'm trying to use Jenkins to do this. I have a Python script that can execute a single test and handles time limits and collection of test results, and a handful of Jenkins jobs that run this Python script with different args. When I run this script from the command line, it works fine. But when I run the script via Jenkins (with the exact same arguments) the test times out. The script handles killing the test, so control is returned all the way back to Jenkins and everything is cleaned up. How can I debug this? The Python script is using subprocess.popen to launch the test.
As a side note, I'm open to suggestions for how to do this better, with or without Jenkins and my Python script. I just need to run a bunch of scripts on different machines and collect their output.
|
Noob questions about upload & security
| 15,735,772
| 0
| 0
| 83
| 0
|
python,google-app-engine
|
Since you have app in C:\myap you need to run appcfg.py update C:\myap. It's just a path to you app on your machine.
In windows command line. For example, "C:\Program Files (x86)\Google\google_appengine\appcfg.py" update C:\myap
No, appcfg uses SSL while uploading. It's safe.
If you mean to call application uploading - it's not really safe. I don't know why you need this. You can add app developers in App Engine admin console, so they will be able to deploy application from their accounts.
| 0
| 1
| 0
| 0
|
2013-03-29T14:05:00.000
| 1
| 0
| false
| 15,704,873
| 0
| 0
| 1
| 1
|
I have the myapp.py and app.yaml in my windows C:\myap directory. The docs say to use:
appcfg.py update myapp/
to upload the app.
I've downloaded/installed Python and the Google python kit.
Sorry, for these noobish questions, but:
Is the myapp/ listed above refer to c:\myapp on my windows machine? Or is it the name of my app on the google side?
How/where do I type the appcfg.py to upload my directory?
Are there any security issues associated with using my gmail account and email address?
I'd like anybody from Second Life to be able to call this from in-world. There will be about a dozen calls a week. Are they going to have to authenticate with my email/password to use it?
Thanks for any help you can provide!
|
How to convert a Python PyQt based program to a portable package in Linux?
| 15,716,571
| 0
| 0
| 1,029
| 0
|
python,linux,pyqt,portability,python-bindings
|
If you package your application in the Linux distribution's package format, it can contain dependency information. That is the canonical solution to this problem.
Otherwise you'd have to include all nested dependencies to make sure that it'll work.
| 1
| 1
| 0
| 0
|
2013-03-30T04:29:00.000
| 1
| 1.2
| true
| 15,714,976
| 1
| 0
| 0
| 1
|
I've managed to make a single working executable file (for Windows) from a PyQt based Python app using PyInstaller, but is it also possible for Linux?
On linux machine (LUbuntu), when I run the .py script, I've got errors about missing PyQt bindings and I can't even download them by apt-get because of inability to connect the servers. It would be much more convenient to somehow pack the missing libraries to my program's files in order to make it more portable, but how can I do it?
|
Python os.pipe vs multiprocessing.Pipe
| 23,668,801
| 8
| 12
| 1,971
| 0
|
python,multithreading,multiprocessing,pipe,communication
|
I believe everything you've stated is correct.
On Linux, os.pipe is just a Python interface for accessing traditional POSIX pipes. On Windows, it's implemented using CreatePipe. When you call it, you get two ordinary file descriptors back. It's unidirectional, and you just write bytes to it on one end that get buffered by the kernel until someone reads from the other side. It's fairly low-level, at least by Python standards.
multiprocessing.Pipe objects are much more high level interface, implemented using multiprocessing.Connection objects. On Linux, these are actually built on top of POSIX sockets, rather than POSIX pipes. On Windows, they're built using the CreateNamedPipe API. As you noted, multiprocessing.Connection objects can send/receive any picklable object, and will automatically handle the pickling/unpickling process, rather than just dealing with bytes. They're capable of being both bidirectional and unidirectional.
| 0
| 1
| 0
| 0
|
2013-03-30T15:22:00.000
| 1
| 1.2
| true
| 15,720,120
| 1
| 0
| 0
| 1
|
Recently I'm studying parallel programming tools in Python. And here are two major differences between os.pipe and multiprocessing.Pipe.(despite the occasion they are used)
os.pipe is unidirectional, multiprocessing.Pipe is bidirectional;
When putting things into pipe/receive things from pipe, os.pipe uses encode/decode, while multiprocessing.Pipe uses pickle/unpickle
I want to know if my understanding is correct, and is there other difference? Thank you.
|
cx_oracle unable to find Oracle Client
| 15,745,441
| 0
| 0
| 412
| 1
|
python,cx-oracle
|
The issue with me was that I installed python, cx_oracle as root but Oracle client installation was done by "oracle" user. I got my own oracle installation and that fixed the issue.
Later I ran into PyUnicodeUCS4_DecodeUTF16 issues with Python and for that I had to install python with —enable-unicode=ucs4 option
| 0
| 1
| 0
| 0
|
2013-04-01T09:00:00.000
| 1
| 0
| false
| 15,740,464
| 0
| 0
| 0
| 1
|
I have installd Python 2.7.3 on Linux 64 bit machine. I have Oracle 11g client(64bit) as well installed. And I set ORACLE_HOME, PATH, LD_LIBRARY_PATH, and installed cx_oracle 5.1.2 version for Python 2.7 & Oracle 11g. But ldd command on cx_oracle is unable to find libclntsh.so.11.1.
I tried creating symlinks to libclntsh.so.11.1 under /usr/lib64, updated oracle.conf file under /etc/ld.so.conf.d/. Tried all possible solutions that have been discussed on this issue on the forums, but no luck.
Please let me know what am missing.
|
How to send data from Windows to embedded linux over USB
| 15,745,200
| 0
| 2
| 956
| 0
|
python,linux,windows,usb,pyserial
|
Normally on the linux front, if the usb dongle is of the right type, you will see something like /dev/usbserial or similar device. Maybe check dmesg after plugging the cable.
(on linux you can run find /dev | grep usb to list all usb related devices)
Just a side note, I've seen the beaglebone has an ethernet port, why not just using a network socket? It's all easier than reinventing a protocol on usb.
| 0
| 1
| 0
| 1
|
2013-04-01T13:34:00.000
| 2
| 0
| false
| 15,744,495
| 0
| 0
| 0
| 1
|
My setup looks like this: A 64-bit box running Windows 7 Professional is connected to a Beaglebone running Angstrom Linux.
I'm currently controlling the beaglebone via a putty command line on the windows box.
What I'd like to do is run an OpenCV script to pull some vision information, process it on the windows box, and send some lightweight data (e.g a True or False, a triplet, etc.) over the (or another) USB connection to the beaglebone.
My OpenCV program is running using Python bindings, so any piping I can do with python would be preferable. I've played around with pyserial to receive data on a windows box via a COM port, so it seems like I could use that on the windows side... at a total loss though on the embedded linux front
|
error in import z3
| 15,773,638
| 1
| 0
| 1,273
| 0
|
python,z3
|
io is a core Python module. It was added in 2.6 and has been present in every subsequent version. Are you on a very old version of Python? If you're running Python version 2.5 or earlier (you can check with python --version in any commandline), you'll need to update Python to a newer version.
| 0
| 1
| 0
| 1
|
2013-04-02T19:40:00.000
| 1
| 0.197375
| false
| 15,772,909
| 0
| 0
| 0
| 1
|
I am trying to use z3 in pydev, I add the path of z3py and libz3.dll to window/preferences/pydev/jython-interpreter, but i got the error as the following
Traceback (most recent call last):
File "C:\Users\linda\workspace\LearningPyDev\main.py", line 11, in
import z3
File "C:\Users\linda\z3\python\z3.py", line 45, in
from z3printer import *
File "C:\Users\linda\z3\python\z3printer.py", line 8, in
import sys, io, z3
ImportError: No module named io
What is the io module anyway? Is it possible to run z3 in pydev?
|
Embedding an executable within a py2app application
| 15,874,127
| 1
| 0
| 536
| 0
|
python,macos,py2app
|
Adding the CLI executable to the resources it the correct way to do it, but that doesn't work due to a bug in py2app (the file permissions aren't copied at the moment).
The easiest workaround is to reset the file permissions after calling py2app.
| 0
| 1
| 0
| 0
|
2013-04-04T15:23:00.000
| 1
| 0.197375
| false
| 15,815,364
| 0
| 0
| 0
| 1
|
I have a python script that I want to package as a Mac application bundle with py2app. That script calls a CLI executable.
How do I embed that executable in the application bundle?
I tried to edit setup.py in order to include it as a Resource but in that case, execution privileges are lost. Moreover the strip stage of py2app raises an error. I wonder if there is a specific setup.py option that could copy the executable in Content/MacOS instead of Content/Resources.
|
Can I add xmpp python library to my google app engine server
| 15,822,431
| 0
| 3
| 131
| 0
|
python,google-app-engine,xmpp,xmpppy
|
I don't know but your two biggest limitations will be the inability to use native libraries, and the fact that GAE only supports HTTP requests, with no access to the underlying sockets.
If your library uses native code, or relies on using sockets for communications, you won't be able to use it. If it's pure python and can work with an HTTP based transport, you should be ok.
| 0
| 1
| 0
| 0
|
2013-04-04T17:47:00.000
| 1
| 0
| false
| 15,818,157
| 0
| 0
| 1
| 1
|
I'm trying to send messages between xmmp clients using gogle app engine as a server, for that reason I prefer to use xmpp library for python (xmpppy) instead the xmpp library of the google app engine API. Can I add the xmpp python library to my server? I mean can I use this library instead the xmpp library of google app engine?
|
What's the working directory when using IDLE?
| 69,122,871
| 0
| 33
| 63,312
| 0
|
python,python-idle
|
Old question I know but maybe the OP's question was not answered? If you want Idle's File Open/Save/Save As menu items to interact with a particular folder, you need to set the CWD before starting Idle. So, assuming you have a folder on Windows "C:\Users<username>\Documents\python\my_project", then at a cmd prompt type cd C:\Users\<username>\Documents\python\my_project and then start Idle
| 0
| 1
| 0
| 0
|
2013-04-04T20:30:00.000
| 5
| 0
| false
| 15,821,121
| 0
| 0
| 0
| 2
|
So, I'm learning Python and would like to create a simple script to download a file from the internet and then write it to a file. However, I am using IDLE and have no idea what the working directory is in IDLE or how to change it. How can I do file system stuff in IDLE if I don't know the working directory or how to change it?
|
What's the working directory when using IDLE?
| 15,821,197
| 5
| 33
| 63,312
| 0
|
python,python-idle
|
This will depend on OS and how IDLE is executed.
To change the (default) CWD in Windows, right click on the Short-cut Icon, go to "Properties" and change "Start In".
| 0
| 1
| 0
| 0
|
2013-04-04T20:30:00.000
| 5
| 0.197375
| false
| 15,821,121
| 0
| 0
| 0
| 2
|
So, I'm learning Python and would like to create a simple script to download a file from the internet and then write it to a file. However, I am using IDLE and have no idea what the working directory is in IDLE or how to change it. How can I do file system stuff in IDLE if I don't know the working directory or how to change it?
|
Problems in fully uninstalling Python 2.7 from Windows 7
| 40,082,367
| 0
| 9
| 36,011
| 0
|
python
|
Locate that set up file which was used to install Python. Run it and choose repair. If that doesn't solve the problem. Go to c:\Python(x,y) and delete this folder completely by shift+Del.
Run that set up file again and click on "Change" which will ultimately install the Python again. By default in my case option to add path and making that version of Python the default on my system was unchecked which can be figured out by seeing the red cross mark in one of the installation screen. Click on it if you want set up to make it default Python version and also click on the option to indicate you want the path to be added in windows environment variable.
No need to touch registry as previous ones will be overwritten again.
In my case it worked. I was getting error like:
Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can't find encoding
Besides that un-installation was failing from control panel. So above steps solved all of my problem. Hope it helps.
| 0
| 1
| 0
| 0
|
2013-04-05T07:34:00.000
| 9
| 0
| false
| 15,828,294
| 1
| 0
| 0
| 7
|
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7).
After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy.
Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue?
I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program
Thanks in advance
Stefano
|
Problems in fully uninstalling Python 2.7 from Windows 7
| 15,856,720
| 6
| 9
| 36,011
| 0
|
python
|
I also had this issue as well. It was due to third party installs. Even though you have uninstalled python, it leaves all the third party libraries that were installed and I think Python(x,y) just detects the directory.
To fix, uninstall Python 2.7 and then check to see if C:\Python27 still exists. If it does, go ahead and delete and then try installing Python(x,y). That is what worked for me.
| 0
| 1
| 0
| 0
|
2013-04-05T07:34:00.000
| 9
| 1
| false
| 15,828,294
| 1
| 0
| 0
| 7
|
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7).
After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy.
Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue?
I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program
Thanks in advance
Stefano
|
Problems in fully uninstalling Python 2.7 from Windows 7
| 39,070,767
| 0
| 9
| 36,011
| 0
|
python
|
I installed Enthought before. When I wanted to install Python(x,y) instead, I met the problems above.
After I had tried to uninstall Enthought and Python(x,y) from the Control Panel and then restart the PC, the problem still occured the next time I installed Python(x,y).
I solved this problem by:
deleting all the relevant files in C:/User/UserName/AppData/ about Python, including the third party softwares like Enthought;
deleting the Path in user and system Environment;
=====the two steps were failed if I didn't do the third step.=====
deleting the register keys as @Daniel said. (include all the relevant keys with the prefix py if you installed the third party software about Python. )
HKEY_LOCAL_MACHINE\Software\Python\
HKEY_CURRENT_USER\Software\Python
| 0
| 1
| 0
| 0
|
2013-04-05T07:34:00.000
| 9
| 0
| false
| 15,828,294
| 1
| 0
| 0
| 7
|
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7).
After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy.
Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue?
I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program
Thanks in advance
Stefano
|
Problems in fully uninstalling Python 2.7 from Windows 7
| 49,225,972
| 0
| 9
| 36,011
| 0
|
python
|
I Repaired/Modified to install all the components for the Python
version I wanted to uninstall.
Once that was done, I clicked on Uninstall/Change and that uninstalled it for good.
| 0
| 1
| 0
| 0
|
2013-04-05T07:34:00.000
| 9
| 0
| false
| 15,828,294
| 1
| 0
| 0
| 7
|
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7).
After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy.
Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue?
I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program
Thanks in advance
Stefano
|
Problems in fully uninstalling Python 2.7 from Windows 7
| 32,640,463
| 4
| 9
| 36,011
| 0
|
python
|
I faced this issue: I tried to uninstall the python and fresh install, reason my pip version issue was not getting resolved. So I deleted the python folder, removed python from system path, and when I tried to uninstall from "Uninstall a program" in control panel, it showed "Windows installation package" error window and could not clean uninstall.
Solution what i found was: In the "Uninstall a program" select python and click repair. And then uninstall the python, it worked for me. Hope this helps and save some time.
PS: I am pretty new to python, and any help correcting me would be appreciated.
| 0
| 1
| 0
| 0
|
2013-04-05T07:34:00.000
| 9
| 0.088656
| false
| 15,828,294
| 1
| 0
| 0
| 7
|
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7).
After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy.
Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue?
I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program
Thanks in advance
Stefano
|
Problems in fully uninstalling Python 2.7 from Windows 7
| 38,963,877
| 1
| 9
| 36,011
| 0
|
python
|
I had python 2.7.12 and wanted to uninstall it for 2.7.9. I had the same problem as you and to fix it I tried to delete all of the local files and then uninstall however it still gave me the same error. So instead I decided to repair the python 2.7.12 and then uninstall which worked perfectly and completely got rid of the error.
| 0
| 1
| 0
| 0
|
2013-04-05T07:34:00.000
| 9
| 0.022219
| false
| 15,828,294
| 1
| 0
| 0
| 7
|
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7).
After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy.
Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue?
I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program
Thanks in advance
Stefano
|
Problems in fully uninstalling Python 2.7 from Windows 7
| 23,568,030
| 0
| 9
| 36,011
| 0
|
python
|
I had python 2.7 installed and enthought canopy. I wanted to switch to python(x,y) to access a full version of the OpenCV library. python(x,y) installation complained about python 2.7 already being installed after:
1)Using windows control panel
2)Removing all lingering python files
3)Removing the windows path as suggested above
Not until I removed all registry entries related to python/enthough did python(x,y) install without issue.
| 0
| 1
| 0
| 0
|
2013-04-05T07:34:00.000
| 9
| 0
| false
| 15,828,294
| 1
| 0
| 0
| 7
|
some months ago, I installed Python 2.7 on my laptop (my os is Windows 7).
After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy.
Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue?
I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program
Thanks in advance
Stefano
|
How to queue up scheduled actions
| 15,870,589
| 1
| 0
| 169
| 0
|
python,django,heroku,celery,django-celery
|
It depends on how much accuracy you need. Do you want users to select the time down to the minute? second? or will allowing them to select the hour they wish to be emailed be enough.
If on the hour is accurate enough, then use a task that polls for users to mail every hour.
If your users need the mail to go out accurate to the second, then set a task for each user timed to complete on that second.
Everything in between comes down to personal choice. What are you more comfortable doing, and even more importantly: what produces the simplest code with the fewest failure modes?
| 0
| 1
| 0
| 0
|
2013-04-08T01:58:00.000
| 2
| 1.2
| true
| 15,870,130
| 0
| 0
| 1
| 1
|
I am trying to set up some scheduled tasks for a Django app with celery, hosted on heroku. Aside from not know how everything should be configured, what is the best way to approach this?
Let's say users can opt to receive a daily email at a time of their choosing.
Should I have a scheduled job that run every, say 5 minutes. Looks up every user who wants to be emailed at that time and then fire off the emails?
OR
Schedule a task for each user, when they set their preference. (Not sure how I would actually implement this yet)
|
Using celery in python 3.3 on windows machine
| 15,971,837
| 0
| 0
| 129
| 0
|
python-3.x,subprocess,celery
|
celery doesn't yet work perfectly with python3.3 on windows it seems.
I ran the exact same setup on linux fedora and got it to work.
This problem should be fixed in future development of the package so be patient.
| 0
| 1
| 0
| 0
|
2013-04-08T19:23:00.000
| 1
| 1.2
| true
| 15,887,206
| 0
| 0
| 0
| 1
|
Currently i'm working on a project where I need to use Python 3.3 and celery.
I've been following the first steps tutorial, but i keep getting errors due to problems with librarys like _subprocess. Does annyone have some more information on this.
I also tried replacing the _subprocess with _winapi, with more errors as result. I'm open for anny suggestions. anny help on the mather would be appriciated.
ps:
I'm working on a windows machine.
I'm using RabbitMq as broker
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 17,015,420
| 1
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
I had exactly the same issue :"IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I found the answer from this stackoverflow site. I created a file named string.py and that classhed with the normal python files. I removed the string.py and everything works now. Thanks folks.
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0.01818
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 17,843,247
| 3
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
Adding to existing answers - it is actually possible to have firewall block IDLE when not running with -n flag. I haven't used IDLE for a few months and decided to try if it works properly with newly installed python3.3 (on Linux Mint 13 x86). In between I made iptables setup much more aggressive and apparently it blocked idle-python3.3 from connecting to the Python RPC server. Sometimes it is just what the message says.
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0.054491
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 20,869,245
| 1
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
I had the same error message. Error not seen after I added all the *.exe filea to be found in the Python install directory to the Windows firewall exception list.
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0.01818
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 21,956,824
| 5
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
Look for files on your main python folder that you may create in names like "threading.py", "tkinter.py" and other names that overlapps with your Lib folder and move/delete them
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0.090659
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 22,885,631
| 1
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
I finally got it to work when I disabled ALL firewalls and antivirus, because some antivirus ALSO have firewall control. Ex. avast
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0.01818
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 31,248,725
| 1
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
Using Windows 7 64 installation of Python 2.7.10 Shell I solved the above problem by opening the program as an administrator.
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0.01818
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 37,479,563
| 0
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
i have the Same issue on os win7 64Bit and Python 3.1 and find a workaround because i have a Project with many .py files and just one gave this error. - Workaround is to copy a working file and copy the contents from not working file to working file. (i used Another editor as idle. The Problem with that workaround is... of you rename the file it doenst work. attention just rename the not working file doesnt work for me. just that copy paste. – john
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 42,023,097
| 0
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
I came across this problem too. There are two things you can do
You may already have a process running call pythonw.exe which prevents IDLE from being starting. End that task and try running IDLE again
Use pythonwin or python command line
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 27,731,044
| 1
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
Remove copy.py in your folder if you happen to have one
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 0.01818
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 16,003,884
| 14
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
I had this same problem today. I found another stack overflow post where someone had a tkinter.py file in the same directory as python, and they fixed it by removing that tkinter.py file. When I looked in my python directory, I realized I had created a script called random.py and put it there. I suspect that it conflicted with the normal random module in python. When I removed this file, python started working again.
So I would suggest you look in your main python directory and see if there are any .py files that you could move to different places.
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 1
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Can't run Python via IDLE from Explorer [2013] - IDLE's subprocess didn't make connection
| 24,211,913
| 10
| 10
| 72,468
| 0
|
python-2.7,python-3.x,python-idle
|
I'm running Windows 7 64-bit. I saw the same errors today. I tracked down the cause for me, hopefully it'll help you. I had IDLE open in the background for days. Today I tried to run a script in IDLE, and got the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." errors. So I closed all IDLE windows, and tried to restart IDLE. That then caused the same errors to pop up, and now IDLE wouldn't open successfully.
The cause was an extra pythonw.exe process running in the background. If I open up an instance of IDLE, then open a second, the second has issues connecting, and closes. But it does not close the instances of pythonw.exe that it opened, one is left running in the background. That extra instance then prevents future attempts to open IDLE.
Opening up Task Manager and killing all pythonw.exe processes fixed IDLE, and now it functions properly on my machine (1 instance open at a time though!).
| 0
| 1
| 0
| 0
|
2013-04-08T20:19:00.000
| 11
| 1
| false
| 15,888,186
| 0
| 0
| 0
| 11
|
Resolved April 15, 2013.
In windows 7 (64bit) windows explorer when I right clicked a Python file and selected "edit with IDLE" the editor opens properly but when I run (or f5) the Python 3.3.1 program, it fails with the "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection." error message. All other methods of starting IDLE for running my python 3.3.1 programs worked perfectly.
Even the "Send to" method worked but it was unacceptably clunky. I've spend four days (so far) researching this and trying various things including reinstalling Python many times.
And NO it's not the FireWall blocking it. I've tried totally turning Firewall off and it had no effect.
Here's an important clue: In the beginning I installed and configured python 3.3 64 bit and everything worked including running from "edit with IDLE" but then recently when I needed a library only available in Python 2 I installed python 2.7.4 and from that point on the stated problem began. At one point I completely removed all traces of both versions and reinstalled Python 3.3.1 64 bit. Problem remained.
Then I tried have both 32 bit versions installed but still no luck. Then at some point in my muddling around I lost the option to "edit with IDLE" and spent a day trying everything including editing in Regedit. No luck there either. I reinstalled Python 3.3.1 still no "edit with IDLE" then Finally I uninstalled all versions of Python and I removed python references to environment variables PATH and PYTHONPATH. Then I Deleted all the Python related keys in the windows registry, deleted the C:\python33 directory that the uninstall didn't bother to delete. Overkill, of course, then I restarted windows and installed Python 3.3.1 64 bit version again and thankfully the option to 'edit with IDLE' was back. I was momentarily happy, I opened windows explorer, right clicked on a python program, selected 'edit with IDLE' selected RUN (eyes closed) and you guessed it, same original error message "IDLE's subprocess didn't make connection. Either IDLE can't start a subprocess or personal firewall software is blocking the connection."
I am completely stuck on this issue and really need help. Pretty sure that you can see I and not a happy camper. And to top it all off, I guess I don't understand StackOverflow yet, I have had this plea for help up in various versions for 5 days and not one response from anyone. Believe me I've looked at every thing in stackoverflow plus other sites and I can't see the answer. Almost seems like I have to answer my own question and post it, trouble is, so far I can't.
Anyway, thanks for listening. Yes I'm pretty new to Python but I've been programming and overcoming problems for many years (too many perhaps). anyone? Not personally having someone that is familiar with Python makes this difficult, how can I get in touch with an expert in Python for a quick phone conversation?
|
Running Boto on Google App Engine (GAE)
| 15,891,258
| 6
| 6
| 2,087
| 0
|
python,google-app-engine,amazon-ec2,boto
|
It sounds like you haven't copied the boto code to the root of your app engine directory.
Boto works with GAE but Google doesn't supply you with the code. Once you copy it into the root of your GAE directory, the dev server should work, and after your next upload it will work on the prod server as well.
| 0
| 1
| 0
| 0
|
2013-04-08T21:34:00.000
| 2
| 1.2
| true
| 15,889,424
| 0
| 0
| 1
| 1
|
I'm new to Python and was hoping for help on how to 'import boto.ec2' on a GAE Python application to control Amazon EC2 instances. I'm using PyDev/Eclipse and have installed boto on my Mac, but using simply 'import boto' does not work (I get: : No module named boto.ec2). I've read that boto is supported on GAE but I haven't been able to find instructions anywhere. Thanks!
|
Configuring Mac OS X Mountain Lion to use python.org's python 2.7.4
| 15,892,084
| 1
| 0
| 337
| 0
|
python,macos,python-2.7,osx-mountain-lion
|
There should be a shell script in the /Applications/Python X.X.
run this shell script to setup your PATH variable for whatever shell you use.
For more info check the README.txt
| 0
| 1
| 0
| 0
|
2013-04-09T01:57:00.000
| 1
| 1.2
| true
| 15,892,046
| 0
| 0
| 0
| 1
|
I am using Mac OS X Mountain Lion and I have installed the "python.org version" of python 2.7.4.
It seems like this newly version is invoked by the command python2 since it gives the version as 2.7.4, whereas the default (pre-installed mac) version is invoked with the command python (it displays version 2.7.2). Is this correct?
How do I best change the command 'python' to point to the newly installed 'python2'?
|
Python 32-bit development on 64-bit Windows
| 15,897,564
| 7
| 4
| 13,622
| 0
|
python,windows
|
You can install almost any 32 bit software on 64 bit Windows because it has a built-in 32 bit emulator.
If you are going to use a 32 bit Python, make sure all the libraries you use are 32 bit too.
| 0
| 1
| 0
| 0
|
2013-04-09T08:45:00.000
| 1
| 1.2
| true
| 15,897,268
| 1
| 0
| 0
| 1
|
Is it possible to install 32-bit Python (2.7 series) on Windows 7/8 64-bit to develop 32-bit applications? I'm sure the answer is yes but be good to get confirmation.
|
How to Refresh Network Drive Mappings in Python
| 16,104,252
| 0
| 5
| 3,454
| 0
|
python,windows
|
My solution to this problem was to just use the IP address for the referenced machine. Worked like a charm and no problems with mapped drives...thanks for the responses.
| 0
| 1
| 0
| 0
|
2013-04-10T12:07:00.000
| 2
| 0
| false
| 15,925,368
| 0
| 0
| 0
| 1
|
I have a drive already mapped to a designated letter, 'R:\'. If I run the python script to access this space while logged on or with the computer unlocked it works fine. The problem occurs when I set task scheduler to run the script early in the morning before I come in. Basically I stay logged in and lock the machine, but at some point it looks like my network drive mappings time out (but reconnect when I unlock the machine in the morning) and this is why the script isn't able to find them.
The error comes when trying to do an os.path.exists() to check for folders on this drive and create them if they don't already exist. From a 'try/except' loop I get the exception "The system cannot find the path specified: 'R:\'.
My question: is there a way to force a refresh through python? I have seen other postings about mapping network drives...but not sure if this applies to my case since I already have the drive mapped. The letter it uses needs to stay the same as different applications have absolute references to it. Wondering if mapping the same drive will cause problems or not work, but also not wanting to temporarily map to another letter with a script and unmap when done...seems like an inefficient way to do this?
Using python 2.6 (what another program requires).
Thanks,
|
google app engine python configuration
| 15,934,118
| 3
| 0
| 181
| 0
|
python,google-app-engine
|
In Launcher go to Edit -> Preferences and set Python Path to match your python 27 path.
| 0
| 1
| 0
| 0
|
2013-04-10T18:48:00.000
| 1
| 1.2
| true
| 15,933,982
| 0
| 0
| 1
| 1
|
when I run my app using "Google App Engine Launcher" it gives me a warning sign.
in the log console I found it using Python 3.3, how can I configure it to use python 2.7
|
Debug a Python C++ extension from Eclipse (under Linux)
| 30,459,774
| 0
| 1
| 750
| 0
|
c++,python,eclipse,debugging,eclipse-cdt
|
For me it works great just adding a debug configuration in C/C++ for the program /usr/bin/python (or whatever search path you have to the python interpreter) and then put the python program you want to run as the arguments. Put the breakpoints you want in the C-code and you should be all set for running the debug configuration and opening the debug perspective.
If it still does not work you may also check that you are using Legacy (or Standard) Process Launcher. For some reason the GDB process launcher does not seem to work here.
| 0
| 1
| 0
| 1
|
2013-04-11T08:26:00.000
| 1
| 0
| false
| 15,944,011
| 0
| 0
| 0
| 1
|
I have a C++ project that is called in Python (via boost-python) and I want to debug the C++ code from python process. How can I do that? In Windows with Visual Studio I can use the functionality attach to process. How to achieve the same in Eclipse?
Thanks
|
How to sync the computer local data in Google Spreadsheet?
| 16,007,383
| 1
| 1
| 270
| 0
|
python,sync,google-sheets,google-spreadsheet-api
|
Google Apps Script will let you create a "web app", and you can pass params to it. There are good docs on how to do this, should be quick and easy way compared to using GData style spreadsheet API. (No Auth2 etc)
| 0
| 1
| 0
| 0
|
2013-04-11T14:20:00.000
| 1
| 0.197375
| false
| 15,951,228
| 0
| 0
| 0
| 1
|
I would like to create a system that works in the background on the computer and when I turned on the computer it would send the time that the computer was turned on to a spreadsheet on Google SpreadSheet and when it were turned off It also sync the time that the computer was turned off in the spreadsheet of Google Spreadsheet.
How could I create this?
|
How to change default directory for IDLE in windows?
| 15,954,961
| 13
| 8
| 11,874
| 0
|
python,python-idle
|
If you're running IDLE from a Windows shortcut, you can just right-click on the shortcut, choose "Properties", and change the field "Start in" to any directory you like.
| 0
| 1
| 0
| 0
|
2013-04-11T15:49:00.000
| 3
| 1.2
| true
| 15,953,303
| 1
| 0
| 0
| 1
|
The installation directory is "d:\python2.7", and every time I open IDLE and click on menu File and Open item, the default directory is also "d:\python2.7". So I have to change the directory to where I want.
Is there any way I can change it? Using configuration file or changing environment variable?
I tried to add PYTHONPATH in environment variable, but it doesn't work.
I also import os, and use os.chdir(), but it only changes the working directory, not what I want.
Thank you.
|
How to implement bank/cross-order type updates scalably and safely
| 15,987,618
| 1
| 0
| 140
| 0
|
python,google-app-engine
|
I think if you can sequence the orders on a commodity, then you can clear orders offline. By "offline", I mean you can come to me at the end of the day, tell me the sequence of the orders, and I can tell you which trades happened. The one snag is, what if a buyer does not have the funds when a transaction should have cleared? You can address this in two ways:
Put the funds in an escrow so that any orders that can clear do.
Drop buy orders when you try to clear them if the funds are not available.
As you suggested, you'll probably need cross-entity group transactions in order to make sure the fund transfers are correct (i.e. funds are neither created nor destroyed).
You can sequence orders by time (e.g. paced_at = db.DateTimeProperty(auto_now_add=True)). If two orders have the same time, then use something (preferably something fair and deterministic) to break the tie. Hash (for fairness) of the numeric id (for determinism) might not be a bad choice here.
App Engine is inherently multithreaded in the sense that an app can have many concurrent instances (instances are not necessarily threads within the same process though). Instances are created automatically, and there is currently no way to cap the number of instances at 1. If the state of your app is in Datastore (as opposed to local memory, memecache, or somewhere else), and your transactions are correct, then your app will be multithreaded "for free". Of course, your transactions being correct is not trivial.
Another tool to keep in mind is that tasks can be transactional. This may come in handy if you want to do offline book clearing using tasks.
| 0
| 1
| 0
| 0
|
2013-04-12T02:57:00.000
| 2
| 1.2
| true
| 15,962,315
| 0
| 0
| 0
| 1
|
I'm working on a small project on Google App Engine, trying to implement a site that allows participants to buy and sell fake goods, similarly to a stock market where the system will show real time-ish BID/ASK spreads.
As a quick example:
A Seller places and order to sell 10 Boxes for 8.00 (Order 1)
A Buyer places then an order to purchase 5 boxes for up to 9.00 (Order 2)
When the second order is placed, the system will need to do multiple tasks, all contingent on all of the tasks completing successfully.
Take the funds (8.00 x 5) to pay for the boxes from the Buyer and give them to the Seller
Take the boxes (5) from the Seller and give them to the Buyer
Update the orders as complete (OID 2 ) or update as partially filled (OID 1) so that they cannot be double matched
Take a fee from each of the participants and add it to a system account
If all that I needed was to move funds from one participant to another, I can do that safely even if the system were to fail in the middle. But to ensure that all of the tasks above complete correctly, and roll-back if any of them fail seems overly complex in App Engine.
Additionally, my "Order Book" and order matching engine are single threaded right now (using Mutexes for locking.) This seems to go against the whole point of using App Engine, but I'm not sure I see a way around it.
So (finally) - My questions are:
Is there a best practice when using App Engine where there are multiple steps that all depend on every step completing correctly?
Does anyone have any suggestions as how to either, allow the order book to be multi-threaded, or if it remains single threaded - is there a best practice to not have this core piece block the use of the site as it scales? I've thought about using tasks to queue the order adds/updates/cancels to keep the book separate from direct participant input.
Thank you, I look forward to your help!
|
Python async and CPU-bound tasks?
| 15,970,840
| 2
| 16
| 6,728
| 0
|
python,asynchronous,flask,gevent
|
How about simply using ThreadPool and Queue? You can then process your stuff in a seperate thread in a synchronous manner and you won't have to worry about blocking at all. Well, Python is not suited for CPU bound tasks in the first place, so you should also think of spawning subprocesses.
| 0
| 1
| 0
| 0
|
2013-04-12T10:38:00.000
| 2
| 0.197375
| false
| 15,969,213
| 1
| 0
| 0
| 1
|
I have recently been working on a pet project in python using flask. It is a simple pastebin with server-side syntax highlighting support with pygments. Because this is a costly task, I delegated the syntax highlighting to a celery task queue and in the request handler I'm waiting for it to finish. Needless to say this does no more than alleviate CPU usage to another worker, because waiting for a result still locks the connection to the webserver.
Despite my instincts telling me to avoid premature optimization like the plague, I still couldn't help myself from looking into async.
Async
If have been following python web development lately, you surely have seen that async is everywhere. What async does is bringing back cooperative-multitasking, meaning each "thread" decides when and where to yield to another. This non-preemptive process is more efficient than OS-threads, but still has it's drawbacks. At the moment there seem to be 2 major approaches:
event/callback style multitasking
coroutines
The first one provides concurrency through loosely-coupled components executed in an event loop. Although this is safer with respect to race conditions and provides for more consistency, it is considerably less intuitive and harder to code than preemptive multitasking.
The other one is a more traditional solution, closer to threaded programming style, the programmer only having to manually switch context. Although more prone to race-conditions and deadlocks, it provides an easy drop-in solution.
Most async work at the moment is done on what is known as IO-bound tasks, tasks that block to wait for input or output. This is usually accomplished through the use of polling and timeout based functions that can be called and if they return negatively, context can be switched.
Despite the name, this could be applied to CPU-bound tasks too, which can be delegated to another worker(thread, process, etc) and then non-blockingly waited for to yield. Ideally, these tasks would be written in an async-friendly manner, but realistically this would imply separating code into small enough chunks not to block, preferably without scattering context switches after every line of code. This is especially inconvenient for existing synchronous libraries.
Due to the convenience, I settled on using gevent for async work and was wondering how is to be dealt with CPU-bound tasks in an async environment(using futures, celery, etc?).
How to use async execution models(gevent in this case) with traditional web frameworks such as flask? What are some commonly agreed-upon solutions to these problems in python(futures, task queues)?
EDIT: To be more specific - How to use gevent with flask and how to deal with CPU-bound tasks in this context?
EDIT2: Considering how Python has the GIL which prevents optimal execution of threaded code, this leaves only the multiprocessing option, in my case at least. This means either using concurrent.futures or some other external service dealing with processing(can open the doors for even something language agnostic). What would, in this case, be some popular or often-used solutions with gevent(i.e. celery)? - best practices
|
Qpid reliability
| 16,147,555
| 0
| 0
| 329
| 0
|
python,qpid
|
1) That depends on architecture. Both methods, queues and topics, can get messages from many sources to many destinations. Topics get messages to all listeners, queues get message to one of the listeners - whoever grabs the message first.
2) Are there any error or log messages pertaining to failure? I suspect you are running out of resources.
3) No, you should figure out why your messaging fails before 24 hours.
| 0
| 1
| 0
| 1
|
2013-04-12T14:21:00.000
| 1
| 1.2
| true
| 15,973,821
| 0
| 0
| 0
| 1
|
I am using a C++ broker with clients written in C++, Python, and Java. If we run the system overnight, it reliably does not send/receive messages by morning. All messages are exchanged over topics with subjects designating the destination. I have 3 questions:
1.) Should we be using queues? Is there an advantage to using queues over topics? What is the design decision that picks a queue over a topic? Queues seem more rigid (i.e. if you know node A sent a request and wants a response, you would send a response right back; pub/sub).
2.) If a message goes unacknowledged, what can happen? I discovered that the Python module was missing a session.acknowledge(). Could this be causing our overnight failures? I discovered this problem today so I will hopefully have more insight tomorrow. The remedy has been to restart the qpidd service. (We are running on x64 Linux).
3.) Is this a good reason to use cluster fail over?
|
In PyCharm, webpages refresh in debug mode, not in run mode
| 30,849,574
| 0
| 1
| 550
| 0
|
python,google-app-engine,google-chrome,pycharm,webapp2
|
It turns out that this wasn't a refresh or caching issue but a timing issue. Under some circumstances, GAE uses an update algorithm that incurs a delay before transactions are applied. In Run mode, the new page was being requested before the update was completed; in Debug mode, enough time passed for the update to be completed.
One solution would have been to change the datastore architecture to eliminate reading an obsolete version of the data, but that caused other, more serious problems.
Another solution was to include a split-second delay, after an update but before displaying the updated record. Not ideal, since it's impossible to know how long that delay has to be, but for now this has been satisfactory.
| 0
| 1
| 0
| 0
|
2013-04-13T17:43:00.000
| 1
| 1.2
| true
| 15,990,889
| 0
| 0
| 1
| 1
|
I'm writing a GAE webapp using Python 2.7, webapp2, and Jinja. In development, I run the app under PyCharm 2.7.1 on a Max OSX 10.7.5 (Lion). I'm currently using Chrome 26.0.1410.43 as my browser.
I don't know for sure that this is a PyCharm issue, but that's my best guess. Here's a description:
When I use the "Debug" control to start the app, webpages refresh automatically as I navigate from one page to another. That is, if I start at page A, navigate to page B, take some action that changes what A should look like, and navigate back to A, the change appears.
However, when I use the "Run" control to start the app, with no other changes, webpages do not automatically refresh. In that same scenario, when I navigate back to A, the old version of that webpage appears. I need to click my browser's Refresh control to see the updated page.
Please tell me how to stop the browser from displaying cached pages in Run mode. I haven't tried publishing this to our GAE website yet, and hopefully it won't happen there, but I need Run mode for performance on the video tutorial I'm creating.
Thanks for any suggestions!
|
Is there a command or a piece of code that prevents the Python(command line) from closing immediately after executing the code?
| 16,012,268
| 3
| 0
| 77
| 0
|
python,python-2.7
|
If you're seeing a Command Prompt open and immediately close when you double-click your .py file, that's to be expected - it's not how you're supposed to run a console-based Python script.
What you should do is start a Command Prompt via the Start menu, then run your program by typing c:\python27\python.exe myscript.py or similar.
Alternatively, use a Python IDE (eg. Idle) or an editor (eg. Scite) that can run Python scripts.
| 0
| 1
| 0
| 0
|
2013-04-15T09:52:00.000
| 3
| 1.2
| true
| 16,012,245
| 1
| 0
| 0
| 1
|
I need your help. I'm a newbie and I'm learning python. I know to write basic codes. But, when I execute the code in Python(command line) it closes immediately. Is there any piece of code that can prevent this from happening or a trick? Please help me out. Cheers!
P.S: I use Python 2.7 in Windows.
|
Making the eyeD3-module available for import in python
| 16,025,847
| 14
| 3
| 3,498
| 0
|
python,windows,eyed3
|
try import eyed3 (without capital D)
| 0
| 1
| 0
| 0
|
2013-04-15T22:22:00.000
| 2
| 1.2
| true
| 16,025,662
| 1
| 0
| 0
| 2
|
On Windows, I have installed Python 2.7 and added python.exe's directory to PATH. Then I installed pip und used pip install eyeD3 to install the eyeD3 module successfully. However, using import eyeD3 doesn't work, but throws an ImportError.
I had the idea to adjust the PYTHONPATH-environment-variable in my command line, but had no clue to what I would have to set it.
|
Making the eyeD3-module available for import in python
| 16,128,387
| 3
| 3
| 3,498
| 0
|
python,windows,eyed3
|
The namespace changed to eyed3 in 0.7, as did the API. On all platforms.
| 0
| 1
| 0
| 0
|
2013-04-15T22:22:00.000
| 2
| 0.291313
| false
| 16,025,662
| 1
| 0
| 0
| 2
|
On Windows, I have installed Python 2.7 and added python.exe's directory to PATH. Then I installed pip und used pip install eyeD3 to install the eyeD3 module successfully. However, using import eyeD3 doesn't work, but throws an ImportError.
I had the idea to adjust the PYTHONPATH-environment-variable in my command line, but had no clue to what I would have to set it.
|
Ipython and Curses on Windows
| 16,066,204
| 1
| 0
| 125
| 0
|
ipython,qtconsole
|
No, it's not really in sight. The Qt console has some support for control characters, so it can do things like coloured text, but it's definitely not enough to support curses, and we're not really interested in going down that route.
The code is all in the open if you want to try to make it into a full terminal emulator. But I rather hope there are better starting points for terminal emulators in Windows.
| 0
| 1
| 0
| 0
|
2013-04-15T23:09:00.000
| 1
| 1.2
| true
| 16,026,129
| 1
| 0
| 0
| 1
|
I have been trying all sorts of sourceforge projects that try to port GNU functionality to Windows, with the goal to create a very GNU aware Ipython profile providing the best terminal environment I know how (on Windows that is).
How close is QtConsole to having the ability of running something like Curses through the IpyQt frontend?
(The key here, is that I want the DPI aware rich text of QtConsole. Would knock the socks off most of the Windows terminal alternatives.)
Is that possibility even in sight, or is that a match that will likely not happen? I have never emulated a VT100 in my spare time, how much does QtConsole look like one?
|
Details of /proc/net/ip_conntrack and /proc/net/nf_conntrack
| 50,619,225
| -1
| 22
| 26,249
| 0
|
python,linux,kernel,conntrack
|
The file ip_conntrack contains only ipv4 specific conntrack entries whereas nf_conntrack includes both ipv4 and ipv6 protocol conntrack entries.
nf_conntrack file is registered with proc file system using code in
net/netfilter/nf_conntrack_standalone.c
whereas ip_conntrack file is registered with proc file system through the code in
net/netfilter/nf_conntrack_l3proto_ipv4_compat.c
| 0
| 1
| 0
| 0
|
2013-04-16T10:27:00.000
| 2
| -0.099668
| false
| 16,034,698
| 0
| 0
| 0
| 1
|
I'm looking for a detailed documentation about content of files /proc/net/nf_conntrack and/or /proc/net/ip_contrack on Linux systems.
Yes, I know, there are many utilities which can show me the content of these files in human readable format, but... I'd like to do it on a SOHO router, with Tomato USB firmware (by Shibby).
The optware AFAIK deprecated and the entware doesn't contain any of these utilities, so I'd like to write a script instead of them, but I didn't find a detailed description of these files :(
|
get PID of QProcess with python on windows
| 69,134,278
| 0
| 3
| 859
| 0
|
python,qt4,pyqt,qprocess
|
pid() function is provided to keep old source code working.
Use processId() instead.
Returns the native process identifier for the running process, if available. If no process is currently running, 0 is returned.
Note: Unlike processId(), pid() returns an integer on Unix and a pointer on Windows.
| 0
| 1
| 0
| 0
|
2013-04-16T10:34:00.000
| 3
| 0
| false
| 16,034,823
| 0
| 0
| 0
| 1
|
Is there some way to read the PID of a process started with QProcess.start(...)? QProcess::pid() returns sip.voidptr and there's not much I can do with it (or I don't know how).
I want to have the PID to have the possibility to make the window active later on.
|
Making pypy available to pyscripter (or any other ide for that matter) on Windows?
| 26,822,586
| 0
| 1
| 1,140
| 0
|
python,python-2.7,pypy,pyscripter
|
PyCharm Community edition IDE by JetBrains supports pypy, or any other interpreter
Just go to File > Settings > Project INterpreter and set interpreter location
| 0
| 1
| 0
| 0
|
2013-04-17T04:13:00.000
| 2
| 0
| false
| 16,051,345
| 1
| 0
| 0
| 1
|
Maybe I am missing something, but I just downloaded pypy 2.0 beta2 windows binary (32 bit), and it seems I can run the interpreter by executing pypy.exe. However, I would like pypy to work with pyscripter and for all my old libraries to be available. Is this possible? Or is it as if I just installed a new version of python (so I would need to install all of my libraries again)? I might be confused at a fundamental level.
Thanks!
|
pydev massive cpu usage
| 16,058,892
| 1
| 0
| 284
| 0
|
python,aptana,pydev
|
The only way to really know what's going on would be connecting jvisualvm (or some profiler or debugger) to your process to see what's going on (and then report an issue). On jvisualvm you can get a dump with the current processes, which may be enough already if you can say which is the thread that's running.
Note that the title should probably be 'aptana studio 3 massive cpu usage' if you're able to reproduce it there but not in pydev...
| 0
| 1
| 0
| 1
|
2013-04-17T04:34:00.000
| 1
| 1.2
| true
| 16,051,571
| 0
| 0
| 0
| 1
|
I am using pydev through Aptana Studio 3 on a mac. Shortly after opening up Aptana, my computer heats way up, the fans go full power, and Aptana uses over 100% cpu even when it's not doing anything. I also have pydev on eclipse, but this spike doesn't occur. Has anyone else seen this? Is there any way to stop it?
|
Handling PySVN merges by manually
| 16,092,530
| 0
| 0
| 175
| 0
|
python,svn,conflict,pysvn
|
I solved this by adding the prop of mime-type application/octet-stream.
This way svn would bypass the contextual merge feature.
| 0
| 1
| 0
| 0
|
2013-04-17T15:18:00.000
| 1
| 0
| false
| 16,063,928
| 0
| 0
| 0
| 1
|
I'm using SVN as a backend for a collaborative framework. That said, I want to handle ALL the updates by hand, ie: no automerge, no auto-update.
so if updating brings the following changeset:
A file1
D file2
U file3
G file4
I want to process the update and the automerge by hand.
I know that this is possible in subversion CLI (for linux) by using the non-interactive flag or marking the file as binary but I didn't found this options in the pysvn.Client module.
Any thoughts about it?
|
Distutils compiler options configuration
| 16,088,553
| 3
| 7
| 4,646
| 0
|
python,python-2.7,distutils,enthought
|
Compiler options are taken from CPython’s Makefile. IOW they are the same as the ones used to compile Python. You can override most of them on the command line as Evert described.
The global distutils.cfg is something that a sysadmin can create to set default options, not a file that is installed with Python.
| 0
| 1
| 0
| 0
|
2013-04-18T07:58:00.000
| 2
| 0.291313
| false
| 16,077,481
| 1
| 0
| 0
| 1
|
Maybe a stupid question, but I was wondering where Python's distutils get the compiler options from? It gets some linked directories wrong and I want to correct that once and for all.
I know there should be a prefix/lib/pythonver/distutils/distutils.cfg but I can't find any distutils.cfg anywhere on the computer. Obviously I haven't got a local setup.cfg or any $HOME/.pydistutils.cfg.
I'm using the Enthought 64-bit distribution, version 7.3 (Python 2.7) on Mac OS X 10.8.3
Cheers,
U.
|
What is the fastest way to get scraped data from so many web pages?
| 16,131,039
| 0
| 0
| 402
| 1
|
python,mysql,google-app-engine,google-cloud-datastore,web-scraping
|
Based on what I know about your app it would make sense to use memcache. It will be faster, and will automatically take care of things like expiring stale cache entries.
| 0
| 1
| 0
| 0
|
2013-04-19T06:29:00.000
| 1
| 0
| false
| 16,098,570
| 0
| 0
| 1
| 1
|
I need to scrap about 40 random webpages at the same time.These pages vary on each request.
I have used rpcs in python to fetch the urls and scraped the data using BeautifulSoup. It takes about 25 seconds to scrap all the data and display on the screen.
To increase the speed i stored the data in appengine datastore so that each data is scraped only once and can be accessed from there quickly.
But the problem is-> as the size of the data increases in the datastore, it is taking too long to fetch the data from the datastore(more than the scraping).
Should i use memcache Or shift to mysql? Is mysql faster than gae-datastore?
Or is there any other better way to fetch the data as quickly as possible?
|
Can't open python.exe in Windows Powershell
| 16,108,206
| 1
| 1
| 1,533
| 1
|
python,windows,powershell,path,exe
|
Making the comments an answer for future reference:
Have a ; at the end of the PATH and logout and log back in.
| 0
| 1
| 0
| 0
|
2013-04-19T15:02:00.000
| 1
| 0.197375
| false
| 16,107,658
| 0
| 0
| 0
| 1
|
I've had my python program removed from windows a while ago, and recently downloaded python2.7.4 from the main site, but when I type "python" in the Windows PowerShell(x86) prompt from C:, I get the message "'python' is not recognized as an internal or external command, operable program or batch file.", and I'd like to find out how to fix this.
I get the same message when I'm in the actual python27 folder (and the python.exe is indeed there). However, when I type in .\python, it runs as expected, and my computer can run other .exe's just fine. I'm using Windows 7 Home Premium Service Pack 1 on a Sony VAIO laptop. I'm not very familiar with the inner workings of my computer, so I'm not sure where to look from here.
My current path looks like this, with the python folder at the very end:
%SystemRoot%\system32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Java\jdk1.6.0_23\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.42;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\apache-ant-1.8.4\bin;C:\Program Files\TortoiseSVN\bin;C:\Windows\system32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Adobe\AGL;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Java\jdk1.6.0_23\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\MySQL\MySQL Workbench CE 5.2.42;C:\Program Files\MySQL\MySQL Server 5.5\bin;C:\Program Files (x86)\apache-ant-1.8.4\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.6.0_23\bin;C:\Python27
|
Embed a celery worker in my own code
| 16,154,276
| 0
| 2
| 515
| 0
|
python,django,rabbitmq,celery
|
Replace this names: coordinator with rabbitmq (or some other broker kombu supports) and users with celery workers.
I am pretty sure you can do all you need (and much more) just by configuring celery / kombu and rabbitmq and without writing too many (if any) lines of code.
small note: Celery features scheduled tasks.
| 0
| 1
| 0
| 0
|
2013-04-19T15:49:00.000
| 1
| 0
| false
| 16,108,560
| 0
| 0
| 1
| 1
|
I have a service that needs a sort of coordinator component. The coordinator will manage entities that need to be assigned to users, taken away from users if the users do not respond on a timely manner, and also handle user responses if they do response. The coordinator will also need to contact messaging services to notify the users they have something to handle.
I want the coordinator to be a single-threaded process, as the load is not expected to be too much for the first few years of usage, and I'd much rather postpone all the concurrency issues to when I really need to handle them (if at all).
The coordinator will receive new entities and user responses from a Django webserver. I thought the easiest way to handle this is with Celery tasks - the webserver just starts a task that the coordinator consumes on its own time.
For this to happen, I need the coordinator to contain a celery worker, and replace the current worker mainloop with my own version (one that checks the broker for a new message and handles the scheduling).
How feasible is it? The alternative is to avoid Celery and use RabbitMQ directly. I'd rather not do that.
|
to keep the script running even after internet connection goes off
| 16,117,169
| 0
| 0
| 289
| 0
|
python,shell,python-2.7,putty
|
On the server, you can install tmux or screen. These programs run the program in the background and enable you to open a 'window', If I use tmux:
Open tmux: tmux
Detach (run in background): press Ctrl-b d
reattach (open a 'window'): tmux attach
| 0
| 1
| 1
| 1
|
2013-04-20T05:37:00.000
| 2
| 0
| false
| 16,117,044
| 0
| 0
| 0
| 1
|
I had putty on one server and run a python script available on that server. That script keep on throwing output on terminal. Later on, my internet connection went off but even then i was expecting my script to complete it job as script is on running on that server. But when internet connection resumed, I found that script has not done its job.
So is this expected ? If yes, then what to do to make sure that script runs on server even though internet connection goes off in-between?
Thanks in advance !!!
|
How can I handle IPC between C and Python?
| 16,121,274
| 0
| 9
| 12,308
| 0
|
python,c,ipc
|
How about writing the weight-lifting code as a library in C and then providing a Python module as wrapper around it? That is actually a pretty usual approach, in particular it allows prototyping and profiling in Python and then moving the performance-critical parts to C.
If you really have a reason to need two processes, there is an XMLRPC package in Python that should facilitate such IPC tasks. In any case, use an existing framework instead of inventing your own IPC, unless you can really prove that performance requires it.
| 0
| 1
| 0
| 1
|
2013-04-20T12:30:00.000
| 3
| 0
| false
| 16,120,373
| 0
| 0
| 0
| 1
|
I have a an application with two processes, one in C and one in Python. The C process is where all the heavy lifting is done, while the Python process handles the user interface.
The C program writes to a large-ish buffer 4 times per second, and the Python process reads this data. To this point the communication to the Python process has been done by AMQP. I would much rather setup some for of memory sharing between the two processes to reduce overhead and increase performance.
What are my options here? Ideally I would simply have the Python process read the physical memory straight (preferable from memory and not from disk), and then taking care of race conditions with Semaphores or something similar. This is however something I have little experience with, so I'd appreciate any help I can get.
I am using Linux btw.
|
processing large cloud storage files in app engine
| 16,135,479
| 0
| 3
| 281
| 0
|
python,google-app-engine,google-cloud-storage
|
The data file doesnt "need to be in memory" and if you try that you will run oom.
If you can process it sequentially open it as a filestream. Ive done that with blobstore, should be similar
| 0
| 1
| 0
| 0
|
2013-04-21T07:20:00.000
| 2
| 0
| false
| 16,128,864
| 0
| 0
| 1
| 1
|
I'm required to process large files, up to 2GB, in GAE (I'm using Python).
of course I'll be running the code on a backend, however since a local storage isn't available the data will need to be in memory.
is there a file descriptor like wrapper for boto or other cloud storage supported protocol?
or other recommended technique?
Thanks,
Shay
|
NDB/DB NoSQL Injection Google Datastore
| 16,140,194
| 7
| 2
| 973
| 1
|
python,security,google-app-engine,nosql,google-cloud-datastore
|
Standard SQL injection techniques rely on the fact that SQL has various statements to either query or modify data. The datastore has no such feature. The GQL (the query language for the datastore) can only be used to query, not modify. Inserts, updates, and deletes are done using a separate method that does not use a text expression. Thus, the datastore is not vulnerable to such injection techniques. In the worst case, an attacker could only change the query to select data you did not intend, but never change it.
| 0
| 1
| 0
| 0
|
2013-04-21T18:51:00.000
| 1
| 1.2
| true
| 16,134,927
| 0
| 0
| 1
| 1
|
Is there any SQL injection equivalents, or other vulnerabilities I should be aware of when using NoSQL?
I'm using Google App Engine DB in Python2.7, and noticed there is not much documentation from Google about security of Datastore.
Any help would be appreciated!
|
Python will not run in windows powershell
| 16,150,017
| 6
| 0
| 7,079
| 0
|
python,powershell,python-2.7
|
I just solved this issue after nearly pulling my hair out. Thought I would share. In windows system > advanced system settings > environment variables there are two places to change the PATH, user variables and system variables. I added ";c:\python27" as the value for PATH in both. It now works
| 0
| 1
| 0
| 0
|
2013-04-22T13:51:00.000
| 2
| 1.2
| true
| 16,148,872
| 1
| 0
| 0
| 2
|
I am trying to get python.exe to run in interactive mode in windows powershell. I have added c:\python27 to my PATH and when I type "python" in into the shell a new command prompt window opens running python, rather than running within powershell. This is a problem as when I run things like "python --version" it launches the new command prompt window and then closes before I can read it. Does anyone know how to get python to run in powershell?
Note: this used to work before I started to install pip, easy_install and virtualenv this morning.
Thanks
|
Python will not run in windows powershell
| 16,149,638
| 0
| 0
| 7,079
| 0
|
python,powershell,python-2.7
|
I'm not expert in PS, but when I need to use python in interactive mode in windows powershell, I use something like this (version of python is 2.7.3, I didn't change env variables):
PS C:\Python27> ./python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
| 0
| 1
| 0
| 0
|
2013-04-22T13:51:00.000
| 2
| 0
| false
| 16,148,872
| 1
| 0
| 0
| 2
|
I am trying to get python.exe to run in interactive mode in windows powershell. I have added c:\python27 to my PATH and when I type "python" in into the shell a new command prompt window opens running python, rather than running within powershell. This is a problem as when I run things like "python --version" it launches the new command prompt window and then closes before I can read it. Does anyone know how to get python to run in powershell?
Note: this used to work before I started to install pip, easy_install and virtualenv this morning.
Thanks
|
which version of program will execute? the one in the /usr/bin or the one in /usr/local/bin?
| 16,148,913
| 1
| 1
| 58
| 0
|
python,unix,centos,version
|
When you run anything on the command-line, it will search through the folders in the PATH variable, in order, until it finds an executable file with that name.
| 0
| 1
| 0
| 0
|
2013-04-22T13:52:00.000
| 2
| 0.099668
| false
| 16,148,893
| 0
| 0
| 0
| 1
|
I have python in both /usr/bin and /usr/local/bin. Now I have this question that which one will execute if I call python?
I know that I can check with which python command to see which one is which one. But I'm asking which one would work by default?
|
Installing lxml with pip in virtualenv Ubuntu 12.10 error: command 'gcc' failed with exit status 4
| 24,547,445
| 8
| 35
| 37,060
| 0
|
python,django,gcc,lxml
|
I met the similar question(error: command 'gcc' failed with exit status 4) this morning. It seems you need check your machine's memory. If the memory is lower than 512M,that may be the cause.Try to close some services temporarily,like apache server,and try "pip install lxml" again.It maybe work!
| 0
| 1
| 0
| 0
|
2013-04-22T14:26:00.000
| 7
| 1
| false
| 16,149,613
| 1
| 0
| 0
| 1
|
I'm having the following error when trying to run "pip install lxml" into a virtualenv in Ubuntu 12.10 x64. I have Python 2.7.
I have seen other related questions here about the same problem and tried installing python-dev, libxml2-dev and libxslt1-dev.
Please take a look of the traceback from the moment I tip the command to the moment when the error occurs.
Downloading/unpacking lxml
Running setup.py egg_info for package lxml
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.1.2.
Building without Cython.
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/lib
warning: no files found matching '*.txt' under directory 'src/lxml/tests'
Installing collected packages: lxml
Running setup.py install for lxml
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.1.2.
Building without Cython.
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/lib
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/admin/.virtualenvs/dev.actualito.com/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o
src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__getFilenameForFile':
src/lxml/lxml.etree.c:26851:7: warning: variable '__pyx_clineno' set but not used [-Wunused-but-set-variable]
src/lxml/lxml.etree.c:26850:15: warning: variable '__pyx_filename' set but not used [-Wunused-but-set-variable]
src/lxml/lxml.etree.c:26849:7: warning: variable '__pyx_lineno' set but not used [-Wunused-but-set-variable]
src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_4XSLT_18__call__':
src/lxml/lxml.etree.c:138273:81: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
src/lxml/lxml.etree.c:136229:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__copyXSLT':
src/lxml/lxml.etree.c:139667:79: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
src/lxml/lxml.etree.c:136229:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
src/lxml/lxml.etree.c: At top level:
src/lxml/lxml.etree.c:12384:13: warning: '__pyx_f_4lxml_5etree_displayNode' defined but not used [-Wunused-function]
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
error: command 'gcc' failed with exit status 4
Complete output from command /home/admin/.virtualenvs/dev.actualito.com/bin/python -c "import setuptools;__file__='/home/admin/.virtualenvs/dev.actualito.com/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-asDtN5-record/install-record.txt --single-version-externally-managed --install-headers /home/admin/.virtualenvs/dev.actualito.com/include/site/python2.7:
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.1.2.
Building without Cython.
Using build configuration of libxslt 1.1.26
Building against libxml2/libxslt in the following directory: /usr/lib
running install
running build
running build_py
copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes
running build_ext
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -I/home/admin/.virtualenvs/dev.actualito.com/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o
src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__getFilenameForFile':
src/lxml/lxml.etree.c:26851:7: warning: variable '__pyx_clineno' set but not used [-Wunused-but-set-variable]
src/lxml/lxml.etree.c:26850:15: warning: variable '__pyx_filename' set but not used [-Wunused-but-set-variable]
src/lxml/lxml.etree.c:26849:7: warning: variable '__pyx_lineno' set but not used [-Wunused-but-set-variable]
src/lxml/lxml.etree.c: In function '__pyx_pf_4lxml_5etree_4XSLT_18__call__':
src/lxml/lxml.etree.c:138273:81: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
src/lxml/lxml.etree.c:136229:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
src/lxml/lxml.etree.c: In function '__pyx_f_4lxml_5etree__copyXSLT':
src/lxml/lxml.etree.c:139667:79: warning: passing argument 1 of '__pyx_f_4lxml_5etree_12_XSLTContext__copy' from incompatible pointer type [enabled by default]
src/lxml/lxml.etree.c:136229:52: note: expected 'struct __pyx_obj_4lxml_5etree__XSLTContext *' but argument is of type 'struct __pyx_obj_4lxml_5etree__BaseContext *'
src/lxml/lxml.etree.c: At top level:
src/lxml/lxml.etree.c:12384:13: warning: '__pyx_f_4lxml_5etree_displayNode' defined but not used [-Wunused-function]
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
error: command 'gcc' failed with exit status 4
----------------------------------------
Command /home/admin/.virtualenvs/dev.actualito.com/bin/python -c "import setuptools;__file__='/home/admin/.virtualenvs/dev.actualito.com/build/lxml/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-asDtN5-record/install-record.txt --single-version-externally-managed --install-headers /home/admin/.virtualenvs/dev.actualito.com/include/site/python2.7 failed with error code 1 in /home/admin/.virtualenvs/dev.actualito.com/build/lxml
Storing complete log in /home/admin/.pip/pip.log
|
create fake process in Python
| 16,173,056
| 3
| 2
| 1,984
| 0
|
python,linux
|
To run a process with the name mysoft,
Create a python with the name mysoft without .py extension.
Inside that file create a endless while loop or something like that, in a way that it runs long time. Or put a line like raw_input("enter something"). It will wait until you give the input.
Make the file executable by chmod 775 [filename]
First line of this file should be #!/usr/bin/python. Change this line according to your python path.
Put this file system path. Or add this file path to system path. (eg. /home/[user]/bin/)
Now, type mysoft. It will start.
You need to kill this manually when you want to terminate this process. Setting pid to a process is not possible to my knowledge.
| 0
| 1
| 0
| 0
|
2013-04-23T13:55:00.000
| 2
| 1.2
| true
| 16,171,245
| 0
| 0
| 0
| 2
|
I'm currently working on a stub for tests purpose. Using Python I need to create a process with a specific name ("mysoft") and a specific pid ("1234")
My final purpose is to be able to run the command "pgrep mysoft" on a terminal and get the PID I set (1234).
The process doesn't need to do anything, it just need to exists.
I looked at the subprocess module but I think this is not exactly what I need. What do you think ?
|
create fake process in Python
| 16,171,310
| 1
| 2
| 1,984
| 0
|
python,linux
|
You can't create processes with specific PIDs. The PID is assigned by the OS.
| 0
| 1
| 0
| 0
|
2013-04-23T13:55:00.000
| 2
| 0.099668
| false
| 16,171,245
| 0
| 0
| 0
| 2
|
I'm currently working on a stub for tests purpose. Using Python I need to create a process with a specific name ("mysoft") and a specific pid ("1234")
My final purpose is to be able to run the command "pgrep mysoft" on a terminal and get the PID I set (1234).
The process doesn't need to do anything, it just need to exists.
I looked at the subprocess module but I think this is not exactly what I need. What do you think ?
|
Running a python script persistently
| 16,173,008
| 1
| 0
| 572
| 0
|
python,linux,bash,service
|
I would start it using init and monitor at interval with a seperate script using crontab watching for a PID file it creates.
Alternatively, if you can find the PID ID using your crontab script (using ps) and re-init the script if it doesn't exist.
My 2 Cents..
| 0
| 1
| 0
| 0
|
2013-04-23T15:05:00.000
| 1
| 0.197375
| false
| 16,172,839
| 1
| 0
| 0
| 1
|
I have a script on my machine that I want to start running as the machine boots and will attempt run again should it crash or otherwise fail.
Would this mean turing it into a service? I realise I could use the crontab and use @reboot, but that doesn't fix the issue should the script crash
|
Determine process for outbound packets
| 16,189,674
| 1
| 1
| 65
| 0
|
python,windows,network-programming
|
Until you don't implement your own packet filter driver you can't do that just looking on a data stream captured via network card promiscuous mode.
| 0
| 1
| 0
| 0
|
2013-04-24T07:31:00.000
| 1
| 0.197375
| false
| 16,186,027
| 0
| 0
| 0
| 1
|
Is there a way to determine which process is sending a particular packet. I am capturing packets on Network Interface card and want to determine the process for each packet. I am working in python under Windows.
|
Differentiating logged-in users as admin and normal user in Google App Engine?
| 16,191,993
| 1
| 0
| 145
| 0
|
python,google-app-engine,google-cloud-datastore
|
Why is what you describe not possible? The object representing the logged-in user is an instance of google.appengine.api.users.User. That object has a user_id property. You can use that ID as a field in your own user model, to which you can add a field determining whether or not they are an admin.
| 0
| 1
| 0
| 0
|
2013-04-24T11:53:00.000
| 1
| 1.2
| true
| 16,191,318
| 0
| 0
| 1
| 1
|
I am developing an app in GAE. Application provides different view depending upon whether logged-in user is admin or normal user. I want to use 'Google Apps domain' as Authentication Type. So that all user of my domain can login into the application and use it.
Here, application can't differentiate a logged-in as admin or normal user. Somehow I should make an user as admin and as soon as that user logs in, application should use admin view for that user. Is there any way to tell application that a particular user is admin?
If we have our own USER table, we can mark any user as admin. Whenever a user logs into the app, app can consult USER table to check if user is admin or not? But in my scenario, it is not possible.
|
Why is my heavy python script pausing on windows? Can it be prevented?
| 16,208,557
| 0
| 0
| 108
| 0
|
python,windows,concurrent-programming
|
The reason was that each process used massive memory, and I tried to work it concurrently. It was over capacity. It was frequently swapping out, but it was hidden by SQLite access which was also working hard with my HDD.
I would like to thank Lennart, who notified me to check other params in my computer, and everybody who gave me guesses and hints, since I gave too less information about the issues occuring in front of me.
| 0
| 1
| 0
| 0
|
2013-04-25T01:23:00.000
| 1
| 0
| false
| 16,204,914
| 0
| 0
| 0
| 1
|
There is a python script I built called convert.py, which is a file converter (SQLite3 -> SQLite3). It takes about 30 minutes to finish, working on with heavy CPU and I/O.
I opened 30 CMD.EXE windows on my computer (Windows 7, CPU with 2 cores and hyper-threading), and started convert.py on each window. I let them work over night, so I expected that it will be all done until next morning ... but it didn't. Only half of them were done. The CPU monitor log told me that my computer was working 100% on it for 1 hour and suddenly it started to use only 25%. It seems that all CPU power wasn't used for the left tasks.
The left tasks resumed it work when I pressed Ctrl+C on it.
So, what is going on? Is this problem a python's problem, or windows' problem? Is there a way to let my computer work constantly 100% on my python script until all of them are done?
|
Adding extra properties to the User class in App Engine datastore?
| 16,215,227
| 2
| 0
| 395
| 0
|
python,google-app-engine,google-cloud-datastore,flask
|
As I explained in your other question, you need a separate class. User is not a model, and it is not stored in the datastore. It's simply a combination of the user_id and email that are obtained from Google's accounts system when you log in. If you want to store something about the user, you need to create your own model class, and use store user_id and/or email as fields which you compare against the logged-in user.
| 0
| 1
| 0
| 0
|
2013-04-25T12:28:00.000
| 1
| 1.2
| true
| 16,214,803
| 0
| 0
| 1
| 1
|
I am working on an App using Flask and App Engine, which requires extra information to be stored in User Object apart from nickname, email and user_id.
Is it possible to extend User class in datastore?
If not, is there is any workaround? I am planning to have my own User model. So, once user logs into the app(using google authentication), I would collect user info using users.get_current_user() function and also add some other extra fields I require. All these information will get stored in my own User model. Is it the right way to handle this situation?
|
Determining environment python runs on
| 16,220,212
| 0
| 2
| 61
| 0
|
python,windows
|
You can try one solution. You can call some powershell command as Write-Host (echo equivalent in cmd) from Python code and get call result. If it fails is not PowerShell. (I can not test it now).
| 0
| 1
| 0
| 0
|
2013-04-25T16:27:00.000
| 3
| 0
| false
| 16,220,046
| 1
| 0
| 0
| 1
|
I'm writing a python program that I want to run differently whether it runs on the windows command prompt or windows powershell. I was wondering if there was a way to determine the environment python runs on within the program.
Thanks in advance!
|
Python: next() is not recognized
| 16,225,009
| 1
| 2
| 2,002
| 0
|
python,next
|
though you could call ByteIter.next() in 2.6. This is not recommended however, as the method has been renamed in python 3 to next().
| 0
| 1
| 0
| 1
|
2013-04-25T21:18:00.000
| 3
| 0.066568
| false
| 16,224,901
| 1
| 0
| 0
| 1
|
When I do next(ByteIter, '')<<8 in python, I got a name error saying
"global name 'next' is not defined"
I'm guessing this function is not recognized because of python version? My version is 2.5.
|
Authenticate a server versus an AppEngine application
| 16,270,248
| 1
| 0
| 77
| 0
|
python,google-app-engine,authentication,google-cloud-endpoints
|
That is exactly what you need to do. On the server, generate a key (you choose the length), and store it in the datastore. When the other server makes a request, use HTTPS and include the key. Its like an API key (it is actually).
| 0
| 1
| 0
| 0
|
2013-04-26T13:30:00.000
| 1
| 1.2
| true
| 16,237,742
| 0
| 0
| 1
| 1
|
I cannot see how I could authenticate a server with vs GAE.
Let's say I have an application on GAE which have some data and I somehow need this data on another server.
It is easy to enable OAuth authentication on GAE but here I cannt use this since there is no "account" binded to my server.
Plus GAE doesn't support client certificate.
I could generate a token for each server that needs to access the GAE Application, and transfe them on the server. It would then use it to access the GAE Application by adding it in the URL (using HTTPS)...
Any other idea?
|
Run background jobs with elastic beanstalk
| 16,341,391
| 5
| 6
| 2,006
| 0
|
python,amazon-web-services,config,web-worker,amazon-elastic-beanstalk
|
fixed it, just needed to write this command instead:
command: "nohup ./workers.py > foo.out 2> foo.err < /dev/null &"
| 0
| 1
| 0
| 0
|
2013-04-28T09:20:00.000
| 1
| 1.2
| true
| 16,261,413
| 0
| 0
| 1
| 1
|
I am trying to start a background job in elastic beanstalk, the background job has an infinite loop so it never returns a response and so I receive this error:" Some instances have not responded to commands.Responses were not received from [i-ba5fb2f7]."
I am starting the background job in the elastic beanstalk .config file like this:
06_start_workers:
command: "./workers.py &"
Is there any way to do this? I don't want elastic beanstalk to wait for a return value of that process ..
|
GAE: planning for exportability and relational databases
| 16,268,751
| 1
| 0
| 48
| 1
|
google-app-engine,python-2.7,google-cloud-datastore
|
GAE's datastore just doesn't export well to SQL. There's often situations where data needs to be modeled very differently on GAE to support certain queries, ie many-to-many relationships. Denormalizing is also the right way to support some queries on GAE's datastore. Ancestor relationships are something that don't exist in the SQL world.
In order to import export data, you'll need to write scripts specific to your data models.
If you're planning for compatibility with SQL, use CloudSQL instead of the datastore.
In terms of moving data between dev/production, you've already identified the ways to do it. There's no real "easy" way.
| 0
| 1
| 0
| 0
|
2013-04-28T19:40:00.000
| 1
| 1.2
| true
| 16,266,979
| 0
| 0
| 1
| 1
|
I'm building a web app in GAE that needs to make use of some simple relationships between the datastore entities. Additionally, I want to do what I can from the outset to make import and exportability easier, and to reduce development time to migrate the application to another platform.
I can see two possible ways of handling relationships between entities in the datastore:
Including the key (or ID) of the related entity as a field in the entity
OR
Creating a unique identifier as an application-defined field of an entity to allow other entities to refer to it
The latter is less integrated with GAE, and requires some kind of mechanism to ensure the unique identifier is in fact unique (which in turn will rely on ancestor queries).
However, the latter may make data portability easier. For example, if entities are created on a local machine they can be uploaded (provided the unique identifier is unique) without problem. By contrast, relying on the GAE defined ID will not work as the ID will not be consistent from the development to the deployed environment.
There may be data exportability considerations too that mean an application-defined unique identifier is preferable.
What is the best way of doing this?
|
Receive an unknown number of UDP messages
| 16,399,916
| 0
| 0
| 273
| 0
|
python,python-2.7,network-programming,udp,sliding-window
|
You could have a message loop continuously listening and processing received packets and putting them on a queue then read them at your leisure...
However you would need to implement you own ACKs taking into account the possibilities of lost and duplicates (if your application is concerned about them).. Which begs the question - why not use TCP?
| 0
| 1
| 0
| 0
|
2013-04-30T06:29:00.000
| 2
| 0
| false
| 16,293,597
| 0
| 0
| 0
| 1
|
Let's say a source A is sending me an unknown number of messages using UDP. How can I intercept all those messages? This is the complete scenario:
Send 7 messages
Wait for their ACKs
Process ACKs
Send another batch
Repeat...
Problems: (1) I don't know how many messages arrive, some may get lost and some are repeated, and (2) I might be be doing something else later, so I cannot wait forever.
|
Simulate KeyboardInterrupt with fabric
| 16,337,848
| 2
| 2
| 414
| 0
|
python,bash,fabric
|
ctrl+c generates a SIGINT signal.
You can send a signal with kill -SIGINT pid where pid is the process id. you wish to signal. kill is a Bash built-in.
| 0
| 1
| 0
| 1
|
2013-05-02T11:28:00.000
| 1
| 1.2
| true
| 16,336,919
| 0
| 0
| 0
| 1
|
How do I fire a Ctrl+C with fabric, in other words is it possible to trigger KeyboardInterrupt manually via bash?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.