Q_Id int64 337 49.3M | CreationDate stringlengths 23 23 | Users Score int64 -42 1.15k | Other int64 0 1 | Python Basics and Environment int64 0 1 | System Administration and DevOps int64 0 1 | Tags stringlengths 6 105 | A_Id int64 518 72.5M | AnswerCount int64 1 64 | is_accepted bool 2
classes | Web Development int64 0 1 | GUI and Desktop Applications int64 0 1 | Answer stringlengths 6 11.6k | Available Count int64 1 31 | Q_Score int64 0 6.79k | Data Science and Machine Learning int64 0 1 | Question stringlengths 15 29k | Title stringlengths 11 150 | Score float64 -1 1.2 | Database and SQL int64 0 1 | Networking and APIs int64 0 1 | ViewCount int64 8 6.81M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3,602,728 | 2010-08-30T17:27:00.000 | -1 | 0 | 0 | 0 | python,itunes,win32com | 3,602,834 | 4 | false | 0 | 0 | Run dir(my_com_client) to get a list of available methods. | 1 | 5 | 0 | I'm trying to develop some scripts for iTunes in python and actually i'm having quite a hard time getting the API information.
I'm using the win32com.client module but i would really need to get all the specifications, methods and details.
There are a few examples but I need some extra data......
thanks!!! | iTunes API for python scripting | -0.049958 | 0 | 1 | 9,348 |
3,603,581 | 2010-08-30T19:32:00.000 | 5 | 0 | 1 | 0 | python,pickle | 63,610,942 | 4 | false | 0 | 0 | Pickling is the process in which the objects in python are converted into simple binary representation that can be used to write that object in a text file which can be stored. This is done to store the python objects and is also called as serialization. You can infer from this what de-serialization or unpickling means... | 3 | 96 | 0 | Python docs mention this word a lot and I want to know what it means! Googling doesn't help much.. | What does it mean for an object to be picklable (or pickle-able)? | 0.244919 | 0 | 0 | 41,912 |
3,603,581 | 2010-08-30T19:32:00.000 | 37 | 0 | 1 | 0 | python,pickle | 3,604,099 | 4 | false | 0 | 0 | Things that are usually not pickable are, for example, sockets, file(handler)s, database connections, and so on. Everything that's build up (recursively) from basic python types (dicts, lists, primitives, objects, object references, even circular) can be pickled by default.
You can implement custom pickling code that w... | 3 | 96 | 0 | Python docs mention this word a lot and I want to know what it means! Googling doesn't help much.. | What does it mean for an object to be picklable (or pickle-able)? | 1 | 0 | 0 | 41,912 |
3,603,581 | 2010-08-30T19:32:00.000 | 4 | 0 | 1 | 0 | python,pickle | 68,867,775 | 4 | false | 0 | 0 | These are all great answers, but for anyone who's new to programming and still confused here's the simple answer:
Pickling is making it so you can store it long term and get it later without it going bad. A bit like Saving in a video game.
So anything that's actively changing (like a live connection to a database) can... | 3 | 96 | 0 | Python docs mention this word a lot and I want to know what it means! Googling doesn't help much.. | What does it mean for an object to be picklable (or pickle-able)? | 0.197375 | 0 | 0 | 41,912 |
3,603,858 | 2010-08-30T20:09:00.000 | 15 | 1 | 0 | 0 | python,matlab,structure | 3,604,355 | 18 | false | 0 | 0 | Well, if you want it in layman's terms:
I reccomend people to write the shortest readable program that works.
There are a lot more rules about how to format code, name variables, design classes, separate responsibilities. But you should not forget that all of those rules are only there to make sure that your code is e... | 5 | 45 | 0 | I would like to know the basic principles and etiquette of writing a well structured code. | Good practices in writing MATLAB code? | 1 | 0 | 0 | 3,967 |
3,603,858 | 2010-08-30T20:09:00.000 | 22 | 1 | 0 | 0 | python,matlab,structure | 3,604,376 | 18 | true | 0 | 0 | These are the most important two things to keep in mind when you are writing code:
Don't write code that you've already written.
Don't write code that you don't need to write. | 5 | 45 | 0 | I would like to know the basic principles and etiquette of writing a well structured code. | Good practices in writing MATLAB code? | 1.2 | 0 | 0 | 3,967 |
3,603,858 | 2010-08-30T20:09:00.000 | 2 | 1 | 0 | 0 | python,matlab,structure | 3,604,396 | 18 | false | 0 | 0 | Personally, I've found that I learned more about programming style from working through SICP which is the MIT Intro to Comp SCI text (I'm about a quarter of the way through.) Than any other book. That being said, If you're going to be working in Python, the Google style guide is an excellent place to start.
I read some... | 5 | 45 | 0 | I would like to know the basic principles and etiquette of writing a well structured code. | Good practices in writing MATLAB code? | 0.022219 | 0 | 0 | 3,967 |
3,603,858 | 2010-08-30T20:09:00.000 | 1 | 1 | 0 | 0 | python,matlab,structure | 3,607,452 | 18 | false | 0 | 0 | Make it readable, make it intuitive, make it understandable, and make it commented. | 5 | 45 | 0 | I would like to know the basic principles and etiquette of writing a well structured code. | Good practices in writing MATLAB code? | 0.011111 | 0 | 0 | 3,967 |
3,603,858 | 2010-08-30T20:09:00.000 | 2 | 1 | 0 | 0 | python,matlab,structure | 3,604,559 | 18 | false | 0 | 0 | Many good points have been made above. I definitely second all of the above. I would also like to add that spelling and consistency in coding be something you practice (and also in real life).
I've worked with some offshore teams and though their English is pretty good, their spelling errors caused a lot of confusion... | 5 | 45 | 0 | I would like to know the basic principles and etiquette of writing a well structured code. | Good practices in writing MATLAB code? | 0.022219 | 0 | 0 | 3,967 |
3,603,883 | 2010-08-30T20:12:00.000 | 0 | 1 | 0 | 1 | python,mechanize | 3,603,922 | 2 | true | 1 | 0 | Yes. It can use any URL available so long as it is reachable. Just make sure it's properly formatted! | 1 | 0 | 0 | Can Mechanize access sites being locally hosted by Apache? | Can python's mechanize use localhost sites? | 1.2 | 0 | 0 | 257 |
3,604,205 | 2010-08-30T21:02:00.000 | 4 | 0 | 0 | 0 | python,ruby-on-rails,django | 3,604,329 | 3 | true | 1 | 0 | I have never seen Rails scaffold-generated view code used in a production app. The chances that it's going to create the look that you want is nearly zero. I use the generators for models and controllers all the time, as they are very useful.
To your question of frameworks:
If you know Python better, use Django.
If you... | 2 | 5 | 0 | If you take out the scaffolding feature where it creates the model/controller, and CRUD pages for you, is ruby on rails still any faster to market than say, django?
It seems very similiar to be if you take away that step...(even though I believe django has similar auto-gen capabilities)
I am reading the starting guide ... | if you don't use scaffolding, is ruby on rails still good for rapid development? | 1.2 | 0 | 0 | 396 |
3,604,205 | 2010-08-30T21:02:00.000 | 1 | 0 | 0 | 0 | python,ruby-on-rails,django | 3,604,384 | 3 | false | 1 | 0 | Scaffolding is just a demo and learning feature. It's not intended for use in real site development. It's certainly not Rails' primary strength. | 2 | 5 | 0 | If you take out the scaffolding feature where it creates the model/controller, and CRUD pages for you, is ruby on rails still any faster to market than say, django?
It seems very similiar to be if you take away that step...(even though I believe django has similar auto-gen capabilities)
I am reading the starting guide ... | if you don't use scaffolding, is ruby on rails still good for rapid development? | 0.066568 | 0 | 0 | 396 |
3,604,357 | 2010-08-30T21:28:00.000 | 0 | 0 | 1 | 0 | python,user-interface,gtk | 3,604,511 | 3 | false | 0 | 1 | You mean a widget to filter a large collection into multiple subsets / views?
I would guess you have to implement this yourself - a list of options on the left and filtered results on the right, I don't know of any existing (gtk) widgets. | 1 | 1 | 0 | I'm trying to write a simple GTD-style todo list app with python and gtk to learn python. I want a container that can select an individual list from a lot of choices. It would be something like the list of notebooks area in tomboy. Not a combobox.
As you can probably tell I'm a beginner and the terminology is probab... | Python PyGTK. What's this component? | 0 | 0 | 0 | 256 |
3,604,565 | 2010-08-30T22:01:00.000 | 1 | 0 | 0 | 0 | python,django,mongodb | 3,605,615 | 3 | false | 1 | 0 | What does the migration process look like with a non-relational db?
Depends on if you need to update all the existing data or not.
In many cases, you may not need to touch the old data, such as when adding a new optional field. If that field also has a default value, you may also not need to update the old documents,... | 2 | 18 | 0 | Since mongo doesn't have a schema, does that mean that we won't have to do migrations when we change the models?
What does the migration process look like with a non-relational db? | Does django with mongodb make migrations a thing of the past? | 0.066568 | 1 | 0 | 5,660 |
3,604,565 | 2010-08-30T22:01:00.000 | 2 | 0 | 0 | 0 | python,django,mongodb | 3,604,687 | 3 | false | 1 | 0 | There is no silver bullet. Adding or removing fields is easier with non-relational db (just don't use unneeded fields or use new fields), renaming a field is easier with traditional db (you'll usually have to change a lot of data in case of field rename in schemaless db), data migration is on par - depending on task. | 2 | 18 | 0 | Since mongo doesn't have a schema, does that mean that we won't have to do migrations when we change the models?
What does the migration process look like with a non-relational db? | Does django with mongodb make migrations a thing of the past? | 0.132549 | 1 | 0 | 5,660 |
3,605,188 | 2010-08-31T00:21:00.000 | 2 | 0 | 1 | 0 | python,multithreading,queue | 3,607,187 | 5 | false | 0 | 0 | Queue is a FIFO (first in first out) register so remember that the consumer can be faster than producer. When consumers thread detect that the queue is empty normally realise one of following actions:
Send to API: switch to next thread.
Send to API: sleep some ms and than check again the queue.
Send to API: wait on ev... | 3 | 14 | 0 | I'm learning to use the Queue module, and am a bit confused about how a queue consumer thread can be made to know that the queue is complete. Ideally I'd like to use get() from within the consumer thread and have it throw an exception if the queue has been marked "done". Is there a better way to communicate this than... | Communicating end of Queue | 0.07983 | 0 | 1 | 10,185 |
3,605,188 | 2010-08-31T00:21:00.000 | 0 | 0 | 1 | 0 | python,multithreading,queue | 3,605,282 | 5 | false | 0 | 0 | The best practice way of doing this would be to have the queue itself notify a client that it has reached the 'done' state. The client can then take any action that is appropriate.
What you have suggested; checking the queue to see if it is done periodically, would be highly undesirable. Polling is an antipattern in mu... | 3 | 14 | 0 | I'm learning to use the Queue module, and am a bit confused about how a queue consumer thread can be made to know that the queue is complete. Ideally I'd like to use get() from within the consumer thread and have it throw an exception if the queue has been marked "done". Is there a better way to communicate this than... | Communicating end of Queue | 0 | 0 | 1 | 10,185 |
3,605,188 | 2010-08-31T00:21:00.000 | 8 | 0 | 1 | 0 | python,multithreading,queue | 3,605,258 | 5 | false | 0 | 0 | A sentinel is a natural way to shut down a queue, but there are a couple things to watch out for.
First, remember that you may have more than one consumer, so you need to send a sentinel once for each running consumer, and guarantee that each consumer will only consume one sentinel, to ensure that each consumer receive... | 3 | 14 | 0 | I'm learning to use the Queue module, and am a bit confused about how a queue consumer thread can be made to know that the queue is complete. Ideally I'd like to use get() from within the consumer thread and have it throw an exception if the queue has been marked "done". Is there a better way to communicate this than... | Communicating end of Queue | 1 | 0 | 1 | 10,185 |
3,605,742 | 2010-08-31T03:00:00.000 | 0 | 0 | 1 | 0 | python,python-imaging-library | 29,567,988 | 3 | false | 0 | 0 | For Mac OSX there are two solid options. First you must open the Terminal App.
1. Try installing with homebrew with this command:
brew install pillow
brew list (this will check if it installed property)
2. Or you can install with pip with this command:
pip install pillow
pip show pillow (this will check if it instal... | 1 | 0 | 0 | Where do I download the python PIL module from? I found some sites but not sure if they can be trusted.
This is for my macbookpro.
Is effbot the source? | Where do download python PIL module from? | 0 | 0 | 0 | 2,974 |
3,606,215 | 2010-08-31T05:18:00.000 | 0 | 0 | 0 | 0 | python,sql,database,google-app-engine,nosql | 3,649,176 | 5 | true | 1 | 0 | Thank you for all the answers. To summarize the answers, currently only web2py and Django supports this kind of abstraction.
It is not about a SQL-NoSQL holy grail, using abstraction can make the apps more flexible. Lets assume that you started a project using NoSQL, and then later on you need to switch over to SQL. I... | 3 | 2 | 0 | Is it even possible to create an abstraction layer that can accommodate relational and non-relational databases? The purpose of this layer is to minimize repetition and allows a web application to use any kind of database by just changing/modifying the code in one place (ie, the abstraction layer). The part that sits o... | Is there any python web app framework that provides database abstraction layer for SQL and NoSQL? | 1.2 | 1 | 0 | 1,721 |
3,606,215 | 2010-08-31T05:18:00.000 | 1 | 0 | 0 | 0 | python,sql,database,google-app-engine,nosql | 3,609,648 | 5 | false | 1 | 0 | Regarding App Engine, all existing attempts limit you in some way (web2py doesn't support transactions or namespaces and probably many other stuff, for example). If you plan to work with GAE, use what GAE provides and forget looking for a SQL-NoSQL holy grail. Existing solutions are inevitably limited and affect perfor... | 3 | 2 | 0 | Is it even possible to create an abstraction layer that can accommodate relational and non-relational databases? The purpose of this layer is to minimize repetition and allows a web application to use any kind of database by just changing/modifying the code in one place (ie, the abstraction layer). The part that sits o... | Is there any python web app framework that provides database abstraction layer for SQL and NoSQL? | 0.039979 | 1 | 0 | 1,721 |
3,606,215 | 2010-08-31T05:18:00.000 | 1 | 0 | 0 | 0 | python,sql,database,google-app-engine,nosql | 3,606,610 | 5 | false | 1 | 0 | Yo may also check web2py, they support relational databases and GAE on the core. | 3 | 2 | 0 | Is it even possible to create an abstraction layer that can accommodate relational and non-relational databases? The purpose of this layer is to minimize repetition and allows a web application to use any kind of database by just changing/modifying the code in one place (ie, the abstraction layer). The part that sits o... | Is there any python web app framework that provides database abstraction layer for SQL and NoSQL? | 0.039979 | 1 | 0 | 1,721 |
3,606,669 | 2010-08-31T06:59:00.000 | 1 | 0 | 0 | 1 | python,google-app-engine | 3,611,807 | 2 | false | 1 | 0 | I would suggest the following:
Make 'marked' entities child entities of the users who have marked them.
Use a key name for the 'marked' entity that is based on the URL of the page marked
To find friends who have marked a page, retrieve a list of friends, then generate the list of entity keys from the list of friends (... | 1 | 2 | 0 | In a python based facebook application on GAE, i want to check which friends of current user have "marked" a web page or not.
For this i have to run as many DB queries as the number of friends (say 100)
I fear this may run into "timeout" because of large no of queries.
Google DOCs suggest that "list" queries run in par... | List query with, facebook friends in list? | 0.099668 | 0 | 0 | 442 |
3,606,743 | 2010-08-31T07:07:00.000 | 0 | 0 | 1 | 1 | python,google-app-engine,ssl | 3,606,827 | 3 | false | 0 | 0 | Why don't you provide the complete path to python executable. That should work.
C:\"Python2.5.2"\python.exe setup.py install | 1 | 1 | 0 | I'm running GAE SDK on a Windows Vista laptop. It keeps reminding me to install the SSL module. I've been having great difficulty on how to do that.
I've downloaded the SSL module.
I've done 'python setup.py install' in cmd, but it just says "python is not recognized as an internal..."
I've added C:\Python2.5.2 to my P... | Installing Python SSL module on Windows Vista | 0 | 0 | 0 | 530 |
3,607,020 | 2010-08-31T07:46:00.000 | 3 | 0 | 1 | 0 | python,vba | 3,627,197 | 4 | false | 0 | 0 | It is matter of taste. If you use modules your 'program' will be more procedural oriented. If you choose classes it will be more or less object oriented. I'm working with Excel for couple of months and personally I choose classes whenever I can because it is more comfortable to me. If you stop thinking about objects an... | 4 | 5 | 0 | My first "serious" language was Java, so I have comprehended object-oriented programming in sense that elemental brick of program is a class.
Now I write on VBA and Python. There are module languages and I am feeling persistent discomfort: I don't know how should I decompose program in a modules/classes.
I understand t... | Module vs object-oriented programming in vba | 0.148885 | 0 | 0 | 4,745 |
3,607,020 | 2010-08-31T07:46:00.000 | 3 | 0 | 1 | 0 | python,vba | 3,607,773 | 4 | true | 0 | 0 | I don't do VBA but in python, modules are fundamental. As you say, the can be viewed as namespaces but they are also objects in their own right. They are not classes however, so you cannot inherit from them (at least not directly).
I find that it's a good rule to keep a module concerned with one domain area. The rule t... | 4 | 5 | 0 | My first "serious" language was Java, so I have comprehended object-oriented programming in sense that elemental brick of program is a class.
Now I write on VBA and Python. There are module languages and I am feeling persistent discomfort: I don't know how should I decompose program in a modules/classes.
I understand t... | Module vs object-oriented programming in vba | 1.2 | 0 | 0 | 4,745 |
3,607,020 | 2010-08-31T07:46:00.000 | 1 | 0 | 1 | 0 | python,vba | 3,607,379 | 4 | false | 0 | 0 | VBA also allows the use of classes. Unfortunately, those classes don't support all the features of a full-fleged object oriented language. Especially inheritance is not supported.
But you can work with interfaces, at least up to a certain degree.
I only used modules like "one module = one singleton". My modules contain... | 4 | 5 | 0 | My first "serious" language was Java, so I have comprehended object-oriented programming in sense that elemental brick of program is a class.
Now I write on VBA and Python. There are module languages and I am feeling persistent discomfort: I don't know how should I decompose program in a modules/classes.
I understand t... | Module vs object-oriented programming in vba | 0.049958 | 0 | 0 | 4,745 |
3,607,020 | 2010-08-31T07:46:00.000 | 1 | 0 | 1 | 0 | python,vba | 3,607,193 | 4 | false | 0 | 0 | Idioms of languages are different and thats the reason a problem solved in different languages take different approaches.
"C" is all about procedural decomposition.
Main idiom in Java is about "class or Object" decomposition. Functions are not absent, but they become a part of exhibited behavior of these classes.
"P... | 4 | 5 | 0 | My first "serious" language was Java, so I have comprehended object-oriented programming in sense that elemental brick of program is a class.
Now I write on VBA and Python. There are module languages and I am feeling persistent discomfort: I don't know how should I decompose program in a modules/classes.
I understand t... | Module vs object-oriented programming in vba | 0.049958 | 0 | 0 | 4,745 |
3,607,201 | 2010-08-31T08:12:00.000 | 2 | 0 | 0 | 1 | python,google-app-engine | 3,608,338 | 1 | true | 1 | 0 | You need to edit it programmatically. Not all property types can be edited in the data viewer. | 1 | 0 | 0 | I would like to edit the value of a StringListProperty variable on App Engine. Is it possible? I don't see any sign of editable field for a StringListProperty variable right inside the DataViewer panel. | How to edit a StringListProperty value in Google App Engine? | 1.2 | 0 | 0 | 220 |
3,607,254 | 2010-08-31T08:21:00.000 | 0 | 1 | 0 | 1 | python,c,linux | 3,607,298 | 3 | true | 0 | 0 | On linux object files are written in ELF file format.So i think you have to start with understanding the ELF file format and how OS write object file using this format.That can give you a idea how you can read object file and symbol table by your own program.To get some initial idea you can look into the source code of... | 1 | 0 | 0 | Question is simple, i have a object file and i want to read the symbols of the object file via code. I am aware that the linux command "nm" would be able to do this, but i want to be able to do it inside code.
Also note id like to do this either via C or Python.
Regards
Paul | How to read symbols of an object file using C | 1.2 | 0 | 0 | 1,506 |
3,607,285 | 2010-08-31T08:25:00.000 | 6 | 0 | 1 | 0 | python,orm | 3,609,616 | 4 | true | 0 | 0 | If you are looking for something thats high performance, and based on one of your comments "something that can handle >5k queries per second". You need to keep in mind that an ORM is not built specifically for speed and performance, it is built for maintainability and ease of use. If the data is so basic that even SqlA... | 1 | 3 | 0 | Can you recommend a high-performance, thread-safe and stable ORM for Python? The data I need to work with isn't complex, so SQLAlchemy is probably an overkill. | Fast, thread-safe Python ORM? | 1.2 | 1 | 0 | 3,631 |
3,607,573 | 2010-08-31T09:09:00.000 | 3 | 0 | 0 | 0 | python,django,keyword-argument | 32,918,934 | 5 | false | 1 | 0 | Using instance._state.adding is the most logical approach, as you will be able to tell the model state exists or is new, regardless whether the primary key as been assigned or not. | 2 | 31 | 0 | I am using Django's pre_save signal to implement auto_now_add. There is a lot of discussion on the internet on why you should or shouldn't implement it yourself. I do not appreciate comments on this. Neither on whether I should be rewriting the save function (I have a lot of models that use auto_now_add so using signal... | Django pre_save signal: check if instance is created not updated, does kwargs['created'] (still) exist? | 0.119427 | 0 | 0 | 21,951 |
3,607,573 | 2010-08-31T09:09:00.000 | 57 | 0 | 0 | 0 | python,django,keyword-argument | 12,132,343 | 5 | false | 1 | 0 | Primary key attribute usually assigned by the database when the instance saved first time. So you can use something like if instance.pk is None | 2 | 31 | 0 | I am using Django's pre_save signal to implement auto_now_add. There is a lot of discussion on the internet on why you should or shouldn't implement it yourself. I do not appreciate comments on this. Neither on whether I should be rewriting the save function (I have a lot of models that use auto_now_add so using signal... | Django pre_save signal: check if instance is created not updated, does kwargs['created'] (still) exist? | 1 | 0 | 0 | 21,951 |
3,608,409 | 2010-08-31T11:12:00.000 | 0 | 0 | 1 | 0 | javascript,python,ide | 3,608,498 | 7 | false | 0 | 0 | It's not quite IDE, but on MacOSX i'm using TextMate, it have many extensions which makes it very powerful. | 4 | 6 | 0 | I am using python for web programming and javascript heavily. Currently, i am using NetBeans
but i am looking for another IDE. NetBeans is not very good while programming with python and javascript. Any suggestion? | IDE Suggestion for python and javascript | 0 | 0 | 1 | 6,379 |
3,608,409 | 2010-08-31T11:12:00.000 | 1 | 0 | 1 | 0 | javascript,python,ide | 3,608,554 | 7 | false | 0 | 0 | PyCharm (and other IDEs on IDEA platform) is brilliant IDE for python, js, xml, css and other languages in webdev stack. | 4 | 6 | 0 | I am using python for web programming and javascript heavily. Currently, i am using NetBeans
but i am looking for another IDE. NetBeans is not very good while programming with python and javascript. Any suggestion? | IDE Suggestion for python and javascript | 0.028564 | 0 | 1 | 6,379 |
3,608,409 | 2010-08-31T11:12:00.000 | 1 | 0 | 1 | 0 | javascript,python,ide | 3,608,748 | 7 | false | 0 | 0 | I use Eclipse with Pydev (Python) and Aptana (Javascript) plugins | 4 | 6 | 0 | I am using python for web programming and javascript heavily. Currently, i am using NetBeans
but i am looking for another IDE. NetBeans is not very good while programming with python and javascript. Any suggestion? | IDE Suggestion for python and javascript | 0.028564 | 0 | 1 | 6,379 |
3,608,409 | 2010-08-31T11:12:00.000 | 0 | 0 | 1 | 0 | javascript,python,ide | 28,404,847 | 7 | false | 0 | 0 | For web programming I used Espresso, it only work on Mac but it is quite good,this one is an IDE.
I don't think the rest classify as an IDE.
For python I use sublimetext2 because it can be customize and has a great GUI feel.
I used to use notepad++ don't really suggest it.
I think if you are asking for efficiency use v... | 4 | 6 | 0 | I am using python for web programming and javascript heavily. Currently, i am using NetBeans
but i am looking for another IDE. NetBeans is not very good while programming with python and javascript. Any suggestion? | IDE Suggestion for python and javascript | 0 | 0 | 1 | 6,379 |
3,609,952 | 2010-08-31T14:25:00.000 | 6 | 1 | 1 | 0 | python,ubuntu,curl,pycurl | 3,609,988 | 2 | true | 0 | 0 | curl is a module which uses pycurl. It provides the curl.Curl class which provides a high-level interface to the pycurl functions.
I haven't found much documentation on how to use it, but reading /usr/share/pyshared/curl/__init__.py may make it pretty self-obvious.
There are also some examples in /usr/share/doc/python... | 1 | 5 | 0 | Newbie question: Python 2.6, Ubuntu 10.04, I can import both pycurl and curl, the former having different names for functions (set_option vs. setopt).
What's the difference between the two modules? | What's the difference between pycurl and curl in python | 1.2 | 0 | 0 | 1,716 |
3,610,071 | 2010-08-31T14:39:00.000 | 2 | 0 | 1 | 0 | python,naming,case,convention,pep | 3,610,856 | 3 | false | 0 | 0 | It's best to match whatever your organization uses or is comfortable with. Preaching "the One True Python style" doesn't exactly build harmony if everyone else already uses some other uniform manner. If it's some random hodgepodge of styles, then go ahead and advocate for some unification. | 2 | 1 | 0 | Are Java style camelCase names good practice in Python. I know Capilized names should be reserved by convention for Class names. Methods should be small letters according to good style, or actually I am not so sure. Is there PEP about naming?
COMMENTS:
Sorry for camels :) , I learned from answer PEP8, that my title is ... | doesPythonLikeCamels | 0.132549 | 0 | 0 | 236 |
3,610,071 | 2010-08-31T14:39:00.000 | 1 | 0 | 1 | 0 | python,naming,case,convention,pep | 3,610,128 | 3 | false | 0 | 0 | Yes there's a PEP on code style, PEP 8.
Check "Naming Conventions" | 2 | 1 | 0 | Are Java style camelCase names good practice in Python. I know Capilized names should be reserved by convention for Class names. Methods should be small letters according to good style, or actually I am not so sure. Is there PEP about naming?
COMMENTS:
Sorry for camels :) , I learned from answer PEP8, that my title is ... | doesPythonLikeCamels | 0.066568 | 0 | 0 | 236 |
3,610,272 | 2010-08-31T14:59:00.000 | 3 | 0 | 1 | 1 | python,eclipse,pydev | 14,501,729 | 4 | false | 1 | 0 | I've found that closing the project and reopening (after rescanning the interpreter) works for me. | 4 | 28 | 0 | I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install and it got installed in my site-packages directory C:\Python26\Lib\site-packages. I can successfully import it in the python shell with import treebeard. However PyDev complains that it cannot resolve it when I try to import it.... | pydev doesn't find python library after installation | 0.148885 | 0 | 0 | 12,392 |
3,610,272 | 2010-08-31T14:59:00.000 | 37 | 0 | 1 | 1 | python,eclipse,pydev | 3,610,311 | 4 | true | 1 | 0 | Pydev doesn't automatically rescan the site-packages folder. You need to go to Preferences-> Interpreter -> Python and click apply to make it scan again. | 4 | 28 | 0 | I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install and it got installed in my site-packages directory C:\Python26\Lib\site-packages. I can successfully import it in the python shell with import treebeard. However PyDev complains that it cannot resolve it when I try to import it.... | pydev doesn't find python library after installation | 1.2 | 0 | 0 | 12,392 |
3,610,272 | 2010-08-31T14:59:00.000 | 0 | 0 | 1 | 1 | python,eclipse,pydev | 43,832,437 | 4 | false | 1 | 0 | Well, I followed this sequence to make it work:
1) I installed the desired library by using pip install
2) I went in Eclipse to: Window --> Preferences --> Pydev --> Interpreters --> Python Interpreter, and clicked "Quick Auto-Config". It made the trick. | 4 | 28 | 0 | I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install and it got installed in my site-packages directory C:\Python26\Lib\site-packages. I can successfully import it in the python shell with import treebeard. However PyDev complains that it cannot resolve it when I try to import it.... | pydev doesn't find python library after installation | 0 | 0 | 0 | 12,392 |
3,610,272 | 2010-08-31T14:59:00.000 | 14 | 0 | 1 | 1 | python,eclipse,pydev | 6,144,832 | 4 | false | 1 | 0 | I also faced the same error when i had installed a new package.i'm using eclipse Helios.
Even after applying and re scanning the folder it was NOT detecting the new packages. So finally i clicked on the "Click here to configure a interpreter not listed" listed and deleted the already selected interpreter and used the a... | 4 | 28 | 0 | I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install and it got installed in my site-packages directory C:\Python26\Lib\site-packages. I can successfully import it in the python shell with import treebeard. However PyDev complains that it cannot resolve it when I try to import it.... | pydev doesn't find python library after installation | 1 | 0 | 0 | 12,392 |
3,610,854 | 2010-08-31T15:59:00.000 | 7 | 0 | 0 | 1 | python,json,google-app-engine | 3,610,930 | 1 | true | 1 | 0 | JSON is just text, so yes, you can store it in memcache. | 1 | 2 | 0 | I think my question is already clear enough, but to make it even more clear i will illustrate it with my example.
I'm currently returning many json every request, which I would like to cache in some way. I thought memcache would be great, but I only see that they use memcache for caching queries. | Is it possible to memcache a json result in App Engine? | 1.2 | 0 | 0 | 717 |
3,611,830 | 2010-08-31T17:59:00.000 | 0 | 0 | 0 | 1 | python,google-app-engine,memcached,python-memcached | 3,611,908 | 3 | false | 1 | 0 | as in comments above, I guess I could stick all data in a single memcache entry with a known key.
Still for non-static data there are scenarios where it would be useful. | 2 | 4 | 0 | I want to use all the data in my python app engine memcache. I do not know the keys in advance.
How do I go about getting all data? | how do I return all memcached values in Google App Engine? | 0 | 0 | 0 | 3,350 |
3,611,830 | 2010-08-31T17:59:00.000 | 1 | 0 | 0 | 1 | python,google-app-engine,memcached,python-memcached | 4,524,611 | 3 | false | 1 | 0 | I am using a 'well known key' called "config" where I store a list of all other keys and use that to enumerate the rest of the items. | 2 | 4 | 0 | I want to use all the data in my python app engine memcache. I do not know the keys in advance.
How do I go about getting all data? | how do I return all memcached values in Google App Engine? | 0.066568 | 0 | 0 | 3,350 |
3,612,410 | 2010-08-31T19:18:00.000 | 2 | 0 | 0 | 0 | python,python-3.x,gpu | 10,986,086 | 2 | false | 0 | 1 | Clyther is a Python package for High-Performance Computing (HPC) using, for example, video cards with multiple Graphics Packaging Units (GPUs) or (less frequently) multi-core processors. Clyther is for parallel processing of algorithms or data sets that would normally take a lot of time to process serially. Meaning, ... | 2 | 2 | 0 | I don't get what Clyther is or how to use it.
My stuff:
ATI OpenCl SDK (just dl'd)
clyther beta (just dl'd)
windows 7 pro 64 bit
active python 3.1.2
Xfxs Ati radeon 5850 video card
I downloaded the ATI OpenCl SDK and the clyther beta from sourceforge. Then I tooke the sample 'reduce' function from the sourc... | Clyther-how to get started? | 0.197375 | 0 | 0 | 507 |
3,612,410 | 2010-08-31T19:18:00.000 | 1 | 0 | 0 | 0 | python,python-3.x,gpu | 3,612,526 | 2 | false | 0 | 1 | When you name the file .py (the file extension associated with python.exe) and double-click it, how is windows supposed to know it's supposed to run the file with CLyther?
Is naming the file .py wrong? I guess clyther is its own lqnguage and not really python?
Documentation compares it with Cython - so I suppose it's... | 2 | 2 | 0 | I don't get what Clyther is or how to use it.
My stuff:
ATI OpenCl SDK (just dl'd)
clyther beta (just dl'd)
windows 7 pro 64 bit
active python 3.1.2
Xfxs Ati radeon 5850 video card
I downloaded the ATI OpenCl SDK and the clyther beta from sourceforge. Then I tooke the sample 'reduce' function from the sourc... | Clyther-how to get started? | 0.099668 | 0 | 0 | 507 |
3,614,609 | 2010-09-01T02:17:00.000 | 0 | 0 | 1 | 0 | python,macos,tkinter | 3,614,650 | 2 | false | 0 | 1 | If I'm not greatly mistaken, it should pass the name of the file as the first argument to the script - sys.argv[1]. | 1 | 0 | 0 | I have a python script bundled into a application (I'm on a mac) and have the application set to be able to open .zip files. But when I say "open foo.zip with bar.py" how do I access the file that I have passed to it?
Additional info:
Using tkinter.
What's a good way to debug this, as there is no terminal to pass info... | Python: open a file *with* script? | 0 | 0 | 0 | 310 |
3,615,122 | 2010-09-01T04:54:00.000 | 3 | 1 | 1 | 0 | javascript,jquery,python,c,syntax | 3,618,018 | 3 | false | 0 | 0 | For jQuery, the answer is pretty simple: jQuery isn't a language, therefore it doesn't have syntax.
For Python and C, the answer from a high-level point of view is also very simple: Python's syntax is directly inspired by C's syntax. (Or more precisely, both Python's and C's syntax are inspired by ALGOL's syntax.) Ther... | 3 | 4 | 0 | I'm trying to get a sense of the similarities between languages in syntax. How similar are Python, jQuery and C? I started programming in Actionscript 3 and then moved on to Javascript , then went on and learned Prototype, and then I started using jQuery and found that the syntax is very different. So is jQuery more li... | How similar are Python, jQuery, C syntax wise? | 0.197375 | 0 | 0 | 2,839 |
3,615,122 | 2010-09-01T04:54:00.000 | 3 | 1 | 1 | 0 | javascript,jquery,python,c,syntax | 3,615,135 | 3 | false | 0 | 0 | Syntax wise, JavaScript (the language jQuery is implemented in) is similar to C. Python uses a different syntax which does not rely on semicolons and braces, but instead on indentation.
Semantically, JavaScript is closer to Python, so this would be easier to learn. I don't understand how you "moved" from ActionScript 3... | 3 | 4 | 0 | I'm trying to get a sense of the similarities between languages in syntax. How similar are Python, jQuery and C? I started programming in Actionscript 3 and then moved on to Javascript , then went on and learned Prototype, and then I started using jQuery and found that the syntax is very different. So is jQuery more li... | How similar are Python, jQuery, C syntax wise? | 0.197375 | 0 | 0 | 2,839 |
3,615,122 | 2010-09-01T04:54:00.000 | 8 | 1 | 1 | 0 | javascript,jquery,python,c,syntax | 3,615,482 | 3 | true | 0 | 0 | C is much different from the languages you've asked about. Remember that C isn't an interpreted language and will not be treated as such in your code. In short, you're up for a lot more material to learn --while dealing with C-- in terms of things like memory management and semantics than the other languages.
In rega... | 3 | 4 | 0 | I'm trying to get a sense of the similarities between languages in syntax. How similar are Python, jQuery and C? I started programming in Actionscript 3 and then moved on to Javascript , then went on and learned Prototype, and then I started using jQuery and found that the syntax is very different. So is jQuery more li... | How similar are Python, jQuery, C syntax wise? | 1.2 | 0 | 0 | 2,839 |
3,615,561 | 2010-09-01T06:37:00.000 | 4 | 1 | 0 | 0 | python,imap,imaplib | 3,636,059 | 2 | true | 0 | 0 | Yes of course the UID is changed when you do move operation.
the new UID for that mail will be the next UID from the destination folder.
(i.e if the last mail UID of the destination folder is : 9332 ,
then the UID of the move email will be 9333)
Note: UID is changed but the Message-Id will not be changed during an... | 1 | 0 | 0 | I try to move email from mailbox's gmail to another one, Just curious that UID of each email will change when move to new mailbox ? | About IMAP UID with imaplib | 1.2 | 0 | 1 | 5,836 |
3,616,078 | 2010-09-01T08:04:00.000 | 0 | 0 | 0 | 0 | database,ironpython | 3,616,111 | 2 | false | 1 | 0 | good
That is highly subjective without far more detailed requirements.
You should be able to use any database with .NET support, whether out of the box (notably SQL Server Express and Compact) or installed separately (SQL Server-other editions, DB2, MySQL, Oracle, ...).
Ten select commands per second should be easily... | 1 | 0 | 0 | i'm using IronPython 2.6 for .Net4 to build an GUI logging application.
This application received data via serialport and stores these data in an sqlite3 database while showing the last 100 received items in an listview. The listview gathers it's data via an SQL SELECT from the database every 100ms. It only querys data... | IronPython - What kind of database is useable | 0 | 1 | 0 | 495 |
3,616,822 | 2010-09-01T09:54:00.000 | 0 | 0 | 1 | 0 | python,hierarchy,tuples | 3,616,913 | 3 | false | 0 | 0 | Remove parent field. You can still implement any tree-manipulation operations efficient without keeping reference to parent node. | 3 | 0 | 0 | I am trying to represent a hierarchy using namedtuple. Essentially, every node has three attributes relevant to the hierarchy: parent, leftChild and rightChild (they also have some attributes that carry the actual information, but that is not important for the question). The problem is the circular reference between pa... | Representing an immutable hierarchy using tuples | 0 | 0 | 0 | 157 |
3,616,822 | 2010-09-01T09:54:00.000 | 2 | 0 | 1 | 0 | python,hierarchy,tuples | 3,616,851 | 3 | true | 0 | 0 | No, there is not. | 3 | 0 | 0 | I am trying to represent a hierarchy using namedtuple. Essentially, every node has three attributes relevant to the hierarchy: parent, leftChild and rightChild (they also have some attributes that carry the actual information, but that is not important for the question). The problem is the circular reference between pa... | Representing an immutable hierarchy using tuples | 1.2 | 0 | 0 | 157 |
3,616,822 | 2010-09-01T09:54:00.000 | 0 | 0 | 1 | 0 | python,hierarchy,tuples | 3,617,608 | 3 | false | 0 | 0 | One trick is not to use an object reference, but instead, a symbolic ID that you maintain in a hash table. | 3 | 0 | 0 | I am trying to represent a hierarchy using namedtuple. Essentially, every node has three attributes relevant to the hierarchy: parent, leftChild and rightChild (they also have some attributes that carry the actual information, but that is not important for the question). The problem is the circular reference between pa... | Representing an immutable hierarchy using tuples | 0 | 0 | 0 | 157 |
3,617,052 | 2010-09-01T10:23:00.000 | 0 | 0 | 0 | 0 | python,mysql,escaping | 61,042,304 | 7 | false | 0 | 0 | One other way to work around this is using something like this when using mysqlclient in python.
suppose the data you want to enter is like this <ol><li><strong style="background-color: rgb(255, 255, 0);">Saurav\'s List</strong></li></ol>. It contains both double qoute and single quote.
You can use the following method... | 1 | 77 | 0 | I use Python and MySQLdb to download web pages and store them into database. The problem I have is that I can't save complicated strings in the database because they are not properly escaped.
Is there a function in Python that I can use to escape a string for MySQL? I tried with ''' (triple simple quotes) and """, but ... | Escape string Python for MySQL | 0 | 1 | 0 | 144,313 |
3,619,063 | 2010-09-01T14:22:00.000 | 5 | 1 | 0 | 0 | php,python,accelerator | 3,619,178 | 4 | false | 0 | 0 | As long as you do trivial amounts of work in your "main script" (the one you directly invoke with python and which gets a __name__ of __main__) you need not worry about "caching the pre-compiled python bytecode": when you import foo, foo.py gets saved to disk (same directory) as foo.pyc, as long as that directory is wr... | 3 | 4 | 0 | I'm planning to use Python to develop a web application. Anybody has any idea about any accelerator for python? (something like eAccelerator or apc for php) if not, is there any way to cache the pre-compiled python bytecode ?
Any idea about the performance comparison between python and php (assuming db/network latenci... | Python accelerator | 0.244919 | 0 | 0 | 1,571 |
3,619,063 | 2010-09-01T14:22:00.000 | 3 | 1 | 0 | 0 | php,python,accelerator | 3,622,927 | 4 | true | 0 | 0 | Others have mentioned Python byte code files, but that is largely irrelevant. This is because hosting mechanisms for Python, with the exception of CGI, keep the Python web Application in memory between requests. This is different to PHP which effectively throws away the application between requests. As such, Python doe... | 3 | 4 | 0 | I'm planning to use Python to develop a web application. Anybody has any idea about any accelerator for python? (something like eAccelerator or apc for php) if not, is there any way to cache the pre-compiled python bytecode ?
Any idea about the performance comparison between python and php (assuming db/network latenci... | Python accelerator | 1.2 | 0 | 0 | 1,571 |
3,619,063 | 2010-09-01T14:22:00.000 | 8 | 1 | 0 | 0 | php,python,accelerator | 3,619,244 | 4 | false | 0 | 0 | There's a trick to this.
It's called mod_wsgi.
The essence of it works like this.
For "static" content (.css, .js, images, etc.) put them in a directory so they're served by Apache, without your Python program knowing they were sent.
For "dynamic" content (the main HTML page itself) you use mod_wsgi to fork a "back-en... | 3 | 4 | 0 | I'm planning to use Python to develop a web application. Anybody has any idea about any accelerator for python? (something like eAccelerator or apc for php) if not, is there any way to cache the pre-compiled python bytecode ?
Any idea about the performance comparison between python and php (assuming db/network latenci... | Python accelerator | 1 | 0 | 0 | 1,571 |
3,619,990 | 2010-09-01T16:04:00.000 | 2 | 0 | 1 | 0 | python,c,installation | 3,620,269 | 2 | true | 0 | 0 | You can avoid having some one to install it independently but you can not avoid installation completely. If his computing platform differs from yours, he will have to build the extension.
What can be done is that you setup a package distribution using distutils. This way the package could be installed or built. You can... | 2 | 4 | 0 | I wrote a Python extension in C, and my python program uses that extension. In order for it to work, I would have to install the extension on the user's system before my program can run. Is there a way to bypass that installation step and somehow just have the extension in my python package? The only compiled part obvi... | Is there a way to package a python extension written in C into a binary so I don't have to python-install it? | 1.2 | 0 | 0 | 112 |
3,619,990 | 2010-09-01T16:04:00.000 | 1 | 0 | 1 | 0 | python,c,installation | 3,621,206 | 2 | false | 0 | 0 | just put the .d compiled python dll in the same directory as your python script. then you'll be able to import it. | 2 | 4 | 0 | I wrote a Python extension in C, and my python program uses that extension. In order for it to work, I would have to install the extension on the user's system before my program can run. Is there a way to bypass that installation step and somehow just have the extension in my python package? The only compiled part obvi... | Is there a way to package a python extension written in C into a binary so I don't have to python-install it? | 0.099668 | 0 | 0 | 112 |
3,621,111 | 2010-09-01T18:38:00.000 | 0 | 0 | 0 | 0 | python,tkinter,abort | 3,621,138 | 3 | false | 0 | 1 | Why not use threads and stop that? I don't think it's possible to intercept a function call in a single threaded program (if not with some kind of signal or interrupt).
Also, with your specific issue, you might want to introduce a flag and check that in the command. | 2 | 1 | 0 | I have a widget that measures elapsed time, then after a certain duration it does a command. However, if the widget is left I want I want it to abort this function call and not do the command.
How do I go about this? | Is there a way to write a command so that it aborts a running function call? | 0 | 0 | 0 | 88 |
3,621,111 | 2010-09-01T18:38:00.000 | 0 | 0 | 0 | 0 | python,tkinter,abort | 3,621,195 | 3 | false | 0 | 1 | No idea about python threads, but in general the way you interrupt a thread is by having some sort of a threadsafe state object that you can set from the widget, and the logic in thread code to check for the change in state object value and break out of the thread loop. | 2 | 1 | 0 | I have a widget that measures elapsed time, then after a certain duration it does a command. However, if the widget is left I want I want it to abort this function call and not do the command.
How do I go about this? | Is there a way to write a command so that it aborts a running function call? | 0 | 0 | 0 | 88 |
3,621,297 | 2010-09-01T19:07:00.000 | 0 | 1 | 1 | 0 | java,python,static-typing,dynamic-typing | 3,621,365 | 7 | false | 0 | 0 | It's a load off your mind. You can think the color red as "Red" (a constant) as "255, 0, 0" (a tuple) or "#FF0000" (a string): three different formats, that would require three different types, or complex lookup and conversion methods in Java.
It makes code simpler. | 6 | 11 | 0 | I am from Java world and I wonder what is so great about dynamic typing in Python besides missing errors while compiling the code?
Do you like Python's typing? Do you have an example where it helped in a big project? Isn't it a bit error prone? | How to deal with Python ~ static typing? | 0 | 0 | 0 | 2,330 |
3,621,297 | 2010-09-01T19:07:00.000 | 0 | 1 | 1 | 0 | java,python,static-typing,dynamic-typing | 3,621,395 | 7 | false | 0 | 0 | For example, you can write functions
to which you can pass an integer as
well as a string or a list or a
dictionary or whatever else, and it
will be able to transparently handle
all of them in appropriate ways (or
throw an exception if it cannot handle
the type). You can do things like that
in other lan... | 6 | 11 | 0 | I am from Java world and I wonder what is so great about dynamic typing in Python besides missing errors while compiling the code?
Do you like Python's typing? Do you have an example where it helped in a big project? Isn't it a bit error prone? | How to deal with Python ~ static typing? | 0 | 0 | 0 | 2,330 |
3,621,297 | 2010-09-01T19:07:00.000 | 5 | 1 | 1 | 0 | java,python,static-typing,dynamic-typing | 3,621,720 | 7 | false | 0 | 0 | Do you like it in Python?
It's part of Python. Liking it in Python is silly.
Do you have an example where it helped in a big project?
Yes. Every single day I rejoice that I can make changes and -- because of Duck typing -- they are reasonably localized, pass all the unit tests, pass all the integration tests, ... | 6 | 11 | 0 | I am from Java world and I wonder what is so great about dynamic typing in Python besides missing errors while compiling the code?
Do you like Python's typing? Do you have an example where it helped in a big project? Isn't it a bit error prone? | How to deal with Python ~ static typing? | 0.141893 | 0 | 0 | 2,330 |
3,621,297 | 2010-09-01T19:07:00.000 | 2 | 1 | 1 | 0 | java,python,static-typing,dynamic-typing | 3,621,952 | 7 | false | 0 | 0 | A lot of patterns (e.g. from GoF) are unnecessary or can be implemented with less efforts in dynamic-typed languages with functional flavor. In fact, a lot of patterns are "built-in" into python so if you write short and 'pythonic' code you will get all the benefits for free. You don't need Iterator, Observer, Strategy... | 6 | 11 | 0 | I am from Java world and I wonder what is so great about dynamic typing in Python besides missing errors while compiling the code?
Do you like Python's typing? Do you have an example where it helped in a big project? Isn't it a bit error prone? | How to deal with Python ~ static typing? | 0.057081 | 0 | 0 | 2,330 |
3,621,297 | 2010-09-01T19:07:00.000 | 13 | 1 | 1 | 0 | java,python,static-typing,dynamic-typing | 3,621,904 | 7 | false | 0 | 0 | I suspect that the vast majority of non-trivial Java programs have dynamic typing in them.
Every time in Java that you do a cast from Object to an explicit type you are doing dynamic type checking - this includes every use of a collection class before generics were introduced in 1.5. Actually Java generics can still... | 6 | 11 | 0 | I am from Java world and I wonder what is so great about dynamic typing in Python besides missing errors while compiling the code?
Do you like Python's typing? Do you have an example where it helped in a big project? Isn't it a bit error prone? | How to deal with Python ~ static typing? | 1 | 0 | 0 | 2,330 |
3,621,297 | 2010-09-01T19:07:00.000 | 0 | 1 | 1 | 0 | java,python,static-typing,dynamic-typing | 3,621,429 | 7 | false | 0 | 0 | As you're from the Java world, the obvious answer would be that it's great not to be forced to write all that stuff you are forced to write, just to keep Java's type system happy.
Of course, there are other statically type checked languages that don't force you to write all that stuff that Java forces you to write.
Eve... | 6 | 11 | 0 | I am from Java world and I wonder what is so great about dynamic typing in Python besides missing errors while compiling the code?
Do you like Python's typing? Do you have an example where it helped in a big project? Isn't it a bit error prone? | How to deal with Python ~ static typing? | 0 | 0 | 0 | 2,330 |
3,621,463 | 2010-09-01T19:28:00.000 | 4 | 1 | 0 | 0 | python,mercurial,hook,mercurial-hook | 3,621,563 | 3 | false | 0 | 0 | You're right that you want a pretxnchangegroup hook, but you don't want to check all the new revisions -- because people will fix the errors you reject in subsequent changesets but if you're checking all changesets their work will never be accepted!
Instead either just check all files in all the heads, or use the hg st... | 1 | 3 | 0 | I want a mercurial hook that will run JSLint/PyChecker/etc on all files that are modified. However, I do not have control over all hg clients, and want this to run on push to the master repository (which I have control), so a pretxnchangegroup hook on the master seems best.
How can I get a list of all changesets that a... | Get list of changesets in a changegroup (mercurial python hook) | 0.26052 | 0 | 0 | 2,726 |
3,622,165 | 2010-09-01T21:07:00.000 | 4 | 0 | 0 | 1 | python,google-app-engine,version-control | 3,625,552 | 1 | true | 1 | 0 | No, there's no way to get a list of app versions from inside an app. | 1 | 1 | 0 | the title speaks for itself. I play with GAE and some of my apps have versions like (1,2,3,4 and dev). So, is there a way to get all of them, so I could use it in my app to generate links to different versions ? | Is it possible to get a list of all versions of an app? | 1.2 | 0 | 0 | 91 |
3,623,070 | 2010-09-02T00:36:00.000 | 8 | 0 | 0 | 0 | python,css,django,dynamic,django-templates | 3,623,235 | 1 | true | 1 | 0 | The Django templating system can be used for any text you like. It's used for HTML most of the time, but it could also be used to create CSS. The CSS reference in your HTML can be to a dynamic URL instead of to a static file, and the view function can create whatever context you like, then a .css template file can cr... | 1 | 6 | 0 | I'm wondering if there is anything like Django's HTML templating system, for for CSS.. my searches on this aren't turning up anything of use. I am aware of things like SASS and CleverCSS but, as far as I can tell, these still don't solve my issue as I want to dynamically generate a CSS file based on certain conditions,... | CSS Templating system for Django / Python? | 1.2 | 0 | 0 | 995 |
3,623,077 | 2010-09-02T00:38:00.000 | 2 | 0 | 0 | 0 | python,web-applications,firebug,tkinter,urllib2 | 3,623,274 | 1 | false | 1 | 0 | Of course the captcha's served by a page which will serve a new one each time (if it was repeated, then once it was solved for one fake userid, a spammer could automatically make a million!). I think you need some "screenshot" functionality to capture the image you want -- there is no cross-platform way to invoke such... | 1 | 0 | 0 | I am scripting in python for some web automation. I know i can not automate captchas but here is what i want to do:
I want to automate everything i can up to the captcha. When i open the page (usuing urllib2) and parse it to find that it contains a captcha, i want to open the captcha using Tkinter. Now i know that i wi... | Is there a way to save a captcha image and view it later in python? | 0.379949 | 0 | 1 | 1,432 |
3,624,521 | 2010-09-02T07:10:00.000 | 2 | 1 | 0 | 0 | python,apache | 3,624,825 | 3 | false | 0 | 0 | as everyone else said, that's part of SIPVicious, of which I'm the original author. Your server got compromised (somehow) and is being used to scan and compromise PBX servers open on the internet.
I would like more details about your case. Would be great if you could get in contact - sandro@enablesecurity.com
sandro | 1 | 1 | 0 | i found out that my server is getting slower and slower.
on command top i get response that i have a lot svcrack.py and svwar.py processes active.
can you tell me what are those?
thank you in advance! | svcrack.py and svwar.py | 0.132549 | 0 | 0 | 4,163 |
3,626,766 | 2010-09-02T11:47:00.000 | 2 | 0 | 0 | 1 | python,windows-services | 3,626,820 | 2 | false | 0 | 0 | Add in script wait for the resources who script must use is in good standing, or rewrite script to better design like not exit if dont have connection; wait 1s and try again if connection failed. | 1 | 2 | 0 | I am running a Python script as a Windows service, but it seems to be failing whenever I set it to auto-start. I believe this may be because the service uses network resources that are not yet mounted when the service starts. Is there a way I can get it to wait until startup is complete before running? | Python Windows service autostarts too early | 0.197375 | 0 | 0 | 348 |
3,628,454 | 2010-09-02T15:07:00.000 | 2 | 0 | 0 | 0 | python,html,download,urllib | 3,628,497 | 1 | true | 1 | 0 | If you're getting back a thank you page, the URL to the file is likely to be in there somewhere. Look for <meta http-equiv="refresh"> or JavaScript redirects. Ctrl+F'ing the page for the file name might also help.
Some sites may have extra protection in, so if you can't figure it out, post a link to the site, just in c... | 1 | 1 | 0 | I have a form which when submitted by a user redirects to a thank you page and the file chosen for download begins to download.
How can I save this file using python? I can use python's urllib.urlopen to open the url to post to but the html returned is the thank you page, which I suspected it would be. Is there a solut... | Python - How do I save a file delivered from html? | 1.2 | 0 | 1 | 383 |
3,628,847 | 2010-09-02T15:54:00.000 | 1 | 1 | 1 | 1 | python,eclipse,wing-ide | 9,213,010 | 2 | false | 0 | 0 | I've added an experimental one in version 4.1.3 | 2 | 1 | 0 | While PyDev turns out to be a great IDE for python, especially if you are a former Java developer accustomed to all the eclipse ubercool navigation, it still lacks some features that Wing has, like GUI for running python unit-tests.
I know Wing has some "personalities" of other editors: vi, emacs, Visual Studio, ...
Un... | Is there an Eclipse personality settings for Wing IDE? | 0.099668 | 0 | 0 | 139 |
3,628,847 | 2010-09-02T15:54:00.000 | 0 | 1 | 1 | 1 | python,eclipse,wing-ide | 3,629,793 | 2 | true | 0 | 0 | Unfortunately, there's no Eclipse personality. | 2 | 1 | 0 | While PyDev turns out to be a great IDE for python, especially if you are a former Java developer accustomed to all the eclipse ubercool navigation, it still lacks some features that Wing has, like GUI for running python unit-tests.
I know Wing has some "personalities" of other editors: vi, emacs, Visual Studio, ...
Un... | Is there an Eclipse personality settings for Wing IDE? | 1.2 | 0 | 0 | 139 |
3,629,088 | 2010-09-02T16:22:00.000 | -1 | 1 | 1 | 0 | python,multithreading,twisted | 3,629,349 | 4 | false | 0 | 0 | A word of caution with twisted, while twisted is very robust I've found that spinning up a hundred threads using the code examples available in documentation is a recipe for race conditions and deadlocks. My suggestion is try twisted but have the stdlib multithreading module waiting in the wings if twisted becomes unma... | 2 | 6 | 0 | I need to pull from hundreds of pop3 email accounts, and i want to build a robust server to do this.
Would twisted be a good choice for this type of project?
Right now a simple prototype would be to pull from a single pop3 account, then it would pull from many but it would be a serialized process.
I want to create a se... | Would twisted be a good choice for building a multi-threaded server? | -0.049958 | 0 | 0 | 2,134 |
3,629,088 | 2010-09-02T16:22:00.000 | 0 | 1 | 1 | 0 | python,multithreading,twisted | 3,629,187 | 4 | false | 0 | 0 | It is a good choice for a server but from your description you are acutally looking for a multithreaded POP client.
Twisted is made for reacting to events like incoming requests, you need to send requests, so in this case I fear twisted to be of limited value. | 2 | 6 | 0 | I need to pull from hundreds of pop3 email accounts, and i want to build a robust server to do this.
Would twisted be a good choice for this type of project?
Right now a simple prototype would be to pull from a single pop3 account, then it would pull from many but it would be a serialized process.
I want to create a se... | Would twisted be a good choice for building a multi-threaded server? | 0 | 0 | 0 | 2,134 |
3,630,664 | 2010-09-02T19:49:00.000 | -2 | 0 | 0 | 0 | python,binding,widget,tkinter,global | 3,630,691 | 4 | false | 0 | 1 | If you have a list that contains all your widgets, you could iterate over them and assign the events. | 2 | 7 | 0 | Is it possible to bind all widgets to one command, with a single line? It would be nice if I could type in one line as opposed to doing each widget individually. | Tkinter Global Binding | -0.099668 | 0 | 0 | 9,705 |
3,630,664 | 2010-09-02T19:49:00.000 | -3 | 0 | 0 | 0 | python,binding,widget,tkinter,global | 3,630,962 | 4 | false | 0 | 1 | You could also just define a function that calls on all your widgets, and call that function. Or better yet create a class that call on your widgets in init and import the class... | 2 | 7 | 0 | Is it possible to bind all widgets to one command, with a single line? It would be nice if I could type in one line as opposed to doing each widget individually. | Tkinter Global Binding | -0.148885 | 0 | 0 | 9,705 |
3,630,774 | 2010-09-02T20:05:00.000 | 78 | 0 | 0 | 0 | python,logging | 3,630,800 | 5 | true | 0 | 0 | logger.handlers contains a list with all handlers of a logger. | 1 | 70 | 0 | How can I remove / inspect / modify handlers configured for my loggers using the fileConfig() function?
For removing there is Logger.removeHandler(hdlr) method, but how do I get the handler in first place if it was configured from file? | logging remove / inspect / modify handlers configured by fileConfig() | 1.2 | 0 | 1 | 46,204 |
3,630,982 | 2010-09-02T20:30:00.000 | 3 | 0 | 1 | 0 | python,regex | 3,630,994 | 5 | false | 0 | 0 | (ABC){5} Should work for you | 2 | 25 | 0 | Is there a way using a regex to match a repeating set of characters? For example:
ABCABCABCABCABC
ABC{5}
I know that's wrong. But is there anything to match that effect?
Update:
Can you use nested capture groups? So Something like (?<cap>(ABC){5}) ? | repeating multiple characters regex | 0.119427 | 0 | 0 | 52,017 |
3,630,982 | 2010-09-02T20:30:00.000 | 5 | 0 | 1 | 0 | python,regex | 3,631,077 | 5 | false | 0 | 0 | ABC{5} matches ABCCCCC. To match 5 ABC's, you should use (ABC){5}. Parentheses are used to group a set of characters. You can also set an interval for occurrences like (ABC){3,5} which matches ABCABCABC, ABCABCABCABC, and ABCABCABCABCABC.
(ABC){1,} means 1 or more repetition which is exactly the same as (ABC)+.
(ABC){... | 2 | 25 | 0 | Is there a way using a regex to match a repeating set of characters? For example:
ABCABCABCABCABC
ABC{5}
I know that's wrong. But is there anything to match that effect?
Update:
Can you use nested capture groups? So Something like (?<cap>(ABC){5}) ? | repeating multiple characters regex | 0.197375 | 0 | 0 | 52,017 |
3,631,828 | 2010-09-02T22:39:00.000 | -1 | 1 | 1 | 0 | python,tweepy | 3,631,888 | 2 | false | 0 | 0 | Update: The comments below have some solid points against this technique.
2) What OS are you running? Generally, there is a symlink somewhere in your system, which points from 'python' to 'pythonx.x', where x.x is the version number preferred by your operating system. On Linux, there is a symlink /usr/bin/python, whic... | 1 | 0 | 0 | I am attempting to use the tweepy api to make a twitter function and I have two issues.
I have little experience with the terminal and Python in general.
1) It installed properly with Python 2.6, however I can't use it or install it with Python 3.1. When I attempt to install the module in 3.1 it gives me an error tha... | Python defaults and using tweepy api | -0.099668 | 0 | 1 | 1,565 |
3,632,046 | 2010-09-02T23:33:00.000 | 1 | 0 | 1 | 0 | python,import,zip | 3,632,086 | 1 | true | 0 | 0 | Just insert the whole path to the zipfile, c:/what/ever/itis.zip, in your sys.path, and import themodule (assuming it's at the top "level" of the zipfile's simulated directory-tree structure). | 1 | 0 | 0 | There is a module I'd love to download, but it is only available in a zip file, how do I get such a file to work properly in python, so That I can import what I want?
This is in Windows 7 BTW. | Getting modules from a zip file? | 1.2 | 0 | 0 | 112 |
3,632,537 | 2010-09-03T01:47:00.000 | 0 | 0 | 0 | 0 | django,mod-python | 3,632,574 | 2 | false | 1 | 0 | It loads Django once per httpd process. Since multiple processes start (each child being a process), multiple instances of Django are started. | 2 | 1 | 0 | My understanding is that mod_python loads the python process into apache, avoiding the overhead of doing that on each call. My expectation was that this would mean that my django stack would also only be loaded once.
What I am observing, however, is that every request is running the entire django stack from the beginn... | Why is mod_python running entire django stack from beginning with each request? | 0 | 0 | 0 | 68 |
3,632,537 | 2010-09-03T01:47:00.000 | 2 | 0 | 0 | 0 | django,mod-python | 3,632,878 | 2 | true | 1 | 0 | Apache on UNIX systems is a multiprocess system as pointed out by someone else. Also make sure the MaxRequestsPerChild hasn't been set to be 1 in Apache configuration for some reason. Ideally that directive should be set to 0, meaning keep processes around and not recycle them based on number of requests. | 2 | 1 | 0 | My understanding is that mod_python loads the python process into apache, avoiding the overhead of doing that on each call. My expectation was that this would mean that my django stack would also only be loaded once.
What I am observing, however, is that every request is running the entire django stack from the beginn... | Why is mod_python running entire django stack from beginning with each request? | 1.2 | 0 | 0 | 68 |
3,636,286 | 2010-09-03T13:38:00.000 | 1 | 0 | 0 | 0 | python,django,postgresql,encryption | 3,636,320 | 4 | true | 1 | 0 | What are you protecting against? If attacker would get access to your DB/filesystem, he would find how you decrypt data & keys. Hiding your encription key is not an easy task (and rarely implemented in "usual" applications).
I would spend more time on protecting the server and fixing all general security issues. | 1 | 22 | 0 | I'm going to be storing a few sensitive pieces of information (SSN, Bank Accounts, etc) so they'll obviously need to be encrypted. What strategies do you recommend?
Should I do all the encryption/decryption in the web app itself? Should I use something like pgcrypto and have the conversions done on the DB side? Some... | Strategies for Encryption with Django + Postgres? | 1.2 | 0 | 0 | 14,180 |
3,637,503 | 2010-09-03T15:59:00.000 | 1 | 1 | 0 | 1 | python,ruby-on-rails,ruby,django,shell | 3,637,544 | 7 | false | 1 | 0 | I'm not sure if it's what you want, but there are some web based ssh clients out there. If you care about security and really just want dynamic feedback, you could look into comet or just have a frame with its own http session that doesn't end until it's done printing. | 1 | 8 | 0 | Imagine a web application that allows a logged in user to run a shell command on the web server at the press of a button. This is relatively simple in most languages via some standard library os tools.
But if that command is long running you don't want your UI to hang. Again this is relatively easy to deal with using s... | What is the best way of running shell commands from a web based interface? | 0.028564 | 0 | 0 | 4,016 |
3,637,579 | 2010-09-03T16:11:00.000 | 1 | 0 | 0 | 0 | python,web-services,dynamics-crm,dynamics-crm-4 | 3,639,310 | 1 | true | 1 | 0 | Catch SoapException and take a look at Detail property. You'll find everything about the error in there. | 1 | 0 | 0 | What is the best way to trap errors/exceptions with the CRM 4 Web service. Is there a way to get more detailed error messages from the web service? There is a custom application that creates orders and when the get a error message from the web service it is not very details or useful. Is there a better way to get mo... | Error Handling CRM 4 Webservice | 1.2 | 0 | 0 | 211 |
3,637,681 | 2010-09-03T16:26:00.000 | 0 | 0 | 0 | 0 | javascript,python | 3,637,740 | 2 | false | 1 | 0 | How does the search page work? If it loads anything using Ajax, you could do some basic reverse engineering and find the URLs involved using Firebug's Net panel or Wireshark and then use urllib2 to load those.
If it's more complicated than that, you could simulate the actions JS performs manually without loading and in... | 1 | 0 | 0 | I'm using Python to parse an auction site.
If I use browser to open this site, it will go to a loading page, then jump to the search result page automatically.
If I use urllib2 to open the webpage, the read() method only return the loading page.
Is there any python package could wait until all contents are loaded then ... | How to parse a web use javascript to load .html by Python? | 0 | 0 | 1 | 862 |
3,639,639 | 2010-09-03T21:18:00.000 | 3 | 0 | 0 | 0 | python,import,dataset,spss | 21,390,123 | 7 | false | 0 | 0 | Option 1
As rkbarney pointed out, there is the Python savReaderWriter available via pypi. I've run into two issues:
It relies on a lot of extra libraries beyond the seemingly pure-python implementation. SPSS files are read and written in nearly every case by the IBM provided SPSS I/O modules. These modules differ b... | 3 | 6 | 1 | Is there any way to import SPSS dataset into Python, preferably NumPy recarray format?
I have looked around but could not find any answer.
Joon | Importing SPSS dataset into Python | 0.085505 | 0 | 0 | 9,605 |
3,639,639 | 2010-09-03T21:18:00.000 | 1 | 0 | 0 | 0 | python,import,dataset,spss | 3,691,267 | 7 | false | 0 | 0 | To be clear, the SPSS ODBC driver does not require an SPSS installation. | 3 | 6 | 1 | Is there any way to import SPSS dataset into Python, preferably NumPy recarray format?
I have looked around but could not find any answer.
Joon | Importing SPSS dataset into Python | 0.028564 | 0 | 0 | 9,605 |
3,639,639 | 2010-09-03T21:18:00.000 | 3 | 0 | 0 | 0 | python,import,dataset,spss | 3,640,019 | 7 | false | 0 | 0 | SPSS has an extensive integration with Python, but that is meant to be used with SPSS (now known as IBM SPSS Statistics). There is an SPSS ODBC driver that could be used with Python ODBC support to read a sav file. | 3 | 6 | 1 | Is there any way to import SPSS dataset into Python, preferably NumPy recarray format?
I have looked around but could not find any answer.
Joon | Importing SPSS dataset into Python | 0.085505 | 0 | 0 | 9,605 |
3,640,092 | 2010-09-03T22:51:00.000 | 1 | 0 | 0 | 1 | python,ctypes | 3,640,616 | 2 | false | 0 | 0 | Be aware that the operating system is going to be doing readahead for read() anyway. You're going to be blocking either in read() or write()--one or the other will bottleneck the operation--but even though you're blocking in one, that doesn't mean the other isn't taking place for you behind the scenes. That's the job... | 1 | 12 | 0 | I am wondering if it is possible for the ctypes package to interface with mmap.
Currently, my module allocates a buffer (with create_string_buffer) and then passes that using byref to my libraries mylib.read function. This, as the name suggests, reads data into the buffer. I then call file.write(buf.raw) to write the d... | Python, ctypes and mmap | 0.099668 | 0 | 0 | 3,930 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.