Q_Score
int64 0
6.79k
| GUI and Desktop Applications
int64 0
1
| ViewCount
int64 8
6.81M
| Database and SQL
int64 0
1
| A_Id
int64 518
72.5M
| Other
int64 0
1
| Available Count
int64 1
31
| is_accepted
bool 2
classes | Score
float64 -1
1.2
| Users Score
int64 -42
1.15k
| Q_Id
int64 337
49.3M
| System Administration and DevOps
int64 0
1
| Web Development
int64 0
1
| Networking and APIs
int64 0
1
| Data Science and Machine Learning
int64 0
1
| Answer
stringlengths 6
11.6k
| Title
stringlengths 11
150
| Python Basics and Environment
int64 0
1
| AnswerCount
int64 1
64
| Question
stringlengths 15
29k
| CreationDate
stringlengths 23
23
| Tags
stringlengths 6
105
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
82 | 0 | 9,979 | 0 | 635 | 0 | 6 | false | 1 | 6 | 337 | 0 | 0 | 1 | 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! | XML Processing in Python | 0 | 12 | 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. | 2008-08-02T03:35:00.000 | python,xml |
82 | 0 | 9,979 | 0 | 123,307 | 0 | 6 | false | 1 | 8 | 337 | 0 | 0 | 1 | 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. | XML Processing in Python | 0 | 12 | 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. | 2008-08-02T03:35:00.000 | python,xml |
82 | 0 | 9,979 | 0 | 202,259 | 0 | 6 | false | 1 | 8 | 337 | 0 | 0 | 1 | 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. | XML Processing in Python | 0 | 12 | 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. | 2008-08-02T03:35:00.000 | python,xml |
82 | 0 | 9,979 | 0 | 69,772 | 0 | 6 | false | 0.033321 | 2 | 337 | 0 | 0 | 1 | 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. | XML Processing in Python | 0 | 12 | 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. | 2008-08-02T03:35:00.000 | python,xml |
82 | 0 | 9,979 | 0 | 13,832,269 | 0 | 6 | false | 0.049958 | 3 | 337 | 0 | 0 | 1 | 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. | XML Processing in Python | 0 | 12 | 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. | 2008-08-02T03:35:00.000 | python,xml |
82 | 0 | 9,979 | 0 | 69,410 | 0 | 6 | false | 1 | 8 | 337 | 0 | 0 | 1 | 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. | XML Processing in Python | 0 | 12 | 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. | 2008-08-02T03:35:00.000 | python,xml |
47 | 0 | 4,225 | 0 | 518 | 1 | 2 | false | 1 | 6 | 469 | 0 | 1 | 0 | 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. | How can I find the full path to a font from its display name on a Mac? | 0 | 4 | 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 | 2008-08-02T15:11:00.000 | python,macos,fonts,photoshop |
47 | 0 | 4,225 | 0 | 3,040 | 1 | 2 | true | 1.2 | 21 | 469 | 0 | 1 | 0 | 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. | How can I find the full path to a font from its display name on a Mac? | 0 | 4 | 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 | 2008-08-02T15:11:00.000 | python,macos,fonts,photoshop |
838 | 0 | 422,064 | 0 | 48,244,490 | 0 | 1 | false | 0.015383 | 2 | 1,854 | 1 | 0 | 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. | Python: What OS am I running on? | 0 | 26 | What do I need to look at to see whether I'm on Windows or Unix, etc? | 2008-08-05T03:23:00.000 | python,cross-platform,platform-specific,platform-agnostic |
58 | 0 | 12,477 | 0 | 49,586,164 | 0 | 14 | false | 0.022219 | 2 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 44,083,156 | 0 | 14 | false | 0.033321 | 3 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 62,503,886 | 0 | 14 | false | 0 | 0 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 63,479,906 | 0 | 14 | false | 0 | 0 | 1,983 | 0 | 0 | 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 | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 38,062,967 | 0 | 14 | false | 0 | 0 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 69,499,270 | 0 | 14 | false | 0 | 0 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 35,496,153 | 0 | 14 | false | 0 | 0 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 54,570,759 | 0 | 14 | false | 0 | 0 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 6,477,369 | 0 | 14 | false | 0.055498 | 5 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 1,987 | 0 | 14 | false | 1 | 23 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 5,719 | 0 | 14 | false | 0.033321 | 3 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 12,454 | 0 | 14 | false | 0.044415 | 4 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 5,746 | 0 | 14 | false | 0.022219 | 2 | 1,983 | 0 | 0 | 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. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
58 | 0 | 12,477 | 0 | 26,250,158 | 0 | 14 | false | 0.022219 | 2 | 1,983 | 0 | 0 | 0 | 0 | [1,2,3] is a list.
(1,2,3) is a tuple and immutable. | Python: what is the difference between (1,2,3) and [1,2,3], and when should I use each? | 1 | 18 | 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? | 2008-08-05T07:18:00.000 | python,list,tuples |
300 | 0 | 199,251 | 0 | 12,167 | 0 | 2 | false | 0.061461 | 4 | 2,933 | 1 | 0 | 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. | Create a directly-executable cross-platform GUI app using Python | 0 | 13 | 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? | 2008-08-05T22:26:00.000 | python,user-interface,deployment,tkinter,release-management |
300 | 0 | 199,251 | 0 | 2,980 | 0 | 2 | false | 1 | 6 | 2,933 | 1 | 0 | 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. | Create a directly-executable cross-platform GUI app using Python | 0 | 13 | 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? | 2008-08-05T22:26:00.000 | python,user-interface,deployment,tkinter,release-management |
14 | 0 | 1,421 | 0 | 4,958 | 1 | 6 | false | 0.07486 | 3 | 4,942 | 0 | 0 | 0 | 0 | Focus on the shorter time needed for development/prototype and possibly easier maintenance (none of this may apply against Ruby). | How to sell Python to a client/boss/person | 0 | 8 | 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? | 2008-08-07T16:43:00.000 | php,python,ruby-on-rails,ruby |
14 | 0 | 1,421 | 0 | 5,014 | 1 | 6 | false | 0.07486 | 3 | 4,942 | 0 | 0 | 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. | How to sell Python to a client/boss/person | 0 | 8 | 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? | 2008-08-07T16:43:00.000 | php,python,ruby-on-rails,ruby |
14 | 0 | 1,421 | 0 | 4,978 | 1 | 6 | true | 1.2 | 13 | 4,942 | 0 | 0 | 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. | How to sell Python to a client/boss/person | 0 | 8 | 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? | 2008-08-07T16:43:00.000 | php,python,ruby-on-rails,ruby |
14 | 0 | 1,421 | 0 | 15,296 | 1 | 6 | false | 0.124353 | 5 | 4,942 | 0 | 0 | 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. | How to sell Python to a client/boss/person | 0 | 8 | 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? | 2008-08-07T16:43:00.000 | php,python,ruby-on-rails,ruby |
14 | 0 | 1,421 | 0 | 9,420,311 | 1 | 6 | false | 0.024995 | 1 | 4,942 | 0 | 0 | 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) | How to sell Python to a client/boss/person | 0 | 8 | 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? | 2008-08-07T16:43:00.000 | php,python,ruby-on-rails,ruby |
14 | 0 | 1,421 | 0 | 15,291 | 1 | 6 | false | 0 | 0 | 4,942 | 0 | 0 | 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. | How to sell Python to a client/boss/person | 0 | 8 | 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? | 2008-08-07T16:43:00.000 | php,python,ruby-on-rails,ruby |
23 | 0 | 32,774 | 0 | 14,791,003 | 1 | 1 | false | 0 | 0 | 5,102 | 1 | 0 | 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. | How do you set up Python scripts to work in Apache 2.0? | 0 | 4 | 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. | 2008-08-07T18:24:00.000 | python,apache,apache2 |
14 | 1 | 2,313 | 0 | 1,659,332 | 0 | 3 | false | 0.244919 | 5 | 5,136 | 0 | 0 | 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. | Does anyone have experience creating a shared library in MATLAB? | 0 | 4 | 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? | 2008-08-07T18:47:00.000 | python,c,matlab |
14 | 1 | 2,313 | 0 | 138,534 | 0 | 3 | false | 0.099668 | 2 | 5,136 | 0 | 0 | 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. | Does anyone have experience creating a shared library in MATLAB? | 0 | 4 | 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? | 2008-08-07T18:47:00.000 | python,c,matlab |
14 | 1 | 2,313 | 0 | 5,302 | 0 | 3 | true | 1.2 | 3 | 5,136 | 0 | 0 | 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. | Does anyone have experience creating a shared library in MATLAB? | 0 | 4 | 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? | 2008-08-07T18:47:00.000 | python,c,matlab |
245 | 0 | 338,237 | 0 | 1,732,475 | 0 | 1 | false | 1 | 40 | 8,692 | 0 | 0 | 1 | 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. | How to use XPath in Python? | 0 | 11 | What are the libraries that support XPath? Is there a full implementation? How is the library used? Where is its website? | 2008-08-12T11:28:00.000 | python,xml,dom,xpath,python-2.x |
142 | 0 | 140,384 | 0 | 31,373,513 | 1 | 1 | false | 0.012499 | 1 | 8,948 | 0 | 0 | 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. | Accessing MP3 metadata with Python | 0 | 16 | Is there a maintained package I can use to retrieve and set MP3 ID3 metadata using Python? | 2008-08-12T15:16:00.000 | python,mp3,metadata |
29 | 1 | 7,527 | 0 | 3,331,503 | 1 | 5 | false | 0 | 0 | 11,060 | 0 | 0 | 0 | 0 | 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. | How should I unit test a code-generator? | 0 | 8 | 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? | 2008-08-14T13:59:00.000 | c++,python,unit-testing,code-generation,swig |
29 | 1 | 7,527 | 0 | 11,443 | 1 | 5 | false | 0.124353 | 5 | 11,060 | 0 | 0 | 0 | 0 | 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... | How should I unit test a code-generator? | 0 | 8 | 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? | 2008-08-14T13:59:00.000 | c++,python,unit-testing,code-generation,swig |
29 | 1 | 7,527 | 0 | 11,128 | 1 | 5 | false | 0 | 0 | 11,060 | 0 | 0 | 0 | 0 | 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. | How should I unit test a code-generator? | 0 | 8 | 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? | 2008-08-14T13:59:00.000 | c++,python,unit-testing,code-generation,swig |
29 | 1 | 7,527 | 0 | 11,074 | 1 | 5 | true | 1.2 | 14 | 11,060 | 0 | 0 | 0 | 0 | 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. | How should I unit test a code-generator? | 0 | 8 | 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? | 2008-08-14T13:59:00.000 | c++,python,unit-testing,code-generation,swig |
29 | 1 | 7,527 | 0 | 11,235 | 1 | 5 | false | 0 | 0 | 11,060 | 0 | 0 | 0 | 0 | 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. | How should I unit test a code-generator? | 0 | 8 | 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? | 2008-08-14T13:59:00.000 | c++,python,unit-testing,code-generation,swig |
7 | 0 | 634 | 0 | 21,149 | 0 | 1 | false | 0 | 0 | 12,692 | 0 | 1 | 0 | 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. | IronPython and ASP.NET | 0 | 3 | Has anyone built a website with IronPython and ASP.NET. What were your experiences and is the combination ready for prime-time? | 2008-08-15T20:17:00.000 | asp.net,ironpython |
95 | 0 | 15,413 | 0 | 473,491 | 0 | 2 | false | 0.046121 | 3 | 13,857 | 0 | 0 | 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. | Can you explain closures (as they relate to Python)? | 1 | 13 | 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. | 2008-08-17T19:14:00.000 | python,functional-programming,closures |
95 | 0 | 15,413 | 0 | 94,543 | 0 | 2 | false | -0.03076 | -2 | 13,857 | 0 | 0 | 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. | Can you explain closures (as they relate to Python)? | 1 | 13 | 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. | 2008-08-17T19:14:00.000 | python,functional-programming,closures |
7 | 0 | 2,774 | 0 | 14,304 | 0 | 2 | false | 0 | 0 | 14,281 | 0 | 0 | 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. | Is there a python module for regex matching in zip files | 1 | 4 | 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? | 2008-08-18T07:41:00.000 | python,regex,zip,text-processing |
7 | 0 | 2,774 | 0 | 41,822 | 0 | 2 | false | 0 | 0 | 14,281 | 0 | 0 | 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. | Is there a python module for regex matching in zip files | 1 | 4 | 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? | 2008-08-18T07:41:00.000 | python,regex,zip,text-processing |
6 | 0 | 651 | 0 | 19,700 | 0 | 8 | false | 0.024995 | 1 | 19,654 | 0 | 1 | 0 | 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. | Introducing Python | 1 | 8 | 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. | 2008-08-21T11:48:00.000 | php,python |
6 | 0 | 651 | 0 | 19,715 | 0 | 8 | true | 1.2 | 14 | 19,654 | 0 | 1 | 0 | 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. | Introducing Python | 1 | 8 | 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. | 2008-08-21T11:48:00.000 | php,python |
6 | 0 | 651 | 0 | 19,943 | 0 | 8 | false | 0 | 0 | 19,654 | 0 | 1 | 0 | 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. | Introducing Python | 1 | 8 | 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. | 2008-08-21T11:48:00.000 | php,python |
6 | 0 | 651 | 0 | 19,968 | 0 | 8 | false | 0.024995 | 1 | 19,654 | 0 | 1 | 0 | 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. | Introducing Python | 1 | 8 | 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. | 2008-08-21T11:48:00.000 | php,python |
6 | 0 | 651 | 0 | 19,685 | 0 | 8 | false | 0 | 0 | 19,654 | 0 | 1 | 0 | 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. | Introducing Python | 1 | 8 | 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. | 2008-08-21T11:48:00.000 | php,python |
6 | 0 | 651 | 0 | 19,692 | 0 | 8 | false | 0.049958 | 2 | 19,654 | 0 | 1 | 0 | 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. | Introducing Python | 1 | 8 | 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. | 2008-08-21T11:48:00.000 | php,python |
6 | 0 | 651 | 0 | 19,668 | 0 | 8 | false | 0.099668 | 4 | 19,654 | 0 | 1 | 0 | 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? | Introducing Python | 1 | 8 | 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. | 2008-08-21T11:48:00.000 | php,python |
6 | 0 | 651 | 0 | 19,665 | 0 | 8 | false | 0 | 0 | 19,654 | 0 | 1 | 0 | 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 .. | Introducing Python | 1 | 8 | 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. | 2008-08-21T11:48:00.000 | php,python |
30 | 0 | 25,846 | 0 | 20,843 | 0 | 1 | false | 0.099668 | 4 | 20,794 | 1 | 0 | 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. | Find broken symlinks with Python | 0 | 8 | 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? | 2008-08-21T19:00:00.000 | python,linux,symlink |
65 | 0 | 20,044 | 0 | 7,826,363 | 0 | 4 | false | 1 | 7 | 21,934 | 0 | 1 | 0 | 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. | Why Java and Python garbage collection methods are different? | 1 | 9 | 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? | 2008-08-22T07:35:00.000 | java,python,garbage-collection |
65 | 0 | 20,044 | 0 | 74,327 | 0 | 4 | false | 1 | 6 | 21,934 | 0 | 1 | 0 | 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. | Why Java and Python garbage collection methods are different? | 1 | 9 | 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? | 2008-08-22T07:35:00.000 | java,python,garbage-collection |
65 | 0 | 20,044 | 0 | 21,964 | 0 | 4 | true | 1.2 | 54 | 21,934 | 0 | 1 | 0 | 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... | Why Java and Python garbage collection methods are different? | 1 | 9 | 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? | 2008-08-22T07:35:00.000 | java,python,garbage-collection |
65 | 0 | 20,044 | 0 | 46,780 | 0 | 4 | false | 0.088656 | 4 | 21,934 | 0 | 1 | 0 | 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. | Why Java and Python garbage collection methods are different? | 1 | 9 | 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? | 2008-08-22T07:35:00.000 | java,python,garbage-collection |
5 | 0 | 2,346 | 0 | 23,041 | 0 | 1 | false | 0 | 0 | 22,059 | 0 | 1 | 0 | 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. | How do content discovery engines, like Zemanta and Open Calais work? | 0 | 3 | 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? | 2008-08-22T10:51:00.000 | python,ruby,semantics,zemanta |
1,032 | 0 | 1,341,778 | 0 | 39,573,536 | 0 | 1 | false | 1 | 20 | 22,676 | 0 | 0 | 1 | 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. | How to download a file over HTTP? | 0 | 27 | 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? | 2008-08-22T15:34:00.000 | python,http,urllib |
23 | 0 | 31,865 | 0 | 52,191 | 0 | 1 | false | 0.085505 | 3 | 23,397 | 1 | 0 | 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. | What's the best way to duplicate fork() in windows? | 0 | 7 | 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. | 2008-08-22T20:27:00.000 | python,windows,process,subprocess,fork |
4 | 0 | 1,825 | 0 | 24,199 | 0 | 2 | false | 0.07983 | 2 | 24,193 | 0 | 0 | 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. | Python code generator for Visual Studio? | 1 | 5 | 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? | 2008-08-23T12:41:00.000 | python,visual-studio-2008,code-generation |
4 | 0 | 1,825 | 0 | 24,236 | 0 | 2 | false | 0.039979 | 1 | 24,193 | 0 | 0 | 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#? | Python code generator for Visual Studio? | 1 | 5 | 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? | 2008-08-23T12:41:00.000 | python,visual-studio-2008,code-generation |
9 | 1 | 4,838 | 0 | 88,457 | 0 | 2 | false | 0 | 0 | 25,661 | 0 | 0 | 0 | 0 | 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. | pyGame within a pyGTK application | 0 | 7 | 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. | 2008-08-25T04:36:00.000 | python,gtk,pygtk,sdl,pygame |
9 | 1 | 4,838 | 0 | 199,288 | 0 | 2 | false | 0 | 0 | 25,661 | 0 | 0 | 0 | 0 | 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. | pyGame within a pyGTK application | 0 | 7 | 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. | 2008-08-25T04:36:00.000 | python,gtk,pygtk,sdl,pygame |
47 | 0 | 24,076 | 0 | 5,942,466 | 0 | 3 | false | 0.03076 | 2 | 26,025 | 0 | 1 | 0 | 0 | In my opinion best/fastest stack is varnish-nginx-uwsgi-django.
And I'm successfully using it. | Cleanest & Fastest server setup for Django | 0 | 13 | 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? | 2008-08-25T13:28:00.000 | python,django,apache,hosting |
47 | 0 | 24,076 | 0 | 26,185 | 0 | 3 | false | 0.015383 | 1 | 26,025 | 0 | 1 | 0 | 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. | Cleanest & Fastest server setup for Django | 0 | 13 | 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? | 2008-08-25T13:28:00.000 | python,django,apache,hosting |
47 | 0 | 24,076 | 0 | 29,748 | 0 | 3 | true | 1.2 | 27 | 26,025 | 0 | 1 | 0 | 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. | Cleanest & Fastest server setup for Django | 0 | 13 | 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? | 2008-08-25T13:28:00.000 | python,django,apache,hosting |
6 | 1 | 584 | 0 | 139,047 | 0 | 2 | false | 0.099668 | 1 | 26,706 | 0 | 0 | 0 | 0 | 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. | wxpython: How do I examine dragged data in OnDragOver? | 0 | 2 | 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? | 2008-08-25T19:43:00.000 | python,user-interface,drag-and-drop,wxpython,wxwidgets |
6 | 1 | 584 | 0 | 26,707 | 0 | 2 | true | 1.2 | 1 | 26,706 | 0 | 0 | 0 | 0 | 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). | wxpython: How do I examine dragged data in OnDragOver? | 0 | 2 | 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? | 2008-08-25T19:43:00.000 | python,user-interface,drag-and-drop,wxpython,wxwidgets |
11 | 0 | 1,284 | 0 | 1,041,655 | 1 | 2 | false | 0.119427 | 3 | 27,567 | 0 | 0 | 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 | Where can I learn more about PyPy's translation function? | 0 | 5 | 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. | 2008-08-26T08:40:00.000 | python,translation,pypy |
11 | 0 | 1,284 | 0 | 1,041,857 | 1 | 2 | false | 0.039979 | 1 | 27,567 | 0 | 0 | 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. | Where can I learn more about PyPy's translation function? | 0 | 5 | 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. | 2008-08-26T08:40:00.000 | python,translation,pypy |
74 | 0 | 39,816 | 0 | 14,046,877 | 0 | 3 | false | -0.057081 | -2 | 28,796 | 0 | 0 | 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 ;) | What refactoring tools do you use for Python? | 1 | 7 | 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. | 2008-08-26T18:26:00.000 | python,refactoring |
74 | 0 | 39,816 | 0 | 1,813,244 | 0 | 3 | false | 0.113791 | 4 | 28,796 | 0 | 0 | 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. | What refactoring tools do you use for Python? | 1 | 7 | 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. | 2008-08-26T18:26:00.000 | python,refactoring |
74 | 0 | 39,816 | 0 | 4,882,243 | 0 | 3 | false | 0.141893 | 5 | 28,796 | 0 | 0 | 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. | What refactoring tools do you use for Python? | 1 | 7 | 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. | 2008-08-26T18:26:00.000 | python,refactoring |
8 | 0 | 1,090 | 0 | 31,926 | 1 | 1 | false | 0.197375 | 3 | 28,961 | 0 | 0 | 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) | What's the best way to use web services in python? | 0 | 3 | 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. | 2008-08-26T19:49:00.000 | python,web-services,soap |
4 | 0 | 653 | 0 | 31,384 | 0 | 4 | true | 1.2 | 1 | 29,856 | 1 | 1 | 0 | 0 | Personally, I wouldn't worry about it until you see a problem. Messing with the default python install on a *Nix system can cause more trouble than it's worth. I can say from personal experience that you never truly understand what python has done for the nix world until you have a problem with it.
You can also add a second python installation, but that also causes more problems than it's worth IMO.
So I suppose the best question to start out with would be why exactly do you want to use the 64 bit version of python? | Install Python to match directory layout in OS X 10.5 | 0 | 5 | 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. | 2008-08-27T10:22:00.000 | python,macos,64-bit |
4 | 0 | 653 | 0 | 31,331 | 0 | 4 | false | 0 | 0 | 29,856 | 1 | 1 | 0 | 0 | Essentially, yes. I was not sure you could do it like that (current version does not do it like that). When using the python install script, however, there is no option (that I can find) to specify where to put directories and files (eg --prefix). I was hoping to match the current layout of python related files so as to avoid 'polluting' my machine with redundant files. | Install Python to match directory layout in OS X 10.5 | 0 | 5 | 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. | 2008-08-27T10:22:00.000 | python,macos,64-bit |
4 | 0 | 653 | 0 | 30,591 | 0 | 4 | false | 0.039979 | 1 | 29,856 | 1 | 1 | 0 | 0 | Not sure I entirely understand your question, but can't you simply build and install a 64 bit version and then create symbolic links so that /Library/Python/2.5 and below point to your freshly built version of python? | Install Python to match directory layout in OS X 10.5 | 0 | 5 | 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. | 2008-08-27T10:22:00.000 | python,macos,64-bit |
4 | 0 | 653 | 0 | 31,425 | 0 | 4 | false | 0 | 0 | 29,856 | 1 | 1 | 0 | 0 | The short answer is because I can. The long answer, expanding on what the OP said, is to be more compatible with apache and mysql/postgresql. They are all 64bit (apache is a fat binary with ppc, ppc64 x86 and x86 and x86_64, the others just straight 64bit). Mysqldb and mod_python wont compile unless they are all running the same architecture. Yes I could run them all in 32bit (and have in the past) but this is much more work then compiling one program.
EDIT: You pretty much convinced though to just let the installer do its thing and update the PATH to reflect this. | Install Python to match directory layout in OS X 10.5 | 0 | 5 | 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. | 2008-08-27T10:22:00.000 | python,macos,64-bit |
89 | 0 | 43,779 | 0 | 1,197,151 | 0 | 1 | false | 0.057081 | 2 | 31,340 | 0 | 0 | 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). | How do threads work in Python, and what are common Python-threading specific pitfalls? | 1 | 7 | 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. | 2008-08-27T23:44:00.000 | python,multithreading |
9 | 0 | 1,904 | 0 | 33,325 | 1 | 1 | false | 0 | 0 | 32,385 | 0 | 0 | 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. | Programmatically editing Python source | 0 | 3 | 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? | 2008-08-28T14:23:00.000 | python,file-io |
267 | 0 | 222,118 | 0 | 24,495,011 | 0 | 1 | false | 0.07983 | 2 | 33,978 | 0 | 0 | 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. | Find out how much memory is being used by an object in Python | 1 | 5 | 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. | 2008-08-29T04:59:00.000 | python,performance,memory-profiling |
28 | 0 | 12,462 | 0 | 576,667 | 0 | 3 | false | 0.066568 | 2 | 34,020 | 0 | 0 | 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. | Are Python threads buggy? | 1 | 6 | 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? | 2008-08-29T05:43:00.000 | python,multithreading |
28 | 0 | 12,462 | 0 | 34,024 | 0 | 3 | false | -0.066568 | -2 | 34,020 | 0 | 0 | 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. | Are Python threads buggy? | 1 | 6 | 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? | 2008-08-29T05:43:00.000 | python,multithreading |
28 | 0 | 12,462 | 0 | 34,078 | 0 | 3 | false | 1 | 9 | 34,020 | 0 | 0 | 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! | Are Python threads buggy? | 1 | 6 | 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? | 2008-08-29T05:43:00.000 | python,multithreading |
58 | 0 | 95,434 | 0 | 3,942,980 | 0 | 1 | false | 1 | 15 | 34,079 | 0 | 0 | 1 | 0 | Setting an environment var named http_proxy like this: http://username:password@proxy_url:port | How to specify an authenticated proxy for a python http connection? | 0 | 6 | What's the best way to specify a proxy with username and password for an http connection in python? | 2008-08-29T06:55:00.000 | python,http,proxy |
10 | 0 | 888 | 0 | 34,266 | 1 | 1 | true | 1.2 | 4 | 34,243 | 0 | 0 | 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. | Python descriptor protocol analog in other languages? | 1 | 2 | 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? | 2008-08-29T09:24:00.000 | python,language-features,encapsulation |
592 | 0 | 564,030 | 0 | 20,100,900 | 1 | 1 | false | 1 | 132 | 34,439 | 0 | 0 | 0 | 0 | The simplest method is to use dir(objectname). It will display all the methods available for that object. | Finding what methods a Python object has | 1 | 22 | 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? | 2008-08-29T15:05:00.000 | python,introspection |
9 | 0 | 473 | 0 | 39,062 | 0 | 1 | false | 0.197375 | 2 | 35,634 | 0 | 0 | 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). | Ruby "is" equivalent | 1 | 2 | Is there a Ruby equivalent for Python's "is"? It tests whether two objects are identical (i.e. have the same memory location). | 2008-08-30T03:04:00.000 | python,ruby |
29 | 0 | 29,152 | 0 | 35,777 | 1 | 8 | false | 1 | 23 | 35,753 | 0 | 0 | 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. | Is Python good for big software projects (not web based)? | 1 | 13 | 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. | 2008-08-30T07:08:00.000 | python,ide |
29 | 0 | 29,152 | 0 | 277,490 | 1 | 8 | false | 0 | 0 | 35,753 | 0 | 0 | 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. | Is Python good for big software projects (not web based)? | 1 | 13 | 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. | 2008-08-30T07:08:00.000 | python,ide |
29 | 0 | 29,152 | 0 | 35,759 | 1 | 8 | false | 1 | 13 | 35,753 | 0 | 0 | 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. | Is Python good for big software projects (not web based)? | 1 | 13 | 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. | 2008-08-30T07:08:00.000 | python,ide |
29 | 0 | 29,152 | 0 | 35,838 | 1 | 8 | false | 0 | 0 | 35,753 | 0 | 0 | 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. | Is Python good for big software projects (not web based)? | 1 | 13 | 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. | 2008-08-30T07:08:00.000 | python,ide |
29 | 0 | 29,152 | 0 | 286,449 | 1 | 8 | false | 0.015383 | 1 | 35,753 | 0 | 0 | 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. | Is Python good for big software projects (not web based)? | 1 | 13 | 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. | 2008-08-30T07:08:00.000 | python,ide |
29 | 0 | 29,152 | 0 | 286,491 | 1 | 8 | false | 0.015383 | 1 | 35,753 | 0 | 0 | 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. | Is Python good for big software projects (not web based)? | 1 | 13 | 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. | 2008-08-30T07:08:00.000 | python,ide |
29 | 0 | 29,152 | 0 | 3,445,481 | 1 | 8 | false | 0 | 0 | 35,753 | 0 | 0 | 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. | Is Python good for big software projects (not web based)? | 1 | 13 | 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. | 2008-08-30T07:08:00.000 | python,ide |
29 | 0 | 29,152 | 0 | 35,841 | 1 | 8 | false | 0.046121 | 3 | 35,753 | 0 | 0 | 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. | Is Python good for big software projects (not web based)? | 1 | 13 | 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. | 2008-08-30T07:08:00.000 | python,ide |
End of preview. Expand
in Dataset Viewer.
No dataset card yet
New: Create and edit this dataset card directly on the website!
Contribute a Dataset Card- Downloads last month
- 0