Answer
stringlengths
11
6.38k
Title
stringlengths
15
150
Web Development
int64
0
1
Other
int64
0
1
Available Count
int64
1
17
Networking and APIs
int64
0
1
GUI and Desktop Applications
int64
0
1
Question
stringlengths
41
29k
ViewCount
int64
18
4.06M
Q_Id
int64
1.85k
44.1M
Data Science and Machine Learning
int64
0
1
is_accepted
bool
2 classes
Score
float64
-1
1.2
System Administration and DevOps
int64
1
1
Q_Score
int64
0
5.69k
Tags
stringlengths
6
105
AnswerCount
int64
1
64
Database and SQL
int64
0
1
Users Score
int64
-17
470
CreationDate
stringlengths
23
23
A_Id
int64
2.98k
72.4M
Python Basics and Environment
int64
0
1
If you are running macOS X and run platform.system() you get darwin because macOS X is built on Apple's Darwin OS. Darwin is the kernel of macOS X and is essentially macOS X without the GUI.
Python: What OS am I running on?
0
0
1
0
0
What do I need to look at to see whether I'm on Windows or Unix, etc?
422,064
1,854
0
false
0.015383
1
838
python,cross-platform,platform-specific,platform-agnostic
26
0
2
2008-08-05T03:23:00.000
48,244,490
0
I'm not sure that this is the best way to do it, but when I'm deploying Ruby GUI apps (not Python, but has the same "problem" as far as .exe's are concerned) on Windows, I just write a short launcher in C# that calls on my main script. It compiles to an executable, and I then have an application executable.
Create a directly-executable cross-platform GUI app using Python
0
0
2
0
0
Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux. The problem being I have no idea where to start or how to write a GUI with it, can anybody shed some light on this and point me in the right direction please?
199,251
2,933
0
false
0.061461
1
300
python,user-interface,deployment,tkinter,release-management
13
0
4
2008-08-05T22:26:00.000
12,167
0
Since python is installed on nearly every non-Windows OS by default now, the only thing you really need to make sure of is that all of the non-standard libraries you use are installed. Having said that, it is possible to build executables that include the python interpreter, and any libraries you use. This is likely to create a large executable, however. MacOS X even includes support in the Xcode IDE for creating full standalone GUI apps. These can be run by any user running OS X.
Create a directly-executable cross-platform GUI app using Python
0
0
2
0
0
Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux. The problem being I have no idea where to start or how to write a GUI with it, can anybody shed some light on this and point me in the right direction please?
199,251
2,933
0
false
1
1
300
python,user-interface,deployment,tkinter,release-management
13
0
6
2008-08-05T22:26:00.000
2,980
0
The problem for me wasn't in Apache set up, but in understanding how mod_apache actually uses the .py files. Module-level statements (including those in a if __name__=='__main__' section) are not executed--I assumed that the stdout from running the script at the commandline would be what the server would output, but that's not how it works. Instead, I wrote a module-level function called index(), and had it return as a string the HTML of the page. It's also possible to have other module-level functions (e.g., otherFunction()) that can be accessed as further segments in the URI (e.g., testScript/otherFunction for the file testScript.py.) Obviously, this makes more sense than my original stdout conception. Better capability of actually using Python as a scripting language and not a humongous markup language.
How do you set up Python scripts to work in Apache 2.0?
0
1
1
0
0
I tried to follow a couple of googled up tutorials on setting up mod_python, but failed every time. Do you have a good, step-by step, rock-solid howto? My dev box is OS X, production - Centos.
32,774
5,102
0
false
0
1
23
python,apache,apache2
4
0
0
2008-08-07T18:24:00.000
14,791,003
0
Can I mention testing for hardlinks without python? /bin/test has the FILE1 -ef FILE2 condition that is true when files share an inode. Therefore, something like find . -type f -exec test \{} -ef /path/to/file \; -print works for hard link testing to a specific file. Which brings me to reading man test and the mentions of -L and -h which both work on one file and return true if that file is a symbolic link, however that doesn't tell you if the target is missing. I did find that head -0 FILE1 would return an exit code of 0 if the file can be opened and a 1 if it cannot, which in the case of a symbolic link to a regular file works as a test for whether it's target can be read.
Find broken symlinks with Python
0
0
1
0
0
If I call os.stat() on a broken symlink, python throws an OSError exception. This makes it useful for finding them. However, there are a few other reasons that os.stat() might throw a similar exception. Is there a more precise way of detecting broken symlinks with Python under Linux?
25,846
20,794
0
false
0.099668
1
30
python,linux,symlink
8
0
4
2008-08-21T19:00:00.000
20,843
0
The Threading example from Eli will run the thread, but not do any of the work after that line. I'm going to look into the processing module and the subprocess module. I think the com method I'm running needs to be in another process, not just in another thread.
What's the best way to duplicate fork() in windows?
0
0
1
0
0
How do I implement some logic that will allow me to reproduce on Windows the functionality that I have on Linux with the fork() system call, using Python? I'm specifically trying to execute a method on the SAPI Com component, while continuing the other logic in the main thread without blocking or waiting.
31,865
23,397
0
false
0.085505
1
23
python,windows,process,subprocess,fork
7
0
3
2008-08-22T20:27:00.000
52,191
0
Personally, I wouldn't worry about it until you see a problem. Messing with the default python install on a *Nix system can cause more trouble than it's worth. I can say from personal experience that you never truly understand what python has done for the nix world until you have a problem with it. You can also add a second python installation, but that also causes more problems than it's worth IMO. So I suppose the best question to start out with would be why exactly do you want to use the 64 bit version of python?
Install Python to match directory layout in OS X 10.5
1
0
4
0
0
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in /Library/Python/2.5/ and not the one in buried at the top of the framework once I compile it.
653
29,856
0
true
1.2
1
4
python,macos,64-bit
5
0
1
2008-08-27T10:22:00.000
31,384
0
Essentially, yes. I was not sure you could do it like that (current version does not do it like that). When using the python install script, however, there is no option (that I can find) to specify where to put directories and files (eg --prefix). I was hoping to match the current layout of python related files so as to avoid 'polluting' my machine with redundant files.
Install Python to match directory layout in OS X 10.5
1
0
4
0
0
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in /Library/Python/2.5/ and not the one in buried at the top of the framework once I compile it.
653
29,856
0
false
0
1
4
python,macos,64-bit
5
0
0
2008-08-27T10:22:00.000
31,331
0
Not sure I entirely understand your question, but can't you simply build and install a 64 bit version and then create symbolic links so that /Library/Python/2.5 and below point to your freshly built version of python?
Install Python to match directory layout in OS X 10.5
1
0
4
0
0
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in /Library/Python/2.5/ and not the one in buried at the top of the framework once I compile it.
653
29,856
0
false
0.039979
1
4
python,macos,64-bit
5
0
1
2008-08-27T10:22:00.000
30,591
0
The short answer is because I can. The long answer, expanding on what the OP said, is to be more compatible with apache and mysql/postgresql. They are all 64bit (apache is a fat binary with ppc, ppc64 x86 and x86 and x86_64, the others just straight 64bit). Mysqldb and mod_python wont compile unless they are all running the same architecture. Yes I could run them all in 32bit (and have in the past) but this is much more work then compiling one program. EDIT: You pretty much convinced though to just let the installer do its thing and update the PATH to reflect this.
Install Python to match directory layout in OS X 10.5
1
0
4
0
0
The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work). I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in /Library/Python/2.5/ and not the one in buried at the top of the framework once I compile it.
653
29,856
0
false
0
1
4
python,macos,64-bit
5
0
0
2008-08-27T10:22:00.000
31,425
0
Now, I'm not saying that this is the greatest name in the world, but here was the idea as I understand it. Originally, the popen family was in the os module and was an implementation of the venerable posix popen. The movement to the subprocess module would have been an opportune time to rename them, but I guess that keeping Popen makes it easier to find in the docs for those who have a long history with python or even to the venerable posix functions. From its earliest posix incarnation, Popen has always been meant to open a Process and allow you to read and write from its stdio like a file. Thus the mnemonic for Popen is that it is short for ProcessOpen in an attempt to kind of, sorta, look like open.
Why is the subprocess.Popen class not named Subprocess?
0
0
2
0
0
The primary class in the subprocess module is name Popen, and represents a subprocess. Popen sounds like someone was trying to force the name to follow some function naming format, rather than chosing a name that actually represents what the object is. Does anyone know why it was chosen over something simple like, say, Subprocess?
691
38,197
0
true
1.2
1
4
python,subprocess
3
0
8
2008-09-01T17:40:00.000
38,222
1
I suppose the name was chosen because the functionality subprocess is replacing was formerly in the os module as the os.popen function. There could be even ways to automate migration between the two.
Why is the subprocess.Popen class not named Subprocess?
0
0
2
0
0
The primary class in the subprocess module is name Popen, and represents a subprocess. Popen sounds like someone was trying to force the name to follow some function naming format, rather than chosing a name that actually represents what the object is. Does anyone know why it was chosen over something simple like, say, Subprocess?
691
38,197
0
false
-0.066568
1
4
python,subprocess
3
0
-1
2008-09-01T17:40:00.000
38,202
1
You know, you should look at static linking. These days, we all have HUGE hard drives, and a few extra megabytes (for carrying around libc and what not) is really not that big a deal anymore. You could also try running your applications in chroot() jails and distributing those.
Using C in a shared multi-platform POSIX environment
0
0
4
0
0
I write tools that are used in a shared workspace. Since there are multiple OS's working in this space, we generally use Python and standardize the version that is installed across machines. However, if I wanted to write some things in C, I was wondering if maybe I could have the application wrapped in a Python script, that detected the operating system and fired off the correct version of the C application. Each platform has GCC available and uses the same shell. One idea was to have the C compiled to the users local ~/bin, with timestamp comparison with C code so it is not compiled each run, but only when code is updated. Another was to just compile it for each platform, and have the wrapper script select the proper executable. Is there an accepted/stable process for this? Are there any catches? Are there alternatives (assuming the absolute need to use native C code)? Clarification: Multiple OS's are involved that do not share ABI. Eg. OS X, various Linuxes, BSD etc. I need to be able to update the code in place in shared folders and have the new code working more or less instantaneously. Distributing binary or source packages is less than ideal.
293
39,847
0
false
0
1
2
python,c,cross-platform,posix,scripting
4
0
0
2008-09-02T15:46:00.000
39,865
1
Also, you could use autoconf and distribute your application in source form only. :)
Using C in a shared multi-platform POSIX environment
0
0
4
0
0
I write tools that are used in a shared workspace. Since there are multiple OS's working in this space, we generally use Python and standardize the version that is installed across machines. However, if I wanted to write some things in C, I was wondering if maybe I could have the application wrapped in a Python script, that detected the operating system and fired off the correct version of the C application. Each platform has GCC available and uses the same shell. One idea was to have the C compiled to the users local ~/bin, with timestamp comparison with C code so it is not compiled each run, but only when code is updated. Another was to just compile it for each platform, and have the wrapper script select the proper executable. Is there an accepted/stable process for this? Are there any catches? Are there alternatives (assuming the absolute need to use native C code)? Clarification: Multiple OS's are involved that do not share ABI. Eg. OS X, various Linuxes, BSD etc. I need to be able to update the code in place in shared folders and have the new code working more or less instantaneously. Distributing binary or source packages is less than ideal.
293
39,847
0
false
0.049958
1
2
python,c,cross-platform,posix,scripting
4
0
1
2008-09-02T15:46:00.000
39,878
1
Launching a Python interpreter instance just to select the right binary to run would be much heavier than you need. I'd distribute a shell .rc file which provides aliases. In /shared/bin, you put the various binaries: /shared/bin/toolname-mac, /shared/bin/toolname-debian-x86, /shared/bin/toolname-netbsd-dreamcast, etc. Then, in the common shared shell .rc file, you put the logic to set the aliases according to platform, so that on OSX, it gets alias toolname=/shared/bin/toolname-mac, and so forth. This won't work as well if you're adding new tools all the time, because the users will need to reload the aliases. I wouldn't recommend distributing tools this way, though. Testing and qualifying new builds of the tools should be taking up enough time and effort that the extra time required to distribute the tools to the users is trivial. You seem to be optimizing to reduce the distribution time. Replacing tools that quickly in a live environment is all too likely to result in lengthy and confusing downtime if anything goes wrong in writing and building the tools--especially when subtle cross-platform issues creep in.
Using C in a shared multi-platform POSIX environment
0
0
4
0
0
I write tools that are used in a shared workspace. Since there are multiple OS's working in this space, we generally use Python and standardize the version that is installed across machines. However, if I wanted to write some things in C, I was wondering if maybe I could have the application wrapped in a Python script, that detected the operating system and fired off the correct version of the C application. Each platform has GCC available and uses the same shell. One idea was to have the C compiled to the users local ~/bin, with timestamp comparison with C code so it is not compiled each run, but only when code is updated. Another was to just compile it for each platform, and have the wrapper script select the proper executable. Is there an accepted/stable process for this? Are there any catches? Are there alternatives (assuming the absolute need to use native C code)? Clarification: Multiple OS's are involved that do not share ABI. Eg. OS X, various Linuxes, BSD etc. I need to be able to update the code in place in shared folders and have the new code working more or less instantaneously. Distributing binary or source packages is less than ideal.
293
39,847
0
false
0.099668
1
2
python,c,cross-platform,posix,scripting
4
0
2
2008-09-02T15:46:00.000
40,367
1
Depending on your mix os OSes, you might be better off creating packages for each class of system. Alternatively, if they all share the same ABI and hardware architecture, you could also compile static binaries.
Using C in a shared multi-platform POSIX environment
0
0
4
0
0
I write tools that are used in a shared workspace. Since there are multiple OS's working in this space, we generally use Python and standardize the version that is installed across machines. However, if I wanted to write some things in C, I was wondering if maybe I could have the application wrapped in a Python script, that detected the operating system and fired off the correct version of the C application. Each platform has GCC available and uses the same shell. One idea was to have the C compiled to the users local ~/bin, with timestamp comparison with C code so it is not compiled each run, but only when code is updated. Another was to just compile it for each platform, and have the wrapper script select the proper executable. Is there an accepted/stable process for this? Are there any catches? Are there alternatives (assuming the absolute need to use native C code)? Clarification: Multiple OS's are involved that do not share ABI. Eg. OS X, various Linuxes, BSD etc. I need to be able to update the code in place in shared folders and have the new code working more or less instantaneously. Distributing binary or source packages is less than ideal.
293
39,847
0
false
0
1
2
python,c,cross-platform,posix,scripting
4
0
0
2008-09-02T15:46:00.000
39,871
1
For simple Python programs, you probably don't need to use eggs. Distributing the raw .py files should suffice; it's like distributing source files for GNU/Linux. You can also use the various OS "packagers" (like py2exe or py2app) to create .exe, .dmg, or other files for different operating systems. More complex programs, e.g. Django, pretty much require eggs due to the various modules and dependencies required.
What are the advantages of packaging your python library/application as an .egg file?
0
1
3
0
0
I've read some about .egg files and I've noticed them in my lib directory but what are the advantages/disadvantages of using then as a developer?
10,471
47,953
0
false
0.033321
1
27
python,zip,packaging,software-distribution,egg
6
0
1
2008-09-06T23:35:00.000
138,090
1
Whatever you do, do not stop distributing your application, also, as a tarball, as that is the easiest packagable format for operating systems with a package sysetem.
What are the advantages of packaging your python library/application as an .egg file?
0
1
3
0
0
I've read some about .egg files and I've noticed them in my lib directory but what are the advantages/disadvantages of using then as a developer?
10,471
47,953
0
false
0.033321
1
27
python,zip,packaging,software-distribution,egg
6
0
1
2008-09-06T23:35:00.000
137,903
1
Eggs are a pretty good way to distribute python apps. Think of it as a platform independent .deb file that will install all dependencies and whatnot. The advantage is that it's easy to use for the end user. The disadvantage are that it can be cumbersome to package your app up as a .egg file. You should also offer an alternative means of installation in addition to .eggs. There are some people who don't like using eggs because they don't like the idea of a software program installing whatever software it wants. These usually tend to be sysadmin types.
What are the advantages of packaging your python library/application as an .egg file?
0
1
3
0
0
I've read some about .egg files and I've noticed them in my lib directory but what are the advantages/disadvantages of using then as a developer?
10,471
47,953
0
false
0.132549
1
27
python,zip,packaging,software-distribution,egg
6
0
4
2008-09-06T23:35:00.000
47,958
1
Using Inter Process Communication (IPC) over socket can be a possible solution. Use a local network socket to listen/trasfer commands between both.
Calling python from a c++ program for distribution
0
1
1
0
0
I would like to call python script files from my c++ program. I am not sure that the people I will distribute to will have python installed. Basically I'm looking for a .lib file that I can use that has an Apache like distribution license.
100,997
49,137
0
false
0
1
65
c++,python,embedded-language
7
0
0
2008-09-08T03:53:00.000
69,672,216
0
I'm currently using JQuery for my GAE app and it works beautifully for me. I have a chart (google charts) that is dynamic and uses an Ajax call to grab a JSON string. It really seems to work fine for me.
Any good AJAX framework for Google App Engine apps?
1
0
2
0
0
I am trying to implement AJAX in my Google App Engine application, and so I am looking for a good AJAX framework that will help me. Anyone has any idea? I am thinking about Google Web Toolkit, how good it is in terms of creating AJAX for Google App Engine?
11,904
53,997
0
false
0
1
14
python,ajax,google-app-engine
11
0
0
2008-09-10T13:12:00.000
230,476
0
I'd recommend looking into a pure javascript framework (probably Jquery) for your client-side code, and write JSON services in python- that seems to be the easiest / bestest way to go. Google Web Toolkit lets you write the UI in Java and compile it to javascript. As Dave says, it may be a better choice where the backend is in Java, as it has nice RPC hooks for that case.
Any good AJAX framework for Google App Engine apps?
1
0
2
0
0
I am trying to implement AJAX in my Google App Engine application, and so I am looking for a good AJAX framework that will help me. Anyone has any idea? I am thinking about Google Web Toolkit, how good it is in terms of creating AJAX for Google App Engine?
11,904
53,997
0
false
0.054491
1
14
python,ajax,google-app-engine
11
0
3
2008-09-10T13:12:00.000
54,015
0
I have no Dabo experience at all but this question is on the top of the list fo such a long time that I decided to give it a shot: Framework selection Assumptions: medium-to-big project: we're talking about a team of more than 20 people working on something for about a year for the first phase. This is usually an expensive and very important effort for the client. this project will have significant amount of users (around a hundred) so performance is essential it's an ERP project so the application will work with large amounts of information you have no prior Dabo experience in your team Considerations: I could not open Dabo project site right now. There seems to be some server problem. That alone would make me think twice about using it for a big project. It's not a well-known framework. Typing Dabo in Google returns almost no useful results, it does not have a Wikipedia page, all-in-all it's quite obscure. It means that when you will have problems with it (and you will have problems with it) you will have almost no place to go. Your question was unanswered for 8 days on SO, this alone would make me re-consider. If you base your project on an obscure technology you have no previous experience with - it's a huge risk. You don't have people who know that framework in your team. It means that you have to learn it to get any results at all and to master it will require quite significant amount of time. You will have to factor that time into your project plan. Do you really need it? What does this framework give you that you cannot do yourself? Quite a lot of time my team tried to use some third-party component or tool only to find that building a custom one would be faster than dealing with third-party problems and limitations. There are brilliant tools available to people nowadays and we would be lost without them - but you have to carefully consider if this tool is one of them Dabo project version is 0.84. Do you know if they spend time optimising their code for performance at this stage? Did you run any tests to see it will sustain the load you have in your NFRs. Hope that helps :) Good luck with your project
Anyone used Dabo for a medium-big project?
1
0
1
0
0
We're at the beginning of a new ERP-ish client-server application, developed as a Python rich client. We're currently evaluating Dabo as our main framework and it looks quite nice and easy to use, but I was wondering, has anyone used it for medium-to-big sized projects? Thanks for your time!
4,033
56,417
0
false
0.197375
1
21
python,erp,dabo
2
0
2
2008-09-11T12:29:00.000
103,212
0
Careful not to use the input function, unless you know what you're doing. Unlike raw_input, input will accept any python expression, so it's kinda like eval
How to prompt for user input and read command-line arguments
0
0
1
0
0
How do I have a Python script that a) can accept user input and how do I make it b) read in arguments if run from the command line?
1,321,249
70,797
0
false
1
1
591
python,input,command-line-arguments
12
0
19
2008-09-16T09:44:00.000
70,869
1
bouncycastle has a Java crypto-provider and support for OCSP requests and responses. The differences between OCSPReq and OCSPRequest and OCSPResp and OCSPResponse class are a little confusing, though.
OCSP command-line test tool?
0
0
1
0
0
Does anybody know of a tool to test OCSP responses? Preferably, something that can be used from a Windows Command-line and/or can be included (easily) in a Java/python program
8,106
71,468
0
false
0.039979
1
3
java,python,command-line,ocsp
5
0
1
2008-09-16T11:44:00.000
108,678
0
Just put at the end of your code quit() and that should close a python script.
How to terminate a script?
0
1
2
0
0
I am aware of the die() command in PHP which exits a script early. How can I do this in Python?
1,876,007
73,663
0
false
0
1
1,288
python,termination
12
0
0
2008-09-16T15:35:00.000
70,824,754
0
While you should generally prefer sys.exit because it is more "friendly" to other code, all it actually does is raise an exception. If you are sure that you need to exit a process immediately, and you might be inside of some exception handler which would catch SystemExit, there is another function - os._exit - which terminates immediately at the C level and does not perform any of the normal tear-down of the interpreter; for example, hooks registered with the "atexit" module are not executed.
How to terminate a script?
0
1
2
0
0
I am aware of the die() command in PHP which exits a script early. How can I do this in Python?
1,876,007
73,663
0
false
1
1
1,288
python,termination
12
0
75
2008-09-16T15:35:00.000
76,374
0
I don't think there is a built in way to get it from Python itself. My question is, how are you getting the IP information from your network? To get it from your local machine you could parse ifconfig (unix) or ipconfig (windows) with little difficulty.
Search for host with MAC-address using Python
0
0
4
1
0
I'd like to search for a given MAC address on my network, all from within a Python script. I already have a map of all the active IP addresses in the network but I cannot figure out how to glean the MAC address. Any ideas?
16,340
85,577
0
false
0.024995
1
9
python,network-programming
8
0
1
2008-09-17T17:23:00.000
85,608
0
You would want to parse the output of 'arp', but the kernel ARP cache will only contain those IP address(es) if those hosts have communicated with the host where the Python script is running. ifconfig can be used to display the MAC addresses of local interfaces, but not those on the LAN.
Search for host with MAC-address using Python
0
0
4
1
0
I'd like to search for a given MAC address on my network, all from within a Python script. I already have a map of all the active IP addresses in the network but I cannot figure out how to glean the MAC address. Any ideas?
16,340
85,577
0
false
0
1
9
python,network-programming
8
0
0
2008-09-17T17:23:00.000
85,641
0
It seems that there is not a native way of doing this with Python. Your best bet would be to parse the output of "ipconfig /all" on Windows, or "ifconfig" on Linux. Consider using os.popen() with some regexps.
Search for host with MAC-address using Python
0
0
4
1
0
I'd like to search for a given MAC address on my network, all from within a Python script. I already have a map of all the active IP addresses in the network but I cannot figure out how to glean the MAC address. Any ideas?
16,340
85,577
0
false
0.024995
1
9
python,network-programming
8
0
1
2008-09-17T17:23:00.000
85,634
0
Depends on your platform. If you're using *nix, you can use the 'arp' command to look up the mac address for a given IP (assuming IPv4) address. If that doesn't work, you could ping the address and then look, or if you have access to the raw network (using BPF or some other mechanism), you could send your own ARP packets (but that is probably overkill).
Search for host with MAC-address using Python
0
0
4
1
0
I'd like to search for a given MAC address on my network, all from within a Python script. I already have a map of all the active IP addresses in the network but I cannot figure out how to glean the MAC address. Any ideas?
16,340
85,577
0
false
0
1
9
python,network-programming
8
0
0
2008-09-17T17:23:00.000
85,620
0
os.system does not allow you to store results, so if you want to store results in some list or something, a subprocess.call works.
How do I execute a program or call a system command?
0
0
3
0
0
How do I call an external command within Python as if I'd typed it in a shell or command prompt?
4,032,334
89,228
0
false
1
1
5,689
python,shell,terminal,subprocess,command
64
0
26
2008-09-18T01:35:00.000
10,988,365
0
subprocess.check_call is convenient if you don't want to test return values. It throws an exception on any error.
How do I execute a program or call a system command?
0
0
3
0
0
How do I call an external command within Python as if I'd typed it in a shell or command prompt?
4,032,334
89,228
0
false
1
1
5,689
python,shell,terminal,subprocess,command
64
0
25
2008-09-18T01:35:00.000
4,728,086
0
There is another difference here which is not mentioned previously. subprocess.Popen executes the <command> as a subprocess. In my case, I need to execute file <a> which needs to communicate with another program, <b>. I tried subprocess, and execution was successful. However <b> could not communicate with <a>. Everything is normal when I run both from the terminal. One more: (NOTE: kwrite behaves different from other applications. If you try the below with Firefox, the results will not be the same.) If you try os.system("kwrite"), program flow freezes until the user closes kwrite. To overcome that I tried instead os.system(konsole -e kwrite). This time program continued to flow, but kwrite became the subprocess of the console. Anyone runs the kwrite not being a subprocess (i.e. in the system monitor it must appear at the leftmost edge of the tree).
How do I execute a program or call a system command?
0
0
3
0
0
How do I call an external command within Python as if I'd typed it in a shell or command prompt?
4,032,334
89,228
0
false
1
1
5,689
python,shell,terminal,subprocess,command
64
0
26
2008-09-18T01:35:00.000
2,030,768
0
py2exe is the best way to do this. It's a bit of a PITA to use, but the end result works very well.
How to bundle a Python application including dependencies?
0
0
2
0
0
I need to package my Python application, its dependencies and Python into a single MSI installer. The end result should desirably be: Python is installed in the standard location the package and its dependencies are installed in a separate directory (possibly site-packages) the installation directory should contain the Python uncompressed and a standalone executable is not required
58,009
106,725
0
false
0.028564
1
61
python,tkinter,packaging
7
0
1
2008-09-20T01:39:00.000
106,731
1
My company uses the free InnoSetup tool. It is a moderately complex program that has tons of flexibility for building installers for windows. I believe that it creates .exe and not .msi files, however. InnoSetup is not python specific but we have created an installer for one of our products that installs python along with dependencies to locations specified by the user at install time.
How to bundle a Python application including dependencies?
0
0
2
0
0
I need to package my Python application, its dependencies and Python into a single MSI installer. The end result should desirably be: Python is installed in the standard location the package and its dependencies are installed in a separate directory (possibly site-packages) the installation directory should contain the Python uncompressed and a standalone executable is not required
58,009
106,725
0
false
0.141893
1
61
python,tkinter,packaging
7
0
5
2008-09-20T01:39:00.000
114,717
1
Yes, it is. You can disable it on the commandline with the "-u" switch. Alternatively, you could call .flush() on sys.stdout on every write (or wrap it with an object that does this automatically)
Disable output buffering
0
0
3
0
0
Is output buffering enabled by default in Python's interpreter for sys.stdout? If the answer is positive, what are all the ways to disable it? Suggestions so far: Use the -u command line switch Wrap sys.stdout in an object that flushes after every write Set PYTHONUNBUFFERED env var sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) Is there any other way to set some global flag in sys/sys.stdout programmatically during execution?
341,073
107,705
0
false
1
1
621
python,stdout,buffered
16
0
68
2008-09-20T09:17:00.000
107,720
0
Yes, it is enabled by default. You can disable it by using the -u option on the command line when calling python.
Disable output buffering
0
0
3
0
0
Is output buffering enabled by default in Python's interpreter for sys.stdout? If the answer is positive, what are all the ways to disable it? Suggestions so far: Use the -u command line switch Wrap sys.stdout in an object that flushes after every write Set PYTHONUNBUFFERED env var sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) Is there any other way to set some global flag in sys/sys.stdout programmatically during execution?
341,073
107,705
0
false
1
1
621
python,stdout,buffered
16
0
12
2008-09-20T09:17:00.000
107,721
0
(I've posted a comment, but it got lost somehow. So, again:) As I noticed, CPython (at least on Linux) behaves differently depending on where the output goes. If it goes to a tty, then the output is flushed after each '\n' If it goes to a pipe/process, then it is buffered and you can use the flush() based solutions or the -u option recommended above. Slightly related to output buffering: If you iterate over the lines in the input with for line in sys.stdin: ... then the for implementation in CPython will collect the input for a while and then execute the loop body for a bunch of input lines. If your script is about to write output for each input line, this might look like output buffering but it's actually batching, and therefore, none of the flush(), etc. techniques will help that. Interestingly, you don't have this behaviour in pypy. To avoid this, you can use while True: line=sys.stdin.readline() ...
Disable output buffering
0
0
3
0
0
Is output buffering enabled by default in Python's interpreter for sys.stdout? If the answer is positive, what are all the ways to disable it? Suggestions so far: Use the -u command line switch Wrap sys.stdout in an object that flushes after every write Set PYTHONUNBUFFERED env var sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0) Is there any other way to set some global flag in sys/sys.stdout programmatically during execution?
341,073
107,705
0
false
0.037482
1
621
python,stdout,buffered
16
0
3
2008-09-20T09:17:00.000
17,047,064
0
Yes you can: Go to Datastore Admin, and then select the Entitiy type you want to delete and click Delete. Mapreduce will take care of deleting!
Delete all data for a kind in Google App Engine
1
0
3
0
0
I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records.
29,003
108,822
0
false
0.010526
1
45
python,google-app-engine
19
0
1
2008-09-20T17:34:00.000
8,444,988
0
You can use the task queues to delete chunks of say 100 objects. Deleting objects in GAE shows how limited the Admin capabilities are in GAE. You have to work with batches on 1000 entities or less. You can use the bulkloader tool that works with csv's but the documentation does not cover java. I am using GAE Java and my strategy for deletions involves having 2 servlets, one for doing the actually delete and another to load the task queues. When i want to do a delete, I run the queue loading servlet, it loads the queues and then GAE goes to work executing all the tasks in the queue. How to do it: Create a servlet that deletes a small number of objects. Add the servlet to your task queues. Go home or work on something else ;) Check the datastore every so often ... I have a datastore with about 5000 objects that i purge every week and it takes about 6 hours to clean out, so i run the task on Friday night. I use the same technique to bulk load my data which happens to be about 5000 objects, with about a dozen properties.
Delete all data for a kind in Google App Engine
1
0
3
0
0
I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records.
29,003
108,822
0
false
0
1
45
python,google-app-engine
19
0
0
2008-09-20T17:34:00.000
2,245,189
0
Unfortunately, there's no way to easily do a bulk delete. Your best bet is to write a script that deletes a reasonable number of entries per invocation, and then call it repeatedly - for example, by having your delete script return a 302 redirect whenever there's more data to delete, then fetching it with "wget --max-redirect=10000" (or some other large number).
Delete all data for a kind in Google App Engine
1
0
3
0
0
I would like to wipe out all data for a specific kind in Google App Engine. What is the best way to do this? I wrote a delete script (hack), but since there is so much data is timeout's out after a few hundred records.
29,003
108,822
0
false
0.031568
1
45
python,google-app-engine
19
0
3
2008-09-20T17:34:00.000
109,018
0
This question has been fully answered. Which is good. But one thing perhaps is worth mentioning. The google app engine has a plugin for the eclipse ide which is a joy to work with. If you already do your development with eclipse you are going to be so happy about that. To deploy on the google app engine's web site all I need to do is click one little button - with the airplane logo - super.
Feedback on using Google App Engine?
1
0
4
0
0
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback. Any other success/failure notes would be great.
10,614
110,186
0
false
1
1
126
python,django,google-app-engine
11
0
6
2008-09-21T03:41:00.000
2,462,266
0
I am using GAE to host several high-traffic applications. Like on the order of 50-100 req/sec. It is great, I can't recommend it enough. My previous experience with web development was with Ruby (Rails/Merb). Learning Python was easy. I didn't mess with Django or Pylons or any other framework, just started from the GAE examples and built what I needed out of the basic webapp libraries that are provided. If you're used to the flexibility of SQL the datastore can take some getting used to. Nothing too traumatic! The biggest adjustment is moving away from JOINs. You have to shed the idea that normalizing is crucial. Ben
Feedback on using Google App Engine?
1
0
4
0
0
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback. Any other success/failure notes would be great.
10,614
110,186
0
false
1
1
126
python,django,google-app-engine
11
0
36
2008-09-21T03:41:00.000
566,481
0
One of the compelling reasons I have come across for using Google App Engine is its integration with Google Apps for your domain. Essentially it allows you to create custom, managed web applications that are restricted to the (controlled) logins of your domain. Most of my experience with this code was building a simple time/task tracking application. The template engine was simple and yet made a multi-page application very approachable. The login/user awareness api is similarly useful. I was able to make a public page/private page paradigm without too much issue. (a user would log in to see the private pages. An anonymous user was only shown the public page.) I was just getting into the datastore portion of the project when I got pulled away for "real work". I was able to accomplish a lot (it still is not done yet) in a very little amount of time. Since I had never used Python before, this was particularly pleasant (both because it was a new language for me, and also because the development was still fast despite the new language). I ran into very little that led me to believe that I wouldn't be able to accomplish my task. Instead I have a fairly positive impression of the functionality and features. That is my experience with it. Perhaps it doesn't represent more than an unfinished toy project, but it does represent an informed trial of the platform, and I hope that helps.
Feedback on using Google App Engine?
1
0
4
0
0
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback. Any other success/failure notes would be great.
10,614
110,186
0
false
1
1
126
python,django,google-app-engine
11
0
23
2008-09-21T03:41:00.000
110,299
0
The "App Engine running Django" idea is a bit misleading. App Engine replaces the entire Django model layer so be prepared to spend some time getting acclimated with App Engine's datastore which requires a different way of modeling and thinking about data.
Feedback on using Google App Engine?
1
0
4
0
0
Looking to do a very small, quick 'n dirty side project. I like the fact that the Google App Engine is running on Python with Django built right in - gives me an excuse to try that platform... but my question is this: Has anyone made use of the app engine for anything other than a toy problem? I see some good example apps out there, so I would assume this is good enough for the real deal, but wanted to get some feedback. Any other success/failure notes would be great.
10,614
110,186
0
false
1
1
126
python,django,google-app-engine
11
0
12
2008-09-21T03:41:00.000
110,225
0
I don't know the correct way to do it, but this manual method is the approach I've used for simple scripts which seems to have preformed suitably. I'll assume that whatever directory I'm in, the Python files for my program are in the relative src/ directory, and that the file I want to execute (which has the proper shebang and execute permissions) is named main.py. $ mkdir -p MyApplication.app/Contents/MacOS $ mv src/* MyApplication.app/Contents/MacOS $ cd MyApplication.app/Contents/MacOS $ mv main.py MyApplication At this point we have an application bundle which, as far as I know, should work on any Mac OS system with Python installed (which I think it has by default). It doesn't have an icon or anything, that requires adding some more metadata to the package which is unnecessary for my purposes and I'm not familiar with. To create the drag-and-drop installer is quite simple. Use Disk Utility to create a New Disk Image of approximately the size you require to store your application. Open it up, copy your application and an alias of /Applications to the drive, then use View Options to position them as you want. The drag-and-drop message is just a background of the disk image, which you can also specify in View Options. I haven't done it before, but I'd assume that after you whip up an image in your editor of choice you could copy it over, set it as the background and then use chflags hidden to prevent it from cluttering up your nice window. I know these aren't the clearest, simplest or most detailed instructions out there, but I hope somebody may find them useful.
How do you create an osx application/dmg from a python package?
0
0
1
0
0
I want to create a mac osx application from python package and then put it in a disk image. Because I load some resources out of the package, the package should not reside in a zip file. The resulting disk image should display the background picture to "drag here -> applications" for installation.
16,311
116,657
0
false
1
1
25
python,macos,packaging
1
0
7
2008-09-22T18:35:00.000
116,901
1
The current Macports installer does the .profile PATH modification automatically.
How do I uninstall python from OSX Leopard so that I can use the MacPorts version?
0
0
3
0
0
I want to use the macports version of python instead of the one that comes with Leopard.
22,721
118,813
0
false
0.085505
1
19
python,macos,osx-leopard,macports
7
0
3
2008-09-23T02:38:00.000
2,621,262
1
Don't. Apple ships various system utilities that rely on the system Python (and particularly the Python "framework" build); removing it will cause you problems. Instead, modify your PATH environ variable in your ~/.bash_profile to put /opt/local/bin first.
How do I uninstall python from OSX Leopard so that I can use the MacPorts version?
0
0
3
0
0
I want to use the macports version of python instead of the one that comes with Leopard.
22,721
118,813
0
false
1
1
19
python,macos,osx-leopard,macports
7
0
29
2008-09-23T02:38:00.000
118,824
1
Instead of uninstalling the built-in Python, install the MacPorts version and then modify your $PATH to have the MacPorts version first. For example, if MacPorts installs /usr/local/bin/python, then modify your .bashrc to include PATH=/usr/local/bin:$PATH at the end.
How do I uninstall python from OSX Leopard so that I can use the MacPorts version?
0
0
3
0
0
I want to use the macports version of python instead of the one that comes with Leopard.
22,721
118,813
0
false
0.113791
1
19
python,macos,osx-leopard,macports
7
0
4
2008-09-23T02:38:00.000
118,821
1
"escaping the ampersand with ^" Are you sure ^ is an escape character to Windows? Shouldn't you use \?
Python subprocess issue with ampersands
0
0
3
0
0
I'm currently having a major issue with a python script. The script runs arbitrary commands through a handler to convert incorrect error reporting into correct error reporting. The issue I'm having is getting the script to work correctly on windows with a command that contains ampersands in it's path. I've attempted quoting the command, escaping the ampersand with ^ and neither works. I'm now out of ideas. Any suggestions? To clarify from current responses: I am using the subprocess module I am passing the command line + arguments in as a list The issue is with the path to the command itself, not any of the arguments I've tried quoting the command. It causes a [Error 123] The filename, directory name, or volume label syntax is incorrect error I'm using no shell argument (so shell=false) In case it matters, I'm grabbing a pipe to stderr for processing it, but ignoring stdout and stdin It is only for use on Windows currently, and works as expected in all other cases that I've tested so far. The command that is failing is: p = subprocess.Popen(prog, stderr = subprocess.PIPE, bufsize=-1) when the first element of the list 'prog' contains any ampersands. Quoting this first string does not work.
5,909
120,657
0
false
0.033321
1
5
python,windows,subprocess,command-line-arguments
6
0
1
2008-09-23T12:28:00.000
120,992
0
To answer my own question: Quoting the actual command when passing the parameters as a list doesn't work correctly (command is first item of list) so to solve the issue I turned the list into a space separated string and passed that into subprocess instead. Better solutions still welcomed.
Python subprocess issue with ampersands
0
0
3
0
0
I'm currently having a major issue with a python script. The script runs arbitrary commands through a handler to convert incorrect error reporting into correct error reporting. The issue I'm having is getting the script to work correctly on windows with a command that contains ampersands in it's path. I've attempted quoting the command, escaping the ampersand with ^ and neither works. I'm now out of ideas. Any suggestions? To clarify from current responses: I am using the subprocess module I am passing the command line + arguments in as a list The issue is with the path to the command itself, not any of the arguments I've tried quoting the command. It causes a [Error 123] The filename, directory name, or volume label syntax is incorrect error I'm using no shell argument (so shell=false) In case it matters, I'm grabbing a pipe to stderr for processing it, but ignoring stdout and stdin It is only for use on Windows currently, and works as expected in all other cases that I've tested so far. The command that is failing is: p = subprocess.Popen(prog, stderr = subprocess.PIPE, bufsize=-1) when the first element of the list 'prog' contains any ampersands. Quoting this first string does not work.
5,909
120,657
0
false
0
1
5
python,windows,subprocess,command-line-arguments
6
0
0
2008-09-23T12:28:00.000
120,782
0
A proper answer will need more information than that. What are you actually doing? How does it fail? Are you using the subprocess module? Are you passing a list of arguments and shell=False (or no shell argument) or are you actually invoking the shell?
Python subprocess issue with ampersands
0
0
3
0
0
I'm currently having a major issue with a python script. The script runs arbitrary commands through a handler to convert incorrect error reporting into correct error reporting. The issue I'm having is getting the script to work correctly on windows with a command that contains ampersands in it's path. I've attempted quoting the command, escaping the ampersand with ^ and neither works. I'm now out of ideas. Any suggestions? To clarify from current responses: I am using the subprocess module I am passing the command line + arguments in as a list The issue is with the path to the command itself, not any of the arguments I've tried quoting the command. It causes a [Error 123] The filename, directory name, or volume label syntax is incorrect error I'm using no shell argument (so shell=false) In case it matters, I'm grabbing a pipe to stderr for processing it, but ignoring stdout and stdin It is only for use on Windows currently, and works as expected in all other cases that I've tested so far. The command that is failing is: p = subprocess.Popen(prog, stderr = subprocess.PIPE, bufsize=-1) when the first element of the list 'prog' contains any ampersands. Quoting this first string does not work.
5,909
120,657
0
false
0.033321
1
5
python,windows,subprocess,command-line-arguments
6
0
1
2008-09-23T12:28:00.000
120,705
0
You can make a shortcut somewhere and as the target use: python yourscript.py then under properties and advanced select run as administrator. When the user executes the shortcut it will ask them to elevate the application.
Request UAC elevation from within a Python script?
0
0
1
0
0
I want my Python script to copy files on Vista. When I run it from a normal cmd.exe window, no errors are generated, yet the files are NOT copied. If I run cmd.exe "as administator" and then run my script, it works fine. This makes sense since User Account Control (UAC) normally prevents many file system actions. Is there a way I can, from within a Python script, invoke a UAC elevation request (those dialogs that say something like "such and such app needs admin access, is this OK?") If that's not possible, is there a way my script can at least detect that it is not elevated so it can fail gracefully?
126,138
130,763
0
false
0.036348
1
113
python,windows,windows-vista,uac
11
0
2
2008-09-25T00:22:00.000
22,821,704
0
If you're app solely relies on Django, then App Engine is a good bet. However, if you ever need to add C-enhanced libraries, you're up a creek. App Engine doesn't support things like PIL or ReportLab, which use C to speed up processing times. I'm only mentioning this because you may want to use C to speed up some of your routines in the long run. If you decide to use a co-loc, check out WebFaction.com. They have great Django/Python support and they have no issue with you using the aforementioned lirbaries.
Is Google App Engine a worthy platform for a Lifestreaming app?
1
0
4
0
0
I'm building a Lifestreaming app that will involve pulling down lots of feeds for lots of users, and performing data-mining, and machine learning algorithms on the results. GAE's load balanced and scalable hosting sounds like a good fit for a system that could eventually be moving around a LOT of data, but it's lack of cron jobs is a nuisance. Would I be better off using Django on a co-loc and dealing with my own DB scaling?
1,087
135,169
0
false
0.028564
1
7
python,django,google-app-engine,web-applications
7
0
1
2008-09-25T18:46:00.000
139,634
0
Pulling feeds or doing calculations won't be a problem. But you'll soon have to pay for your account. App engine includes Django, except you'll need to work with some adaptors for the model part. It will surely save you from maintenance headaches.
Is Google App Engine a worthy platform for a Lifestreaming app?
1
0
4
0
0
I'm building a Lifestreaming app that will involve pulling down lots of feeds for lots of users, and performing data-mining, and machine learning algorithms on the results. GAE's load balanced and scalable hosting sounds like a good fit for a system that could eventually be moving around a LOT of data, but it's lack of cron jobs is a nuisance. Would I be better off using Django on a co-loc and dealing with my own DB scaling?
1,087
135,169
0
false
0
1
7
python,django,google-app-engine,web-applications
7
0
0
2008-09-25T18:46:00.000
135,223
0
No. If you need to pull lots of things down, App Engine isn't going to work so well. You can use it as a front end by putting your data in their store after doing your offline preprocessing, but you can't do much in the ~1 second time you have per request without doing some really crazy things. Your app would likely be better off on your own hosting.
Is Google App Engine a worthy platform for a Lifestreaming app?
1
0
4
0
0
I'm building a Lifestreaming app that will involve pulling down lots of feeds for lots of users, and performing data-mining, and machine learning algorithms on the results. GAE's load balanced and scalable hosting sounds like a good fit for a system that could eventually be moving around a LOT of data, but it's lack of cron jobs is a nuisance. Would I be better off using Django on a co-loc and dealing with my own DB scaling?
1,087
135,169
0
false
0
1
7
python,django,google-app-engine,web-applications
7
0
0
2008-09-25T18:46:00.000
135,201
0
It might change when they offer paid plans, but as it stands, App Engine is not good for CPU intensive apps. It is designed to scale to handle a large number of requests, not necessarily a large amount of calculation per request. I am running into this issue with fairly minor calculations, and I fear I may have to start looking elsewhere as my data set grows.
Is Google App Engine a worthy platform for a Lifestreaming app?
1
0
4
0
0
I'm building a Lifestreaming app that will involve pulling down lots of feeds for lots of users, and performing data-mining, and machine learning algorithms on the results. GAE's load balanced and scalable hosting sounds like a good fit for a system that could eventually be moving around a LOT of data, but it's lack of cron jobs is a nuisance. Would I be better off using Django on a co-loc and dealing with my own DB scaling?
1,087
135,169
0
false
0.085505
1
7
python,django,google-app-engine,web-applications
7
0
3
2008-09-25T18:46:00.000
135,199
0
Create a shortcut of the file. In case you don't have python open .py files by default, go into the properties of the shortcut and edit the target of the shortcut to include the python version you're using. For example: Target: C:\Python26\python.exe < shortcut target path> I'm posting this because I didn't want to edit the Registry and the .bat workaround didn't work for me.
Drag and drop onto Python script in Windows Explorer
0
0
3
0
0
I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a drop target. Is there some kind of configuration that needs to be done somewhere for this work?
59,279
142,844
0
false
0.049958
1
59
python,windows,drag-and-drop,windows-explorer
8
0
2
2008-09-27T03:02:00.000
21,840,490
0
1). create shortcut of .py 2). right click -> properties 3). prefix "Target:" with "python" so it runs the .py as an argument into the python command or 1). create a .bat 2). python some.py %* these shortcut versions are simplest for me to do what i'm doing otherwise i'd convert it to a .exe, but would rather just use java or c/c++
Drag and drop onto Python script in Windows Explorer
0
0
3
0
0
I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a drop target. Is there some kind of configuration that needs to be done somewhere for this work?
59,279
142,844
0
false
0.049958
1
59
python,windows,drag-and-drop,windows-explorer
8
0
2
2008-09-27T03:02:00.000
53,586,688
0
Try using py2exe. Use py2exe to convert your python script into a windows executable. You should then be able to drag and drop input files to your script in Windows Explorer. You should also be able to create a shortcut on your desktop and drop input files onto it. And if your python script can take a file list you should be able to drag and drop multiple files on your script (or shortcut).
Drag and drop onto Python script in Windows Explorer
0
0
3
0
0
I would like to drag and drop my data file onto a Python script and have it process the file and generate output. The Python script accepts the name of the data file as a command-line parameter, but Windows Explorer doesn't allow the script to be a drop target. Is there some kind of configuration that needs to be done somewhere for this work?
59,279
142,844
0
false
1
1
59
python,windows,drag-and-drop,windows-explorer
8
0
6
2008-09-27T03:02:00.000
4,486,506
0
Have you check pyOpenSSL.. am sure openssl supports ocsp and python binding may support it
OCSP libraries for python / java / c?
1
0
1
0
0
Going back to my previous question on OCSP, does anybody know of "reliable" OCSP libraries for Python, Java and C? I need "client" OCSP functionality, as I'll be checking the status of Certs against an OCSP responder, so responder functionality is not that important. Thanks
2,998
143,515
0
true
1.2
1
3
java,python,c,ocsp
3
0
1
2008-09-27T12:12:00.000
143,996
0
As of wxPython 2.9.2.0 wx.TaskBarIcon will create a menubar icon now instead on OSX, so long as you call SetIcon.
how to set a menubar icon on mac osx using wx
0
0
1
0
1
I could not find any pointers on how to create a menubar icon on OSX using wx. I originally thought that the wxTaskBarIcon class would do, but it actually creates an icon on the Dock. On Windows, wxTaskBarIcon creates a Systray icon and associated menu, and I would think that on mac osx it would create a menubar icon, I guess not.
4,972
145,894
0
false
0.049958
1
6
macos,wxpython,wxwidgets
4
0
1
2008-09-28T14:02:00.000
25,845,284
0
Create a new launch configuration (Python Run) Main tab Use paster-script.py as main module (you can find it in the Scripts sub-directory in your python installation directory) Don't forget to add the root folder of your application in the PYTHONPATH zone Arguments Set the base directory to the root folder also. As Program Arguments use "serve development.ini" (or whatever you use to debug your app") Common Tab Check allocate console and launch in background
Debug Pylons application through Eclipse
1
1
4
0
0
I have Eclipse setup with PyDev and love being able to debug my scripts/apps. I've just started playing around with Pylons and was wondering if there is a way to start up the paster server through Eclipse so I can debug my webapp?
5,139
147,650
0
true
1.2
1
11
python,eclipse,pylons,pydev,pyramid
7
0
10
2008-09-29T05:41:00.000
147,768
0
I was able to get --reload working by changing the 'Working directory' in the arguments tab to not use default (i.e. select 'Other'->File System->'Root of your Pylons' app where development.ini is stored.
Debug Pylons application through Eclipse
1
1
4
0
0
I have Eclipse setup with PyDev and love being able to debug my scripts/apps. I've just started playing around with Pylons and was wondering if there is a way to start up the paster server through Eclipse so I can debug my webapp?
5,139
147,650
0
false
0.057081
1
11
python,eclipse,pylons,pydev,pyramid
7
0
2
2008-09-29T05:41:00.000
3,817,880
0
On linux that will probably be /usr/bin/paster or /usr/local/bin/paster for paste script, and for arguments i have: serve ${workspace_loc}${project_path}/development.ini
Debug Pylons application through Eclipse
1
1
4
0
0
I have Eclipse setup with PyDev and love being able to debug my scripts/apps. I've just started playing around with Pylons and was wondering if there is a way to start up the paster server through Eclipse so I can debug my webapp?
5,139
147,650
0
false
0.028564
1
11
python,eclipse,pylons,pydev,pyramid
7
0
1
2008-09-29T05:41:00.000
2,958,194
0
yanjost has it right, just wanted to add that you need to make sure you do not use the --reload option, this will prevent the debugger from properly attaching itself and cause your breakpoints not to work. Just a little thing I ran in to.
Debug Pylons application through Eclipse
1
1
4
0
0
I have Eclipse setup with PyDev and love being able to debug my scripts/apps. I've just started playing around with Pylons and was wondering if there is a way to start up the paster server through Eclipse so I can debug my webapp?
5,139
147,650
0
false
0.057081
1
11
python,eclipse,pylons,pydev,pyramid
7
0
2
2008-09-29T05:41:00.000
1,306,122
0
I always create a develop.py file at the top level of the project, and have also a packages directory with all of the .tar.gz files from PyPI that I want to install, and also included an unpacked copy of virtualenv that is ready to run right from that file. All of this goes into version control. Every developer can simply check out the trunk, run develop.py, and a few moments later will have a virtual environment ready to use that includes all of our dependencies at exactly the versions the other developers are using. And it works even if PyPI is down, which is very helpful at this point in that service's history.
Are there any other good alternatives to zc.buildout and/or virtualenv for installing non-python dependencies?
1
0
4
0
0
I am a member of a team that is about to launch a beta of a python (Django specifically) based web site and accompanying suite of backend tools. The team itself has doubled in size from 2 to 4 over the past few weeks and we expect continued growth for the next couple of months at least. One issue that has started to plague us is getting everyone up to speed in terms of getting their development environment configured and having all the right eggs installed, etc. I'm looking for ways to simplify this process and make it less error prone. Both zc.buildout and virtualenv look like they would be good tools for addressing this problem but both seem to concentrate primarily on the python-specific issues. We have a couple of small subprojects in other languages (Java and Ruby specifically) as well as numerous python extensions that have to be compiled natively (lxml, MySQL drivers, etc). In fact, one of the biggest thorns in our side has been getting some of these extensions compiled against appropriate versions of the shared libraries so as to avoid segfaults, malloc errors and all sorts of similar issues. It doesn't help that out of 4 people we have 4 different development environments -- 1 leopard on ppc, 1 leopard on intel, 1 ubuntu and 1 windows. Ultimately what would be ideal would be something that works roughly like this, from the dos/unix prompt: $ git clone [repository url] ... $ python setup-env.py ... that then does what zc.buildout/virtualenv does (copy/symlink the python interpreter, provide a clean space to install eggs) then installs all required eggs, including installing any native shared library dependencies, installs the ruby project, the java project, etc. Obviously this would be useful for both getting development environments up as well as deploying on staging/production servers. Ideally I would like for the tool that accomplishes this to be written in/extensible via python, since that is (and always will be) the lingua franca of our team, but I am open to solutions in other languages. So, my question then is: does anyone have any suggestions for better alternatives or any experiences they can share using one of these solutions to handle larger/broader install bases?
2,576
160,834
0
false
0.099668
1
7
python,deployment,build-process
6
0
3
2008-10-02T03:55:00.000
4,060,962
0
Setuptools may be capable of more of what you're looking for than you realize -- if you need a custom version of lxml to work correctly on MacOS X, for instance, you can put a URL to an appropriate egg inside your setup.py and have setuptools download and install that inside your developers' environments as necessary; it also can be told to download and install a specific version of a dependency from revision control. That said, I'd lean towards using a scriptably generated virtual environment. It's pretty straightforward to build a kickstart file which installs whichever packages you depend on and then boot virtual machines (or production hardware!) against it, with puppet or similar software doing other administration (adding users, setting up services [where's your database come from?], etc). This comes in particularly handy when your production environment includes multiple machines -- just script the generation of multiple VMs within their handy little sandboxed subnet (I use libvirt+kvm for this; while kvm isn't available on all the platforms you have developers working on, qemu certainly is, or you can do as I do and have a small number of beefy VM hosts shared by multiple developers). This gets you out of the headaches of supporting N platforms -- you only have a single virtual platform to support -- and means that your deployment process, as defined by the kickstart file and puppet code used for setup, is source-controlled and run through your QA and review processes just like everything else.
Are there any other good alternatives to zc.buildout and/or virtualenv for installing non-python dependencies?
1
0
4
0
0
I am a member of a team that is about to launch a beta of a python (Django specifically) based web site and accompanying suite of backend tools. The team itself has doubled in size from 2 to 4 over the past few weeks and we expect continued growth for the next couple of months at least. One issue that has started to plague us is getting everyone up to speed in terms of getting their development environment configured and having all the right eggs installed, etc. I'm looking for ways to simplify this process and make it less error prone. Both zc.buildout and virtualenv look like they would be good tools for addressing this problem but both seem to concentrate primarily on the python-specific issues. We have a couple of small subprojects in other languages (Java and Ruby specifically) as well as numerous python extensions that have to be compiled natively (lxml, MySQL drivers, etc). In fact, one of the biggest thorns in our side has been getting some of these extensions compiled against appropriate versions of the shared libraries so as to avoid segfaults, malloc errors and all sorts of similar issues. It doesn't help that out of 4 people we have 4 different development environments -- 1 leopard on ppc, 1 leopard on intel, 1 ubuntu and 1 windows. Ultimately what would be ideal would be something that works roughly like this, from the dos/unix prompt: $ git clone [repository url] ... $ python setup-env.py ... that then does what zc.buildout/virtualenv does (copy/symlink the python interpreter, provide a clean space to install eggs) then installs all required eggs, including installing any native shared library dependencies, installs the ruby project, the java project, etc. Obviously this would be useful for both getting development environments up as well as deploying on staging/production servers. Ideally I would like for the tool that accomplishes this to be written in/extensible via python, since that is (and always will be) the lingua franca of our team, but I am open to solutions in other languages. So, my question then is: does anyone have any suggestions for better alternatives or any experiences they can share using one of these solutions to handle larger/broader install bases?
2,576
160,834
0
false
0.132549
1
7
python,deployment,build-process
6
0
4
2008-10-02T03:55:00.000
185,505
0
You might consider creating virtual machine appliances with whatever production OS you are running, and all of the software dependencies pre-built. Code can be edited either remotely, or with a shared folder. It worked pretty well for me in a past life that had a fairly complicated development environment.
Are there any other good alternatives to zc.buildout and/or virtualenv for installing non-python dependencies?
1
0
4
0
0
I am a member of a team that is about to launch a beta of a python (Django specifically) based web site and accompanying suite of backend tools. The team itself has doubled in size from 2 to 4 over the past few weeks and we expect continued growth for the next couple of months at least. One issue that has started to plague us is getting everyone up to speed in terms of getting their development environment configured and having all the right eggs installed, etc. I'm looking for ways to simplify this process and make it less error prone. Both zc.buildout and virtualenv look like they would be good tools for addressing this problem but both seem to concentrate primarily on the python-specific issues. We have a couple of small subprojects in other languages (Java and Ruby specifically) as well as numerous python extensions that have to be compiled natively (lxml, MySQL drivers, etc). In fact, one of the biggest thorns in our side has been getting some of these extensions compiled against appropriate versions of the shared libraries so as to avoid segfaults, malloc errors and all sorts of similar issues. It doesn't help that out of 4 people we have 4 different development environments -- 1 leopard on ppc, 1 leopard on intel, 1 ubuntu and 1 windows. Ultimately what would be ideal would be something that works roughly like this, from the dos/unix prompt: $ git clone [repository url] ... $ python setup-env.py ... that then does what zc.buildout/virtualenv does (copy/symlink the python interpreter, provide a clean space to install eggs) then installs all required eggs, including installing any native shared library dependencies, installs the ruby project, the java project, etc. Obviously this would be useful for both getting development environments up as well as deploying on staging/production servers. Ideally I would like for the tool that accomplishes this to be written in/extensible via python, since that is (and always will be) the lingua franca of our team, but I am open to solutions in other languages. So, my question then is: does anyone have any suggestions for better alternatives or any experiences they can share using one of these solutions to handle larger/broader install bases?
2,576
160,834
0
false
0
1
7
python,deployment,build-process
6
0
0
2008-10-02T03:55:00.000
177,109
0
Basically, you're looking for a cross-platform software/package installer (on the lines of apt-get/yum/etc.) I'm not sure something like that exists? An alternative might be specifying the list of packages that need to be installed via the OS-specific package management system such as Fink or DarwinPorts for Mac OS X and having a script that sets up the build environment for the in-house code?
Are there any other good alternatives to zc.buildout and/or virtualenv for installing non-python dependencies?
1
0
4
0
0
I am a member of a team that is about to launch a beta of a python (Django specifically) based web site and accompanying suite of backend tools. The team itself has doubled in size from 2 to 4 over the past few weeks and we expect continued growth for the next couple of months at least. One issue that has started to plague us is getting everyone up to speed in terms of getting their development environment configured and having all the right eggs installed, etc. I'm looking for ways to simplify this process and make it less error prone. Both zc.buildout and virtualenv look like they would be good tools for addressing this problem but both seem to concentrate primarily on the python-specific issues. We have a couple of small subprojects in other languages (Java and Ruby specifically) as well as numerous python extensions that have to be compiled natively (lxml, MySQL drivers, etc). In fact, one of the biggest thorns in our side has been getting some of these extensions compiled against appropriate versions of the shared libraries so as to avoid segfaults, malloc errors and all sorts of similar issues. It doesn't help that out of 4 people we have 4 different development environments -- 1 leopard on ppc, 1 leopard on intel, 1 ubuntu and 1 windows. Ultimately what would be ideal would be something that works roughly like this, from the dos/unix prompt: $ git clone [repository url] ... $ python setup-env.py ... that then does what zc.buildout/virtualenv does (copy/symlink the python interpreter, provide a clean space to install eggs) then installs all required eggs, including installing any native shared library dependencies, installs the ruby project, the java project, etc. Obviously this would be useful for both getting development environments up as well as deploying on staging/production servers. Ideally I would like for the tool that accomplishes this to be written in/extensible via python, since that is (and always will be) the lingua franca of our team, but I am open to solutions in other languages. So, my question then is: does anyone have any suggestions for better alternatives or any experiences they can share using one of these solutions to handle larger/broader install bases?
2,576
160,834
0
false
0
1
7
python,deployment,build-process
6
0
0
2008-10-02T03:55:00.000
160,872
0
I do this kind of thing all the time for quick-and-dirty scripts. It's quite common to have a CGI or PHP script that just uses system/popen to call some external program. Just be extra careful if your web server is open to the internet at large. Be sure to sanitize your GET/POST input in this case so as to not allow attackers to run arbitrary commands on your machine.
Calling Python in PHP
0
1
2
0
0
I have a Python script I recently wrote that I call using the command line with some options. I now want a very thin web interface to call this script locally on my Mac. I don't want to go through the minor trouble of installing mod_python or mod_wsgi on my Mac, so I was just going to do a system() or popen() from PHP to call the Python script. Any better ideas? Thanks in advance!
180,160
166,944
0
false
1
1
85
php,python
9
0
7
2008-10-03T13:44:00.000
167,205
0
Note that if you are using a virtual environment (as in shared hosting) then you must adjust your path to python, e.g: /home/user/mypython/bin/python ./cgi-bin/test.py
Calling Python in PHP
0
1
2
0
0
I have a Python script I recently wrote that I call using the command line with some options. I now want a very thin web interface to call this script locally on my Mac. I don't want to go through the minor trouble of installing mod_python or mod_wsgi on my Mac, so I was just going to do a system() or popen() from PHP to call the Python script. Any better ideas? Thanks in advance!
180,160
166,944
0
false
0
1
85
php,python
9
0
0
2008-10-03T13:44:00.000
45,592,623
0
Well, there's emacs, which is arguably a shell written in lisp :) Seriously though, are you looking for a reimplementation of an existing shell design in a different language such as Python? Or are you looking for a new implementation of a shell language that looks similar to your language of choice?
UNIX shell written in a reasonable language?
0
1
3
0
0
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
3,377
171,267
0
false
0.141893
1
9
python,unix,shell
7
0
5
2008-10-05T00:42:00.000
171,271
0
From all appearances, Python IS a shell. It runs with #! and it can run interactively. Between the os and shutil packages you have all of the features of standard Unix shells. Since you can do anything in Python with simple, powerful scripts, you don't really need to spend any time messing with the other shells.
UNIX shell written in a reasonable language?
0
1
3
0
0
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
3,377
171,267
0
false
1
1
9
python,unix,shell
7
0
6
2008-10-05T00:42:00.000
171,304
0
Tclsh is pretty nice (assuming you like Tcl, of course).
UNIX shell written in a reasonable language?
0
1
3
0
0
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
3,377
171,267
0
false
0.085505
1
9
python,unix,shell
7
0
3
2008-10-05T00:42:00.000
171,290
0
In addition to PEP8 and easy_install, you should check out virtualenv. Virtualenv allows you to have multiple different python library trees. At work, we use virtualenv with a bootstrapping environment to quickly set up a development/production environment where we are all in sync w.r.t library versions etc. We generally coordinate library upgrades.
How do you organize Python modules?
0
0
2
0
0
When it comes to organizing python modules, my Mac OS X system is a mess. I've packages lying around everywhere on my hdd and no particular system to organize them. How do you keep everything manageable?
6,801
171,785
0
false
0.124353
1
14
python,module
8
0
5
2008-10-05T10:09:00.000
172,007
1
There are several families of Python componentry. The stuff that comes with Python. This takes care of itself. The stuff that you got with easy_install. This, also, takes care of itself. The packages that you had to get some other way, either as TARballs or SVN checkouts. Create a Components folder. Put the downloads or the SVN's in there first. Every Single Time. Do installs from there. The packages that you wrote that are reusable. I have a Projects folder with each project in that folder. If the project is a highly reusable thing, it has a setup.py and I actually run the install as if I downloaded it. I don't have many of these, but a few. Some of them might become open source projects. The final applications you write. I have a folder in Projects with each of these top-level applications. These are usually big, rambling things (like Django sites) and don't have setup.py. Why? They're often pretty complex with only a few server installations to manage, and each of those server installations is unique. These generally rely on PYTHONPATH to identify their parts. Notice the common theme. Either they're Components you downloaded or they're Projects you're working on. Also, I keep this separate (to an extent) from the client. I have a master directory of Client folders, each of which has Projects and each project has Sales and Delivery. Not all projects have both sales and delivery.
How do you organize Python modules?
0
0
2
0
0
When it comes to organizing python modules, my Mac OS X system is a mess. I've packages lying around everywhere on my hdd and no particular system to organize them. How do you keep everything manageable?
6,801
171,785
0
false
0.124353
1
14
python,module
8
0
5
2008-10-05T10:09:00.000
172,538
1
The traditional, UNIX-y way to communicate with sub-processes is to open pipes to their standard input/output, and use the select() system call to multiplex the communications in the parent process (available in Python via... the select module). If you need to kill a slow-running child process, you can just save its process ID (returned by the os.fork() call) and then use os.kill() to kill it when not needed anymore. Of course, it would probably be cleaner to be able to communicate with the child process explicitly and tell it to shut itself down.
What is the best way to run multiple subprocesses via fork()?
0
0
1
0
0
A python script need to spawn multiple sub-processes via fork(). All of those child processes should run simultaneously and the parent process should be waiting for all of them to finish. Having an ability to set some timeout on a "slow" child would be nice. The parent process goes on processing the rest of the script after all kids are collected. What is the best way to work it out? Thanks.
12,429
174,853
0
false
0.039979
1
10
python,linux
5
0
1
2008-10-06T15:47:00.000
174,989
1
I don't know any Windows specific function. You could try getting the MD5 hash of the file every second/minute/hour (depends on how fast you need it) and compare it to the last hash. When it differs you know the file has been changed and you read out the newest lines.
How do I watch a file for changes?
0
0
1
0
0
I have a log file being written by another process which I want to watch for changes. Each time a change occurs I'd like to read the new data in to do some processing on it. What's the best way to do this? I was hoping there'd be some sort of hook from the PyWin32 library. I've found the win32file.FindNextChangeNotification function but have no idea how to ask it to watch a specific file. If anyone's done anything like this I'd be really grateful to hear how... [Edit] I should have mentioned that I was after a solution that doesn't require polling. [Edit] Curses! It seems this doesn't work over a mapped network drive. I'm guessing windows doesn't 'hear' any updates to the file the way it does on a local disk.
376,572
182,197
0
false
-1
1
383
python,windows,file,pywin32,watch
28
0
-4
2008-10-08T11:12:00.000
182,234
0
All of them will get the job done. Use the one that you and your team are most familiar with This will have a far greater impact on the delivery times and stability of your app than any of the other variables.
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
false
1
1
2
python,ruby-on-rails,django,merb
13
0
7
2008-10-08T18:07:00.000
188,971
0
Sorry, but your question is wrong. People are probably going to vote me down for this one but I want to say it anyway: I wouldn't expect to get an objective answer! Why? That's simple: All Ruby advocates will tell to use Ruby. All Python advocates will tell to use Python. All PHP advocates will tell to use PHP. Insert additional languages here. Got the idea? I recommend you to try each of the languages you mentioned for yourself. At least a few days each. Afterwards you should have a much better foundation to make your final decision. That said, I would choose Ruby (because I am a Ruby advocate).
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
false
1
1
2
python,ruby-on-rails,django,merb
13
0
9
2008-10-08T18:07:00.000
184,278
0
Don't get stuck in the mindset of server-side page layout. Consider technologies like SproutCore, GWT or ExtJS which put the layouting code fully on the client, making the server responsible only for data marshalling and processing (and easily replaced). And you really, really need to know which server platform you want. Don't pick one because it's the flavor of the month, pick one because you're comfortable with it. Flavors don't last, a solidly built codebase will.
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
false
0.015383
1
2
python,ruby-on-rails,django,merb
13
0
1
2008-10-08T18:07:00.000
189,236
0
it depends. php - symfony is a great framework. downsides: php, wordy and directory heavy. propel gets annoying to use. upsides: php is everywhere and labor is cheap. well done framework, and good support. lots of plugins to make your life easier python - django is also a great framework. downsides: python programmers can be harder to find, django even harder. changing your db schema can be somewhat difficult since there are no official migrations. doesn't quite do mvc like you'd expect. upsides: does everything you need and has the great python std library and community behind it. ruby - i've never used merb, so I'll address rails. upsides: there is a plugin, gem, or recipe for almost anything you could want to do. easy to use. downsides: those plugins, gems, and recipes sometimes fail to work in mysterious ways. monkey patching is often evil. the community is.. vocal. opinionated software, and sometimes those opinions are wrong (lack of foreign keys). rails itself seems like a tower of cards waiting to explode and take hours of your life away. with all of that said, I'm a freelance php/symfony and ruby/rails developer. I've worked on several projects in both languages and frameworks. My latest project is in Rails solely because of ActiveMerchant. I've been looking for a reason to develop a django app for a while. If there were an ActiveMerchant like library for django, I probably would have used it.
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
true
1.2
1
2
python,ruby-on-rails,django,merb
13
0
5
2008-10-08T18:07:00.000
184,376
0
My experience with various new technologies over the last ten years leads me to recommend that you make stability of the platform a serious criterion. It's all well and good developing with the latest and greatest framework, but when you find it's moved forward a point version and suddenly the way you have done everything is deprecated, that can turn out to result in extra unnecessary work. This was particularly my experience working with rails a little ahead of version 1. For that reason alone I would avoid any platform that wasn't at least at 1.0 when you start work on it. Ruby is great to work with and will keep your developer productivity high, but if Django is the more stable platform I would favour that for sure.
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
false
0
1
2
python,ruby-on-rails,django,merb
13
0
0
2008-10-08T18:07:00.000
186,765
0
I have to preface this with my agreeing with Orion Edwards, choose the one your team is most familiar with. However, I also have to note the curious lack of ASP.NET languages in your list. Not to provoke the great zealot army, but where's the beef? .NET is a stable, rapid development platform and the labor pool is growing daily. VB.NET and C# are transportable skill sets, and that can mean a lot when you're building a team of developers to work on a diverse set of tasks. .NET also allows you to separate your presentation layer from your backend code, like other languages, but also allows you to expose that backend code as web service for things like your iPhone and Facebook applications. Take every suggestion with a grain of salt, and pick what suits the application best. Do your research, and design for function and not the zealots. Disclaimer: Once a PHP, ColdFusion and Perl developer. Flex zealot, and Adobe lover. Now writing enterprise .NET applications. ;) Don't forget Mono, which will let you run .NET under *nix. Not that I'm saying it will be perfect, just playing devil's advocate.
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
false
0.015383
1
2
python,ruby-on-rails,django,merb
13
0
1
2008-10-08T18:07:00.000
189,012
0
Having built apps in Django, I can attest to its utility. If only all frameworks were as elegant (yes Spring, I'm looking at you). However in terms of betting the farm on Django, one thing you need to factor in is that Python 3 will be released shortly. Python 3 is not backwards compatible and there's a risk that it will fork the language and end up slowing momentum for all Python projects while they deal with the fallout. To be fair, Ruby 2.0 is due soon too, but I don't think it will be as disruptive.
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
false
0.015383
1
2
python,ruby-on-rails,django,merb
13
0
1
2008-10-08T18:07:00.000
208,938
0
I would go with Django, if you are comfortable with a Python solution. It's at version 1.0 now, and is maturing nicely, with a large user base and many contributors. Integrating jQuery is no problem, and I've done it without any issues. The only thing is, as far as I can tell, Ruby is much more popular for web development nowadays, so it's easier to find Ruby developers. I get this impression from browsing recent job advertisements - there aren't that many for Python or Django. I don't know much about Merb, so I can't give a fair comparison. I've done enough PHP to not recommend starting a new project with it.
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
false
0.061461
1
2
python,ruby-on-rails,django,merb
13
0
4
2008-10-08T18:07:00.000
184,107
0
Based in your reasons, I would go with Ruby. I see that you want some administration tools (scp, ftp client) and Ruby has it (net/sftp and net/ftp libraries). Also, there are great gems like God for monitoring your system, Vlad the Deployer for deploying, etc. And a lot of alternatives in Merb's field, just use whatever you find it's better for your needs (Thin, Mongrel, ebb, etc).
Framework/Language for new web 2.0 sites (2008 and 2009)
1
1
9
0
0
I know I'll get a thousand "Depends on what you're trying to do" answers, but seriously, there really is no solid information about this online yet. Here are my assumptions - I think they're similar for alot of people right now: It is now October 2008. I want to start writing an application for January 2009. I am willing to use beta code and such but by January, I'd like a site that doesn't have 'strange' problems. With that said, if a language is simply 10% slower than another, I don't care about those things as long as the issue is linear. My main concern is developer productivity. I'll be using Linux, Apache, MySQL for the application. I want the power to do things like run scp and ftp client functions with stable libraries (I only picked those two because they're not web-related but at the same time represent pretty common network protocols that any larger app might use). Technologies like OpenID and Oauth will be used as well. Experienced web developers are readily available (i.e. I don't have to find people from financial companies and such). Whatever the choice is is common and will be around for a while. Here's a kicker. I'd like to be able to use advanced presentation layer tools/languages similar to HAML, SASS. I definitively want to use JQuery. I will be creating a Facebook app and at some point doing things like dealing with SMS messages, iPhone apps, etc... At this point, the choices for language are PHP (Cake,Symfony,Zend), Python (Django), Ruby (Merb). I'm really between Django and Merb at this point mostly because everybody else seems to be going that way. Please don't put any technologies in here that aren't made for mainstream. I know Merb is untested mostly, but their stated goal is a solid platform and it has alot of momentum behind it so I'm confident that it's workable. Please don't answer with how great Perl is or .Net. For Future References - these choices were already made: Debian (Lenny) - For converting CPU cycles into something useful. Trac 0.11 - For Project Management Gliffy - For wireframes and such Google Docs/Apps - For documentation, hosted email, etc... Amazon ec2/S3 - For hosting, storage. Cheers, Adam
959
184,049
0
false
0.03076
1
2
python,ruby-on-rails,django,merb
13
0
2
2008-10-08T18:07:00.000
184,157
0
If you are willing to put Flash or a Java applet on the page, you might be able to do it on the client. I'm not sure if anything like canvas or SVG supports pixel-level manipulation, but if they do, you might be able to get it to work in some browsers with JavaScript. The Flash or Java Applet, can be invisible and optional -- you can use JavaScript to detect if the user has the plugin and only support this feature when they do.
Read colors of image with Python (GAE)
0
0
1
0
0
How can I read the colors of an image with python using google app engine? Example: I like to build a function to determine the most striking colors of an image to set a harmonic background color for it.
1,703
190,675
0
false
0
1
1
python,google-app-engine,image,analysis
3
0
0
2008-10-10T09:56:00.000
190,958
1
Are you sure that the machine does not have a 128M process limit? If you are running the python script as a CGI inside a web server, it is quite likely that there is a process limit set - you will need to look at the web server configuration.
Configuring python
0
0
2
0
0
I am new to python and struggling to find how to control the amount of memory a python process can take? I am running python on a Cento OS machine with more than 2 GB of main memory size. Python is taking up only 128mb of this and I want to allocate it more. I tried to search all over the internet on this for last half an hour and found absolutely nothing! Why is it so difficult to find information on python related stuff :( I would be happy if someone could throw some light on how to configure python for various things like allowed memory size, number of threads etc. A link to a site where most controllable parameters of python are described would be appreciated well.
1,627
191,700
0
false
0.197375
1
2
python,memory
2
0
2
2008-10-10T14:52:00.000
191,790
1
Forget all that, python just allocates more memory as needed, there is not a myriad of comandline arguments for the VM as in java, just let it run. For all comandline switches you can just run python -h or read man python.
Configuring python
0
0
2
0
0
I am new to python and struggling to find how to control the amount of memory a python process can take? I am running python on a Cento OS machine with more than 2 GB of main memory size. Python is taking up only 128mb of this and I want to allocate it more. I tried to search all over the internet on this for last half an hour and found absolutely nothing! Why is it so difficult to find information on python related stuff :( I would be happy if someone could throw some light on how to configure python for various things like allowed memory size, number of threads etc. A link to a site where most controllable parameters of python are described would be appreciated well.
1,627
191,700
0
true
1.2
1
2
python,memory
2
0
11
2008-10-10T14:52:00.000
191,744
1
Create a deb (for everything Debian-derived) and an rpm (for Fedora/SuSE). Add the right dependencies to the packaging and you can be reasonably sure that it will work.
Standalone Python applications in Linux
0
0
3
0
0
How can I distribute a standalone Python application in Linux? I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPython, scipy, python cryptographic toolkit, reportlab, and so on. Is there a working Linux counterpart to, say, py2exe (which, by the way, I have never tried)? Is there a free, opensource one?
28,132
193,077
0
false
1
1
33
python,linux
8
0
23
2008-10-10T21:26:00.000
193,963
0
Nope. Python is notoriously flaky with respect to different setups. The only sane way to deploy a python app is to ship the whole bundle of interpreter and libraries that you are relying on with your code. That will most likely work. Update 2019: I stand by this. Virtualenv is a way of packaging libraries and interpreters together. Tox is a testing tool to test that interpreter/dependency matrix. Docker is a widely used way of then deploying the bundle.
Standalone Python applications in Linux
0
0
3
0
0
How can I distribute a standalone Python application in Linux? I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPython, scipy, python cryptographic toolkit, reportlab, and so on. Is there a working Linux counterpart to, say, py2exe (which, by the way, I have never tried)? Is there a free, opensource one?
28,132
193,077
0
false
-1
1
33
python,linux
8
0
-9
2008-10-10T21:26:00.000
193,083
0
You can't easily do it in a distribution-neutral format. The only reliable dependency tracking mechanisms are built into the package management systems on the distributions and will vary from distribution to distribution. You'll effectively have to do rpm for fedora, debs for ubuntu and debian etc. Py2exe works fine on Windows. It builds a distribution with all of the necessary DLL's and a wrapper for the python interpreter that starts your program. It's fairly straightforward to install - just drop it in a directory - so making a msi file for it is trivial.
Standalone Python applications in Linux
0
0
3
0
0
How can I distribute a standalone Python application in Linux? I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPython, scipy, python cryptographic toolkit, reportlab, and so on. Is there a working Linux counterpart to, say, py2exe (which, by the way, I have never tried)? Is there a free, opensource one?
28,132
193,077
0
false
1
1
33
python,linux
8
0
7
2008-10-10T21:26:00.000
193,101
0
In my experience, it's just a matter of iteration. Put your data and code wherever you think they go. Chances are, you'll be wrong anyway. But once you get a better idea of exactly how things are going to shape up, you're in a much better position to make these kinds of guesses. As far as extension sources, we have a Code directory under trunk that contains a directory for python and a directory for various other languages. Personally, I'm more inclined to try putting any extension code into its own repository next time around. With that said, I go back to my initial point: don't make too big a deal out of it. Put it somewhere that seems to work for you. If you find something that doesn't work, it can (and should) be changed.
What is the best project structure for a Python application?
0
0
3
0
0
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy? Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation of install packages. In particular: Where do you put the source? Where do you put application startup scripts? Where do you put the IDE project cruft? Where do you put the unit/acceptance tests? Where do you put non-Python data such as config files? Where do you put non-Python sources such as C++ for pyd/so binary extension modules?
551,755
193,161
0
false
1
1
880
python,directory-structure,organization,project-structure
8
0
18
2008-10-10T21:50:00.000
193,280
1
Doesn't too much matter. Whatever makes you happy will work. There aren't a lot of silly rules because Python projects can be simple. /scripts or /bin for that kind of command-line interface stuff /tests for your tests /lib for your C-language libraries /doc for most documentation /apidoc for the Epydoc-generated API docs. And the top-level directory can contain README's, Config's and whatnot. The hard choice is whether or not to use a /src tree. Python doesn't have a distinction between /src, /lib, and /bin like Java or C has. Since a top-level /src directory is seen by some as meaningless, your top-level directory can be the top-level architecture of your application. /foo /bar /baz I recommend putting all of this under the "name-of-my-product" directory. So, if you're writing an application named quux, the directory that contains all this stuff is named /quux. Another project's PYTHONPATH, then, can include /path/to/quux/foo to reuse the QUUX.foo module. In my case, since I use Komodo Edit, my IDE cuft is a single .KPF file. I actually put that in the top-level /quux directory, and omit adding it to SVN.
What is the best project structure for a Python application?
0
0
3
0
0
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy? Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation of install packages. In particular: Where do you put the source? Where do you put application startup scripts? Where do you put the IDE project cruft? Where do you put the unit/acceptance tests? Where do you put non-Python data such as config files? Where do you put non-Python sources such as C++ for pyd/so binary extension modules?
551,755
193,161
0
true
1.2
1
880
python,directory-structure,organization,project-structure
8
0
470
2008-10-10T21:50:00.000
193,181
1
Non-python data is best bundled inside your Python modules using the package_data support in setuptools. One thing I strongly recommend is using namespace packages to create shared namespaces which multiple projects can use -- much like the Java convention of putting packages in com.yourcompany.yourproject (and being able to have a shared com.yourcompany.utils namespace). Re branching and merging, if you use a good enough source control system it will handle merges even through renames; Bazaar is particularly good at this. Contrary to some other answers here, I'm +1 on having a src directory top-level (with doc and test directories alongside). Specific conventions for documentation directory trees will vary depending on what you're using; Sphinx, for instance, has its own conventions which its quickstart tool supports. Please, please leverage setuptools and pkg_resources; this makes it much easier for other projects to rely on specific versions of your code (and for multiple versions to be simultaneously installed with different non-code files, if you're using package_data).
What is the best project structure for a Python application?
0
0
3
0
0
Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy? Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation of install packages. In particular: Where do you put the source? Where do you put application startup scripts? Where do you put the IDE project cruft? Where do you put the unit/acceptance tests? Where do you put non-Python data such as config files? Where do you put non-Python sources such as C++ for pyd/so binary extension modules?
551,755
193,161
0
false
1
1
880
python,directory-structure,organization,project-structure
8
0
13
2008-10-10T21:50:00.000
193,256
1
Expose your Ruby classes as web services using Sinatra, Rails, or, plain old Rack. Expose your Python classes as web services using web.py, flask, Django, or App Engine. Use HTTParty for Ruby to build an API into your Python classes. Use a Python REST library to build an API into your Ruby classes.
Ruby to Python bridge
0
1
2
0
0
I am interested in getting some Python code talking to some Ruby code on Windows, Linux and possibly other platforms. Specificlly I would like to access classes in Ruby from Python and call their methods, access their data, create new instances and so on. An obvious way to do this is via something like XML-RPC or maybe CORBA but I would be interested in any other approaches. What have other people done to get code from Python and Ruby communicating with one another, either locally on the same system or remotely accross a network? Thanks in advance.
2,499
206,823
0
false
0.039979
1
8
python,ruby,interop
5
0
1
2008-10-15T22:49:00.000
4,859,776
0
Please be advised that I don't speak from personal experience here, but I imagine JRuby and Jython (The ruby and python implementations in the JVM) would be able to to easily talk to each other, as well as Java code. You may want to look into that.
Ruby to Python bridge
0
1
2
0
0
I am interested in getting some Python code talking to some Ruby code on Windows, Linux and possibly other platforms. Specificlly I would like to access classes in Ruby from Python and call their methods, access their data, create new instances and so on. An obvious way to do this is via something like XML-RPC or maybe CORBA but I would be interested in any other approaches. What have other people done to get code from Python and Ruby communicating with one another, either locally on the same system or remotely accross a network? Thanks in advance.
2,499
206,823
0
false
0.119427
1
8
python,ruby,interop
5
0
3
2008-10-15T22:49:00.000
206,839
0

No dataset card yet

New: Create and edit this dataset card directly on the website!

Contribute a Dataset Card
Downloads last month
0
Add dataset card