CreationDate stringlengths 23 23 | Data Science and Machine Learning int64 0 1 | Q_Id int64 469 38.2M | Q_Score int64 0 6.79k | Python Basics and Environment int64 0 1 | is_accepted bool 2
classes | Question stringlengths 15 7.24k | Networking and APIs int64 0 1 | Score float64 -1 1.2 | A_Id int64 518 72.2M | Web Development int64 0 1 | AnswerCount int64 1 35 | Answer stringlengths 15 7k | Title stringlengths 15 142 | Tags stringlengths 6 76 | GUI and Desktop Applications int64 0 1 | ViewCount int64 13 1.88M | Other int64 1 1 | Available Count int64 1 31 | Users Score int64 -17 588 | Database and SQL int64 0 1 | System Administration and DevOps int64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2008-08-02T15:11:00.000 | 0 | 469 | 47 | 0 | false | 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 javascrip... | 0 | 1 | 518 | 1 | 4 | 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? | python,macos,fonts,photoshop | 0 | 4,225 | 1 | 2 | 6 | 0 | 0 |
2008-08-02T15:11:00.000 | 0 | 469 | 47 | 0 | true | 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 javascrip... | 0 | 1.2 | 3,040 | 1 | 4 | 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,... | How can I find the full path to a font from its display name on a Mac? | python,macos,fonts,photoshop | 0 | 4,225 | 1 | 2 | 21 | 0 | 0 |
2008-08-07T16:43:00.000 | 0 | 4,942 | 14 | 0 | false | 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? | 0 | 0.07486 | 4,958 | 0 | 8 | 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 | php,python,ruby-on-rails,ruby | 0 | 1,421 | 1 | 6 | 3 | 0 | 0 |
2008-08-07T16:43:00.000 | 0 | 4,942 | 14 | 0 | false | 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? | 0 | 0.07486 | 5,014 | 0 | 8 | 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 ab... | How to sell Python to a client/boss/person | php,python,ruby-on-rails,ruby | 0 | 1,421 | 1 | 6 | 3 | 0 | 0 |
2008-08-07T16:43:00.000 | 0 | 4,942 | 14 | 0 | true | 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? | 0 | 1.2 | 4,978 | 0 | 8 | 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 ... | How to sell Python to a client/boss/person | php,python,ruby-on-rails,ruby | 0 | 1,421 | 1 | 6 | 13 | 0 | 0 |
2008-08-07T16:43:00.000 | 0 | 4,942 | 14 | 0 | false | 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? | 0 | 0.124353 | 15,296 | 0 | 8 | 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 o... | How to sell Python to a client/boss/person | php,python,ruby-on-rails,ruby | 0 | 1,421 | 1 | 6 | 5 | 0 | 0 |
2008-08-07T16:43:00.000 | 0 | 4,942 | 14 | 0 | false | 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? | 0 | 0.024995 | 9,420,311 | 0 | 8 | 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... | How to sell Python to a client/boss/person | php,python,ruby-on-rails,ruby | 0 | 1,421 | 1 | 6 | 1 | 0 | 0 |
2008-08-07T16:43:00.000 | 0 | 4,942 | 14 | 0 | false | 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? | 0 | 0 | 15,291 | 0 | 8 | 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 ... | How to sell Python to a client/boss/person | php,python,ruby-on-rails,ruby | 0 | 1,421 | 1 | 6 | 0 | 0 | 0 |
2008-08-07T18:24:00.000 | 0 | 5,102 | 23 | 0 | false | 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. | 0 | 0 | 14,791,003 | 0 | 4 | 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 th... | How do you set up Python scripts to work in Apache 2.0? | python,apache,apache2 | 0 | 32,774 | 1 | 1 | 0 | 0 | 1 |
2008-08-12T15:16:00.000 | 0 | 8,948 | 142 | 0 | false | Is there a maintained package I can use to retrieve and set MP3 ID3 metadata using Python? | 0 | 0.012499 | 31,373,513 | 0 | 16 | 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.)... | Accessing MP3 metadata with Python | python,mp3,metadata | 0 | 140,384 | 1 | 1 | 1 | 0 | 0 |
2008-08-14T13:59:00.000 | 0 | 11,060 | 29 | 0 | false | 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... | 0 | 0 | 3,331,503 | 0 | 8 | 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 reall... | How should I unit test a code-generator? | c++,python,unit-testing,code-generation,swig | 1 | 7,527 | 1 | 5 | 0 | 0 | 0 |
2008-08-14T13:59:00.000 | 0 | 11,060 | 29 | 0 | false | 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... | 0 | 0.124353 | 11,443 | 0 | 8 | 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 cer... | How should I unit test a code-generator? | c++,python,unit-testing,code-generation,swig | 1 | 7,527 | 1 | 5 | 5 | 0 | 0 |
2008-08-14T13:59:00.000 | 0 | 11,060 | 29 | 0 | false | 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... | 0 | 0 | 11,128 | 0 | 8 | 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? | c++,python,unit-testing,code-generation,swig | 1 | 7,527 | 1 | 5 | 0 | 0 | 0 |
2008-08-14T13:59:00.000 | 0 | 11,060 | 29 | 0 | true | 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... | 0 | 1.2 | 11,074 | 0 | 8 | 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 t... | How should I unit test a code-generator? | c++,python,unit-testing,code-generation,swig | 1 | 7,527 | 1 | 5 | 14 | 0 | 0 |
2008-08-14T13:59:00.000 | 0 | 11,060 | 29 | 0 | false | 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... | 0 | 0 | 11,235 | 0 | 8 | 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 bui... | How should I unit test a code-generator? | c++,python,unit-testing,code-generation,swig | 1 | 7,527 | 1 | 5 | 0 | 0 | 0 |
2008-08-26T08:40:00.000 | 0 | 27,567 | 11 | 0 | false | 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 of... | 0 | 0.119427 | 1,041,655 | 0 | 5 | 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 too... | Where can I learn more about PyPy's translation function? | python,translation,pypy | 0 | 1,284 | 1 | 2 | 3 | 0 | 0 |
2008-08-26T08:40:00.000 | 0 | 27,567 | 11 | 0 | false | 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 of... | 0 | 0.039979 | 1,041,857 | 0 | 5 | 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, ... | Where can I learn more about PyPy's translation function? | python,translation,pypy | 0 | 1,284 | 1 | 2 | 1 | 0 | 0 |
2008-08-26T19:49:00.000 | 0 | 28,961 | 8 | 0 | false | 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 contr... | 0 | 0.197375 | 31,926 | 0 | 3 | 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? | python,web-services,soap | 0 | 1,090 | 1 | 1 | 3 | 0 | 0 |
2008-08-28T14:23:00.000 | 0 | 32,385 | 9 | 0 | false | 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 ... | 0 | 0 | 33,325 | 0 | 3 | 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 | python,file-io | 0 | 1,904 | 1 | 1 | 0 | 0 | 0 |
2008-08-29T09:24:00.000 | 0 | 34,243 | 10 | 1 | true | 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... | 0 | 1.2 | 34,266 | 0 | 2 | 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? | python,language-features,encapsulation | 0 | 888 | 1 | 1 | 4 | 0 | 0 |
2008-08-29T15:05:00.000 | 0 | 34,439 | 592 | 1 | false | 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? | 0 | 1 | 20,100,900 | 0 | 22 | 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 | python,introspection | 0 | 564,030 | 1 | 1 | 132 | 0 | 0 |
2008-08-30T07:08:00.000 | 0 | 35,753 | 29 | 1 | false | 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 i... | 0 | 1 | 35,777 | 0 | 13 | 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, rea... | Is Python good for big software projects (not web based)? | python,ide | 0 | 29,152 | 1 | 8 | 23 | 0 | 0 |
2008-08-30T07:08:00.000 | 0 | 35,753 | 29 | 1 | false | 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 i... | 0 | 0 | 277,490 | 0 | 13 | 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 ... | Is Python good for big software projects (not web based)? | python,ide | 0 | 29,152 | 1 | 8 | 0 | 0 | 0 |
2008-08-30T07:08:00.000 | 0 | 35,753 | 29 | 1 | false | 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 i... | 0 | 1 | 35,759 | 0 | 13 | 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. Thi... | Is Python good for big software projects (not web based)? | python,ide | 0 | 29,152 | 1 | 8 | 13 | 0 | 0 |
2008-08-30T07:08:00.000 | 0 | 35,753 | 29 | 1 | false | 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 i... | 0 | 0 | 35,838 | 0 | 13 | 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... | Is Python good for big software projects (not web based)? | python,ide | 0 | 29,152 | 1 | 8 | 0 | 0 | 0 |
2008-08-30T07:08:00.000 | 0 | 35,753 | 29 | 1 | false | 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 i... | 0 | 0.015383 | 286,449 | 0 | 13 | 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 t... | Is Python good for big software projects (not web based)? | python,ide | 0 | 29,152 | 1 | 8 | 1 | 0 | 0 |
2008-08-30T07:08:00.000 | 0 | 35,753 | 29 | 1 | false | 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 i... | 0 | 0.015383 | 286,491 | 0 | 13 | 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 w... | Is Python good for big software projects (not web based)? | python,ide | 0 | 29,152 | 1 | 8 | 1 | 0 | 0 |
2008-08-30T07:08:00.000 | 0 | 35,753 | 29 | 1 | false | 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 i... | 0 | 0 | 3,445,481 | 0 | 13 | 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)? | python,ide | 0 | 29,152 | 1 | 8 | 0 | 0 | 0 |
2008-08-30T07:08:00.000 | 0 | 35,753 | 29 | 1 | false | 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 i... | 0 | 0.046121 | 35,841 | 0 | 13 | 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)? | python,ide | 0 | 29,152 | 1 | 8 | 3 | 0 | 0 |
2008-08-31T05:07:00.000 | 0 | 36,647 | 20 | 0 | false | Does Python have a unit testing framework compatible with the standard xUnit style of test framework? If so, what is it, where is it, and is it any good? | 0 | 0.022219 | 1,310,119 | 0 | 9 | I recommend Nose.
After the reasonable simple installation, you just have to run "nosetests" in your project folder and Nose will find all your tests and run them. I also like the collection of plugins (coverage, GAE, etc.) and the abilty to call Nose directly from within my Python scripts. | Unit tests in Python | python,unit-testing | 0 | 8,490 | 1 | 3 | 1 | 0 | 0 |
2008-08-31T05:07:00.000 | 0 | 36,647 | 20 | 0 | false | Does Python have a unit testing framework compatible with the standard xUnit style of test framework? If so, what is it, where is it, and is it any good? | 0 | 0 | 2,194,729 | 0 | 9 | nose seems to be the best combination of flexibility and convenience. It runs unittests, doctests, coverage (with an extension) and py.test-like tests from one framework and does so admirably. It has enough popularity that it has had some IDE integration done as well for Komodo Edit and I wouldn't be surprised to see... | Unit tests in Python | python,unit-testing | 0 | 8,490 | 1 | 3 | 0 | 0 | 0 |
2008-08-31T05:07:00.000 | 0 | 36,647 | 20 | 0 | false | Does Python have a unit testing framework compatible with the standard xUnit style of test framework? If so, what is it, where is it, and is it any good? | 0 | 0.044415 | 36,654 | 0 | 9 | @Greg: PyUnit is included in the standard library as unittest | Unit tests in Python | python,unit-testing | 0 | 8,490 | 1 | 3 | 2 | 0 | 0 |
2008-09-03T21:52:00.000 | 0 | 42,690 | 5 | 1 | false | I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn.
Having limited time, I really only have time to look learn one of them.
Any opinions on which of the two (Iron Ruby or Iron Python) would be more useful in the long run? | 0 | 0.16514 | 42,702 | 0 | 6 | Without getting into the relative merits of the languages (which would be an entire pissing contest in itself), IronPython (stable 1.1.1, beta 2.0) is further along in development than IronRuby (alpha) | Which Dynamic .NET language makes more sense to learn, Iron Ruby or Iron Python? | .net,ironpython,ironruby,dynamic-language-runtime,dynamic-languages | 0 | 1,222 | 1 | 3 | 5 | 0 | 0 |
2008-09-03T21:52:00.000 | 0 | 42,690 | 5 | 1 | false | I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn.
Having limited time, I really only have time to look learn one of them.
Any opinions on which of the two (Iron Ruby or Iron Python) would be more useful in the long run? | 0 | 0.033321 | 467,185 | 0 | 6 | I just want to mention that there is also a DLR version of Javascript(JScript), which is my personal fav. If you are looking for a new language to learn for dlr use, I'd suggest ironpython as mentioned, it is farther along in terms of the dlr. Python is also fairly popular outside the dlr for gui programming, and of... | Which Dynamic .NET language makes more sense to learn, Iron Ruby or Iron Python? | .net,ironpython,ironruby,dynamic-language-runtime,dynamic-languages | 0 | 1,222 | 1 | 3 | 1 | 0 | 0 |
2008-09-03T21:52:00.000 | 0 | 42,690 | 5 | 1 | true | I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn.
Having limited time, I really only have time to look learn one of them.
Any opinions on which of the two (Iron Ruby or Iron Python) would be more useful in the long run? | 0 | 1.2 | 61,734 | 0 | 6 | If this is 'Which language runs better on the CLR,' then right now, IronPython wins hands down.
For the long term though, 'which language will teach me more, and serve me better in my career as a programmer', I would definitely say IronRuby (this would be true of CPython vs CRuby also)
Ruby will expose you to more 'con... | Which Dynamic .NET language makes more sense to learn, Iron Ruby or Iron Python? | .net,ironpython,ironruby,dynamic-language-runtime,dynamic-languages | 0 | 1,222 | 1 | 3 | 4 | 0 | 0 |
2008-09-04T12:07:00.000 | 0 | 43,580 | 242 | 0 | false | Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer.
Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in th... | 0 | 0.011111 | 11,101,343 | 0 | 18 | The mimetypes module just recognise an file type based on file extension. If you will try to recover a file type of a file without extension, the mimetypes will not works. | How to find the mime type of a file in python? | python,mime | 0 | 233,034 | 1 | 3 | 1 | 0 | 0 |
2008-09-04T12:07:00.000 | 0 | 43,580 | 242 | 0 | false | Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer.
Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in th... | 0 | 0 | 51,510,950 | 0 | 18 | For byte Array type data you can use
magic.from_buffer(_byte_array,mime=True) | How to find the mime type of a file in python? | python,mime | 0 | 233,034 | 1 | 3 | 0 | 0 | 0 |
2008-09-04T12:07:00.000 | 0 | 43,580 | 242 | 0 | false | Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer.
Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in th... | 0 | 1 | 12,297,929 | 0 | 18 | There are 3 different libraries that wraps libmagic.
2 of them are available on pypi (so pip install will work):
filemagic
python-magic
And another, similar to python-magic is available directly in the latest libmagic sources, and it is the one you probably have in your linux distribution.
In Debian the package pytho... | How to find the mime type of a file in python? | python,mime | 0 | 233,034 | 1 | 3 | 11 | 0 | 0 |
2008-09-05T10:26:00.000 | 0 | 45,507 | 32 | 1 | false | I'm looking to create favicon.ico files programatically from Python, but PIL only has support for reading ico files. | 0 | 0.028564 | 45,520 | 0 | 7 | I don't know if this applies for all cases, but on WinXP an .ico can be a bmp of size 16x16, 32x32 or 64x64. Just change the extension to ico from bmp and you're ready to go. | Is there a Python library for generating .ico files? | python,favicon | 0 | 25,030 | 1 | 1 | 1 | 0 | 0 |
2008-09-06T02:22:00.000 | 0 | 47,198 | 15 | 1 | false | If I was going to start an open source project using Python what version should I use to ensure that the vast majority of users can use it on their system?
I'm the kind of person who quickly jumps to the next version (which I'll do when Python 3 comes out) but many people may be more conservative if their current versi... | 0 | 0 | 2,036,609 | 0 | 6 | If the project is going to be mainstream and will be run on Linux the only sensible choise is 2.4 - just because it is a pain to get anything else installed as default on Enterprise Linuxes.
In any case, any modern OS will/can have 2.4 or newer. | Which Version of Python to Use for Maximum Compatibility | python,compatibility | 0 | 3,460 | 1 | 2 | 0 | 0 | 0 |
2008-09-06T02:22:00.000 | 0 | 47,198 | 15 | 1 | false | If I was going to start an open source project using Python what version should I use to ensure that the vast majority of users can use it on their system?
I'm the kind of person who quickly jumps to the next version (which I'll do when Python 3 comes out) but many people may be more conservative if their current versi... | 0 | 0.033321 | 47,264 | 0 | 6 | You can use different versions of python on each machine.
Coding something new, I would not use anything less than python2.5. You can do apt-get install python2.5 on stock debian stable.
For windows, don't really worry about it. It's very easy to install the python2.5 msi.
If the users can't be bothered to do that, ... | Which Version of Python to Use for Maximum Compatibility | python,compatibility | 0 | 3,460 | 1 | 2 | 1 | 0 | 0 |
2008-09-06T23:35:00.000 | 0 | 47,953 | 27 | 1 | false | I've read some about .egg files and I've noticed them in my lib directory but what are the advantages/disadvantages of using then as a developer? | 0 | 0.033321 | 138,090 | 0 | 6 | For simple Python programs, you probably don't need to use eggs. Distributing the raw .py files should suffice; it's like distributing source files for GNU/Linux. You can also use the various OS "packagers" (like py2exe or py2app) to create .exe, .dmg, or other files for different operating systems.
More complex progra... | What are the advantages of packaging your python library/application as an .egg file? | python,zip,packaging,software-distribution,egg | 0 | 10,471 | 1 | 3 | 1 | 0 | 1 |
2008-09-06T23:35:00.000 | 0 | 47,953 | 27 | 1 | false | I've read some about .egg files and I've noticed them in my lib directory but what are the advantages/disadvantages of using then as a developer? | 0 | 0.033321 | 137,903 | 0 | 6 | Whatever you do, do not stop distributing your application, also, as a tarball, as that is the easiest packagable format for operating systems with a package sysetem. | What are the advantages of packaging your python library/application as an .egg file? | python,zip,packaging,software-distribution,egg | 0 | 10,471 | 1 | 3 | 1 | 0 | 1 |
2008-09-06T23:35:00.000 | 0 | 47,953 | 27 | 1 | false | I've read some about .egg files and I've noticed them in my lib directory but what are the advantages/disadvantages of using then as a developer? | 0 | 0.132549 | 47,958 | 0 | 6 | Eggs are a pretty good way to distribute python apps. Think of it as a platform independent .deb file that will install all dependencies and whatnot. The advantage is that it's easy to use for the end user. The disadvantage are that it can be cumbersome to package your app up as a .egg file.
You should also offer an... | What are the advantages of packaging your python library/application as an .egg file? | python,zip,packaging,software-distribution,egg | 0 | 10,471 | 1 | 3 | 4 | 0 | 1 |
2008-09-08T03:53:00.000 | 0 | 49,137 | 65 | 0 | false | I would like to call python script files from my c++ program.
I am not sure that the people I will distribute to will have python installed.
Basically I'm looking for a .lib file that I can use that has an Apache like distribution license. | 0 | 0 | 69,672,216 | 0 | 7 | Using Inter Process Communication (IPC) over socket can be a possible solution. Use a local network socket to listen/trasfer commands between both. | Calling python from a c++ program for distribution | c++,python,embedded-language | 0 | 100,997 | 1 | 1 | 0 | 0 | 1 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0.014285 | 49,246 | 0 | 14 | C is a bridge onto itself.
K&R is the only programming language book you can read in one sitting and almost never pick it up again ... | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 1 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0.071307 | 49,285 | 0 | 14 | I generally agree with most of the others - There's not really a good stepping stone language.
It is, however, useful to understand what is difficult about learning C, which might help you understand what's making it difficult for you.
I'd say the things that would prove difficult in C for someone coming from PHP would... | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 5 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0 | 49,237 | 0 | 14 | Java might actually be a good option here, believe it or not. It is strongly based on C/C++, so if you can get the syntax and the strong typing, picking up C might be easier. The benefit is you can learn the lower level syntax without having to learn pointers (since memory is managed for you just like in Python and P... | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 0 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0 | 49,248 | 0 | 14 | I think C++ is a good "bridge" to C. I learned C++ first at University, and since it's based on C you'll learn a lot of the same concepts - perhaps most notably pointers - but also Object Oriented Design. OO can be applied to all kinds of modern languages, so it's worth learning.
After learning C++, I found it wasn... | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 0 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0.014285 | 49,245 | 0 | 14 | Forget Java - it is not going to bring you anywhere closer to C (you have allready proved that you don't have a problem learning new syntax).
Either read K&R or go one lower: Learn about the machine itself. The only tricky part in C is pointers and memory management (which is closely related to pointers, but also has a... | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 1 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0 | 49,502 | 0 | 14 | Languages are easy to learn (especially one like C)... the hard part is learning the libraries and/or coding style of the language. For instance, I know C++ fairly well, but most C/C++ code I see confuses me because the naming conventions are so different from what I work with on a daily basis.
Anyway, I guess what I'... | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 0 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0 | 49,217 | 0 | 14 | I'm feeling your pain, I also learned PHP first and I'm trying to learn C++, it's not easy, and I am really struggling, It's been 2 years since I started on c++ and Still the extent of what I can do is cout, cin, and math.
If anyone reads this and wonders where to start, START LOWER. | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 0 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0 | 50,673 | 0 | 14 | Pascal! Close enough syntax, still requires you to do some memory management, but not as rough for beginners. | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 0 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0 | 49,295 | 0 | 14 | try to learn a language which you are comfortable with, try different approach and the basics. | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 0 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 0.014285 | 49,234 | 0 | 14 | Learning any language takes time, I always ensure I have a measurable goal; I set myself an objective, then start learning the language to achieve this objective, as opposed to trying to learn every nook and cranny of the language and syntax.
C is not easy, pointers can be hard to comprehend if you’re not coming assem... | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 1 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | true | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 1.2 | 49,202 | 0 | 14 | It's not clear why you need a bridge language. Why don't you start working with C directly? C is a very simple language itself. I think that hardest part for C learner is pointers and everything else related to memory management. Also C lang is oriented on structured programming, so you will need to learn how to implem... | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 15 | 0 | 0 |
2008-09-08T05:23:00.000 | 0 | 49,195 | 4 | 0 | false | The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to bridge between Python to C | 0 | 1 | 49,227 | 0 | 14 | The best place to start learning C is the book "The C Programming Language" by Kernighan and Ritchie.
You will recognise a lot of things from PHP, and you will be surprised how much PHP (and Perl, Python etc) do for you.
Oh and you also will need a C compiler, but i guess you knew that. | What language should I learn as a bridge to C (and derivatives) | python,c | 0 | 871 | 1 | 12 | 7 | 0 | 0 |
2008-09-08T14:36:00.000 | 0 | 49,824 | 29 | 1 | true | Besides the dynamic nature of Python (and the syntax), what are some of the major features of the Python language that Java doesn't have, and vice versa? | 0 | 1.2 | 49,953 | 0 | 5 | List comprehensions. I often find myself filtering/mapping lists, and being able to say [line.replace("spam","eggs") for line in open("somefile.txt") if line.startswith("nee")] is really nice.
Functions are first class objects. They can be passed as parameters to other functions, defined inside other function, and ha... | Java -> Python? | java,python | 0 | 11,654 | 1 | 2 | 47 | 0 | 0 |
2008-09-08T14:36:00.000 | 0 | 49,824 | 29 | 1 | false | Besides the dynamic nature of Python (and the syntax), what are some of the major features of the Python language that Java doesn't have, and vice versa? | 0 | 0.07983 | 51,512 | 0 | 5 | Apart from what Eli Courtwright said:
I find iterators in Python more concise. You can use for i in something, and it works with pretty much everything. Yeah, Java has gotten better since 1.5, but for example you can iterate through a string in python with this same construct.
Introspection: In python you can get at r... | Java -> Python? | java,python | 0 | 11,654 | 1 | 2 | 2 | 0 | 0 |
2008-09-12T23:28:00.000 | 0 | 60,152 | 12 | 0 | false | Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions? | 1 | 0 | 60,218 | 0 | 8 | The languages of choice of Firefox is Javascript. Unless you have a specific requirement that requires Python, I would advice you to use that. | Automate firefox with python? | python,linux,firefox,ubuntu,automation | 0 | 21,896 | 1 | 2 | 0 | 0 | 0 |
2008-09-12T23:28:00.000 | 0 | 60,152 | 12 | 0 | false | Been scouring the net for something like firewatir but for python. I'm trying to automate firefox on linux. Any suggestions? | 1 | 0.024995 | 7,610,441 | 0 | 8 | I would suggest you to use Selenium instead of Mechanize/Twill because Mechanize would fail while handling Javascript. | Automate firefox with python? | python,linux,firefox,ubuntu,automation | 0 | 21,896 | 1 | 2 | 1 | 0 | 0 |
2008-09-14T05:41:00.000 | 0 | 61,151 | 545 | 1 | false | If you're writing a library, or an app, where do the unit test files go?
It's nice to separate the test files from the main app code, but it's awkward to put them into a "tests" subdirectory inside of the app root directory, because it makes it harder to import the modules that you'll be testing.
Is there a best pr... | 0 | 0.011111 | 61,820 | 0 | 18 | In C#, I've generally separated the tests into a separate assembly.
In Python -- so far -- I've tended to either write doctests, where the test is in the docstring of a function, or put them in the if __name__ == "__main__" block at the bottom of the module. | Where do the Python unit tests go? | python,unit-testing,code-organization | 0 | 112,049 | 1 | 4 | 1 | 0 | 0 |
2008-09-14T05:41:00.000 | 0 | 61,151 | 545 | 1 | false | If you're writing a library, or an app, where do the unit test files go?
It's nice to separate the test files from the main app code, but it's awkward to put them into a "tests" subdirectory inside of the app root directory, because it makes it harder to import the modules that you'll be testing.
Is there a best pr... | 0 | 0 | 63,645 | 0 | 18 | When writing a package called "foo", I will put unit tests into a separate package "foo_test". Modules and subpackages will then have the same name as the SUT package module. E.g. tests for a module foo.x.y are found in foo_test.x.y. The __init__.py files of each testing package then contain an AllTests suite that incl... | Where do the Python unit tests go? | python,unit-testing,code-organization | 0 | 112,049 | 1 | 4 | 0 | 0 | 0 |
2008-09-14T05:41:00.000 | 0 | 61,151 | 545 | 1 | false | If you're writing a library, or an app, where do the unit test files go?
It's nice to separate the test files from the main app code, but it's awkward to put them into a "tests" subdirectory inside of the app root directory, because it makes it harder to import the modules that you'll be testing.
Is there a best pr... | 0 | -0.022219 | 61,518 | 0 | 18 | I've recently started to program in Python, so I've not really had chance to find out best practice yet.
But, I've written a module that goes and finds all the tests and runs them.
So, I have:
app/
appfile.py
test/
appfileTest.py
I'll have to see how it goes as I progress to larger projects. | Where do the Python unit tests go? | python,unit-testing,code-organization | 0 | 112,049 | 1 | 4 | -2 | 0 | 0 |
2008-09-14T05:41:00.000 | 0 | 61,151 | 545 | 1 | false | If you're writing a library, or an app, where do the unit test files go?
It's nice to separate the test files from the main app code, but it's awkward to put them into a "tests" subdirectory inside of the app root directory, because it makes it harder to import the modules that you'll be testing.
Is there a best pr... | 0 | 1 | 61,168 | 0 | 18 | I don't believe there is an established "best practice".
I put my tests in another directory outside of the app code. I then add the main app directory to sys.path (allowing you to import the modules from anywhere) in my test runner script (which does some other stuff as well) before running all the tests. This way I n... | Where do the Python unit tests go? | python,unit-testing,code-organization | 0 | 112,049 | 1 | 4 | 13 | 0 | 0 |
2008-09-14T18:58:00.000 | 0 | 61,556 | 0 | 1 | false | What is the best available method for developing a spell check engine (for example, with aspell_python), that works with apache mod_python?
apache 2.0.59+RHEL4+mod_python+aspell_python seems to crash.
Is there any alternative to using aspell_python? | 0 | 0.197375 | 61,570 | 0 | 1 | Looks like RHEL4 is the culprit. Works well on Fedore 7 (the version of apache is newer and there is no crash) | Spell Checking Service with python using mod_python | spell-checking,mod-python,aspell | 0 | 238 | 1 | 1 | 1 | 0 | 0 |
2008-09-15T21:11:00.000 | 0 | 67,015 | 3 | 0 | false | My development shop has put together a fairly useful Python-based test suite, and we'd like to test some Linux-based C++ code with it. We've gotten the test project they ship with Boost to compile (type 'bjam' in the directory and it works), but we're having issues with our actual project.
Building the boost libraries ... | 0 | 0.132549 | 93,027 | 0 | 3 | Found the solution! Boost builds a debug build by default. Typing "bjam release" builds the release configuration. (This isn't listed in any documentation anywhere, as far as I can tell.) Note that this is not the same as changing your build-type to release, as that doesn't build a release configuration. Doing a 'compl... | Using boost-python with C++ in Linux | c++,boost-python | 0 | 3,149 | 1 | 2 | 2 | 0 | 0 |
2008-09-15T21:11:00.000 | 0 | 67,015 | 3 | 0 | false | My development shop has put together a fairly useful Python-based test suite, and we'd like to test some Linux-based C++ code with it. We've gotten the test project they ship with Boost to compile (type 'bjam' in the directory and it works), but we're having issues with our actual project.
Building the boost libraries ... | 0 | 0.132549 | 67,282 | 0 | 3 | If you want to build the debug variants of the boost libraries as well, you have to invoke bjam with the option --build-type=complete.
On Debian, you get the debug Python interpreter in the python2.x-dbg packages. Debug builds of the Boost libraries are in libboost1.xy-dbg, if you want to use the system Boost. | Using boost-python with C++ in Linux | c++,boost-python | 0 | 3,149 | 1 | 2 | 2 | 0 | 0 |
2008-09-16T07:07:00.000 | 0 | 69,979 | 1 | 0 | false | My university doesn't support the POST cgi method (I know, it's crazy), and I was hoping to be able to have a system where a user can have a username and password and log in securely. Is this even possible?
If it's not, how would you do it with POST? Just out of curiosity.
Cheers! | 1 | 0 | 70,003 | 0 | 6 | With a bit of JavaScript, you could have the client hash the entered password and a server-generated nonce, and use that in an HTTP GET. | Can I implement a web user authentication system in python without POST? | python,authentication,cgi | 0 | 2,893 | 1 | 3 | 0 | 0 | 0 |
2008-09-16T07:07:00.000 | 0 | 69,979 | 1 | 0 | true | My university doesn't support the POST cgi method (I know, it's crazy), and I was hoping to be able to have a system where a user can have a username and password and log in securely. Is this even possible?
If it's not, how would you do it with POST? Just out of curiosity.
Cheers! | 1 | 1.2 | 69,995 | 0 | 6 | You can actually do it all with GET methods. However, you'll want to use a full challenge response protocol for the logins. (You can hash on the client side using javascript. You just need to send out a unique challenge each time.) You'll also want to use SSL to ensure that no one can see the strings as they go acr... | Can I implement a web user authentication system in python without POST? | python,authentication,cgi | 0 | 2,893 | 1 | 3 | 5 | 0 | 0 |
2008-09-16T07:07:00.000 | 0 | 69,979 | 1 | 0 | false | My university doesn't support the POST cgi method (I know, it's crazy), and I was hoping to be able to have a system where a user can have a username and password and log in securely. Is this even possible?
If it's not, how would you do it with POST? Just out of curiosity.
Cheers! | 1 | 0.033321 | 69,989 | 0 | 6 | You could use HTTP Authentication, if supported.
You'd have to add SSL, as all methods, POST, GET and HTTP Auth (well, except Digest HHTP authentication) send plaintext.
GET is basically just like POST, it just has a limit on the amount of data you can send which is usually a lot smaller than POST and a semantic differ... | Can I implement a web user authentication system in python without POST? | python,authentication,cgi | 0 | 2,893 | 1 | 3 | 1 | 0 | 0 |
2008-09-16T15:35:00.000 | 0 | 73,663 | 1,288 | 0 | false | I am aware of the die() command in PHP which exits a script early.
How can I do this in Python? | 0 | 0 | 70,824,754 | 0 | 12 | Just put at the end of your code quit() and that should close a python script. | How to terminate a script? | python,termination | 0 | 1,876,007 | 1 | 2 | 0 | 0 | 1 |
2008-09-16T15:35:00.000 | 0 | 73,663 | 1,288 | 0 | false | I am aware of the die() command in PHP which exits a script early.
How can I do this in Python? | 0 | 1 | 76,374 | 0 | 12 | While you should generally prefer sys.exit because it is more "friendly" to other code, all it actually does is raise an exception.
If you are sure that you need to exit a process immediately, and you might be inside of some exception handler which would catch SystemExit, there is another function - os._exit - which te... | How to terminate a script? | python,termination | 0 | 1,876,007 | 1 | 2 | 75 | 0 | 1 |
2008-09-16T16:44:00.000 | 0 | 74,386 | 5 | 0 | false | Is it possible to call managed code, specifically IronRuby or IronPython from unamanaged code such as C++ or Delphi?
For example, we have an application written in Delphi that is being moved to C#.NET We'd like to provide Ruby or Python scripting in our new application to replace VBSCRIPT. However, we would need to p... | 0 | 0.099668 | 934,717 | 0 | 6 | Why not embed CPython instead, which has an API intended to be used directly from C/C++. You lose the multiple language advantage but probably gain simplicity. | Using DLR from Unmanaged Code | .net,delphi,ironpython,unmanaged,ironruby | 1 | 877 | 1 | 1 | 3 | 0 | 0 |
2008-09-16T20:11:00.000 | 0 | 76,408 | 6 | 0 | false | First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby . I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one.
If, for example, I see a cool Perl module, I have to try it out. If I see a nice Python app, I hav... | 0 | 0.049958 | 76,441 | 0 | 12 | That depends on the implementation, if it will be distributed I would go with Java, seeing as you know that, because of its portability. If it is just for internal use, or will be used in semi-controlled environments, then go with whatever you are the most comfortable maintaining, and whichever has the best long-term ... | Which of these scripting languages is more appropriate for pen-testing? | python,ruby,perl,security,penetration-testing | 0 | 6,338 | 1 | 7 | 3 | 0 | 0 |
2008-09-16T20:11:00.000 | 0 | 76,408 | 6 | 0 | false | First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby . I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one.
If, for example, I see a cool Perl module, I have to try it out. If I see a nice Python app, I hav... | 0 | 0 | 76,470 | 0 | 12 | Well, what kind of exploits are you thinking about? If you want to write something that needs low level stuff (ptrace, raw sockets, etc.) then you'll need to learn C. But both Perl and Python can be used. The real question is which one suits your style more?
As for toolmaking, Perl has good string-processing abilities,... | Which of these scripting languages is more appropriate for pen-testing? | python,ruby,perl,security,penetration-testing | 0 | 6,338 | 1 | 7 | 0 | 0 | 0 |
2008-09-16T20:11:00.000 | 0 | 76,408 | 6 | 0 | false | First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby . I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one.
If, for example, I see a cool Perl module, I have to try it out. If I see a nice Python app, I hav... | 0 | 0.016665 | 76,495 | 0 | 12 | All of them should be sufficient for that. Unless you need some library that is only available in one language, I'd let personal preference guide me. | Which of these scripting languages is more appropriate for pen-testing? | python,ruby,perl,security,penetration-testing | 0 | 6,338 | 1 | 7 | 1 | 0 | 0 |
2008-09-16T20:11:00.000 | 0 | 76,408 | 6 | 0 | false | First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby . I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one.
If, for example, I see a cool Perl module, I have to try it out. If I see a nice Python app, I hav... | 0 | 0.016665 | 76,508 | 0 | 12 | If you're looking for a scripting language that will play well with Java, you might want to look at Groovy. It has the flexibility and power of Perl (closures, built in regexes, associative arrays on every corner) but you can access Java code from it thus you have access to a huge number of libraries, and in particula... | Which of these scripting languages is more appropriate for pen-testing? | python,ruby,perl,security,penetration-testing | 0 | 6,338 | 1 | 7 | 1 | 0 | 0 |
2008-09-16T20:11:00.000 | 0 | 76,408 | 6 | 0 | false | First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby . I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one.
If, for example, I see a cool Perl module, I have to try it out. If I see a nice Python app, I hav... | 0 | 0.049958 | 78,106 | 0 | 12 | If you plan on using Metasploit for pen-testing and exploit development I would recommend ruby as mentioned previously Metasploit is written in ruby and any exploit/module development you may wish to do will require ruby.
If you will be using Immunity CANVAS for pen testing then for the same reasons I would recommend P... | Which of these scripting languages is more appropriate for pen-testing? | python,ruby,perl,security,penetration-testing | 0 | 6,338 | 1 | 7 | 3 | 0 | 0 |
2008-09-16T20:11:00.000 | 0 | 76,408 | 6 | 0 | false | First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby . I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one.
If, for example, I see a cool Perl module, I have to try it out. If I see a nice Python app, I hav... | 0 | 0 | 4,927,367 | 0 | 12 | I'm with tqbf. I've worked with Python and Ruby. Currently I'm working with JRuby. It has all the power of Ruby with access to the Java libraries so if there is something you absolutely need a low-level language to solve you can do so with a high-level language. So far I haven't needed to really use much Java as Ru... | Which of these scripting languages is more appropriate for pen-testing? | python,ruby,perl,security,penetration-testing | 0 | 6,338 | 1 | 7 | 0 | 0 | 0 |
2008-09-16T20:11:00.000 | 0 | 76,408 | 6 | 0 | false | First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby . I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one.
If, for example, I see a cool Perl module, I have to try it out. If I see a nice Python app, I hav... | 0 | 1 | 77,717 | 0 | 12 | [Disclaimer: I am primarily a Perl programmer, which may be colouring my judgement. However, I am not a particularly tribal one, and I think on this particular question my argument is reasonably objective.]
Perl was designed to blend seamlessly into the Unix landscape, and that is why it feels so alien to people with a... | Which of these scripting languages is more appropriate for pen-testing? | python,ruby,perl,security,penetration-testing | 0 | 6,338 | 1 | 7 | 8 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | 1 | 33,627,050 | 0 | 10 | I would assume that PHP (>5.5) is faster and more reliable for complex web applications because it is optimized for website scripting.
Many of the benchmarks you will find at the net are only made to prove that the favoured language is better. But you can not compare 2 languages with a mathematical task running X-times... | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | 7 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | 0.019997 | 77,093 | 0 | 10 | If it ain't broke don't fix it.
Just write a quick test, but bear in mind that each language will be faster with certain functions then the other. | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | 1 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | 0.019997 | 77,166 | 0 | 10 | You need to be able to make a business case for switching, not just that "it's faster". If a site built on technology B costs 20% more in developer time for maintenance over a set period (say, 3 years), it would likely be cheaper to add another webserver to the system running technology A to bridge the performance gap... | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | 1 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | 1 | 77,297 | 0 | 10 | There's no point in attempting to convince your employer to port from PHP to Python, especially not for an existing system, which is what I think you implied in your question.
The reason for this is that you already have a (presumably) working system, with an existing investment of time and effort (and experience). To ... | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | 30 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | 0 | 77,112 | 0 | 10 | The only right answer is "It depends". There's a lot of variables that can affect the performance, and you can optimize many things in either situation. | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | 0 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | 0.039979 | 77,220 | 0 | 10 | PHP and Python are similiar enough to not warrent any kind of switching.
Any performance improvement you might get from switching from one language to another would be vastly outgunned by simply not spending the money on converting the code (you don't code for free right?) and just buy more hardware. | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | 2 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | 0.019997 | 510,276 | 0 | 10 | an IS organization would not ponder this unless availability was becoming an issue.
if so the case, look into replication, load balancing and lots of ram. | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | 1 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | -0.019997 | 2,412,215 | 0 | 10 | I had to come back to web development at my new job, and, if not Pylons/Python, maybe I would have chosen to live in jungle instead :) In my subjective opinion, PHP is for kindergarten, I did it in my 3rd year of uni and, I believe, many self-respecting (or over-estimating) software engineers will not want to be bother... | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | -1 | 0 | 0 |
2008-09-16T21:05:00.000 | 0 | 77,086 | 41 | 0 | false | Which is faster, python webpages or php webpages?
Does anyone know how the speed of pylons(or any of the other frameworks) compares to a similar website made with php?
I know that serving a python base webpage via cgi is slower than php because of its long start up every time.
I enjoy using pylons and I would still ... | 0 | 0.039979 | 77,174 | 0 | 10 | It's about the same. The difference shouldn't be large enough to be the reason to pick one or the other. Don't try to compare them by writing your own tiny benchmarks ("hello world") because you will probably not have results that are representative of a real web site generating a more complex page. | Which is faster, python webpages or php webpages? | php,python,performance,pylons | 0 | 58,657 | 1 | 9 | 2 | 0 | 0 |
2008-09-17T05:15:00.000 | 0 | 80,215 | 1 | 0 | false | Is there any library available to query Btrieve databases without buying something from Pervasive? I'm looking to code in C# or Python. | 0 | 0 | 718,654 | 0 | 3 | This depends a lot on the version of Btrieve. I've been working with btrieve for a long time and have found that the best API for the old 6.15 version was in pascal. That having been said there was definately a C api around as well.
Pervasive have recently released a 6.15 ultimate patch. Using this and the C api should... | Btrieve without Pervasive? | c#,python,btrieve | 0 | 2,923 | 1 | 3 | 0 | 0 | 0 |
2008-09-17T05:15:00.000 | 0 | 80,215 | 1 | 0 | false | Is there any library available to query Btrieve databases without buying something from Pervasive? I'm looking to code in C# or Python. | 0 | 0.132549 | 275,524 | 0 | 3 | If you download one of the trial versions, you can get/install the odbc client and connect that way.
In our version of pervasive (older version) on the server where the database is installed, you can also find this client install. | Btrieve without Pervasive? | c#,python,btrieve | 0 | 2,923 | 1 | 3 | 2 | 0 | 0 |
2008-09-17T05:15:00.000 | 0 | 80,215 | 1 | 0 | true | Is there any library available to query Btrieve databases without buying something from Pervasive? I'm looking to code in C# or Python. | 0 | 1.2 | 80,596 | 0 | 3 | As far as I know that is not possible. It is not an open source database, so writing drivers for it is really hard. | Btrieve without Pervasive? | c#,python,btrieve | 0 | 2,923 | 1 | 3 | 1 | 0 | 0 |
2008-09-17T15:16:00.000 | 0 | 84,340 | 66 | 0 | false | I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language?
What helper tasks can be done by the dynamic languages faster or better after only a few days of lear... | 0 | 0.011428 | 87,121 | 0 | 35 | Towards answering the updated question, its a chicken/egg problem. The best way to justify an expense is to show how it reduces a cost somewhere else, so you may need to spend some extra/personal time to learn something first to build some kind of functional prototype.
Show your boss a demo like "hey, i did this thing... | Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? | c#,java,python,ruby,perl | 1 | 32,287 | 1 | 31 | 2 | 0 | 0 |
2008-09-17T15:16:00.000 | 0 | 84,340 | 66 | 0 | false | I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language?
What helper tasks can be done by the dynamic languages faster or better after only a few days of lear... | 0 | 0.005714 | 84,456 | 0 | 35 | Personally I work on a Java app, but I couldn't get by without perl for some supporting scripts.
I've got scripts to quickly flip what db I'm pointing at, scripts to run build scripts, scripts to scrape data & compare stuff.
Sure I could do all that with java, or maybe shell scripts (I've got some of those too), but ... | Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? | c#,java,python,ruby,perl | 1 | 32,287 | 1 | 31 | 1 | 0 | 0 |
2008-09-17T15:16:00.000 | 0 | 84,340 | 66 | 0 | false | I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language?
What helper tasks can be done by the dynamic languages faster or better after only a few days of lear... | 0 | 0.005714 | 84,443 | 0 | 35 | They're useful for the "Quick Hack" that is for plugging a gap in your main language for a quick (and potentially dirty) fix faster than it would take to develop the same in your main language. An example: a simple script in perl to go through a large text file and replace all instances of an email address with another... | Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? | c#,java,python,ruby,perl | 1 | 32,287 | 1 | 31 | 1 | 0 | 0 |
2008-09-17T15:16:00.000 | 0 | 84,340 | 66 | 0 | false | I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language?
What helper tasks can be done by the dynamic languages faster or better after only a few days of lear... | 0 | 0.005714 | 84,423 | 0 | 35 | Im not sure if this is what you are looking for, but we write our main application with Java at the small company I work for, but have used python to write smaller scripts quickly. Backup software, temporary scripts to manipulate data and push out results. It just seems easier sometimes to sit down with python and wr... | Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? | c#,java,python,ruby,perl | 1 | 32,287 | 1 | 31 | 1 | 0 | 0 |
2008-09-17T15:16:00.000 | 0 | 84,340 | 66 | 0 | false | I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language?
What helper tasks can be done by the dynamic languages faster or better after only a few days of lear... | 0 | 0 | 84,584 | 0 | 35 | You should also consider learning a functional programming language like Scala. It has many of the advantages of Ruby, including a concise syntax, and powerful features like closures. But it compiles to Java class files and and integrate seamlessly into a Java stack, which may make it much easier for your employer to... | Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? | c#,java,python,ruby,perl | 1 | 32,287 | 1 | 31 | 0 | 0 | 0 |
2008-09-17T15:16:00.000 | 0 | 84,340 | 66 | 0 | false | I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language?
What helper tasks can be done by the dynamic languages faster or better after only a few days of lear... | 0 | 0.005714 | 85,167 | 0 | 35 | Learning something with a flexible OOP system, like Lisp or Perl (see Moose), will allow you to better expand and understand your thoughts on software engineering. Ideally, every language has some unique facet (whether it be CLOS or some other technique) that enhances, extends and grows your abilities as a programmer. | Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? | c#,java,python,ruby,perl | 1 | 32,287 | 1 | 31 | 1 | 0 | 0 |
2008-09-17T15:16:00.000 | 0 | 84,340 | 66 | 0 | false | I wonder why would a C++, C#, Java developer want to learn a dynamic language?
Assuming the company won't switch its main development language from C++/C#/Java to a dynamic one what use is there for a dynamic language?
What helper tasks can be done by the dynamic languages faster or better after only a few days of lear... | 0 | 0.005714 | 85,733 | 0 | 35 | If all you have is a hammer, every problem begins to look like a nail.
There are times when having a screwdriver or pair of pliers makes a complicated problem trivial.
Nobody asks contractors, carpenters, etc, "Why learn to use a screwdriver if i already have a hammer?". Really good contractors/carpenters have tons of... | Why learn Perl, Python, Ruby if the company is using C++, C# or Java as the application language? | c#,java,python,ruby,perl | 1 | 32,287 | 1 | 31 | 1 | 0 | 0 |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 5