Q_Id
int64 337
49.3M
| CreationDate
stringlengths 23
23
| Users Score
int64 -42
1.15k
| Other
int64 0
1
| Python Basics and Environment
int64 0
1
| System Administration and DevOps
int64 0
1
| Tags
stringlengths 6
105
| A_Id
int64 518
72.5M
| AnswerCount
int64 1
64
| is_accepted
bool 2
classes | Web Development
int64 0
1
| GUI and Desktop Applications
int64 0
1
| Answer
stringlengths 6
11.6k
| Available Count
int64 1
31
| Q_Score
int64 0
6.79k
| Data Science and Machine Learning
int64 0
1
| Question
stringlengths 15
29k
| Title
stringlengths 11
150
| Score
float64 -1
1.2
| Database and SQL
int64 0
1
| Networking and APIs
int64 0
1
| ViewCount
int64 8
6.81M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
337 | 2008-08-02T03:35:00.000 | 6 | 0 | 0 | 0 | python,xml | 635 | 12 | false | 0 | 0 | I write a SOAP server that receives XML requests and creates XML responses. (Unfortunately, it's not my project, so it's closed source, but that's another problem).
It turned out for me that creating (SOAP) XML documents is fairly simple if you have a data structure that "fits" the schema.
I keep the envelope since the response envelope is (almost) the same as the request envelope. Then, since my data structure is a (possibly nested) dictionary, I create a string that turns this dictionary into <key>value</key> items.
This is a task that recursion makes simple, and I end up with the right structure. This is all done in python code and is currently fast enough for production use.
You can also (relatively) easily build lists as well, although depending upon your client, you may hit problems unless you give length hints.
For me, this was much simpler, since a dictionary is a much easier way of working than some custom class. For the books, generating XML is much easier than parsing! | 6 | 82 | 0 | I am about to build a piece of a project that will need to construct and post an XML document to a web service and I'd like to do it in Python, as a means to expand my skills in it.
Unfortunately, whilst I know the XML model fairly well in .NET, I'm uncertain what the pros and cons are of the XML models in Python.
Anyone have experience doing XML processing in Python? Where would you suggest I start? The XML files I'll be building will be fairly simple. | XML Processing in Python | 1 | 0 | 1 | 9,979 |
337 | 2008-08-02T03:35:00.000 | 8 | 0 | 0 | 0 | python,xml | 123,307 | 12 | false | 0 | 0 | I've used ElementTree for several projects and recommend it.
It's pythonic, comes 'in the box' with Python 2.5, including the c version cElementTree (xml.etree.cElementTree) which is 20 times faster than the pure Python version, and is very easy to use.
lxml has some perfomance advantages, but they are uneven and you should check the benchmarks first for your use case.
As I understand it, ElementTree code can easily be ported to lxml. | 6 | 82 | 0 | I am about to build a piece of a project that will need to construct and post an XML document to a web service and I'd like to do it in Python, as a means to expand my skills in it.
Unfortunately, whilst I know the XML model fairly well in .NET, I'm uncertain what the pros and cons are of the XML models in Python.
Anyone have experience doing XML processing in Python? Where would you suggest I start? The XML files I'll be building will be fairly simple. | XML Processing in Python | 1 | 0 | 1 | 9,979 |
337 | 2008-08-02T03:35:00.000 | 8 | 0 | 0 | 0 | python,xml | 202,259 | 12 | false | 0 | 0 | It depends a bit on how complicated the document needs to be.
I've used minidom a lot for writing XML, but that's usually been just reading documents, making some simple transformations, and writing them back out. That worked well enough until I needed the ability to order element attributes (to satisfy an ancient application that doesn't parse XML properly). At that point I gave up and wrote the XML myself.
If you're only working on simple documents, then doing it yourself can be quicker and simpler than learning a framework. If you can conceivably write the XML by hand, then you can probably code it by hand as well (just remember to properly escape special characters, and use str.encode(codec, errors="xmlcharrefreplace")). Apart from these snafus, XML is regular enough that you don't need a special library to write it. If the document is too complicated to write by hand, then you should probably look into one of the frameworks already mentioned. At no point should you need to write a general XML writer. | 6 | 82 | 0 | I am about to build a piece of a project that will need to construct and post an XML document to a web service and I'd like to do it in Python, as a means to expand my skills in it.
Unfortunately, whilst I know the XML model fairly well in .NET, I'm uncertain what the pros and cons are of the XML models in Python.
Anyone have experience doing XML processing in Python? Where would you suggest I start? The XML files I'll be building will be fairly simple. | XML Processing in Python | 1 | 0 | 1 | 9,979 |
337 | 2008-08-02T03:35:00.000 | 2 | 0 | 0 | 0 | python,xml | 69,772 | 12 | false | 0 | 0 | I assume that the .NET way of processing XML builds on some version of MSXML and in that case I assume that using, for example, minidom would make you feel somewhat at home. However, if it is simple processing you are doing, any library will probably do.
I also prefer working with ElementTree when dealing with XML in Python because it is a very neat library. | 6 | 82 | 0 | I am about to build a piece of a project that will need to construct and post an XML document to a web service and I'd like to do it in Python, as a means to expand my skills in it.
Unfortunately, whilst I know the XML model fairly well in .NET, I'm uncertain what the pros and cons are of the XML models in Python.
Anyone have experience doing XML processing in Python? Where would you suggest I start? The XML files I'll be building will be fairly simple. | XML Processing in Python | 0.033321 | 0 | 1 | 9,979 |
337 | 2008-08-02T03:35:00.000 | 3 | 0 | 0 | 0 | python,xml | 13,832,269 | 12 | false | 0 | 0 | I strongly recommend SAX - Simple API for XML - implementation in the Python libraries. They are fairly easy to setup and process large XML by even driven API, as discussed by previous posters here, and have low memory footprint unlike validating DOM style XML parsers. | 6 | 82 | 0 | I am about to build a piece of a project that will need to construct and post an XML document to a web service and I'd like to do it in Python, as a means to expand my skills in it.
Unfortunately, whilst I know the XML model fairly well in .NET, I'm uncertain what the pros and cons are of the XML models in Python.
Anyone have experience doing XML processing in Python? Where would you suggest I start? The XML files I'll be building will be fairly simple. | XML Processing in Python | 0.049958 | 0 | 1 | 9,979 |
337 | 2008-08-02T03:35:00.000 | 8 | 0 | 0 | 0 | python,xml | 69,410 | 12 | false | 0 | 0 | There are 3 major ways of dealing with XML, in general: dom, sax, and xpath. The dom model is good if you can afford to load your entire xml file into memory at once, and you don't mind dealing with data structures, and you are looking at much/most of the model. The sax model is great if you only care about a few tags, and/or you are dealing with big files and can process them sequentially. The xpath model is a little bit of each -- you can pick and choose paths to the data elements you need, but it requires more libraries to use.
If you want straightforward and packaged with Python, minidom is your answer, but it's pretty lame, and the documentation is "here's docs on dom, go figure it out". It's really annoying.
Personally, I like cElementTree, which is a faster (c-based) implementation of ElementTree, which is a dom-like model.
I've used sax systems, and in many ways they're more "pythonic" in their feel, but I usually end up creating state-based systems to handle them, and that way lies madness (and bugs).
I say go with minidom if you like research, or ElementTree if you want good code that works well. | 6 | 82 | 0 | I am about to build a piece of a project that will need to construct and post an XML document to a web service and I'd like to do it in Python, as a means to expand my skills in it.
Unfortunately, whilst I know the XML model fairly well in .NET, I'm uncertain what the pros and cons are of the XML models in Python.
Anyone have experience doing XML processing in Python? Where would you suggest I start? The XML files I'll be building will be fairly simple. | XML Processing in Python | 1 | 0 | 1 | 9,979 |
469 | 2008-08-02T15:11:00.000 | 6 | 1 | 0 | 0 | python,macos,fonts,photoshop | 518 | 4 | false | 1 | 0 | I haven't been able to find anything that does this directly. I think you'll have to iterate through the various font folders on the system: /System/Library/Fonts, /Library/Fonts, and there can probably be a user-level directory as well ~/Library/Fonts. | 2 | 47 | 0 | I am using the Photoshop's javascript API to find the fonts in a given PSD.
Given a font name returned by the API, I want to find the actual physical font file that font name corresponds to on the disc.
This is all happening in a python program running on OSX so I guess I'm looking for one of:
Some Photoshop javascript
A Python function
An OSX API that I can call from python | How can I find the full path to a font from its display name on a Mac? | 1 | 0 | 0 | 4,225 |
469 | 2008-08-02T15:11:00.000 | 21 | 1 | 0 | 0 | python,macos,fonts,photoshop | 3,040 | 4 | true | 1 | 0 | Unfortunately the only API that isn't deprecated is located in the ApplicationServices framework, which doesn't have a bridge support file, and thus isn't available in the bridge. If you're wanting to use ctypes, you can use ATSFontGetFileReference after looking up the ATSFontRef.
Cocoa doesn't have any native support, at least as of 10.5, for getting the location of a font. | 2 | 47 | 0 | I am using the Photoshop's javascript API to find the fonts in a given PSD.
Given a font name returned by the API, I want to find the actual physical font file that font name corresponds to on the disc.
This is all happening in a python program running on OSX so I guess I'm looking for one of:
Some Photoshop javascript
A Python function
An OSX API that I can call from python | How can I find the full path to a font from its display name on a Mac? | 1.2 | 0 | 0 | 4,225 |
1,854 | 2008-08-05T03:23:00.000 | 2 | 0 | 0 | 1 | python,cross-platform,platform-specific,platform-agnostic | 48,244,490 | 26 | false | 0 | 0 | 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. | 1 | 838 | 0 | What do I need to look at to see whether I'm on Windows or Unix, etc? | Python: What OS am I running on? | 0.015383 | 0 | 0 | 422,064 |
1,983 | 2008-08-05T07:18:00.000 | 2 | 0 | 1 | 0 | python,list,tuples | 49,586,164 | 18 | false | 0 | 0 | (1,2,3) and [1,2,3] can be used interchangeably in rare conditions.
So (1,2,3) is a tuple and is immutable. Any changes you wish to make need to overwrite the object.
[1,2,3] is a list and elements can be appended and removed.
List has more features than a tuple. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0.022219 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 3 | 0 | 1 | 0 | python,list,tuples | 44,083,156 | 18 | false | 0 | 0 | A tuple might represent a key in dictionary, because it's
immutable.
Use lists if you have a collection of data that doesn't
need random access. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0.033321 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 0 | 0 | 1 | 0 | python,list,tuples | 62,503,886 | 18 | false | 0 | 0 | a = (1,2,3) is a tuple which is immutable meaning you can't add anything into a
b = [1,2,3] is a list in python which is immutable meaning you can make changes into 'b' either delete or add numbers into it. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 0 | 0 | 1 | 0 | python,list,tuples | 63,479,906 | 18 | false | 0 | 0 | In simple words, lists are mutable whereas tuples are not. Hence, if you want to modify the elements in your program i.e., adding, deleting or altering elements, go for a list. But, if you don't want tat to happen i.e., may be for setting sequence in for loop, etc. go for a tuple | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 0 | 0 | 1 | 0 | python,list,tuples | 38,062,967 | 18 | false | 0 | 0 | (1,2,3) is a tuple and [1,2,3] is a list. You either of the two represent sequences of numbers but note that tuples are immutable and list are mutable Python objects. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 0 | 0 | 1 | 0 | python,list,tuples | 69,499,270 | 18 | false | 0 | 0 | (1,2,3) is immutable, so you can't add to it or change one of the items. In contrast, [1,2,3] is mutable, so you can add to it or change the items. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 0 | 0 | 1 | 0 | python,list,tuples | 35,496,153 | 18 | false | 0 | 0 | (1,2,3) is a tuple while [1,2,3] is a list. A tuple is an immutable object while a list is mutable. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 0 | 0 | 1 | 0 | python,list,tuples | 54,570,759 | 18 | false | 0 | 0 | (1,2,3)-tuple
[1,2,3]-list
lists are mutable on which various operations can be performed whereas tuples are immutable which cannot be extended.we cannot add,delete or update any element from a tuple once it is created. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 5 | 0 | 1 | 0 | python,list,tuples | 6,477,369 | 18 | false | 0 | 0 | [1, 2, 3] is a list in which one can add or delete items.
(1, 2, 3) is a tuple in which once defined, modification cannot be done. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0.055498 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 23 | 0 | 1 | 0 | python,list,tuples | 1,987 | 18 | false | 0 | 0 | The list [1,2,3] is dynamic and flexible but that flexibility comes at a speed cost.
The tuple (1,2,3) is fixed (immutable) and therefore faster. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 3 | 0 | 1 | 0 | python,list,tuples | 5,719 | 18 | false | 0 | 0 | As others have mentioned, Lists and tuples are both containers which can be used to store python objects. Lists are extensible and their contents can change by assignment, on the other hand tuples are immutable.
Also, lists cannot be used as keys in a dictionary whereas tuples can. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0.033321 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 4 | 0 | 1 | 0 | python,list,tuples | 12,454 | 18 | false | 0 | 0 | Whenever I need to pass in a collection of items to a function, if I want the function to not change the values passed in - I use tuples.
Else if I want to have the function to alter the values, I use list.
Always if you are using external libraries and need to pass in a list of values to a function and are unsure about the integrity of the data, use a tuple. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0.044415 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 2 | 0 | 1 | 0 | python,list,tuples | 5,746 | 18 | false | 0 | 0 | If you can find a solution that works with tuples, use them, as it forces immutability which kind of drives you down a more functional path. You almost never regret going down the functional/immutable path. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0.022219 | 0 | 0 | 12,477 |
1,983 | 2008-08-05T07:18:00.000 | 2 | 0 | 1 | 0 | python,list,tuples | 26,250,158 | 18 | false | 0 | 0 | [1,2,3] is a list.
(1,2,3) is a tuple and immutable. | 14 | 58 | 0 | In many places, (1,2,3) (a tuple) and [1,2,3] (a list) can be used interchangeably.
When should I use one or the other, and why? | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 0.022219 | 0 | 0 | 12,477 |
2,933 | 2008-08-05T22:26:00.000 | 4 | 0 | 0 | 1 | python,user-interface,deployment,tkinter,release-management | 12,167 | 13 | false | 0 | 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. | 2 | 300 | 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? | Create a directly-executable cross-platform GUI app using Python | 0.061461 | 0 | 0 | 199,251 |
2,933 | 2008-08-05T22:26:00.000 | 6 | 0 | 0 | 1 | python,user-interface,deployment,tkinter,release-management | 2,980 | 13 | false | 0 | 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. | 2 | 300 | 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? | Create a directly-executable cross-platform GUI app using Python | 1 | 0 | 0 | 199,251 |
4,942 | 2008-08-07T16:43:00.000 | 3 | 1 | 0 | 0 | php,python,ruby-on-rails,ruby | 4,958 | 8 | false | 0 | 0 | Focus on the shorter time needed for development/prototype and possibly easier maintenance (none of this may apply against Ruby). | 6 | 14 | 0 | When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it? | How to sell Python to a client/boss/person | 0.07486 | 0 | 0 | 1,421 |
4,942 | 2008-08-07T16:43:00.000 | 3 | 1 | 0 | 0 | php,python,ruby-on-rails,ruby | 5,014 | 8 | false | 0 | 0 | I would consider that using python on a new project is completely dependent on what problem you are trying to solve with python. If you want someone to agree with you that you should use python, then show them how python's features apply specifically to that problem.
In the case of web development with python, talk about WSGI and other web libraries and frameworks you could use that would make your life easier. One note for python is that most of the frameworks for python web development can be plugged right into any current project. With ruby on rails, you're practically working in a DSL that anyone who uses your project will have to learn. If they know python, then they can figure out what you are doing with django, etc in a day.
I'm only talking about web development because it appears that's what you are going to be working on seeing ruby, python and PHP in the same list. The real message that's important is applying to whatever it is you like about python directly to some problem you are trying to solve. | 6 | 14 | 0 | When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it? | How to sell Python to a client/boss/person | 0.07486 | 0 | 0 | 1,421 |
4,942 | 2008-08-07T16:43:00.000 | 13 | 1 | 0 | 0 | php,python,ruby-on-rails,ruby | 4,978 | 8 | true | 0 | 0 | This is one of those cases that really boil down to personal preference or situational details. If you're more comfortable and experienced with Python, then say so. Are they asking you to justify it because they're more comfortable with one of the other environments? After you're done, will the system be passed off to someone else for long-term maintenance?
If they ask you to use a technology or language that you're not as familiar with, then make sure they know up-front that it's going to take you longer. | 6 | 14 | 0 | When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it? | How to sell Python to a client/boss/person | 1.2 | 0 | 0 | 1,421 |
4,942 | 2008-08-07T16:43:00.000 | 5 | 1 | 0 | 0 | php,python,ruby-on-rails,ruby | 15,296 | 8 | false | 0 | 0 | It's one of the preferred languages over at Google - It's several years ahead of Ruby in terms of "maturity" (what ever that really means - but managers like that). Since it's prefered by Google you can also run it on the Google App Engine.
Mircosoft is also embracing Python, and will have a v2.0 of IronPython coming out shortly. They are working on a Ruby implementation as well, but the Python version is way ahead, and is actually "ready for primetime". That give you the possibility for easy integration with .NET code, as well as being able to write client side RIAs in Python when Silverlight 2 ships. | 6 | 14 | 0 | When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it? | How to sell Python to a client/boss/person | 0.124353 | 0 | 0 | 1,421 |
4,942 | 2008-08-07T16:43:00.000 | 1 | 1 | 0 | 0 | php,python,ruby-on-rails,ruby | 9,420,311 | 8 | false | 0 | 0 | Give them a snippet of code in each (no more than a page) that performs some cool function that they will like. (e.g show outliers in a data set).
Show them each page. One in PHP, Ruby and Python.
Ask them which they find easiest to understand/read.
Tell them thats why you want to use Python. It's easier to read if you've not written it, more manageable, less buggy and quicker to build features because it is the most elegant (pythonic) | 6 | 14 | 0 | When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it? | How to sell Python to a client/boss/person | 0.024995 | 0 | 0 | 1,421 |
4,942 | 2008-08-07T16:43:00.000 | 0 | 1 | 0 | 0 | php,python,ruby-on-rails,ruby | 15,291 | 8 | false | 0 | 0 | I agree with mreggen. Tell them by working in Python you can get things done faster. Getting things done faster possibly means money saved by the client. In the least it means that you are working with a language you a more comfortable in, meaning faster development, debugging, and refactoring time. There will be less time spent looking up documentation on what function to use to find the length of a string, etc. | 6 | 14 | 0 | When asked to create system XYZ and you ask to do it in Python over PHP or Ruby, what are the main features you can mention when they require you to explain it? | How to sell Python to a client/boss/person | 0 | 0 | 0 | 1,421 |
5,102 | 2008-08-07T18:24:00.000 | 0 | 1 | 0 | 1 | python,apache,apache2 | 14,791,003 | 4 | false | 0 | 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. | 1 | 23 | 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. | How do you set up Python scripts to work in Apache 2.0? | 0 | 0 | 0 | 32,774 |
5,136 | 2008-08-07T18:47:00.000 | 5 | 0 | 0 | 0 | python,c,matlab | 1,659,332 | 4 | false | 0 | 1 | One thing to remember is that the Matlab compiler does not actually compile the Matlab code into native machine instructions. It simply wraps it into a standalone executable or a library with its own runtime engine that runs it. You would be able to run your code without Matlab installed, and you would be able to interface it with other languages, but it will still be interpreted Matlab code, so there would be no speedup. | 3 | 14 | 1 | A researcher has created a small simulation in MATLAB and we want to make it accessible to others. My plan is to take the simulation, clean up a few things and turn it into a set of functions. Then I plan to compile it into a C library and use SWIG to create a Python wrapper. At that point, I should be able to call the simulation from a small Django app. At least I hope so.
Do I have the right plan? Has anyone else done something similar? Can you let me know if there are any serious pitfalls that I'm not aware of at the moment? | Does anyone have experience creating a shared library in MATLAB? | 0.244919 | 0 | 0 | 2,313 |
5,136 | 2008-08-07T18:47:00.000 | 2 | 0 | 0 | 0 | python,c,matlab | 138,534 | 4 | false | 0 | 1 | I'd also try ctypes first.
Use the Matlab compiler to compile the code into C.
Compile the C code into a DLL.
Use ctypes to load and call code from this DLL
The hardest step is probably 1, but if you already know Matlab and have used the Matlab compiler, you should not have serious problems with it. | 3 | 14 | 1 | A researcher has created a small simulation in MATLAB and we want to make it accessible to others. My plan is to take the simulation, clean up a few things and turn it into a set of functions. Then I plan to compile it into a C library and use SWIG to create a Python wrapper. At that point, I should be able to call the simulation from a small Django app. At least I hope so.
Do I have the right plan? Has anyone else done something similar? Can you let me know if there are any serious pitfalls that I'm not aware of at the moment? | Does anyone have experience creating a shared library in MATLAB? | 0.099668 | 0 | 0 | 2,313 |
5,136 | 2008-08-07T18:47:00.000 | 3 | 0 | 0 | 0 | python,c,matlab | 5,302 | 4 | true | 0 | 1 | I won't help much but I remember that I was able to wrap a MATLAB simulation into DLL and then call it from a Delphi app. It worked really well. | 3 | 14 | 1 | A researcher has created a small simulation in MATLAB and we want to make it accessible to others. My plan is to take the simulation, clean up a few things and turn it into a set of functions. Then I plan to compile it into a C library and use SWIG to create a Python wrapper. At that point, I should be able to call the simulation from a small Django app. At least I hope so.
Do I have the right plan? Has anyone else done something similar? Can you let me know if there are any serious pitfalls that I'm not aware of at the moment? | Does anyone have experience creating a shared library in MATLAB? | 1.2 | 0 | 0 | 2,313 |
8,692 | 2008-08-12T11:28:00.000 | 40 | 0 | 0 | 0 | python,xml,dom,xpath,python-2.x | 1,732,475 | 11 | false | 0 | 0 | Use LXML. LXML uses the full power of libxml2 and libxslt, but wraps them in more "Pythonic" bindings than the Python bindings that are native to those libraries. As such, it gets the full XPath 1.0 implementation. Native ElemenTree supports a limited subset of XPath, although it may be good enough for your needs. | 1 | 245 | 0 | What are the libraries that support XPath? Is there a full implementation? How is the library used? Where is its website? | How to use XPath in Python? | 1 | 0 | 1 | 338,237 |
8,948 | 2008-08-12T15:16:00.000 | 1 | 1 | 0 | 0 | python,mp3,metadata | 31,373,513 | 16 | false | 0 | 0 | After some initial research I thought songdetails might fit my use case, but it doesn't handle .m4b files. Mutagen does. Note that while some have (reasonably) taken issue with Mutagen's surfacing of format-native keys, that vary from format to format (TIT2 for mp3, title for ogg, \xa9nam for mp4, Title for WMA etc.), mutagen.File() has a (new?) easy=True parameter that provides EasyMP3/EasyID3 tags, which have a consistent, albeit limited, set of keys. I've only done limited testing so far, but the common keys, like album, artist, albumartist, genre, tracknumber, discnumber, etc. are all present and identical for .mb4 and .mp3 files when using easy=True, making it very convenient for my purposes. | 1 | 142 | 0 | Is there a maintained package I can use to retrieve and set MP3 ID3 metadata using Python? | Accessing MP3 metadata with Python | 0.012499 | 0 | 0 | 140,384 |
11,060 | 2008-08-14T13:59:00.000 | 0 | 1 | 0 | 0 | c++,python,unit-testing,code-generation,swig | 3,331,503 | 8 | false | 0 | 1 | My recommendation would be to figure out a set of known input-output results, such as some simpler cases that you already have in place, and unit test the code that is produced. It's entirely possible that as you change the generator that the exact string that is produced may be slightly different... but what you really care is whether it is interpreted in the same way. Thus, if you test the results as you would test that code if it were your feature, you will find out if it succeeds in the ways you want.
Basically, what you really want to know is whether your generator will produce what you expect without physically testing every possible combination (also: impossible). By ensuring that your generator is consistent in the ways you expect, you can feel better that the generator will succeed in ever-more-complex situations.
In this way, you can also build up a suite of regression tests (unit tests that need to keep working correctly). This will help you make sure that changes to your generator aren't breaking other forms of code. When you encounter a bug that your unit tests didn't catch, you may want to include it to prevent similar breakage. | 5 | 29 | 0 | This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.
I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When I developed this code I did it using TDD, but I've found my tests to be brittle as hell. Because each test essentially wanted to verify that for a given bit of input code (which happens to be a C++ header) I'd get a given bit of outputted code I wrote a small engine that reads test definitions from XML input files and generates test cases from these expectations.
The problem is I dread going in to modify the code at all. That and the fact that the unit tests themselves are a: complex, and b: brittle.
So I'm trying to think of alternative approaches to this problem, and it strikes me I'm perhaps tackling it the wrong way. Maybe I need to focus more on the outcome, IE: does the code I generate actually run and do what I want it to, rather than, does the code look the way I want it to.
Has anyone got any experiences of something similar to this they would care to share? | How should I unit test a code-generator? | 0 | 0 | 0 | 7,527 |
11,060 | 2008-08-14T13:59:00.000 | 5 | 1 | 0 | 0 | c++,python,unit-testing,code-generation,swig | 11,443 | 8 | false | 0 | 1 | Recall that "unit testing" is only one kind of testing. You should be able to unit test the internal pieces of your code generator. What you're really looking at here is system level testing (a.k.a. regression testing). It's not just semantics... there are different mindsets, approaches, expectations, etc. It's certainly more work, but you probably need to bite the bullet and set up an end-to-end regression test suite: fixed C++ files -> SWIG interfaces -> python modules -> known output. You really want to check the known input (fixed C++ code) against expected output (what comes out of the final Python program). Checking the code generator results directly would be like diffing object files... | 5 | 29 | 0 | This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.
I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When I developed this code I did it using TDD, but I've found my tests to be brittle as hell. Because each test essentially wanted to verify that for a given bit of input code (which happens to be a C++ header) I'd get a given bit of outputted code I wrote a small engine that reads test definitions from XML input files and generates test cases from these expectations.
The problem is I dread going in to modify the code at all. That and the fact that the unit tests themselves are a: complex, and b: brittle.
So I'm trying to think of alternative approaches to this problem, and it strikes me I'm perhaps tackling it the wrong way. Maybe I need to focus more on the outcome, IE: does the code I generate actually run and do what I want it to, rather than, does the code look the way I want it to.
Has anyone got any experiences of something similar to this they would care to share? | How should I unit test a code-generator? | 0.124353 | 0 | 0 | 7,527 |
11,060 | 2008-08-14T13:59:00.000 | 0 | 1 | 0 | 0 | c++,python,unit-testing,code-generation,swig | 11,128 | 8 | false | 0 | 1 | Yes, results are the ONLY thing that matters. The real chore is writing a framework that allows your generated code to run independently... spend your time there. | 5 | 29 | 0 | This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.
I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When I developed this code I did it using TDD, but I've found my tests to be brittle as hell. Because each test essentially wanted to verify that for a given bit of input code (which happens to be a C++ header) I'd get a given bit of outputted code I wrote a small engine that reads test definitions from XML input files and generates test cases from these expectations.
The problem is I dread going in to modify the code at all. That and the fact that the unit tests themselves are a: complex, and b: brittle.
So I'm trying to think of alternative approaches to this problem, and it strikes me I'm perhaps tackling it the wrong way. Maybe I need to focus more on the outcome, IE: does the code I generate actually run and do what I want it to, rather than, does the code look the way I want it to.
Has anyone got any experiences of something similar to this they would care to share? | How should I unit test a code-generator? | 0 | 0 | 0 | 7,527 |
11,060 | 2008-08-14T13:59:00.000 | 14 | 1 | 0 | 0 | c++,python,unit-testing,code-generation,swig | 11,074 | 8 | true | 0 | 1 | I started writing up a summary of my experience with my own code generator, then went back and re-read your question and found you had already touched upon the same issues yourself, focus on the execution results instead of the code layout/look.
Problem is, this is hard to test, the generated code might not be suited to actually run in the environment of the unit test system, and how do you encode the expected results?
I've found that you need to break down the code generator into smaller pieces and unit test those. Unit testing a full code generator is more like integration testing than unit testing if you ask me. | 5 | 29 | 0 | This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.
I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When I developed this code I did it using TDD, but I've found my tests to be brittle as hell. Because each test essentially wanted to verify that for a given bit of input code (which happens to be a C++ header) I'd get a given bit of outputted code I wrote a small engine that reads test definitions from XML input files and generates test cases from these expectations.
The problem is I dread going in to modify the code at all. That and the fact that the unit tests themselves are a: complex, and b: brittle.
So I'm trying to think of alternative approaches to this problem, and it strikes me I'm perhaps tackling it the wrong way. Maybe I need to focus more on the outcome, IE: does the code I generate actually run and do what I want it to, rather than, does the code look the way I want it to.
Has anyone got any experiences of something similar to this they would care to share? | How should I unit test a code-generator? | 1.2 | 0 | 0 | 7,527 |
11,060 | 2008-08-14T13:59:00.000 | 0 | 1 | 0 | 0 | c++,python,unit-testing,code-generation,swig | 11,235 | 8 | false | 0 | 1 | If you are running on *nux you might consider dumping the unittest framework in favor of a bash script or makefile. on windows you might consider building a shell app/function that runs the generator and then uses the code (as another process) and unittest that.
A third option would be to generate the code and then build an app from it that includes nothing but a unittest. Again you would need a shell script or whatnot to run this for each input. As to how to encode the expected behavior, it occurs to me that it could be done in much the same way as you would for the C++ code just using the generated interface rather than the C++ one. | 5 | 29 | 0 | This is a difficult and open-ended question I know, but I thought I'd throw it to the floor and see if anyone had any interesting suggestions.
I have developed a code-generator that takes our python interface to our C++ code (generated via SWIG) and generates code needed to expose this as WebServices. When I developed this code I did it using TDD, but I've found my tests to be brittle as hell. Because each test essentially wanted to verify that for a given bit of input code (which happens to be a C++ header) I'd get a given bit of outputted code I wrote a small engine that reads test definitions from XML input files and generates test cases from these expectations.
The problem is I dread going in to modify the code at all. That and the fact that the unit tests themselves are a: complex, and b: brittle.
So I'm trying to think of alternative approaches to this problem, and it strikes me I'm perhaps tackling it the wrong way. Maybe I need to focus more on the outcome, IE: does the code I generate actually run and do what I want it to, rather than, does the code look the way I want it to.
Has anyone got any experiences of something similar to this they would care to share? | How should I unit test a code-generator? | 0 | 0 | 0 | 7,527 |
12,692 | 2008-08-15T20:17:00.000 | 0 | 0 | 0 | 0 | asp.net,ironpython | 21,149 | 3 | false | 1 | 0 | Keep a look out for ASP.NET MVC
The IronRuby guys have got some internal builds of MVC to work with IronRuby, and IronPython 2 and IronRuby have a lot of code in common with the DLR.
I'm not sure if they'll support IronPython/IronRuby when MVC is released, but it's definitely worth keeping your eye on anyway - The old ASP.NET forms-based development model is old, busted, and the sooner it goes away the better. | 1 | 7 | 0 | Has anyone built a website with IronPython and ASP.NET. What were your experiences and is the combination ready for prime-time? | IronPython and ASP.NET | 0 | 0 | 0 | 634 |
13,857 | 2008-08-17T19:14:00.000 | 3 | 0 | 1 | 0 | python,functional-programming,closures | 473,491 | 13 | false | 0 | 0 | Here's a typical use case for closures - callbacks for GUI elements (this would be an alternative to subclassing the button class). For example, you can construct a function that will be called in response to a button press, and "close" over the relevant variables in the parent scope that are necessary for processing the click. This way you can wire up pretty complicated interfaces from the same initialization function, building all the dependencies into the closure. | 2 | 95 | 0 | I've been reading a lot about closures and I think I understand them, but without clouding the picture for myself and others, I am hoping someone can explain closures as succinctly and clearly as possible. I'm looking for a simple explanation that might help me understand where and why I would want to use them. | Can you explain closures (as they relate to Python)? | 0.046121 | 0 | 0 | 15,413 |
13,857 | 2008-08-17T19:14:00.000 | -2 | 0 | 1 | 0 | python,functional-programming,closures | 94,543 | 13 | false | 0 | 0 | The best explanation I ever saw of a closure was to explain the mechanism. It went something like this:
Imagine your program stack as a degenerate tree where each node has only one child and the single leaf node is the context of your currently executing procedure.
Now relax the constraint that each node can have only one child.
If you do this, you can have a construct ('yield') that can return from a procedure without discarding the local context (i.e. it doesn't pop it off the stack when you return). The next time the procedure is invoked, the invocation picks up the old stack (tree) frame and continues executing where it left off. | 2 | 95 | 0 | I've been reading a lot about closures and I think I understand them, but without clouding the picture for myself and others, I am hoping someone can explain closures as succinctly and clearly as possible. I'm looking for a simple explanation that might help me understand where and why I would want to use them. | Can you explain closures (as they relate to Python)? | -0.03076 | 0 | 0 | 15,413 |
14,281 | 2008-08-18T07:41:00.000 | 0 | 0 | 1 | 0 | python,regex,zip,text-processing | 14,304 | 4 | false | 0 | 0 | You could loop through the zip files, reading individual files using the zipfile module and running your regex on those, eliminating to unzip all the files at once.
I'm fairly certain that you can't run a regex over the zipped data, at least not meaningfully. | 2 | 7 | 0 | I have over a million text files compressed into 40 zip files. I also have a list of about 500 model names of phones. I want to find out the number of times a particular model was mentioned in the text files.
Is there any python module which can do a regex match on the files without unzipping it. Is there a simple way to solve this problem without unzipping? | Is there a python module for regex matching in zip files | 0 | 0 | 0 | 2,774 |
14,281 | 2008-08-18T07:41:00.000 | 0 | 0 | 1 | 0 | python,regex,zip,text-processing | 41,822 | 4 | false | 0 | 0 | Isn't it (at least theoretically) possible, to read in the ZIP's Huffman coding and then translate the regexp into the Huffman code? Might this be more efficient than first de-compressing the data, then running the regexp?
(Note: I know it wouldn't be quite that simple: you'd also have to deal with other aspects of the ZIP coding—file layout, block structures, back-references—but one imagines this could be fairly lightweight.)
EDIT: Also note that it's probably much more sensible to just use the zipfile solution. | 2 | 7 | 0 | I have over a million text files compressed into 40 zip files. I also have a list of about 500 model names of phones. I want to find out the number of times a particular model was mentioned in the text files.
Is there any python module which can do a regex match on the files without unzipping it. Is there a simple way to solve this problem without unzipping? | Is there a python module for regex matching in zip files | 0 | 0 | 0 | 2,774 |
19,654 | 2008-08-21T11:48:00.000 | 1 | 0 | 1 | 0 | php,python | 19,700 | 8 | false | 1 | 0 | I think the language itself is not an issue here, as python is really nice high level language with good and easy to find, thorough documentation.
From what I've seen, the Django framework is also a great tooklit for web development, giving much the same developer performance boost Rails is touted to give.
The real issue is at the maintenance and management level.
How will this move fragment the maintenance between PHP and Python code. Is there a need to migrate existing code from one platform to another? What problems will adopting Python and Django solve that you have in your current development workflow and frameworks, etc. | 8 | 6 | 0 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | Introducing Python | 0.024995 | 0 | 0 | 651 |
19,654 | 2008-08-21T11:48:00.000 | 14 | 0 | 1 | 0 | php,python | 19,715 | 8 | true | 1 | 0 | I recently introduced Python to my company, which does consulting work for the Post Office. I did this by waiting until there was a project for which I would be the only programmer, then getting permission to do this new project in Python. I then did another small project in Python with similarly impressive results. In addition, I used Python for all of my small throwaway assignments ("can you parse the stats in these files into a CSV file organized by date and site?", etc) and had a quick turnaround time on all of them.
I also evangelized Python a bit; I went out of my way to NOT be obnoxious about it, but I'd occasionally describe why I liked it so much, talked about the personal projects I use it for in my free time and why it's awesome for me, etc.
Eventually we started another project and I convinced everyone to use Python for it. I took care to point everyone to a lot of documentation, including the specific webpages relating to what they were working on, and every time they had a question, I'd explain how to do things properly by explaining the Pythonic approach to things, etc.
This has worked really well. However, this might be somewhat different than what you're describing. In my case I started with moderately small projects and Python is only being used for new projects. Also, none of my co-workers were really Perl or PHP gurus; they all knew those languages and had been using them for awhile, but it didn't take much effort for them to become more productive in Python than they'd been before.
So if you're talking about new projects with people who currently use PHP but aren't super-experts and don't love that language, then I think switching to Python is a no-brainer. However, if you're talking about working with a large existing PHP code base with a lot of very experienced PHP programmers who are happy with their current setup, then switching languages is probably not a good idea. You're probably somewhere in between, so you'll have to weigh the tradeoffs; hopefully my answer will help you do that. | 8 | 6 | 0 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | Introducing Python | 1.2 | 0 | 0 | 651 |
19,654 | 2008-08-21T11:48:00.000 | 0 | 0 | 1 | 0 | php,python | 19,943 | 8 | false | 1 | 0 | I love Python and Django, and use both to develop the our core webapps.
That said, it's hard to make a business case for switching at this point. Specifically:
Any new platform is risky compared to staying with the tried and true
You'll have the developer fragmentation you mentioned
It's far easier to find PHP programmers than python programmers
Moreover, as other posters have mention, if the issue is more with spaghetti code than PHP itself, there are plenty of nice PHP frameworks that could be used to refactor the code.
That said, if this developer is excited about python, stopping them outright is probably demoralizing. My suggestion would be to encourage them to develop in python, but not the mission critical parts of the app. Instead they could write some utility scripts, some small internal application that needs doing, etc.
In conclusion: I don't recommend switching from PHP, but I do recommend accommodating the developer's interest in some way at work. | 8 | 6 | 0 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | Introducing Python | 0 | 0 | 0 | 651 |
19,654 | 2008-08-21T11:48:00.000 | 1 | 0 | 1 | 0 | php,python | 19,968 | 8 | false | 1 | 0 | It's really all about schedules. To me the break should be with a specific project. If you decide your direction is Django then start new projects with that. Before you start a new project with a new language/framework, either make sure that you have scheduled time to get up to speed in this new direction, or get up to speed before using on new projects.
I would avoid going with a tool of the month. Make sure you want it to be your direction and commit some time/resources to learning enough to make a good decision. | 8 | 6 | 0 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | Introducing Python | 0.024995 | 0 | 0 | 651 |
19,654 | 2008-08-21T11:48:00.000 | 0 | 0 | 1 | 0 | php,python | 19,685 | 8 | false | 1 | 0 | I don't think it's a matter of a programming language as such.
What is the proficiency level of PHP in the team you're talking about? Are they doing spaghetti code or using some structured framework like Zend? If this is the first case then I absolutely understand the guy's interest in Python and Django. It this is the latter, it's just a hype. | 8 | 6 | 0 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | Introducing Python | 0 | 0 | 0 | 651 |
19,654 | 2008-08-21T11:48:00.000 | 2 | 0 | 1 | 0 | php,python | 19,692 | 8 | false | 1 | 0 | @darkdog:
Using a new language in production code is about more than easy syntax and high-level capability. You want to be familiar with core APIs and feel like you can fix something through logic instead of having to comb through the documentation.
I'm not saying transitioning to Python would be a bad idea for this company, but I'm with John--keep things simple during the transition. The new lead will appreciate having a say in such decisions.
If you'd really, really, really like to introduce Python, consider writing some extensions or utilities in straight-up Python or in the framework. You won't be upsetting your core initiatives, so it will be a low/no-risk opportunity to prove the merits of a switch. | 8 | 6 | 0 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | Introducing Python | 0.049958 | 0 | 0 | 651 |
19,654 | 2008-08-21T11:48:00.000 | 4 | 0 | 1 | 0 | php,python | 19,668 | 8 | false | 1 | 0 | If the mandate of the new lead is to put the house in order, the current situation should likely be simplified as much as possible prior. If I had to bring things to order, I wouldn't want to have to manage an ongoing language conversion project on top of everything else, or at least I'd like some choice when initiating the project. When making your recommendation, did you think about the additional managerial complexity that coming into the middle of a conversion would entail? | 8 | 6 | 0 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | Introducing Python | 0.099668 | 0 | 0 | 651 |
19,654 | 2008-08-21T11:48:00.000 | 0 | 0 | 1 | 0 | php,python | 19,665 | 8 | false | 1 | 0 | Well, python is a high level language.. its not hard to learn and if the guys already have programming knowledge it should be much easier to learn.. i like django.. i think it should be a nice try to use django .. | 8 | 6 | 0 | The company I used to work with has two developers working fulltime, and a handful of freelancers. They're in the process of hiring a new lead developer to try to bring order and management to the development.
But, currently, one of the developers has seen the light of Django (the company has only developed in PHP to date) while the other developer is concerned that introducing a new language (Python) is a bad idea right now.
How should they approach introducing this new technology? Obviously with only one of the developers actually knowing Python, there will be no redundancy when that dev is away or leaves the company.
Should they bother to introduce Python, or should they look for PHP-only solutions until such a time when the team actually have more than one Pythonion? Without a team leader, the decisions are having to fall to them. | Introducing Python | 0 | 0 | 0 | 651 |
20,794 | 2008-08-21T19:00:00.000 | 4 | 0 | 0 | 1 | python,linux,symlink | 20,843 | 8 | false | 0 | 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. | 1 | 30 | 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? | Find broken symlinks with Python | 0.099668 | 0 | 0 | 25,846 |
21,934 | 2008-08-22T07:35:00.000 | 7 | 0 | 1 | 0 | java,python,garbage-collection | 7,826,363 | 9 | false | 1 | 0 | One big disadvantage of Java's tracing GC is that from time to time it will "stop the world" and freeze the application for a relatively long time to do a full GC. If the heap is big and the the object tree complex, it will freeze for a few seconds. Also each full GC visits the whole object tree over and over again, something that is probably quite inefficient. Another drawback of the way Java does GC is that you have to tell the jvm what heap size you want (if the default is not good enough); the JVM derives from that value several thresholds that will trigger the GC process when there is too much garbage stacking up in the heap.
I presume that this is actually the main cause of the jerky feeling of Android (based on Java), even on the most expensive cellphones, in comparison with the smoothness of iOS (based on ObjectiveC, and using RC).
I'd love to see a jvm option to enable RC memory management, and maybe keeping GC only to run as a last resort when there is no more memory left. | 4 | 65 | 0 | Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed.
But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time.
Why does Java choose this strategy and what is the benefit from this?
Is this better than the Python approach? | Why Java and Python garbage collection methods are different? | 1 | 0 | 0 | 20,044 |
21,934 | 2008-08-22T07:35:00.000 | 6 | 0 | 1 | 0 | java,python,garbage-collection | 74,327 | 9 | false | 1 | 0 | Garbage collection is faster (more time efficient) than reference counting, if you have enough memory. For example, a copying gc traverses the "live" objects and copies them to a new space, and can reclaim all the "dead" objects in one step by marking a whole memory region. This is very efficient, if you have enough memory. Generational collections use the knowledge that "most objects die young"; often only a few percent of objects have to be copied.
[This is also the reason why gc can be faster than malloc/free]
Reference counting is much more space efficient than garbage collection, since it reclaims memory the very moment it gets unreachable. This is nice when you want to attach finalizers to objects (e.g. to close a file once the File object gets unreachable). A reference counting system can work even when only a few percent of the memory is free. But the management cost of having to increment and decrement counters upon each pointer assignment cost a lot of time, and some kind of garbage collection is still needed to reclaim cycles.
So the trade-off is clear: if you have to work in a memory-constrained environment, or if you need precise finalizers, use reference counting. If you have enough memory and need the speed, use garbage collection. | 4 | 65 | 0 | Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed.
But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time.
Why does Java choose this strategy and what is the benefit from this?
Is this better than the Python approach? | Why Java and Python garbage collection methods are different? | 1 | 0 | 0 | 20,044 |
21,934 | 2008-08-22T07:35:00.000 | 54 | 0 | 1 | 0 | java,python,garbage-collection | 21,964 | 9 | true | 1 | 0 | There are drawbacks of using reference counting. One of the most mentioned is circular references: Suppose A references B, B references C and C references B. If A were to drop its reference to B, both B and C will still have a reference count of 1 and won't be deleted with traditional reference counting. CPython (reference counting is not part of python itself, but part of the C implementation thereof) catches circular references with a separate garbage collection routine that it runs periodically...
Another drawback: Reference counting can make execution slower. Each time an object is referenced and dereferenced, the interpreter/VM must check to see if the count has gone down to 0 (and then deallocate if it did). Garbage Collection does not need to do this.
Also, Garbage Collection can be done in a separate thread (though it can be a bit tricky). On machines with lots of RAM and for processes that use memory only slowly, you might not want to be doing GC at all! Reference counting would be a bit of a drawback there in terms of performance... | 4 | 65 | 0 | Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed.
But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time.
Why does Java choose this strategy and what is the benefit from this?
Is this better than the Python approach? | Why Java and Python garbage collection methods are different? | 1.2 | 0 | 0 | 20,044 |
21,934 | 2008-08-22T07:35:00.000 | 4 | 0 | 1 | 0 | java,python,garbage-collection | 46,780 | 9 | false | 1 | 0 | Reference counting is particularly difficult to do efficiently in a multi-threaded environment. I don't know how you'd even start to do it without getting into hardware assisted transactions or similar (currently) unusual atomic instructions.
Reference counting is easy to implement. JVMs have had a lot of money sunk into competing implementations, so it shouldn't be surprising that they implement very good solutions to very difficult problems. However, it's becoming increasingly easy to target your favourite language at the JVM. | 4 | 65 | 0 | Python uses the reference count method to handle object life time. So an object that has no more use will be immediately destroyed.
But, in Java, the GC(garbage collector) destroys objects which are no longer used at a specific time.
Why does Java choose this strategy and what is the benefit from this?
Is this better than the Python approach? | Why Java and Python garbage collection methods are different? | 0.088656 | 0 | 0 | 20,044 |
22,059 | 2008-08-22T10:51:00.000 | 0 | 0 | 0 | 0 | python,ruby,semantics,zemanta | 23,041 | 3 | false | 1 | 0 | Open Calais probably use language parsing technology and language statics to guess which words or phrases are Names, Places, Companies, etc. Then, it is just another step to do some kind of search for those entities and return meta data.
Zementa probably does something similar, but matches the phrases against meta-data attached to images in order to acquire related results.
It certainly isn't easy. | 1 | 5 | 0 | I was wondering how as semantic service like Open Calais figures out the names of companies, or people, tech concepts, keywords, etc. from a piece of text. Is it because they have a large database that they match the text against?
How would a service like Zemanta know what images to suggest to a piece of text for instance? | How do content discovery engines, like Zemanta and Open Calais work? | 0 | 0 | 0 | 2,346 |
22,676 | 2008-08-22T15:34:00.000 | 20 | 0 | 0 | 0 | python,http,urllib | 39,573,536 | 27 | false | 0 | 0 | Following are the most commonly used calls for downloading files in python:
urllib.urlretrieve ('url_to_file', file_name)
urllib2.urlopen('url_to_file')
requests.get(url)
wget.download('url', file_name)
Note: urlopen and urlretrieve are found to perform relatively bad with downloading large files (size > 500 MB). requests.get stores the file in-memory until download is complete. | 1 | 1,032 | 0 | I have a small utility that I use to download an MP3 file from a website on a schedule and then builds/updates a podcast XML file which I've added to iTunes.
The text processing that creates/updates the XML file is written in Python. However, I use wget inside a Windows .bat file to download the actual MP3 file. I would prefer to have the entire utility written in Python.
I struggled to find a way to actually download the file in Python, thus why I resorted to using wget.
So, how do I download the file using Python? | How to download a file over HTTP? | 1 | 0 | 1 | 1,341,778 |
23,397 | 2008-08-22T20:27:00.000 | 3 | 0 | 0 | 1 | python,windows,process,subprocess,fork | 52,191 | 7 | false | 0 | 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. | 1 | 23 | 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. | What's the best way to duplicate fork() in windows? | 0.085505 | 0 | 0 | 31,865 |
24,193 | 2008-08-23T12:41:00.000 | 2 | 0 | 1 | 0 | python,visual-studio-2008,code-generation | 24,199 | 5 | false | 0 | 0 | I recall that in previous versions of VS, there was a way to add custom build steps to the build process. I used that a lot to do exactly the kind of automated code generation you describe.
I imagine the custom build step feature is still there in 2008. | 2 | 4 | 0 | I had an idea, if I add a python .py file to my C# project, and tag the file with a custom generator that would execute the python file, and treat the output as the result of the code generation, ie. put it into a C# file, that would allow me to do quite a lot of code generation as part of the build process.
Does anyone know if such a custom generator for Visual Studio 2008 exists? | Python code generator for Visual Studio? | 0.07983 | 0 | 0 | 1,825 |
24,193 | 2008-08-23T12:41:00.000 | 1 | 0 | 1 | 0 | python,visual-studio-2008,code-generation | 24,236 | 5 | false | 0 | 0 | I don't understand what you are trying to do here. Are you trying to execute a Python script that generates a C# file and then compile that with the project? Or are you trying to compile a Python script to C#? | 2 | 4 | 0 | I had an idea, if I add a python .py file to my C# project, and tag the file with a custom generator that would execute the python file, and treat the output as the result of the code generation, ie. put it into a C# file, that would allow me to do quite a lot of code generation as part of the build process.
Does anyone know if such a custom generator for Visual Studio 2008 exists? | Python code generator for Visual Studio? | 0.039979 | 0 | 0 | 1,825 |
25,661 | 2008-08-25T04:36:00.000 | 0 | 0 | 0 | 0 | python,gtk,pygtk,sdl,pygame | 88,457 | 7 | false | 0 | 1 | I tried doing this myself a while ago, and I never got it to work perfectly. Actually I never got it to work at all under Windows, as it kept crashing the entire OS and I ran out of patience. I continued to use it though as it was only important it ran on Linux, and was only a small project. I'd strongly recommend you investigate alternatives. It always felt like a nasty hack, and made me feel dirty. | 2 | 9 | 0 | What is the best way to use PyGame (SDL) within a PyGTK application?
I'm searching for a method that allows me to have a drawing area in the GTK window and at the same time being able to manage both GTK and SDL events. | pyGame within a pyGTK application | 0 | 0 | 0 | 4,838 |
25,661 | 2008-08-25T04:36:00.000 | 0 | 0 | 0 | 0 | python,gtk,pygtk,sdl,pygame | 199,288 | 7 | false | 0 | 1 | There's a simple solution that might work for you.
Write the PyGTK stuff and PyGame stuff as separate applications. Then from the PyGTK application call the PyGame application, using os.system to call the PyGame application. If you need to share data between the two then either use a database, pipes or IPC. | 2 | 9 | 0 | What is the best way to use PyGame (SDL) within a PyGTK application?
I'm searching for a method that allows me to have a drawing area in the GTK window and at the same time being able to manage both GTK and SDL events. | pyGame within a pyGTK application | 0 | 0 | 0 | 4,838 |
26,025 | 2008-08-25T13:28:00.000 | 2 | 0 | 0 | 0 | python,django,apache,hosting | 5,942,466 | 13 | false | 1 | 0 | In my opinion best/fastest stack is varnish-nginx-uwsgi-django.
And I'm successfully using it. | 3 | 47 | 0 | I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server.
I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow.
What i'm looking for is:
Easy to set up
Fast and easy on resources
Can serve mediafiles
Able to serve multiple djangosites on same server
I would rather not install PHP or anything else that sucks resources, and for which I have no use for.
I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the pros and cons of these and have i missed someone?
@Barry: Somehow i feel like Apache is to bloated for me. What about the alternatives?
@BrianLy: Ok I'll check out mod_wsgi some more. But why do i need Apache if i serve static files with lighty? I have also managed to serve the django app itself with lighty. Is that bad in anyway? Sorry for beeing so stupid :-)
UPDATE: What about lighty and nginx - which are the uses-cases when these are the perfect choice? | Cleanest & Fastest server setup for Django | 0.03076 | 0 | 0 | 24,076 |
26,025 | 2008-08-25T13:28:00.000 | 1 | 0 | 0 | 0 | python,django,apache,hosting | 26,185 | 13 | false | 1 | 0 | If you're using lighthttpd, you can also use FastCGI for serving Django. I'm not sure how the speed compares to mod_wsgi, but if memory serves correctly, you get a couple of the benefits that you would get with mod_wsgi that you wouldn't get with mod_python. The main one being that you can give each application its own process (which is really helpful for keeping memory of different apps separated as well as for taking advantage of multi-core computers.
Edit: Just to add in regards to your update about nginix, if memory serves correctly again, nginix uses "greenlets" to handle concurrency. This means that you may need to be a little bit more careful to make sure that one app doesn't eat up all the server's time. | 3 | 47 | 0 | I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server.
I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow.
What i'm looking for is:
Easy to set up
Fast and easy on resources
Can serve mediafiles
Able to serve multiple djangosites on same server
I would rather not install PHP or anything else that sucks resources, and for which I have no use for.
I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the pros and cons of these and have i missed someone?
@Barry: Somehow i feel like Apache is to bloated for me. What about the alternatives?
@BrianLy: Ok I'll check out mod_wsgi some more. But why do i need Apache if i serve static files with lighty? I have also managed to serve the django app itself with lighty. Is that bad in anyway? Sorry for beeing so stupid :-)
UPDATE: What about lighty and nginx - which are the uses-cases when these are the perfect choice? | Cleanest & Fastest server setup for Django | 0.015383 | 0 | 0 | 24,076 |
26,025 | 2008-08-25T13:28:00.000 | 27 | 0 | 0 | 0 | python,django,apache,hosting | 29,748 | 13 | true | 1 | 0 | Since I was looking for some more in-depth answers, I decided to research the issue myself in depth. Please let me know if I've misunderstood anything.
Some general recommendation are to use a separate webserver for handling media. By separate, I mean a webserver which is not running Django. This server can be for instance:
Lighttpd (Lighty)
Nginx (EngineX)
Or some other light-weight server
Then, for Django, you can go down different paths. You can either:
Serve Django via Apache and:
mod_python
This is the stable and recommended/well documented way. Cons: uses a lot of memory.
mod_wsgi
From what I understand, mod_wsgi is a newer alternative. It appears to be faster and easier on resources.
mod_fastcgi
When using FastCGI you are delegating the serving of Django to another process. Since mod_python includes a python interpreter in every request it uses a lot of memory. This is a way to bypass that problem. Also there is some security concerns.
What you do is that you start your Django FastCGI server in a separate process and then configures apache via rewrites to call this process when needed.
Or you can:
Serve Django without using Apache but with another server that supports FastCGI natively:
(The documentation mentions that you can do this if you don't have any Apache specific needs. I guess the reason must be to save memory.)
Lighttpd
This is the server that runs Youtube. It seems fast and easy to use, however i've seen reports on memoryleaks.
nginx
I've seen benchmarks claiming that this server is even faster than lighttpd. It's mostly documented in Russian though.
Another thing, due to limitations in Python your server should be running in forked mode, not threaded.
So this is my current research, but I want more opinions and experiences. | 3 | 47 | 0 | I'm about to deploy a mediumsized site powered by Django. I have a dedicated Ubuntu Server.
I'm really confused over which serversoftware to use. So i thought to myself: why not ask stackoverflow.
What i'm looking for is:
Easy to set up
Fast and easy on resources
Can serve mediafiles
Able to serve multiple djangosites on same server
I would rather not install PHP or anything else that sucks resources, and for which I have no use for.
I have heard of mod_wsgi and mod_python on Apache, nginx and lighty. Which are the pros and cons of these and have i missed someone?
@Barry: Somehow i feel like Apache is to bloated for me. What about the alternatives?
@BrianLy: Ok I'll check out mod_wsgi some more. But why do i need Apache if i serve static files with lighty? I have also managed to serve the django app itself with lighty. Is that bad in anyway? Sorry for beeing so stupid :-)
UPDATE: What about lighty and nginx - which are the uses-cases when these are the perfect choice? | Cleanest & Fastest server setup for Django | 1.2 | 0 | 0 | 24,076 |
26,706 | 2008-08-25T19:43:00.000 | 1 | 0 | 0 | 0 | python,user-interface,drag-and-drop,wxpython,wxwidgets | 139,047 | 2 | false | 0 | 1 | There is no way to see dragged data in OnEnter and OnDragOver methods.
The only solution I found is to store the dragged item in some instance variable that is then readable inside these methods. | 2 | 6 | 0 | I'm a bit perplexed by drag and drop in wxPython (but perhaps this questions pertains to drag and drop in other GUI frameworks as well). The frameworks provides a couple of callbacks (OnEnter and OnDragOver) that purportedly allow me to inform the system whether the current mouse position is a valid place to drop whatever it is that is being dragged. From these methods I can return wx.DragNone, wx.DragCopy, etc. What baffles me is that from within these methods I am not allowed to call GetData, which means I am not allowed to examine the data that the user is dragging. If I cannot see the data, how am I supposed to know whether it is OK for the user to drop here? | wxpython: How do I examine dragged data in OnDragOver? | 0.099668 | 0 | 0 | 584 |
26,706 | 2008-08-25T19:43:00.000 | 1 | 0 | 0 | 0 | python,user-interface,drag-and-drop,wxpython,wxwidgets | 26,707 | 2 | true | 0 | 1 | One solution, which is a hack of limited usefulness, is when a drag is initiated, store the dragged data in a global or static reference somewhere. This way, in the OnEnter and OnDragOver handlers, it is possible to get a reference to the data being dragged. This is of course only useful for drags within the same application (the same instance of the application, actually). | 2 | 6 | 0 | I'm a bit perplexed by drag and drop in wxPython (but perhaps this questions pertains to drag and drop in other GUI frameworks as well). The frameworks provides a couple of callbacks (OnEnter and OnDragOver) that purportedly allow me to inform the system whether the current mouse position is a valid place to drop whatever it is that is being dragged. From these methods I can return wx.DragNone, wx.DragCopy, etc. What baffles me is that from within these methods I am not allowed to call GetData, which means I am not allowed to examine the data that the user is dragging. If I cannot see the data, how am I supposed to know whether it is OK for the user to drop here? | wxpython: How do I examine dragged data in OnDragOver? | 1.2 | 0 | 0 | 584 |
27,567 | 2008-08-26T08:40:00.000 | 3 | 1 | 0 | 0 | python,translation,pypy | 1,041,655 | 5 | false | 0 | 0 | PyPy translator is in general, not intended for more public use. We use it for translating
our own python interpreter (including JIT and GCs, both written in RPython, this restricted
subset of Python). The idea is that with good JIT and GC, you'll be able to speedups even
without knowing or using PyPy's translation toolchain (and more importantly, without
restricting yourself to RPython).
Cheers,
fijal | 2 | 11 | 0 | I've been having a hard time trying to understand PyPy's translation. It looks like something absolutely revolutionary from simply reading the description, however I'm hard-pressed to find good documentation on actually translating a real world piece of code to something such as LLVM. Does such a thing exist? The official PyPy documentation on it just skims over the functionality, rather than providing anything I can try out myself. | Where can I learn more about PyPy's translation function? | 0.119427 | 0 | 0 | 1,284 |
27,567 | 2008-08-26T08:40:00.000 | 1 | 1 | 0 | 0 | python,translation,pypy | 1,041,857 | 5 | false | 0 | 0 | It looks like something absolutely revolutionary from simply reading the description,
As far as I know, PyPy is novel in the sense that it is the first system expressly designed for implementing languages. Other tools exist to help with much of the very front end, such as parser generators, or for the very back end, such as code generation, but not much existed for connecting the two. | 2 | 11 | 0 | I've been having a hard time trying to understand PyPy's translation. It looks like something absolutely revolutionary from simply reading the description, however I'm hard-pressed to find good documentation on actually translating a real world piece of code to something such as LLVM. Does such a thing exist? The official PyPy documentation on it just skims over the functionality, rather than providing anything I can try out myself. | Where can I learn more about PyPy's translation function? | 0.039979 | 0 | 0 | 1,284 |
28,796 | 2008-08-26T18:26:00.000 | -2 | 0 | 1 | 0 | python,refactoring | 14,046,877 | 7 | false | 0 | 0 | You can use sed to perform this. The trick is to recall that regular expressions can recognize word boundaries. This works on all platforms provided you get the tools, which on Windows is Cygwin, Mac OS may require installing the dev tools, I'm not sure, and Linux has this out of the box. So grep, xargs, and sed should do the trick, after 12 hours of reading man pages and trial and error ;) | 3 | 74 | 0 | I have a bunch of classes I want to rename. Some of them have names that are small and that name is reused in other class names, where I don't want that name changed. Most of this lives in Python code, but we also have some XML code that references class names.
Simple search and replace only gets me so far. In my case, I want to rename AdminAction to AdminActionPlug and AdminActionLogger to AdminActionLoggerPlug, so the first one's search-and-replace would also hit the second, wrongly.
Does anyone have experience with Python refactoring tools ? Bonus points if they can fix class names in the XML documents too. | What refactoring tools do you use for Python? | -0.057081 | 0 | 0 | 39,816 |
28,796 | 2008-08-26T18:26:00.000 | 4 | 0 | 1 | 0 | python,refactoring | 1,813,244 | 7 | false | 0 | 0 | Your IDE can support refactorings !!
Check it Eric, Eclipse, WingIDE have build in tools for refactorings (Rename including). And that are very safe refactorings - if something can go wrong IDE wont do ref.
Also consider adding few unit test to ensure your code did not suffer during refactorings. | 3 | 74 | 0 | I have a bunch of classes I want to rename. Some of them have names that are small and that name is reused in other class names, where I don't want that name changed. Most of this lives in Python code, but we also have some XML code that references class names.
Simple search and replace only gets me so far. In my case, I want to rename AdminAction to AdminActionPlug and AdminActionLogger to AdminActionLoggerPlug, so the first one's search-and-replace would also hit the second, wrongly.
Does anyone have experience with Python refactoring tools ? Bonus points if they can fix class names in the XML documents too. | What refactoring tools do you use for Python? | 0.113791 | 0 | 0 | 39,816 |
28,796 | 2008-08-26T18:26:00.000 | 5 | 0 | 1 | 0 | python,refactoring | 4,882,243 | 7 | false | 0 | 0 | WingIDE 4.0 (WingIDE is my python IDE of choice) will support a few refactorings, but I just tried out the latest beta, beta6, and... there's still work to be done. Retract Method works nicely, but Rename Symbol does not.
Update: The 4.0 release has fixed all of the refactoring tools. They work great now. | 3 | 74 | 0 | I have a bunch of classes I want to rename. Some of them have names that are small and that name is reused in other class names, where I don't want that name changed. Most of this lives in Python code, but we also have some XML code that references class names.
Simple search and replace only gets me so far. In my case, I want to rename AdminAction to AdminActionPlug and AdminActionLogger to AdminActionLoggerPlug, so the first one's search-and-replace would also hit the second, wrongly.
Does anyone have experience with Python refactoring tools ? Bonus points if they can fix class names in the XML documents too. | What refactoring tools do you use for Python? | 0.141893 | 0 | 0 | 39,816 |
28,961 | 2008-08-26T19:49:00.000 | 3 | 1 | 0 | 0 | python,web-services,soap | 31,926 | 3 | false | 0 | 0 | If I have to expose APIs, I prefer doing it as JSON. Python has excellent support for JSON objects (JSON Objects are infact python dictionaries) | 1 | 8 | 0 | I have a medium sized application that runs as a .net web-service which I do not control,
and I want to create a loose pythonic API above it to enable easy scripting.
I wanted to know what is the best/most practical solution for using web-services in python.
Edit:
I need to consume a complex soap WS
and I have no control over it. | What's the best way to use web services in python? | 0.197375 | 0 | 0 | 1,090 |
29,856 | 2008-08-27T10:22:00.000 | 1 | 0 | 0 | 1 | python,macos,64-bit | 31,384 | 5 | true | 1 | 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? | 4 | 4 | 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. | Install Python to match directory layout in OS X 10.5 | 1.2 | 0 | 0 | 653 |
29,856 | 2008-08-27T10:22:00.000 | 0 | 0 | 0 | 1 | python,macos,64-bit | 31,331 | 5 | false | 1 | 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. | 4 | 4 | 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. | Install Python to match directory layout in OS X 10.5 | 0 | 0 | 0 | 653 |
29,856 | 2008-08-27T10:22:00.000 | 1 | 0 | 0 | 1 | python,macos,64-bit | 30,591 | 5 | false | 1 | 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? | 4 | 4 | 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. | Install Python to match directory layout in OS X 10.5 | 0.039979 | 0 | 0 | 653 |
29,856 | 2008-08-27T10:22:00.000 | 0 | 0 | 0 | 1 | python,macos,64-bit | 31,425 | 5 | false | 1 | 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. | 4 | 4 | 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. | Install Python to match directory layout in OS X 10.5 | 0 | 0 | 0 | 653 |
31,340 | 2008-08-27T23:44:00.000 | 2 | 0 | 1 | 0 | python,multithreading | 1,197,151 | 7 | false | 0 | 0 | Try to remember that the GIL is set to poll around every so often in order to do show the appearance of multiple tasks. This setting can be fine tuned, but I offer the suggestion that there should be work that the threads are doing or lots of context switches are going to cause problems.
I would go so far as to suggest multiple parents on processors and try to keep like jobs on the same core(s). | 1 | 89 | 0 | I've been trying to wrap my head around how threads work in Python, and it's hard to find good information on how they operate. I may just be missing a link or something, but it seems like the official documentation isn't very thorough on the subject, and I haven't been able to find a good write-up.
From what I can tell, only one thread can be running at once, and the active thread switches every 10 instructions or so?
Where is there a good explanation, or can you provide one? It would also be very nice to be aware of common problems that you run into while using threads with Python. | How do threads work in Python, and what are common Python-threading specific pitfalls? | 0.057081 | 0 | 0 | 43,779 |
32,385 | 2008-08-28T14:23:00.000 | 0 | 1 | 0 | 0 | python,file-io | 33,325 | 3 | false | 0 | 0 | I had the same issue and I simply opened the file and did some replace: then reload the file in the Python interpreter. This works fine and is easy to do.
Otherwise AFAIK you have to use some conf objects. | 1 | 9 | 0 | This is something that I think would be very useful. Basically, I'd like there to be a way to edit Python source programmatically without requiring human intervention. There are a couple of things I would like to do with this:
Edit the configuration of Python apps that use source modules for configuration.
Set up a "template" so that I can customize a Python source file on the fly. This way, I can set up a "project" system on an open source app I'm working on and allow certain files to be customized.
I could probably write something that can do this myself, but I can see that opening up a lot of "devil's in the details" type issues. Are there any ways to do this currently, or am I just going to have to bite the bullet and implement it myself? | Programmatically editing Python source | 0 | 0 | 0 | 1,904 |
33,978 | 2008-08-29T04:59:00.000 | 2 | 0 | 1 | 0 | python,performance,memory-profiling | 24,495,011 | 5 | false | 0 | 0 | For big objects you may use a somewhat crude but effective method:
check how much memory your Python process occupies in the system, then delete the object and compare.
This method has many drawbacks but it will give you a very fast estimate for very big objects. | 1 | 267 | 0 | How would you go about finding out how much memory is being used by an object? I know it is possible to find out how much is used by a block of code, but not by an instantiated object (anytime during its life), which is what I want. | Find out how much memory is being used by an object in Python | 0.07983 | 0 | 0 | 222,118 |
34,020 | 2008-08-29T05:43:00.000 | 2 | 0 | 1 | 0 | python,multithreading | 576,667 | 6 | false | 0 | 0 | If you want to code in python and get great threading support, you might want to check out IronPython or Jython. Since the python code in IronPython and Jython run on the .NET CLR and Java VM respectively, they enjoy the great threading support built into those libraries. In addition to that, IronPython doesn't have the GIL, an issue that prevents CPython threads from taking full advantage of multi-core architectures. | 3 | 28 | 0 | A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy - enough to avoid using altogether. What can said about this rumor? | Are Python threads buggy? | 0.066568 | 0 | 0 | 12,462 |
34,020 | 2008-08-29T05:43:00.000 | -2 | 0 | 1 | 0 | python,multithreading | 34,024 | 6 | false | 0 | 0 | I've used it in several applications and have never had nor heard of threading being anything other than 100% reliable, as long as you know its limits. You can't spawn 1000 threads at the same time and expect your program to run properly on Windows, however you can easily write a worker pool and just feed it 1000 operations, and keep everything nice and under control. | 3 | 28 | 0 | A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy - enough to avoid using altogether. What can said about this rumor? | Are Python threads buggy? | -0.066568 | 0 | 0 | 12,462 |
34,020 | 2008-08-29T05:43:00.000 | 9 | 0 | 1 | 0 | python,multithreading | 34,078 | 6 | false | 0 | 0 | The GIL (Global Interpreter Lock) might be a problem, but the API is quite OK. Try out the excellent processing module, which implements the Threading API for separate processes. I am using that right now (albeit on OS X, have yet to do some testing on Windows) and am really impressed. The Queue class is really saving my bacon in terms of managing complexity!
EDIT: it seemes the processing module is being included in the standard library as of version 2.6 (import multiprocessing). Joy! | 3 | 28 | 0 | A reliable coder friend told me that Python's current multi-threading implementation is seriously buggy - enough to avoid using altogether. What can said about this rumor? | Are Python threads buggy? | 1 | 0 | 0 | 12,462 |
34,079 | 2008-08-29T06:55:00.000 | 15 | 0 | 0 | 0 | python,http,proxy | 3,942,980 | 6 | false | 0 | 0 | Setting an environment var named http_proxy like this: http://username:password@proxy_url:port | 1 | 58 | 0 | What's the best way to specify a proxy with username and password for an http connection in python? | How to specify an authenticated proxy for a python http connection? | 1 | 0 | 1 | 95,434 |
34,243 | 2008-08-29T09:24:00.000 | 4 | 1 | 1 | 0 | python,language-features,encapsulation | 34,266 | 2 | true | 0 | 0 | I've not heard of a direct equivalent either. You could probably achieve the same effect with macros, especially in a language like Lisp which has extremely powerful macros.
I wouldn't be at all surprised if other languages start to incorporate something similar because it is so powerful. | 1 | 10 | 0 | Is there something like the Python descriptor protocol implemented in other languages? It seems like a nice way to increase modularity/encapsulation without bloating your containing class' implementation, but I've never heard of a similar thing in any other languages. Is it likely absent from other languages because of the lookup overhead? | Python descriptor protocol analog in other languages? | 1.2 | 0 | 0 | 888 |
34,439 | 2008-08-29T15:05:00.000 | 132 | 1 | 1 | 0 | python,introspection | 20,100,900 | 22 | false | 0 | 0 | The simplest method is to use dir(objectname). It will display all the methods available for that object. | 1 | 592 | 0 | Given a Python object of any kind, is there an easy way to get the list of all methods that this object has?
Or,
if this is not possible, is there at least an easy way to check if it has a particular method other than simply checking if an error occurs when the method is called? | Finding what methods a Python object has | 1 | 0 | 0 | 564,030 |
35,634 | 2008-08-30T03:04:00.000 | 2 | 0 | 1 | 0 | python,ruby | 39,062 | 2 | false | 0 | 0 | You could also use __id__. This gives you the objects internal ID number, which is always unique. To check if to objects are the same, try
a.__id__ = b.__id__
This is how Ruby's standard library does it as far as I can tell (see group_by and others). | 1 | 9 | 0 | Is there a Ruby equivalent for Python's "is"? It tests whether two objects are identical (i.e. have the same memory location). | Ruby "is" equivalent | 0.197375 | 0 | 0 | 473 |
35,753 | 2008-08-30T07:08:00.000 | 23 | 1 | 1 | 0 | python,ide | 35,777 | 13 | false | 0 | 0 | You'll find mostly two answers to that – the religous one (Yes! Of course! It's the best language ever!) and the other religious one (you gotta be kidding me! Python? No... it's not mature enough). I will maybe skip the last religion (Python?! Use Ruby!). The truth, as always, is far from obvious.
Pros: it's easy, readable, batteries included, has lots of good libraries for pretty much everything. It's expressive and dynamic typing makes it more concise in many cases.
Cons: as a dynamic language, has way worse IDE support (proper syntax completion requires static typing, whether explicit in Java or inferred in SML), its object system is far from perfect (interfaces, anyone?) and it is easy to end up with messy code that has methods returning either int or boolean or object or some sort under unknown circumstances.
My take – I love Python for scripting, automation, tiny webapps and other simple well defined tasks. In my opinion it is by far the best dynamic language on the planet. That said, I would never use it any dynamically typed language to develop an application of substantial size.
Say – it would be fine to use it for Stack Overflow, which has three developers and I guess no more than 30k lines of code. For bigger things – first your development would be super fast, and then once team and codebase grow things are slowing down more than they would with Java or C#. You need to offset lack of compilation time checks by writing more unittests, refactorings get harder cause you never know what your refacoring broke until you run all tests or even the whole big app, etc.
Now – decide on how big your team is going to be and how big the app is supposed to be once it is done. If you have 5 or less people and the target size is roughly Stack Overflow, go ahead, write in Python. You will finish in no time and be happy with good codebase. But if you want to write second Google or Yahoo, you will be much better with C# or Java.
Side-note on C/C++ you have mentioned: if you are not writing performance critical software (say massive parallel raytracer that will run for three months rendering a film) or a very mission critical system (say Mars lander that will fly three years straight and has only one chance to land right or you lose $400mln) do not use it. For web apps, most desktop apps, most apps in general it is not a good choice. You will die debugging pointers and memory allocation in complex business logic. | 8 | 29 | 0 | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion. | Is Python good for big software projects (not web based)? | 1 | 0 | 0 | 29,152 |
35,753 | 2008-08-30T07:08:00.000 | 0 | 1 | 1 | 0 | python,ide | 277,490 | 13 | false | 0 | 0 | I had only one python experience, my trash-cli project.
I know that probably some or all problems depends of my inexperience with python.
I found frustrating these things:
the difficult of finding a good IDE for free
the limited support to automatic refactoring
Moreover:
the need of introduce two level of grouping packages and modules confuses me.
it seems to me that there is not a widely adopted code naming convention
it seems to me that there are some standard library APIs docs that are incomplete
the fact that some standard libraries are not fully object oriented annoys me
Although some python coders tell me that they does not have these problems, or they say these are not problems. | 8 | 29 | 0 | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion. | Is Python good for big software projects (not web based)? | 0 | 0 | 0 | 29,152 |
35,753 | 2008-08-30T07:08:00.000 | 13 | 1 | 1 | 0 | python,ide | 35,759 | 13 | false | 0 | 0 | I really like python, it's usually my language of choice these days for small (non-gui) stuff that I do on my own.
However, for some larger Python projects I've tackled, I'm finding that it's not quite the same as programming in say, C++. I was working on a language parser, and needed to represent an AST in Python. This is certainly within the scope of what Python can do, but I had a bit of trouble with some refactoring. I was changing the representation of my AST and changing methods and classes around a lot, and I found I missed the strong typing that would be available to me in a C++ solution. Python's duck typing was almost too flexible and I found myself adding a lot of assert code to try to check my types as the program ran. And then I couldn't really be sure that everything was properly typed unless I had 100% code coverage testing (which I didn't at the time).
Actually, that's another thing that I miss sometimes. It's possible to write syntactically correct code in Python that simply won't run. The compiler is incapable of telling you about it until it actually executes the code, so in infrequently-used code paths such as error handlers you can easily have unseen bugs lurking around. Even code that's as simple as printing an error message with a % format string can fail at runtime because of mismatched types.
I haven't used Python for any GUI stuff so I can't comment on that aspect. | 8 | 29 | 0 | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion. | Is Python good for big software projects (not web based)? | 1 | 0 | 0 | 29,152 |
35,753 | 2008-08-30T07:08:00.000 | 0 | 1 | 1 | 0 | python,ide | 35,838 | 13 | false | 0 | 0 | I know I'm probably stating the obvious, but don't forget that the quality of the development team and their familiarity with the technology will have a major impact on your ability to deliver.
If you have a strong team, then it's probably not an issue if they're familiar. But if you have people who are more 9 to 5'rs who aren't familiar with the technology, they will need more support and you'd need to make a call if the productivity gains are worth whatever the cost of that support is. | 8 | 29 | 0 | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion. | Is Python good for big software projects (not web based)? | 0 | 0 | 0 | 29,152 |
35,753 | 2008-08-30T07:08:00.000 | 1 | 1 | 1 | 0 | python,ide | 286,449 | 13 | false | 0 | 0 | And as far as I know they use a lot of python inside google too.
Well i'd hope so, the maker of python still works at google if i'm not mistaken?
As for the use of Python, i think it's a great language for stand-alone apps. It's heavily used in a lot of Linux programs, and there are a few nice widget sets out there to aid in the development of GUI's. | 8 | 29 | 0 | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion. | Is Python good for big software projects (not web based)? | 0.015383 | 0 | 0 | 29,152 |
35,753 | 2008-08-30T07:08:00.000 | 1 | 1 | 1 | 0 | python,ide | 286,491 | 13 | false | 0 | 0 | Python is a delight to use. I use it routinely and also write a lot of code for work in C#. There are two drawbacks to writing UI code in Python. one is that there is not a single ui framework that is accepted by the majority of the community. when you write in c# the .NET runtime and class libraries are all meant to work together. With Python every UI library has at's own semantics which are often at odds with the pythonic mindset in which you are trying to write your program. I am not blaming the library writers. I've tried several libraries (wxwidgets, PythonWin[Wrapper around MFC], Tkinter), When doing so I often felt that I was writing code in a language other than Python (despite the fact that it was python) because the libraries aren't exactly pythonic they are a port from another language be it c, c++, tk.
So for me I will write UI code in .NET (for me C#) because of the IDE & the consistency of the libraries. But when I can I will write business logic in python because it is more clear and more fun. | 8 | 29 | 0 | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion. | Is Python good for big software projects (not web based)? | 0.015383 | 0 | 0 | 29,152 |
35,753 | 2008-08-30T07:08:00.000 | 0 | 1 | 1 | 0 | python,ide | 3,445,481 | 13 | false | 0 | 0 | Try Django or Pylons, write a simple app with both of them and then decide which one suits you best. There are others (like Turbogears or Werkzeug) but those are the most used. | 8 | 29 | 0 | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion. | Is Python good for big software projects (not web based)? | 0 | 0 | 0 | 29,152 |
35,753 | 2008-08-30T07:08:00.000 | 3 | 1 | 1 | 0 | python,ide | 35,841 | 13 | false | 0 | 0 | Refactoring is inevitable on larger codebases and the lack of static typing makes this much harder in python than in statically typed languages. | 8 | 29 | 0 | Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).
Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?
What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion. | Is Python good for big software projects (not web based)? | 0.046121 | 0 | 0 | 29,152 |