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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Getting logging.debug() to work on Google App Engine/Python | 17,550,812 | 8 | 25 | 7,359 | 0 | python,debugging,google-app-engine | In case someone is using the Windows Google Application Launcher. The argument for debug can be set under Edit > Application Settings
In the Extra Command Line Flags, add --log_level=debug | 0 | 1 | 0 | 0 | 2010-06-06T03:01:00.000 | 4 | 1 | false | 2,982,959 | 0 | 0 | 1 | 2 | I'm just getting started on building a Python app for Google App Engine. In the localhost environment (on a Mac)
I'm trying to send debug info to the GoogleAppEngineLauncher Log Console via logging.debug(), but it isn't showing up. However, anything sent through, say, logging.info() or logging.error() does show up. ... |
Getting logging.debug() to work on Google App Engine/Python | 27,547,085 | 1 | 25 | 7,359 | 0 | python,debugging,google-app-engine | On a Mac:
1) click Edit > Application Settings
2) then copy and paste the following line into the "Extra Flags:" field
--log_level=debug
3) click Update
your debug logs will now show up in the Log Console | 0 | 1 | 0 | 0 | 2010-06-06T03:01:00.000 | 4 | 0.049958 | false | 2,982,959 | 0 | 0 | 1 | 2 | I'm just getting started on building a Python app for Google App Engine. In the localhost environment (on a Mac)
I'm trying to send debug info to the GoogleAppEngineLauncher Log Console via logging.debug(), but it isn't showing up. However, anything sent through, say, logging.info() or logging.error() does show up. ... |
Which os is better for development : Debian or Ubuntu? | 2,985,450 | 4 | 10 | 20,812 | 0 | java,python,ubuntu,debian,operating-system | Both use Debian packages and Ubuntu is based on Debian but is more user friendly. Everything yo can do on one you can do on the other. I'd recommend Ubuntu if your new to linux on a Desktop. Though when it comes to servers I'd recommend Debian as it has less stuff "taken out" basically. | 0 | 1 | 0 | 1 | 2010-06-06T18:44:00.000 | 6 | 0.132549 | false | 2,985,426 | 0 | 0 | 0 | 5 | Are there any real differences between them?
I want to program in java and python. And of corse be a normal user: internet, etc
Which one will give me less headaches/more satisfaction ?
And which is better for a server machine ?
Thank you |
Which os is better for development : Debian or Ubuntu? | 2,985,456 | 1 | 10 | 20,812 | 0 | java,python,ubuntu,debian,operating-system | In Ubuntu it is a bit easier to install packages for Java development, but it doesn't really matter that much. Remember that Ubuntu is based on Debian, so it works the same. Ubuntu just adds more user-friendly GUI's. | 0 | 1 | 0 | 1 | 2010-06-06T18:44:00.000 | 6 | 0.033321 | false | 2,985,426 | 0 | 0 | 0 | 5 | Are there any real differences between them?
I want to program in java and python. And of corse be a normal user: internet, etc
Which one will give me less headaches/more satisfaction ?
And which is better for a server machine ?
Thank you |
Which os is better for development : Debian or Ubuntu? | 2,985,463 | 2 | 10 | 20,812 | 0 | java,python,ubuntu,debian,operating-system | Ubuntu is the more user-friendly of the two (I think Ubuntu is actually one of the most newbie-friendly Linux distros), so if you are new to Linux, Ubuntu is the way to go. Otherwise, the packages are mostly the same except for branding, so it's pretty much your choice. | 0 | 1 | 0 | 1 | 2010-06-06T18:44:00.000 | 6 | 0.066568 | false | 2,985,426 | 0 | 0 | 0 | 5 | Are there any real differences between them?
I want to program in java and python. And of corse be a normal user: internet, etc
Which one will give me less headaches/more satisfaction ?
And which is better for a server machine ?
Thank you |
Which os is better for development : Debian or Ubuntu? | 2,985,472 | 1 | 10 | 20,812 | 0 | java,python,ubuntu,debian,operating-system | Neither is better. They both support the same tools and libraries. They are both linux. Anything and everything you can do on one you can do on the other. | 0 | 1 | 0 | 1 | 2010-06-06T18:44:00.000 | 6 | 0.033321 | false | 2,985,426 | 0 | 0 | 0 | 5 | Are there any real differences between them?
I want to program in java and python. And of corse be a normal user: internet, etc
Which one will give me less headaches/more satisfaction ?
And which is better for a server machine ?
Thank you |
Which os is better for development : Debian or Ubuntu? | 2,985,442 | 2 | 10 | 20,812 | 0 | java,python,ubuntu,debian,operating-system | java and python would most likely run the same on both.
With Ubuntu you get additional space of support and active community, and perhaps larger user base.
So if and when you face a particular problem, chances are with Ubuntu, the solution will appear faster.
(although, whatever works on this should work on the other... | 0 | 1 | 0 | 1 | 2010-06-06T18:44:00.000 | 6 | 0.066568 | false | 2,985,426 | 0 | 0 | 0 | 5 | Are there any real differences between them?
I want to program in java and python. And of corse be a normal user: internet, etc
Which one will give me less headaches/more satisfaction ?
And which is better for a server machine ?
Thank you |
Best practice for installing python modules from an arbitrary VCS repository | 2,986,445 | 1 | 5 | 1,655 | 0 | python,version-control,module,easy-install | Packages installed by easy_install tend to come from snapshots of the developer's version control, generally made when the developer releases an official version. You're therefore going to have to choose between convenient automatic downloads via easy_install and up-to-the-minute code updates via version control. If ... | 0 | 1 | 0 | 1 | 2010-06-06T23:32:00.000 | 4 | 0.049958 | false | 2,986,357 | 1 | 0 | 0 | 1 | I'm newish to the python ecosystem, and have a question about module editing.
I use a bunch of third-party modules, distributed on PyPi. Coming from a C and Java background, I love the ease of easy_install <whatever>. This is a new, wonderful world, but the model breaks down when I want to edit the newly installed m... |
what should i do after openid (or twitter ,facebook) user login my site ,on gae | 2,988,807 | 1 | 0 | 264 | 0 | python,google-app-engine,openid,integration | I understand your question.
You wish to be able to maintain a list of users that have signed up with your service, and also want to record users using OpenID to authenticate.
In order to solve this I would do either of the following:
Create a new user in your users table for each new user logged in under OpenID, and s... | 0 | 1 | 0 | 0 | 2010-06-07T02:24:00.000 | 1 | 0.197375 | false | 2,986,766 | 0 | 0 | 1 | 1 | how to integration local user and openid(or facebook twitter) user ,
did you know some framework have already done this ,
updated
my mean is : how to deal with 'local user' and 'openid user',
and how to mix them in one model .
please give me a framework that realize 'local user' and 'openid user' |
How to obtain ports that a process in listening on? | 42,511,544 | 0 | 23 | 21,117 | 0 | python,linux,sockets,port | One thing that wasn't mentioned. Most port applications in python take a command line argument. You can parse /proc/pid/cmdline and parse out the port number. This avoids the large overhead of using ss or netstat on servers with a ton of connections. | 0 | 1 | 0 | 1 | 2010-06-07T05:04:00.000 | 5 | 0 | false | 2,987,168 | 0 | 0 | 0 | 3 | How do I get the ports that a process is listening on using python? The pid of the process is known. |
How to obtain ports that a process in listening on? | 2,987,231 | 1 | 23 | 21,117 | 0 | python,linux,sockets,port | You can use netstat -lnp, last column will contain pid and process name. In Python you can parse output of this command. | 0 | 1 | 0 | 1 | 2010-06-07T05:04:00.000 | 5 | 0.039979 | false | 2,987,168 | 0 | 0 | 0 | 3 | How do I get the ports that a process is listening on using python? The pid of the process is known. |
How to obtain ports that a process in listening on? | 2,987,379 | 4 | 23 | 21,117 | 0 | python,linux,sockets,port | If you don't want to parse the output of a program like netstat or lsof, you can grovel through the /proc filesystem and try to find documentation on the files within. /proc/<pid>/net/tcp might be especially interesting to you. Of course, the format of those files might change between kernel releases, so parsing comm... | 0 | 1 | 0 | 1 | 2010-06-07T05:04:00.000 | 5 | 0.158649 | false | 2,987,168 | 0 | 0 | 0 | 3 | How do I get the ports that a process is listening on using python? The pid of the process is known. |
File copy completion? | 2,989,433 | 1 | 0 | 995 | 0 | python,file-io | In Linux, you can open a file while another process is writing to it without Python throwing an OSError, so in general, you cannot know for sure whether the other side has finished writing into that file. You can try some hacks, though:
You can check the file size regularly to see whether it increased since the last c... | 0 | 1 | 0 | 0 | 2010-06-07T12:23:00.000 | 2 | 0.099668 | false | 2,989,388 | 0 | 0 | 0 | 1 | In Linux, how can we know if a file has completed copying before reading it? In Windows, an OSError is raised. |
Python-based password tracker (or dictionary) | 2,992,104 | 0 | 1 | 313 | 0 | python,encryption,passwords | On first i think you can change passwords on md5 of this passwords..
it will give more safety. | 0 | 1 | 0 | 0 | 2010-06-07T18:22:00.000 | 4 | 0 | false | 2,992,057 | 0 | 0 | 0 | 1 | Where we work we need to remember about 10 long passwords which need to change every so often. I would like to create a utility which can potentially save these passwords in an encrypted file so that we can keep track of them.
I can think of some sort of dictionary passwd = {'host1':'pass1', 'host2':'pass2'}, etc, but ... |
Display constantly updating information in-place in command-line window using python? | 2,993,839 | 3 | 1 | 638 | 0 | python,command-line | Outputting \b will move the output cursor left 1 cell, and outputting \r will return it to column 0. Make sure to flush the output often though. | 0 | 1 | 0 | 0 | 2010-06-07T23:09:00.000 | 2 | 1.2 | true | 2,993,805 | 1 | 0 | 0 | 1 | I am essentially building a timer. I have a python script that monitors for an event and then prints out the seconds that have elapsed since that event.
Instead of an ugly stream of numbers printed to the command line, I would like to display only the current elapsed time "in-place"-- so that only one number is visibl... |
OS-independent Inter-program communication between Python and C | 60,171,476 | 0 | 6 | 3,514 | 0 | python,c,networking,network-protocols,inter-process-communicat | if both applications running on same computer, use socket and serialize your objects to jsun. otherwise, use web service and jsun or xml. You can find jsun and xml parser in both languages. | 0 | 1 | 0 | 0 | 2010-06-08T22:36:00.000 | 6 | 0 | false | 3,001,827 | 0 | 0 | 0 | 2 | I have very little idea what I'm doing here, I've never done anything like this before, but a friend and I are writing competing chess programs and they need to be able to communicate to each other.
He'll be writing mainly in C, the bulk of mine will be in Python, and I can see a few options:
Alternately write to a te... |
OS-independent Inter-program communication between Python and C | 3,099,077 | 0 | 6 | 3,514 | 0 | python,c,networking,network-protocols,inter-process-communicat | Sockets with a client/server model...
Basically, you and your friend are creating different implementations of the client.
The local client shows a visual representation of the game and stores the state of the pieces (position, killed/not-killed) and the rules about what the pieces can/can't do (which moves can be made... | 0 | 1 | 0 | 0 | 2010-06-08T22:36:00.000 | 6 | 0 | false | 3,001,827 | 0 | 0 | 0 | 2 | I have very little idea what I'm doing here, I've never done anything like this before, but a friend and I are writing competing chess programs and they need to be able to communicate to each other.
He'll be writing mainly in C, the bulk of mine will be in Python, and I can see a few options:
Alternately write to a te... |
Fetching a random record from the Google App Engine Datastore? | 3,003,170 | 23 | 21 | 5,002 | 0 | python,google-app-engine,google-cloud-datastore | Assign each entity a random number and store it in the entity. Then query for ten records whose random number is greater than (or less than) some other random number.
This isn't totally random, however, since entities with nearby random numbers will tend to show up together. If you want to beat this, do ten queries bas... | 0 | 1 | 0 | 0 | 2010-06-09T03:55:00.000 | 2 | 1.2 | true | 3,002,999 | 0 | 0 | 1 | 1 | I have a datastore with around 1,000,000 entities in a model. I want to fetch 10 random entities from this.
I am not sure how to do this? can someone help? |
How to detect non-graceful disconnect of Twisted on Linux? | 3,011,987 | 1 | 4 | 1,538 | 0 | python,networking,twisted | Seconding what Jean-Paul said, if you need more fine grained TCP connection management, just use reactor.CallLater. We have exactly that implementation on a Twisted/wxPython trading platform, and it works a treat. You might also want to tweak the behaviour of the ReconnectingClientFactory in order to achieve the result... | 0 | 1 | 0 | 0 | 2010-06-09T06:12:00.000 | 2 | 0.099668 | false | 3,003,450 | 0 | 0 | 0 | 1 | I wrote a server based on Twisted, and I encountered a problem, some of the clients are disconnected not gracefully. For example, the user pulls out the network cable.
For a while, the client on Windows is disconnected (the connectionLost is called, and it is also written in Twisted). And on the Linux server side, my c... |
Which display manager for a non interactive Python app and mplayer? | 9,260,878 | 0 | 2 | 1,163 | 0 | python,linux,embedded-linux,xorg | I realize this is an old question, but I use openbox on my system, I have created a custom config file that disables all mouse keyboard shortcuts, and removes borders etc on the applications.
In the openbox config i even created some secret shortcuts that can run fx. an xterm for debugging live on the box.
The openbox ... | 0 | 1 | 0 | 0 | 2010-06-09T20:22:00.000 | 5 | 0 | false | 3,009,634 | 0 | 0 | 0 | 3 | I am developing an application that will run on Linux to run fullscreen all the time (no menus or trays or anything will be visible).
The application is going to be developed in Python, not that that matters as far as the window manager, but what I am having a hard time with is choosing a window manager.
I need somethi... |
Which display manager for a non interactive Python app and mplayer? | 3,012,123 | 1 | 2 | 1,163 | 0 | python,linux,embedded-linux,xorg | I am doing something similar on my "set-top box" and I don't use any window manager.
It boots debian, and from inittab I auto-login the user that runs the display. That user's .profile starts X, which runs .xinitrc, which starts my python app that runs as a network server in front of mplayer (running mplayer in -slave ... | 0 | 1 | 0 | 0 | 2010-06-09T20:22:00.000 | 5 | 0.039979 | false | 3,009,634 | 0 | 0 | 0 | 3 | I am developing an application that will run on Linux to run fullscreen all the time (no menus or trays or anything will be visible).
The application is going to be developed in Python, not that that matters as far as the window manager, but what I am having a hard time with is choosing a window manager.
I need somethi... |
Which display manager for a non interactive Python app and mplayer? | 3,009,693 | 1 | 2 | 1,163 | 0 | python,linux,embedded-linux,xorg | You probably meant window manager. Display manages are KDM, GDM and the like. Windoe managers, to name, GNOME, Xfce, KDE, ratpoison, fvwm, twm, blackbox are a few. ratpoison gives full screen to the application that is in the foreground but demands heavy keyboard interaction (hence the name ratpoison) and no mouse i... | 0 | 1 | 0 | 0 | 2010-06-09T20:22:00.000 | 5 | 0.039979 | false | 3,009,634 | 0 | 0 | 0 | 3 | I am developing an application that will run on Linux to run fullscreen all the time (no menus or trays or anything will be visible).
The application is going to be developed in Python, not that that matters as far as the window manager, but what I am having a hard time with is choosing a window manager.
I need somethi... |
IDLE wont start Python 2.6.5 | 3,011,669 | 0 | 0 | 625 | 0 | python,python-idle | Honestly I would advise you to stop using IDLE, the fact that it runs program code in the same process as itself caused me a lot of problems when I used it, including things like not refreshing imported modules that were modified. Personally I switched to emacs, but you might like to try something like Notepad++. | 0 | 1 | 0 | 0 | 2010-06-09T21:19:00.000 | 1 | 1.2 | true | 3,010,030 | 1 | 0 | 0 | 1 | I was using it as my primary text editor for quite sometime. However, one day it just stopped working. This had happened to me several times before, so I simply tried to end all procceses using windows task manager. However that didn't work. I've recently tried getting it to work again. Whenever I try to reopen it it i... |
How to calculate network usage with Python on Windows 7? | 3,010,921 | 2 | 1 | 2,541 | 0 | python,networking | What you want technically isn't a problem of the language you're using - how much data is being transferred on your network interfaces is something you need to get from your operating system or network device driver. The way that you acquire these statistics will vary based on the OS, so that's what you need to nail d... | 0 | 1 | 0 | 0 | 2010-06-09T23:18:00.000 | 3 | 1.2 | true | 3,010,674 | 0 | 0 | 0 | 1 | How would I go about writing a python script that shows how much bandwidth is being used and how much data is being transferred on a Windows 7 machine? |
how to make a chat room on gae ,has any audio python-framework to do this? | 3,020,384 | 0 | 0 | 749 | 0 | python,google-app-engine,audio,chat | You'll need two things:
A browser plugin to get audio. You could build this on top of eg. http://code.google.com/p/libjingle/'>libjingle which has the advantage of being cross-platform and allowing P2P communication, not to mention being able to talk to arbitrary other XMPP endoints. Or you could use Flash to grab the ... | 0 | 1 | 0 | 0 | 2010-06-10T08:07:00.000 | 4 | 0 | false | 3,012,661 | 0 | 0 | 1 | 3 | i want to make a chat room on gae ,(audio chat)
has any framework to do this ?
thanks |
how to make a chat room on gae ,has any audio python-framework to do this? | 3,080,160 | 1 | 0 | 749 | 0 | python,google-app-engine,audio,chat | Try Adobe Stratus (it works with p2p connections) and you could use Google App Engine only for exchanging peer ids. | 0 | 1 | 0 | 0 | 2010-06-10T08:07:00.000 | 4 | 0.049958 | false | 3,012,661 | 0 | 0 | 1 | 3 | i want to make a chat room on gae ,(audio chat)
has any framework to do this ?
thanks |
how to make a chat room on gae ,has any audio python-framework to do this? | 3,013,054 | 1 | 0 | 749 | 0 | python,google-app-engine,audio,chat | App Engine doesn't directly support audio chat of any sort, and since it's based around a request-response system with (primarily) HTTP requests, you can't implement it yourself. | 0 | 1 | 0 | 0 | 2010-06-10T08:07:00.000 | 4 | 1.2 | true | 3,012,661 | 0 | 0 | 1 | 3 | i want to make a chat room on gae ,(audio chat)
has any framework to do this ?
thanks |
How can I build a wrapper to wait for listening on a port? | 3,019,494 | 0 | 0 | 838 | 0 | python,testing,sockets,wrapper | Another option is to mock the socket module before importing the asyncore module. Of course, then you have to make sure that the mock works properly first. | 0 | 1 | 1 | 1 | 2010-06-10T13:19:00.000 | 2 | 0 | false | 3,014,686 | 0 | 0 | 0 | 1 | I am looking for a way of programmatically testing a script written with the asyncore Python module. My test consists of launching the script in question -- if a TCP listen socket is opened, the test passes. Otherwise, if the script dies before getting to that point, the test fails.
The purpose of this is knowing if a ... |
exec: 23: python: not found error? | 3,019,817 | 0 | 2 | 3,027 | 0 | python,android | You should check your python instalation as the repo command is an python script made by Google to interact with git repositories.
If you do have python installed it is possible that it is not in your shell path or you are using a diferent version than required by repo, ie. you have version 3 while repo requires versio... | 0 | 1 | 0 | 1 | 2010-06-11T01:59:00.000 | 1 | 0 | false | 3,019,742 | 0 | 0 | 0 | 1 | im trying to build android from source on ubuntu 10.04. when i enter the repo command:
repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
it get this error back
exec: 23: python: not found
any ideas. |
how to make a python or perl script portable to both linux and windows? | 3,020,285 | 2 | 11 | 5,770 | 0 | python,perl,scripting,cross-platform,shebang | The shebang line will be interpreted as a comment by Perl or Python. The only thing that assigns it a special meaning is the UNIX/Linux shell; it gets ignored on Windows. The way Windows knows which interpreter to use to run the file is through the file associations in the registry, a different mechanism altogether. | 0 | 1 | 0 | 0 | 2010-06-11T04:53:00.000 | 4 | 0.099668 | false | 3,020,267 | 0 | 0 | 0 | 2 | I was wondering how to make a python script portable to both linux and windows?
One problem I see is shebang. How to write the shebang so that the script can be run on both windows and linux?
Are there other problems besides shebang that I should know?
Is the solution same for perl script?
Thanks and regards! |
how to make a python or perl script portable to both linux and windows? | 3,020,286 | 14 | 11 | 5,770 | 0 | python,perl,scripting,cross-platform,shebang | Windows will just ignore the shebang (which is, after all, a comment); in Windows you need to associate the .py extension to the Python executable in the registry, but you can perfectly well leave the shebang on, it will be perfectly innocuous there.
There are many bits and pieces which are platform-specific (many only... | 0 | 1 | 0 | 0 | 2010-06-11T04:53:00.000 | 4 | 1.2 | true | 3,020,267 | 0 | 0 | 0 | 2 | I was wondering how to make a python script portable to both linux and windows?
One problem I see is shebang. How to write the shebang so that the script can be run on both windows and linux?
Are there other problems besides shebang that I should know?
Is the solution same for perl script?
Thanks and regards! |
Help me sort programming languages a bit | 3,021,757 | 1 | 3 | 333 | 0 | python,c,ruby,programming-languages | If I assume this is your central question:
Where is the line between language functions and system API?
Then imagine if you will this analogy:
OS API system calls are like lego bricks and lego components.
Programming 'functions' are merely an arrangement of many lego bricks. Such that the combination results in a too... | 0 | 1 | 0 | 0 | 2010-06-11T09:26:00.000 | 6 | 0.033321 | false | 3,021,652 | 0 | 0 | 0 | 5 | so I asked here few days ago about C# and its principles. Now, if I may, I have some additional general questions about some languages, because for novice like me, it seems a bit confusing. To be exact I want to ask more about language functions capabilities than syntax and so.
To be honest, its just these special func... |
Help me sort programming languages a bit | 3,021,731 | 1 | 3 | 333 | 0 | python,c,ruby,programming-languages | So.
For your first question, the interface between the C API and the OS API is the C runtime. On Windows this is some incarnation of MSVCRT.DLL, whereas on Linux this is glibc.
For the second, the native language for most GUI toolkits is either C or C++. Higher-level languages seeking to use them require bindings which... | 0 | 1 | 0 | 0 | 2010-06-11T09:26:00.000 | 6 | 0.033321 | false | 3,021,652 | 0 | 0 | 0 | 5 | so I asked here few days ago about C# and its principles. Now, if I may, I have some additional general questions about some languages, because for novice like me, it seems a bit confusing. To be exact I want to ask more about language functions capabilities than syntax and so.
To be honest, its just these special func... |
Help me sort programming languages a bit | 3,021,849 | 2 | 3 | 333 | 0 | python,c,ruby,programming-languages | At the bottom you have the OS kernel itself - code that runs in a special CPU mode that allows direct access to otherwise protected resources. You will never have to deal with this unless you're an OS developer.
Then comes a do-not-cross line seperating this "kernel space" from "user space". Everything you do as "norma... | 0 | 1 | 0 | 0 | 2010-06-11T09:26:00.000 | 6 | 1.2 | true | 3,021,652 | 0 | 0 | 0 | 5 | so I asked here few days ago about C# and its principles. Now, if I may, I have some additional general questions about some languages, because for novice like me, it seems a bit confusing. To be exact I want to ask more about language functions capabilities than syntax and so.
To be honest, its just these special func... |
Help me sort programming languages a bit | 3,021,738 | 2 | 3 | 333 | 0 | python,c,ruby,programming-languages | C is portable. That means that on different systems the assembler output for printf will be different... this is something the compiler does based on what your target system is. Write C code and compile as a Linux app and the output will be different than as a Win32 app, and also different than if you compile the exact... | 0 | 1 | 0 | 0 | 2010-06-11T09:26:00.000 | 6 | 0.066568 | false | 3,021,652 | 0 | 0 | 0 | 5 | so I asked here few days ago about C# and its principles. Now, if I may, I have some additional general questions about some languages, because for novice like me, it seems a bit confusing. To be exact I want to ask more about language functions capabilities than syntax and so.
To be honest, its just these special func... |
Help me sort programming languages a bit | 3,021,872 | 0 | 3 | 333 | 0 | python,c,ruby,programming-languages | C's printf() is a wrapper. You can use it and compile your code under any OS, but the resulting machine code will be different. In Windows, it might call some function inside the Windows API. In Linux, it will use the Linux API. You ask why is the Windows API distinguished. That's because, if you're programming for Win... | 0 | 1 | 0 | 0 | 2010-06-11T09:26:00.000 | 6 | 0 | false | 3,021,652 | 0 | 0 | 0 | 5 | so I asked here few days ago about C# and its principles. Now, if I may, I have some additional general questions about some languages, because for novice like me, it seems a bit confusing. To be exact I want to ask more about language functions capabilities than syntax and so.
To be honest, its just these special func... |
Google App Engine - update_indexes error | 3,025,435 | 1 | 1 | 221 | 0 | java,python,google-app-engine,google-cloud-datastore | I followed what was suggested in the error logs and that worked for me:
Empty the index.yaml file (create a backup first)
Run vacuum_indexes again
Look at your app's admin console and don't go to the next step till all your indexes are deleted.
Specify the indexes you want to be created in index.yaml
Run update_indexe... | 0 | 1 | 0 | 0 | 2010-06-11T16:55:00.000 | 1 | 0.197375 | false | 3,024,663 | 0 | 0 | 1 | 1 | I have a Java app deployed on app engine and I use appcfg.py of the
Python SDK to vacuum and update my indexes.
Yesterday I first ran vacuum_indexes and that completed successfully -
i.e. it en-queued tasks to delete my existing indexes.
The next step was probably a mistake on my part - I then ran
update_indexes even t... |
Where is the Google App Engine SDK path on OSX? | 3,030,645 | 60 | 31 | 17,766 | 0 | python,eclipse,google-app-engine,pydev | /usr/local/google_appengine - that's a symlink that links to the SDK. | 0 | 1 | 0 | 0 | 2010-06-13T00:14:00.000 | 3 | 1.2 | true | 3,030,585 | 0 | 0 | 1 | 2 | I need to know for creating a Pydev Google App Engine Project in Eclipse. |
Where is the Google App Engine SDK path on OSX? | 5,189,889 | 28 | 31 | 17,766 | 0 | python,eclipse,google-app-engine,pydev | /Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine | 0 | 1 | 0 | 0 | 2010-06-13T00:14:00.000 | 3 | 1 | false | 3,030,585 | 0 | 0 | 1 | 2 | I need to know for creating a Pydev Google App Engine Project in Eclipse. |
is there any way to enforce the 30 seconds limit on local appengine dev server? | 3,031,594 | 1 | 3 | 138 | 0 | python,django,google-app-engine | It's possible, as Alex demonstrates, but it's not really a good idea: The performance characteristics of the development server are not the same as those of the production environment, so something that executes quickly locally may not be nearly as quick in production, and vice versa.
Also, your user facing tasks shoul... | 0 | 1 | 0 | 0 | 2010-06-13T00:22:00.000 | 2 | 0.099668 | false | 3,030,593 | 0 | 0 | 1 | 1 | Hey, i was wondering if there is a way to enforce the 30 seconds limit that is being enforced online at the appengine production servers to the local dev server? its impossible to test if i reach the limit before going production.
maybe some django middlware? |
uWSGI with Cherokee: first steps | 5,033,390 | 1 | 2 | 2,309 | 0 | python,wsgi,cherokee,uwsgi | There seems to be an issue with the 'make' method of installation on the uwsgi docs. Use 'python uwsgiconfig.py --build' instead. That worked for me. Cherokee, Django running on Ubuntu 10.10. | 0 | 1 | 0 | 1 | 2010-06-13T03:16:00.000 | 3 | 0.066568 | false | 3,030,936 | 0 | 0 | 1 | 1 | Has anyone tried using uWSGI with Cherokee? Can you share your experiences and what documents you relied upon the most? I am trying to get started from the documentation on both (uWSGI and Cherokee) websites. Nothing works yet. I am using Ubuntu 10.04.
Edit: To clarify, Cherokee has been working fine. I am getting the... |
Detecting and interacting with long running process | 3,032,409 | 0 | 0 | 317 | 0 | python | Well here is an idea...
place a status somewhere else, that
can be polled/queried.
when the process starts, post the
'running' status.
have the script check here to see if the process is running.
I would also use a seperate place to
post control values. e.g. set a
value to the 'control set' and have
the process lo... | 0 | 1 | 0 | 0 | 2010-06-13T13:29:00.000 | 2 | 0 | false | 3,032,378 | 0 | 0 | 0 | 2 | I want a script to start and interact with a long running process. The process is started first time the script is executed, after that the script can be executed repeatedly, but will detect that the process is already running. The script should be able to interact with the process. I would like this to work on Unix an... |
Detecting and interacting with long running process | 3,032,536 | 2 | 0 | 317 | 0 | python | Sockets are easier to make portable between Windows and any other OS, so that's what I would recommend it over named pipes (that's why e.g. IDLE uses sockets rather than named pipes -- the latter require platform-dependent code on Windows, e.g. via ctypes [[or third-party win32all or cython &c]], while sockets just wor... | 0 | 1 | 0 | 0 | 2010-06-13T13:29:00.000 | 2 | 1.2 | true | 3,032,378 | 0 | 0 | 0 | 2 | I want a script to start and interact with a long running process. The process is started first time the script is executed, after that the script can be executed repeatedly, but will detect that the process is already running. The script should be able to interact with the process. I would like this to work on Unix an... |
Starting a separate process | 3,032,818 | 15 | 17 | 44,315 | 0 | python,multiprocessing | From the Python docs:
When a process exits, it attempts to
terminate all of its daemonic child
processes.
This is the expected behavior. | 0 | 1 | 0 | 0 | 2010-06-13T15:41:00.000 | 6 | 1.2 | true | 3,032,805 | 1 | 0 | 0 | 1 | I want a script to start a new process, such that the new process continues running after the initial script exits. I expected that I could use multiprocessing.Process to start a new process, and set daemon=True so that the main script may exit while the created process continues running.
But it seems that the second ... |
App Engine HTTP 500s | 3,033,229 | 2 | 1 | 829 | 0 | python,google-app-engine,http-error | I agree that the correlation between startup log messages and 500 errors is not necessarily causal. However, it could be and pocoa should take steps to ensure that his startup time is low and that time consuming tasks be deferred when possible.
One log entry and one 500 error does not mean much, but a few with time cor... | 0 | 1 | 0 | 0 | 2010-06-13T16:31:00.000 | 3 | 0.132549 | false | 3,033,009 | 0 | 0 | 1 | 1 | This request caused a new process to
be started for your application, and
thus caused your application code to
be loaded for the first time. This
request may thus take longer and use
more CPU than a typical request for
your application.
I've handled all the situations, also DeadlineExceededError too. But s... |
Storing task state between multiple django processes | 3,036,073 | 0 | 0 | 537 | 0 | python,django,transactions,multiprocessing,rabbitmq | This sounds brittle to me: You have a web app which posts to a queue and then inserts the initial state into the database. What happens if the consumer processes the message before the web app can commit the initial state?
What happens if the web app tries to insert the new state while the DB is locked by the consumer?... | 0 | 1 | 0 | 0 | 2010-06-14T09:09:00.000 | 2 | 0 | false | 3,036,049 | 0 | 0 | 1 | 2 | I am building a logging-bridge between rabbitmq messages and Django application to store background task state in the database for further investigation/review, also to make it possible to re-publish tasks via the Django admin interface.
I guess it's nothing fancy, just a standard Producer-Consumer pattern.
Web applic... |
Storing task state between multiple django processes | 3,036,410 | 0 | 0 | 537 | 0 | python,django,transactions,multiprocessing,rabbitmq | Web application publishes to message queue and inserts initial task state into the database
Do not do this.
Web application publishes to the queue. Done. Present results via template and finish the web transaction.
A consumer fetches from the queue and does things. For example, it might append to a log to the datab... | 0 | 1 | 0 | 0 | 2010-06-14T09:09:00.000 | 2 | 0 | false | 3,036,049 | 0 | 0 | 1 | 2 | I am building a logging-bridge between rabbitmq messages and Django application to store background task state in the database for further investigation/review, also to make it possible to re-publish tasks via the Django admin interface.
I guess it's nothing fancy, just a standard Producer-Consumer pattern.
Web applic... |
How to determine what user and group a Python script is running as? | 3,042,340 | 1 | 31 | 29,300 | 0 | python,unix,permissions | os.getgid() and os.getuid() can be useful. For other environment variables, look into os.getenv. For example, os.getenv('USER') on my Mac OS X returns the username. os.getenv('USERNAME') would return the username on Windows machines. | 0 | 1 | 0 | 1 | 2010-06-15T03:15:00.000 | 3 | 0.066568 | false | 3,042,304 | 0 | 0 | 0 | 1 | I have a CGI script that is getting an "IOError: [Errno 13] Permission denied" error in the stack trace in the web server's error log.
As part of debugging this problem, I'd like to add a little bit of code to the script to print the user and (especially) group that the script is running as, into the error log (presuma... |
How can I make the Eclipse Python debugger more reliable? | 5,732,993 | 2 | 4 | 1,295 | 0 | python,eclipse,debugging,pydev | There are known issues with Python 2.4 (so, if possible, get a newer version), still, if you're unable to get a newer version, at least use threadframe extension (http://pypi.python.org/pypi/threadframe). If None of that's possible, it's really expected that the debugger doesn't work as well as it could (as the debugge... | 0 | 1 | 0 | 0 | 2010-06-15T08:27:00.000 | 2 | 0.197375 | false | 3,043,597 | 1 | 0 | 0 | 2 | I've found that under some circumstances the Eclipse python debugger can be unreliable. For example, when stepping through a memory-hungry Python program I've found that after a certain point the debugger fails to respond. The entire process hangs with 100% cpu load.
I've heard (unconfirmed) reports from developers th... |
How can I make the Eclipse Python debugger more reliable? | 5,637,371 | 0 | 4 | 1,295 | 0 | python,eclipse,debugging,pydev | Not sure if its related, but I had a scenario where too many debug messages will cause my PC to become very slow. You can try go to Window -> Preferences -> Run/Debug -> Console... tick Limit console output, and reduce Console buffer size (mine is set to 40000). | 0 | 1 | 0 | 0 | 2010-06-15T08:27:00.000 | 2 | 0 | false | 3,043,597 | 1 | 0 | 0 | 2 | I've found that under some circumstances the Eclipse python debugger can be unreliable. For example, when stepping through a memory-hungry Python program I've found that after a certain point the debugger fails to respond. The entire process hangs with 100% cpu load.
I've heard (unconfirmed) reports from developers th... |
unattended install of binary python packages (modules) for windows | 3,542,501 | 0 | 11 | 4,548 | 0 | python,windows,setuptools | If you want scripted automation of installs on Windows, look into AutoIt. | 0 | 1 | 0 | 0 | 2010-06-15T10:36:00.000 | 4 | 0 | false | 3,044,359 | 1 | 0 | 0 | 1 | Is there no sane way to peform a scripted install of binary python packages for windows? Unfortunately it seems like several essential windows python packages like pywin32 and py2exe are only available as EXE's not MSI's (and as far as I know only the latter are scriptable). Easy_install/pip also seems no use since the... |
I suspect I have multiple version of Python 2.6 installed on Mac OS X 10.6.3; how do I set which one Terminal should launch? | 3,046,210 | 4 | 1 | 1,464 | 0 | python,macos,terminal | When you run python in a shell or command prompt it will execute the first executable file which is found in your PATH environment variable.
To find out what file is being executed use which python or where python. | 0 | 1 | 0 | 0 | 2010-06-15T14:37:00.000 | 3 | 0.26052 | false | 3,046,183 | 1 | 0 | 0 | 1 | When I enter in python in Terminal it loads up Python 2.6.2. However there are folders by the name of Python 2.6 in different places on my drive. I'm not sure if that's because Python 2.6 has been installed in different places or because Python just likes to have lots of folers in different places.
If there are multipl... |
On Ubuntu, how do you install a newer version of python and keep the older python version? | 3,050,521 | 10 | 8 | 11,229 | 0 | python,ubuntu,installation,gnu,configure | When you install from source, by default, the installation goes in /usr/local -- the executable in particular becomes /usr/local/bin/pythonX.Y with a symlink to it that's named /usr/local/python. Ubuntu's own installation is in /usr/ (e.g., /usr/bin/python), so the new installation won't overwrite it. Take care that t... | 0 | 1 | 0 | 0 | 2010-06-16T03:18:00.000 | 4 | 1.2 | true | 3,050,512 | 1 | 0 | 0 | 1 | Background:
I am using Ubuntu
The newer python version is not in the apt-get repository (or synaptic)
I plan on keeping the old version as the default python when you call "python" from the command line
I plan on calling the new python using pythonX.X (X.X is the new version).
Given the background, how do you install... |
Gathering mac addresses with Python | 3,056,396 | 1 | 0 | 1,429 | 0 | python,django,networking,mac-address | The easiest thing to do would be to run a tool that can achieve this and parse its output (e.g. nmap). Depending on your needs, you could run it periodically and keep a file with the mac addresses.
Looking at the leases file could work, assuming that all your machines are in there. If you want to actively look for mac... | 0 | 1 | 0 | 0 | 2010-06-16T19:00:00.000 | 2 | 1.2 | true | 3,056,324 | 1 | 0 | 0 | 2 | is there a good way to gather the mac addresses of machines on a local network using Python. If it helps I'm trying to execute this python script from the DHCP server for the network. I'm new to Python but would it be a bad idea to look at the DHCP leases file for this info? I'd like to use this inside a Django app ev... |
Gathering mac addresses with Python | 3,056,384 | 1 | 0 | 1,429 | 0 | python,django,networking,mac-address | Really a unix question (one will assume)
You can either look at the arp addresses registered "/sbin/arp -a" or a DHCP lease table. If you go the arp route you will on find addresses that your system has recently received/sent packets to, the DHCP lease table will give you the ability to see everything. Though if it's... | 0 | 1 | 0 | 0 | 2010-06-16T19:00:00.000 | 2 | 0.099668 | false | 3,056,324 | 1 | 0 | 0 | 2 | is there a good way to gather the mac addresses of machines on a local network using Python. If it helps I'm trying to execute this python script from the DHCP server for the network. I'm new to Python but would it be a bad idea to look at the DHCP leases file for this info? I'd like to use this inside a Django app ev... |
A daemon to call a function every 2 minutes with start and stop capablities | 3,057,550 | 4 | 1 | 549 | 0 | python,django | There are a number of ways to achieve this. Assuming the correct server resources I would write a python script that calls function xyz "outside" of your django directory (although importing the necessary stuff) that only runs if /var/run/django-stuff/my-daemon.run exists. Get cron to run this every two minutes.
Then, ... | 0 | 1 | 0 | 0 | 2010-06-16T22:03:00.000 | 3 | 0.26052 | false | 3,057,507 | 0 | 0 | 1 | 2 | I am working on a django web application.
A function 'xyx' (it updates a variable) needs to be called every 2 minutes.
I want one http request should start the daemon and keep calling xyz (every 2 minutes) until I send another http request to stop it.
Appreciate your ideas.
Thanks
Vishal Rana |
A daemon to call a function every 2 minutes with start and stop capablities | 3,057,553 | 2 | 1 | 549 | 0 | python,django | Probably a little hacked but you could try this:
Set up a crontab entry that runs a script every two minutes. This script will check for some sort of flag (file existence, contents of a file, etc.) on the disk to decide whether to run a given python module. The problem with this is it could take up to 1:59 to run the f... | 0 | 1 | 0 | 0 | 2010-06-16T22:03:00.000 | 3 | 0.132549 | false | 3,057,507 | 0 | 0 | 1 | 2 | I am working on a django web application.
A function 'xyx' (it updates a variable) needs to be called every 2 minutes.
I want one http request should start the daemon and keep calling xyz (every 2 minutes) until I send another http request to stop it.
Appreciate your ideas.
Thanks
Vishal Rana |
Python: disabling $HOME/.python-eggs? | 3,064,433 | 3 | 1 | 719 | 0 | python,egg | The best way to fix it is by creating a directory where it can write it's egg cache. You can specify the directory with the PYTHON_EGG_CACHE variable.
[edit]
And yes, you can convert your apps so they won't need an egg-cache. If you install the python packages with easy_install you can use easy_install -Z so it won't z... | 0 | 1 | 0 | 1 | 2010-06-17T18:19:00.000 | 1 | 1.2 | true | 3,064,405 | 0 | 0 | 0 | 1 | Is there an easy way to disable Python egg caching? We have the situation where a system account needs to run a python program which imports a module.
Since this is a non-login robot account, it does not have a home directory, and dies trying to create the directory /.python-eggs.
What's the best way to fix this? Can... |
Reboot windows machines at a certain time of day and automatically login with Python | 3,066,480 | 1 | 1 | 1,489 | 0 | python,login,restart,boot | I can't think of any way to do strictly what you want off the top of my head other than the registry, at least not without even more drastic measures. But doing this registry modification isn't a big deal; just change the autologon username/password and reboot the computer. To have the computer reboot when the user log... | 0 | 1 | 0 | 0 | 2010-06-18T00:05:00.000 | 3 | 1.2 | true | 3,066,438 | 1 | 0 | 0 | 2 | I know how to reboot machines remotely, so that's the easy part. However, the complexity of the issue is trying to setup the following. I'd like to control machines on a network for after-hours use such that when users logoff and go home, or shutdown their computers, whatever, python or some combination of python + win... |
Reboot windows machines at a certain time of day and automatically login with Python | 3,076,111 | 0 | 1 | 1,489 | 0 | python,login,restart,boot | Thanks for the responses. To be more clear on what I'm doing, I have a program that automatically starts on bootup, so getting logged in would be preferred. I'm coding a manager for a render-farm for work which will take all the machines that our guys use during the day and turn them into render servers at night (or wh... | 0 | 1 | 0 | 0 | 2010-06-18T00:05:00.000 | 3 | 0 | false | 3,066,438 | 1 | 0 | 0 | 2 | I know how to reboot machines remotely, so that's the easy part. However, the complexity of the issue is trying to setup the following. I'd like to control machines on a network for after-hours use such that when users logoff and go home, or shutdown their computers, whatever, python or some combination of python + win... |
django on appengine | 13,855,137 | 0 | 1 | 253 | 0 | python,django,google-app-engine | Appengine comes with built in Django, if you look under your (google_appengine/lib/django_1_3) lib dir you will see a few versions. You can define what version you want to be used in your app.yaml
It isn't a full release of Django and if you do want to have full admin functionality of Django you might have to use some... | 0 | 1 | 0 | 0 | 2010-06-18T05:48:00.000 | 3 | 0 | false | 3,067,452 | 0 | 0 | 1 | 1 | I am impressed with django.Am am currenty a java developer.I want to make some cool websites for myself but i want to host it in some third pary environmet.
Now the question is can i host the django application on appengine?If yes , how??
Are there any site built using django which are already hosted on appengine? |
Need a way to determine if a file is done being written to | 3,073,958 | 1 | 8 | 8,480 | 0 | python,windows,linux,pdf,file-io | I ended up resolving it for our situation. As it turns out the process that was writing the files out had them opened exclusively so all we had to do was try opening them for read access - when denied they were in use. | 0 | 1 | 1 | 0 | 2010-06-18T13:59:00.000 | 2 | 1.2 | true | 3,070,210 | 0 | 0 | 0 | 2 | The situation I'm in is this - there's a process that's writing to a file, sometimes the file is rather large say 400 - 500MB. I need to know when it's done writing. How can I determine this? If I look in the directory I'll see it there but it might not be done being written. Plus this needs to be done remotely - as... |
Need a way to determine if a file is done being written to | 3,070,749 | 8 | 8 | 8,480 | 0 | python,windows,linux,pdf,file-io | There are probably many approaches you can take. I would try to open the file with write access. If that succeeds then no-one else is writing to that file.
Build a web service around this concept if you don't have direct access to the file between machines. | 0 | 1 | 1 | 0 | 2010-06-18T13:59:00.000 | 2 | 1 | false | 3,070,210 | 0 | 0 | 0 | 2 | The situation I'm in is this - there's a process that's writing to a file, sometimes the file is rather large say 400 - 500MB. I need to know when it's done writing. How can I determine this? If I look in the directory I'll see it there but it might not be done being written. Plus this needs to be done remotely - as... |
ZeroConf Chat with Python | 3,072,977 | 0 | 0 | 1,923 | 0 | python,linux,bonjour,zeroconf,chatbot | The easiest thing to do is to use Telepathy Salut or Pidgin/libpurple, and talk with it over D-Bus. | 0 | 1 | 0 | 0 | 2010-06-18T20:43:00.000 | 2 | 0 | false | 3,072,934 | 0 | 0 | 0 | 1 | I am trying to set up a Bonjour (or Ahavi) chatbot for our helpdesk system that would answer basic questions based on a menu system. The basis of my question is how do I get python to create the bot so that it connects to the network as a chat client.
Basically, anyone on my network with iChat or Empathy (or any chat p... |
Does GQL automatically add an "ID" Property | 3,078,018 | 4 | 1 | 282 | 1 | python,google-app-engine,gql | An object has a Key, part of which is either an automatically-generated numeric ID, or an assigned key name. IDs are not guaranteed to be increasing, and they're almost never going to be consecutive because they're allocated to an instance in big chunks, and IDs unused by the instance to which they're allocated will n... | 0 | 1 | 0 | 0 | 2010-06-19T20:38:00.000 | 3 | 0.26052 | false | 3,077,156 | 0 | 0 | 1 | 2 | I currently work with Google's AppEngine and I could not find out, whether a Google DataStorage Object Entry has an ID by default, and if not, how I add such a field and let it increase automatically?
regards, |
Does GQL automatically add an "ID" Property | 3,077,170 | 3 | 1 | 282 | 1 | python,google-app-engine,gql | Yes, they have id's by default, and it is named ID as you mentioned. | 0 | 1 | 0 | 0 | 2010-06-19T20:38:00.000 | 3 | 1.2 | true | 3,077,156 | 0 | 0 | 1 | 2 | I currently work with Google's AppEngine and I could not find out, whether a Google DataStorage Object Entry has an ID by default, and if not, how I add such a field and let it increase automatically?
regards, |
Adding printf to the starting of all functions in a file | 3,078,693 | 24 | 9 | 937 | 0 | python,c,perl | Just pass -finstrument-functions to gcc when compiling. See the gcc(1) man page for details. | 0 | 1 | 0 | 0 | 2010-06-20T08:47:00.000 | 2 | 1 | false | 3,078,680 | 1 | 0 | 0 | 1 | I have some very large C files, having lots of functions. I need to trace the execution path at run time. There is no way I can trace it through debugging as its a hypervisor code currently running over qemu and doing a lot of binary translations.
Can anyone point me to some script in Perl or Python which can add a pri... |
is mac good for python programming? | 3,081,478 | 0 | 3 | 3,465 | 0 | python,macos | FWIW, mod_wsgi is developed on MacOS X. My experience in supporting users of mod_wsgi is however that MacPorts and fink are an absolute PITA. Specifically, trying to use Python and Apache from those third party systems usually causes nothing but hurt. This is based on problems encountered over the last couple of years.... | 0 | 1 | 0 | 0 | 2010-06-20T16:40:00.000 | 4 | 0 | false | 3,080,019 | 1 | 0 | 0 | 3 | I am programming a django based website. I actually use a small computer under Ubuntu 10.04.
I would like to buy something more professional, so I am wondering whether an iMac is good for that, because :
Is there a free IDE as good as eclipse on MacOS ?
Is there a remote python debugger like pydev for eclipse ?
Is the... |
is mac good for python programming? | 3,080,040 | 5 | 3 | 3,465 | 0 | python,macos | All of the things you mentioned (Eclipse+plugins, Python, Apache, mod_wsgi) can run fine on OS X. | 0 | 1 | 0 | 0 | 2010-06-20T16:40:00.000 | 4 | 0.244919 | false | 3,080,019 | 1 | 0 | 0 | 3 | I am programming a django based website. I actually use a small computer under Ubuntu 10.04.
I would like to buy something more professional, so I am wondering whether an iMac is good for that, because :
Is there a free IDE as good as eclipse on MacOS ?
Is there a remote python debugger like pydev for eclipse ?
Is the... |
is mac good for python programming? | 3,080,121 | 6 | 3 | 3,465 | 0 | python,macos | Why do you consider iMac to be more or less professional than anything else? Hardware? System?
Note: I'm myself a MacOSX and Linux user.
Unless it's a requisite, most times I'd say it's only a matter of personal taste.
As said by others earlier, everything you cited works fine on MacOSX.
However, you should consider th... | 0 | 1 | 0 | 0 | 2010-06-20T16:40:00.000 | 4 | 1.2 | true | 3,080,019 | 1 | 0 | 0 | 3 | I am programming a django based website. I actually use a small computer under Ubuntu 10.04.
I would like to buy something more professional, so I am wondering whether an iMac is good for that, because :
Is there a free IDE as good as eclipse on MacOS ?
Is there a remote python debugger like pydev for eclipse ?
Is the... |
How to exit when viewing python help like help(os.listdir) | 38,031,055 | 2 | 44 | 40,312 | 0 | python | Other options to exit the help screen would be to type any one of the following(as described in the help section)
q,:q,Q,:Q and ZZ
.These can be seen when you press 'h' once you are on the help screen | 0 | 1 | 0 | 0 | 2010-06-20T19:05:00.000 | 2 | 0.197375 | false | 3,080,563 | 0 | 0 | 0 | 1 | when the help window pops up, what are the basic commands (mac os) to page up/down, end of document and exiting the help screen?
I just had to close my terminal as I couldn't figure it out! |
what does python.exe take as arguments? | 3,088,518 | 8 | 7 | 12,210 | 0 | python,arguments | It takes any options for python.exe itself, then the name of the file (or command or module), then any arguments to be passed to your program.
If no file is specified, it puts you in interactive mode.
As indicated in the comments by Adam, type python -h to see the full list. | 0 | 1 | 0 | 0 | 2010-06-21T21:01:00.000 | 2 | 1.2 | true | 3,088,493 | 1 | 0 | 0 | 1 | does it take the filename of the .py and then what? |
How to trap a copy/move-file operation in a custom filesystem based on Fuse? | 7,040,661 | 0 | 2 | 1,016 | 0 | python,fuse | Copy is as Weholt said: difficult to trap because it is basically the same as creating a new file and writing to it.
Move is the same operation as a rename. | 0 | 1 | 0 | 0 | 2010-06-22T07:39:00.000 | 3 | 0 | false | 3,091,166 | 0 | 0 | 0 | 2 | I`m implementing a custom filesystem on Ubuntu using Fuse, but I need to trap when a copy or move operation occur. Right now all I see are when some file are opened for writing or reading, but I need to see these operations in context so I can see what file are being copied or moved.
Any hints? |
How to trap a copy/move-file operation in a custom filesystem based on Fuse? | 3,091,286 | 0 | 2 | 1,016 | 0 | python,fuse | What you want to do is probably not easily done, considering that a "copy" or "move" program could do just what you see - open a file and write to it. That's a perfectly good way of copying a file.
Even if you can see what actual binary is doing it, that wouldn't give you enough information to know if this was a copy, ... | 0 | 1 | 0 | 0 | 2010-06-22T07:39:00.000 | 3 | 0 | false | 3,091,166 | 0 | 0 | 0 | 2 | I`m implementing a custom filesystem on Ubuntu using Fuse, but I need to trap when a copy or move operation occur. Right now all I see are when some file are opened for writing or reading, but I need to see these operations in context so I can see what file are being copied or moved.
Any hints? |
sound way to feed commands to twisted ssh after reactor.run() | 3,102,192 | 0 | 3 | 1,007 | 0 | python,ssh,twisted | You're trying to put a square peg in a round hole. Everything in Twisted is asynchronous, so you have to think about the sequence of events differently. You can't say "here are 10 operations to be run one after the other" that's serial thinking.
In Twisted you issue the first command and register a callback that will b... | 0 | 1 | 0 | 0 | 2010-06-23T13:36:00.000 | 2 | 0 | false | 3,102,098 | 0 | 0 | 0 | 1 | Guys this is a question about python twisted ssh lib.
All sample code even production code I saw acting as a ssh client based on twisted.conch.ssh are all interacting with server in such a mode:
prepare some commands to run remotely;
define call backs;
kick off reactor then suspend for new feedback;
After the reactor... |
Determine user connecting a local socket with Python | 3,107,066 | 1 | 2 | 195 | 0 | python,sockets | Unfortunately, at this point in time the python libraries don't support the usual SCM_CREDENTIALS method of passing credentials along a Unix socket.
You'll need to use an "ugly" method as described in another answer to find it. | 0 | 1 | 1 | 0 | 2010-06-23T21:30:00.000 | 3 | 0.066568 | false | 3,105,705 | 0 | 0 | 0 | 1 | If Python, if you are developing a system service that communicates with user applications through sockets, and you want to treat sockets connected by different users differently, how would you go about that?
If I know that all connecting sockets will be from localhost, is there a way to lookup through the OS (either o... |
In Python script, how do I set PYTHONPATH? | 48,543,222 | -4 | 146 | 173,492 | 0 | python,linux,unix,environment-variables | you can set PYTHONPATH, by os.environ['PATHPYTHON']=/some/path, then you need to call os.system('python') to restart the python shell to make the newly added path effective. | 0 | 1 | 0 | 0 | 2010-06-24T08:25:00.000 | 6 | -1 | false | 3,108,285 | 1 | 0 | 0 | 1 | I know how to set it in my /etc/profile and in my environment variables.
But what if I want to set it during a script?
Is it import os, sys? How do I do it? |
os.path.exists() lies | 3,112,744 | 1 | 14 | 7,646 | 0 | python | The problem is related to the fact that the Python process runs in its own shell. When you run subprocess.Popen(shell=True) you are spawning a new shell, which is working around the issue you're experiencing.
Python is not causing this issue. It's a combination of how NFS (file storage) and directory listings function ... | 0 | 1 | 0 | 0 | 2010-06-24T17:48:00.000 | 2 | 0.099668 | false | 3,112,546 | 0 | 0 | 0 | 1 | I'm running a number of python scripts on a linux cluster, and the output from one job is generally the input to another script, potentially run on another node. I find that there is some not insignificant lag before python notices files that have been created on other nodes -- os.path.exists() returns false and open()... |
PHP vs. Other Languages in Hadoop/MapReduce implementations, and in the Cloud generally | 3,113,643 | 10 | 3 | 906 | 0 | java,php,python,hadoop,mapreduce | PHP is designed primarily as a language for displaying output to a browser. Most jobs being run on MapReduce/Hadoop clusters have nothing to do with displaying output.
They instead tend to lean much more heavily towards data processing. PHP is not the most commonly supported language for data processing, by far. Thus, ... | 0 | 1 | 0 | 1 | 2010-06-24T20:18:00.000 | 3 | 1.2 | true | 3,113,573 | 0 | 0 | 1 | 2 | I'm beginning to learn some Hadoop/MapReduce, coming mostly from a PHP background, with a little bit of Java and Python.
But, it seems like most implementations of MapReduce out there are in Java, Ruby, C++ or Python.
I've looked, and it looks like there are some Hadoop/MapReduce in PHP, but the overwhelming body of ... |
PHP vs. Other Languages in Hadoop/MapReduce implementations, and in the Cloud generally | 3,113,644 | 1 | 3 | 906 | 0 | java,php,python,hadoop,mapreduce | The reason is PHP lack of support for multi-threading and process communication. | 0 | 1 | 0 | 1 | 2010-06-24T20:18:00.000 | 3 | 0.066568 | false | 3,113,573 | 0 | 0 | 1 | 2 | I'm beginning to learn some Hadoop/MapReduce, coming mostly from a PHP background, with a little bit of Java and Python.
But, it seems like most implementations of MapReduce out there are in Java, Ruby, C++ or Python.
I've looked, and it looks like there are some Hadoop/MapReduce in PHP, but the overwhelming body of ... |
Update datastore in Google App Engine from the iPhone | 3,113,823 | 5 | 2 | 411 | 0 | java,iphone,python,google-app-engine,google-cloud-datastore | Why not have the iPhone application communicate this information to app engine by making a simple HTTP request?
Specifically, I would do an HTTP POST to the server and include the relevant fields. Then your app engine request handler would simply store the information in the datastore. | 0 | 1 | 0 | 0 | 2010-06-24T20:44:00.000 | 1 | 1.2 | true | 3,113,734 | 0 | 0 | 1 | 1 | I'm working on an app that communicates with Google App Engine to update and retrieve user information, but I can't think of a way to modify elements in the datastore.
For example, every user for my app is represented by a User object in the datastore. If this user inputs things like email, phone number, etc into field... |
Terminating android ASE shell from within the script | 3,125,831 | 1 | 2 | 329 | 0 | python,android,ase | You should use android.exit(). | 0 | 1 | 0 | 0 | 2010-06-26T19:56:00.000 | 2 | 0.099668 | false | 3,125,325 | 0 | 0 | 1 | 2 | I'm using android scripting environment with python (ASE), and I'd like to terminate the shell executing the script when the script terminates.
Is there a good way to do this?
I have tried executing on the last line:
os.system( 'kill %d' % os.getppid() )
but to no avail. |
Terminating android ASE shell from within the script | 3,304,337 | 0 | 2 | 329 | 0 | python,android,ase | My guess is that the above answer ought to be android.Android().exit() | 0 | 1 | 0 | 0 | 2010-06-26T19:56:00.000 | 2 | 0 | false | 3,125,325 | 0 | 0 | 1 | 2 | I'm using android scripting environment with python (ASE), and I'd like to terminate the shell executing the script when the script terminates.
Is there a good way to do this?
I have tried executing on the last line:
os.system( 'kill %d' % os.getppid() )
but to no avail. |
Disable all `pylint` 'Convention' messages | 3,125,349 | 28 | 23 | 10,285 | 0 | python,pylint | If I'm not mistaken, you should be able to use --disable-msg-cat=C (can't remember whether it's uppercase or lowercase or both) to accomplish this.
UPDATE: In later versions of pylint, you should use --disable=C | 0 | 1 | 0 | 0 | 2010-06-26T20:02:00.000 | 1 | 1.2 | true | 3,125,333 | 0 | 0 | 0 | 1 | Background
I find pylint useful, but I also find it is horrifically undocumented, has painfully verbose output, and lacks an intuitive interface.
I'd like to use pylint, but it keeps pumping out an absurd number of pointless 'convention' messages, e.g. C: 2: Line too long (137/80) etc.
Question
If I could disable these... |
Is there any linux distribution that comes with python 3? | 7,409,203 | 5 | 6 | 5,178 | 0 | python,linux,python-3.x | All of them have the repositories, but if you care for one that has python3 as default, I only know of ArchLinux. | 0 | 1 | 0 | 0 | 2010-06-27T14:49:00.000 | 6 | 0.16514 | false | 3,127,715 | 1 | 0 | 0 | 4 | I would like to know if there is any Linux distribution where you can easily install and use Python 3. This means a distribution that will provide not only Python 3 binaries and updates but also python modules.
I know that probably we are not going to see any python 3 as the default python interpretor so soon but at le... |
Is there any linux distribution that comes with python 3? | 3,128,073 | 2 | 6 | 5,178 | 0 | python,linux,python-3.x | I think most distros have it. Debian has it so all derived distros (Ubuntu et. all) do. Fedora as well. It's just that it's not used for the standard system utilities so just typing python will give you a 2.x interpreter. | 0 | 1 | 0 | 0 | 2010-06-27T14:49:00.000 | 6 | 0.066568 | false | 3,127,715 | 1 | 0 | 0 | 4 | I would like to know if there is any Linux distribution where you can easily install and use Python 3. This means a distribution that will provide not only Python 3 binaries and updates but also python modules.
I know that probably we are not going to see any python 3 as the default python interpretor so soon but at le... |
Is there any linux distribution that comes with python 3? | 3,129,338 | 1 | 6 | 5,178 | 0 | python,linux,python-3.x | Gentoo has Python3 (I have 2.6.4-r1 and 3.1.2-r3 installed, 2.6 being the default). A quick search reveals that ebuilds of python libraries tested on both 2.x and 3.x have already been built for both versions on my machine (thank God for python-updater, obviously).
Gentoo + Python developing is a very nice combination ... | 0 | 1 | 0 | 0 | 2010-06-27T14:49:00.000 | 6 | 0.033321 | false | 3,127,715 | 1 | 0 | 0 | 4 | I would like to know if there is any Linux distribution where you can easily install and use Python 3. This means a distribution that will provide not only Python 3 binaries and updates but also python modules.
I know that probably we are not going to see any python 3 as the default python interpretor so soon but at le... |
Is there any linux distribution that comes with python 3? | 3,127,755 | 11 | 6 | 5,178 | 0 | python,linux,python-3.x | Ubuntu 10.04 comes by default w/ Python 2.6.5, but the following python 3 packages are in the standard repositories as well:
python3 python3.1-minimal python3-dev
python3.0 python3.1-profiler python3-doc
python3.1 python3.1-tk python3-examples
python3.1... | 0 | 1 | 0 | 0 | 2010-06-27T14:49:00.000 | 6 | 1.2 | true | 3,127,715 | 1 | 0 | 0 | 4 | I would like to know if there is any Linux distribution where you can easily install and use Python 3. This means a distribution that will provide not only Python 3 binaries and updates but also python modules.
I know that probably we are not going to see any python 3 as the default python interpretor so soon but at le... |
Is it possible to run two versions of Python side-by-side? | 3,130,801 | 0 | 4 | 758 | 0 | python,google-app-engine | OK, I figured out the answer to my own question, partly with the help of Nicholas Knight who pointed out that you just install different Python version to different Python directories. I was left scratching my head on how to get Google App Engine to use Python 2.5 (the required version) instead of Python 2.6. This is... | 0 | 1 | 0 | 0 | 2010-06-27T16:07:00.000 | 3 | 0 | false | 3,127,915 | 1 | 0 | 1 | 2 | I've been learning Python for a couple of weeks, and although I've been successfully develop apps for Google App Engine with Python 2.6.5, it specifically requires Python 2.5.
Being mindful of compatibility issues when uploading apps (it's a situation I'd rather avoid while learning Python), I wonder if it's possible t... |
Is it possible to run two versions of Python side-by-side? | 3,127,950 | 5 | 4 | 758 | 0 | python,google-app-engine | Absolutely.
If you're on *nix, you'd usually just use make altinstall instead of make install, that way the "python" binary won't get installed/overwritten, but instead you'd have e.g. python2.5 or python2.6 installed. Using a separate --prefix with the configure script is also an option, of course.
Some Linux distribu... | 0 | 1 | 0 | 0 | 2010-06-27T16:07:00.000 | 3 | 0.321513 | false | 3,127,915 | 1 | 0 | 1 | 2 | I've been learning Python for a couple of weeks, and although I've been successfully develop apps for Google App Engine with Python 2.6.5, it specifically requires Python 2.5.
Being mindful of compatibility issues when uploading apps (it's a situation I'd rather avoid while learning Python), I wonder if it's possible t... |
How to Log All IRC data on Channel Using Twisted? | 3,128,285 | 0 | 0 | 617 | 0 | python,twisted,logging,irc | I don't think you can do this if you just connect to a server... the servers don't send you messages for channels you haven't joined. Or are you the host of the server? | 0 | 1 | 0 | 1 | 2010-06-27T16:41:00.000 | 2 | 0 | false | 3,128,025 | 0 | 0 | 0 | 2 | I have a somewhat unique request. What I am looking to do is listen on a specific port for all traffic coming through via IRC protocol. I then want to log all of those messages/commands/ect. I do not, however, want to join the channel. I just want to listen and log. Is there an easy built in way to do this? I have been... |
How to Log All IRC data on Channel Using Twisted? | 5,207,277 | 1 | 0 | 617 | 0 | python,twisted,logging,irc | We addressed this issue in a somewhat round about way. We worked off a generic hexdumping proxy server constructed in twisted and then created finer detail parsing algorithms off of that. | 0 | 1 | 0 | 1 | 2010-06-27T16:41:00.000 | 2 | 1.2 | true | 3,128,025 | 0 | 0 | 0 | 2 | I have a somewhat unique request. What I am looking to do is listen on a specific port for all traffic coming through via IRC protocol. I then want to log all of those messages/commands/ect. I do not, however, want to join the channel. I just want to listen and log. Is there an easy built in way to do this? I have been... |
How to 'catch' c printf in python with ctypes? | 3,133,108 | 0 | 5 | 2,287 | 0 | python,c,printf,ctypes | Well printf simply writes its output to whatever the stdout file pointer refers to. Im not sure how you're executing the C program, but it should be possible to redirect the C program's stdout to something that you can read in Python. | 0 | 1 | 0 | 0 | 2010-06-28T11:38:00.000 | 2 | 0 | false | 3,131,977 | 0 | 0 | 0 | 1 | I hope this is trivial and I just didn't find it in the tutorials. I am writing python code that 'supervises' c code, aka I run the c code with ctypes from python. Now I want to 'catch' the c 'printfs' to process the data that is output by the c code. Any idea how one would do this?
Thanks |
How do I access the command history from IDLE? | 3,132,305 | 49 | 114 | 75,492 | 0 | python,python-idle | just use Alt+P to go up. Similarly, Alt+N could be used to go down. | 0 | 1 | 0 | 0 | 2010-06-28T12:20:00.000 | 5 | 1 | false | 3,132,265 | 1 | 0 | 0 | 2 | On bash or Window's Command Prompt, we can press the up arrow on keyboard to get the last command, and edit it, and press ENTER again to see the result.
But in Python's IDLE 2.6.5 or 3.1.2, it seems if our statement prints out 25 lines, we need to press the up arrow 25 times to that last command, and press ENTER for it... |
How do I access the command history from IDLE? | 26,785,641 | 12 | 114 | 75,492 | 0 | python,python-idle | If you're on mac, it's ctrl+p. | 0 | 1 | 0 | 0 | 2010-06-28T12:20:00.000 | 5 | 1 | false | 3,132,265 | 1 | 0 | 0 | 2 | On bash or Window's Command Prompt, we can press the up arrow on keyboard to get the last command, and edit it, and press ENTER again to see the result.
But in Python's IDLE 2.6.5 or 3.1.2, it seems if our statement prints out 25 lines, we need to press the up arrow 25 times to that last command, and press ENTER for it... |
How to properly use PyDev with two different Python versions with scripts that are recalling other python scripts? | 3,165,062 | 0 | 2 | 1,364 | 0 | python,windows,environment-variables | I believe your call should be:
import sys
os.system(sys.executable+ ' second.py')
So that you guarantee you're using the same interpreter you're currently running and not launching the other one (or did you really mean to use the other interpreter?) | 0 | 1 | 0 | 0 | 2010-06-28T15:22:00.000 | 3 | 0 | false | 3,133,690 | 1 | 0 | 0 | 2 | The story began with a very strange error while I was running my script from PyDev. Running the same script from outside will not encounter the same problem.
Fatal Python error: Py_Initialize: can't initialize sys standard streams
File "C:\Python26\lib\encodings\__init__.py", line 123
raise CodecRegistryError,\
... |
How to properly use PyDev with two different Python versions with scripts that are recalling other python scripts? | 3,133,843 | 2 | 2 | 1,364 | 0 | python,windows,environment-variables | I found a solution that seams acceptable specially because it will not interfere with running the scripts on other systems, just to run python -E second.py - this will force Python to ignore PYTHON* environment variables. | 0 | 1 | 0 | 0 | 2010-06-28T15:22:00.000 | 3 | 1.2 | true | 3,133,690 | 1 | 0 | 0 | 2 | The story began with a very strange error while I was running my script from PyDev. Running the same script from outside will not encounter the same problem.
Fatal Python error: Py_Initialize: can't initialize sys standard streams
File "C:\Python26\lib\encodings\__init__.py", line 123
raise CodecRegistryError,\
... |
Switch python distributions | 3,134,369 | 1 | 1 | 645 | 0 | python,osx-snow-leopard,numpy,macports | You need to update your PATH so that the stuff from MacPorts is in front of the standard system directories, e.g., export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/:$PATH.
UPDATE: Pay special attention to the fact that /opt/local/Library/Frameworks/Python.fr... | 0 | 1 | 0 | 0 | 2010-06-28T16:43:00.000 | 3 | 0.066568 | false | 3,134,332 | 0 | 1 | 0 | 1 | I have a MacBook Pro with Snow Leopard, and the Python 2.6 distribution that comes standard. Numpy does not work properly on it. Loadtxt gives errors of the filename being too long, and getfromtxt does not work at all (no object in module error). So then I tried downloading the py26-numpy port on MacPorts. Of cours... |
SSH Dynamic Port Forwarding ('ssh -D') in Python | 3,141,104 | 1 | 4 | 1,634 | 0 | python,windows,ssh,tunneling,ssh-tunnel | There are ssh executables for Windows, so you can uses the subprocess.Popen approach. This is not exactly elegant, a pure Python approach would be better. | 0 | 1 | 0 | 1 | 2010-06-29T13:28:00.000 | 2 | 0.099668 | false | 3,141,063 | 0 | 0 | 0 | 1 | I'm looking for a way to implement SSH Dynamic Port Forwarding ('ssh -D') under Python. The problem is that it has to work under Windows, i.e., running SSH with popen/pexec/etc. won't work. Any ideas?
cheers,
Bruno Nery. |
os.path.getmtime of shared files in Dropbox | 3,142,886 | 1 | 1 | 384 | 0 | python,dropbox | It looks that Dropbox preserves mtime when synchronizing files. Try to detect changed file by changed file size and/or checksum (MD5, SHA1 or so) instead of modification time. Or just ask Dropbox :) (I don't know if it has any API for this). | 0 | 1 | 0 | 0 | 2010-06-29T16:38:00.000 | 1 | 0.197375 | false | 3,142,770 | 0 | 0 | 0 | 1 | I want to run a script to check whether certain files in my Dropbox folder have changed. I am currently using os.path.getmtime() to check that the modified time is in some window of time.time(). The problem is that if I modify a file in my Dropbox folder from a different computer than where the script is set to run, th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.