Q_Id int64 2.93k 49.7M | CreationDate stringlengths 23 23 | Users Score int64 -10 437 | Other int64 0 1 | Python Basics and Environment int64 0 1 | System Administration and DevOps int64 0 1 | DISCREPANCY int64 0 1 | Tags stringlengths 6 90 | ERRORS int64 0 1 | A_Id int64 2.98k 72.5M | API_CHANGE int64 0 1 | AnswerCount int64 1 42 | REVIEW int64 0 1 | is_accepted bool 2
classes | Web Development int64 0 1 | GUI and Desktop Applications int64 0 1 | Answer stringlengths 15 5.1k | Available Count int64 1 17 | Q_Score int64 0 3.67k | Data Science and Machine Learning int64 0 1 | DOCUMENTATION int64 0 1 | Question stringlengths 25 6.53k | Title stringlengths 11 148 | CONCEPTUAL int64 0 1 | Score float64 -1 1.2 | API_USAGE int64 1 1 | Database and SQL int64 0 1 | Networking and APIs int64 0 1 | ViewCount int64 15 3.72M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2,322,868 | 2010-02-24T00:34:00.000 | 3 | 0 | 1 | 0 | 0 | python,python-2.6,python-2.x | 0 | 2,322,892 | 0 | 3 | 0 | false | 0 | 0 | As the other people say, just ask for input to get it to hold. However, I would recommend running your Python scripts in a different manner in Windows. Using the IDLE IDE (should have come with your distribution), just open the script you want to run and press F5. Then, not only can you see the output for as long as yo... | 3 | 3 | 0 | 0 | I'm new to programming, especially Python. I'm trying to make an application that converts Fahrenheit to Celsius, but I don't know how to make the program stay open. Whenever it reaches the end of the code, it automatically closes before the user can see his or her results. I'm using Python 2.6. | How do I prevent my Python application from automatically closing once reaching the end of code? | 0 | 0.197375 | 1 | 0 | 0 | 25,629 |
2,322,868 | 2010-02-24T00:34:00.000 | 0 | 0 | 1 | 0 | 0 | python,python-2.6,python-2.x | 0 | 2,322,884 | 0 | 3 | 0 | false | 0 | 0 | ask user to enter one more variable and print "Press enter to exit..." | 3 | 3 | 0 | 0 | I'm new to programming, especially Python. I'm trying to make an application that converts Fahrenheit to Celsius, but I don't know how to make the program stay open. Whenever it reaches the end of the code, it automatically closes before the user can see his or her results. I'm using Python 2.6. | How do I prevent my Python application from automatically closing once reaching the end of code? | 0 | 0 | 1 | 0 | 0 | 25,629 |
2,322,868 | 2010-02-24T00:34:00.000 | 10 | 0 | 1 | 0 | 0 | python,python-2.6,python-2.x | 0 | 2,322,878 | 0 | 3 | 0 | false | 0 | 0 | Well, I guess you mean the terminal that Windows opens for you when you run a python file is closed too fast. You can add raw_input('Press Enter to exit') right before your program would exit. It tells Python to wait for input before exiting. | 3 | 3 | 0 | 0 | I'm new to programming, especially Python. I'm trying to make an application that converts Fahrenheit to Celsius, but I don't know how to make the program stay open. Whenever it reaches the end of the code, it automatically closes before the user can see his or her results. I'm using Python 2.6. | How do I prevent my Python application from automatically closing once reaching the end of code? | 0 | 1 | 1 | 0 | 0 | 25,629 |
2,323,371 | 2010-02-24T02:59:00.000 | 1 | 0 | 0 | 0 | 1 | python,django,actionscript-3 | 1 | 2,323,428 | 0 | 1 | 0 | true | 1 | 0 | I've used firebug to debug the flex side of things. But I've been using json or XML for communication between the two. Since flash uses the browser to do the network stuff, the request should be visible in the net tab of firebug.
To debug the django side of things, you have a few options.
If you're using the django de... | 1 | 0 | 0 | 0 | I love django, and I like flex. Django for it's cool debugging system (those yellow pages helps a lot to find bugs in my code), and flex for it possibilities.
Recently I come across a problem. If I create a form in flex and then communicate with the django server, I can't see any debugging info (when the exception happ... | django+flex: Debugging strategies | 1 | 1.2 | 1 | 0 | 0 | 111 |
2,328,230 | 2010-02-24T17:53:00.000 | 0 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,658 | 0 | 12 | 0 | false | 0 | 0 | Charlie, being a new hire and all, you shouldn't really decide on which technology to code the project. This is a management decision.
In fact, even though team skill can be used to determine the technology of choice for one or other project, there are many other, more important, things to take into account.
Which te... | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 0 | 0 | 1 | 0 | 0 | java,python | 0 | 3,258,221 | 0 | 12 | 0 | false | 0 | 0 | My personal preference is to learn new languages on personal projects, and use tools I already understand on professional projects. So if it was me, I'd do the project in Java, and do a few little Python projects at home.
But of course, you learn a lot more a lot faster when you are using a new language "for real" for... | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 1 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,518 | 0 | 12 | 0 | false | 0 | 0 | Generally, if I'm not familiar with a language, I allow at least a month to get somewhat comfortable with it. Two or three months if it's outside my "comfort zone" of C-like languages. Having said that, I think Java and Python are similar enough that you might trim that a bit.
Also, based on your own history, how goo... | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0.016665 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 1 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,430 | 0 | 12 | 0 | false | 0 | 0 | I'd say if you want to avoid possible headaches, do it in Java and learn Python at home, by trying to re-create a similar application to the one you do at work, if you want something which feels real. It's likely that if you arent familiar with Python you arent going to take advantage of its capabilities anyway. Once I... | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0.016665 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 5 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,250 | 0 | 12 | 0 | false | 0 | 0 | My boss's rule of thumb is any time there's a learning curve, it can triple the time to write the application. So, if Java would take you two weeks, then Python may take about 6. | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0.083141 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 7 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,364 | 0 | 12 | 0 | false | 0 | 0 | You have roughly 5 weeks to complete the project. If you're confident the Java version would take 2 weeks, that leaves 3 weeks to flail around with the Python version until you have to give up. I say go for it. Python is relatively easy to pick up. I think three weeks of work is enough to time to know whether you c... | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 1 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 4 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,292 | 0 | 12 | 0 | false | 0 | 0 | It always take longer than you think.
Try writing a small program doing just a bit of what you need. If you are to write a program with a GUI then make small program showing a frame with Hello World and an Ok-button and see how hard that is. | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0.066568 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 0 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,316 | 0 | 12 | 0 | false | 0 | 0 | Are you just programming or are you designing/architecting?
If you are coding according to a design that an experienced Python resource has layed-out then I'd give myself 3-4 times as long since you've described this as a small, fairly simple project.
If you are designing/architecting this yourself then you're taking... | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 2 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,426 | 0 | 12 | 0 | false | 0 | 0 | If you Google for "Pythonic", you'll find a lot of discussion about how to do things in ways that fit well in Python, will be easy to understand by other Python users, and so on. It always takes a while to progress from code that simply works in a language to using that language well -- and in the case of Python, that ... | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0.033321 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 3 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,275 | 0 | 12 | 0 | false | 0 | 0 | Python is like baby java, you'll pick it up in a breeze. | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0.049958 | 1 | 0 | 0 | 670 |
2,328,230 | 2010-02-24T17:53:00.000 | 2 | 0 | 1 | 0 | 0 | java,python | 0 | 2,328,330 | 0 | 12 | 0 | false | 0 | 0 | Well I would say how fast you pick up Python also depends on what other languages you know(or comfortable) apart from Java. If the only language you know is Java then I don't think the switch from Java to Python would be intuitive or smooth. To start with Java is statically typed and Python is dynamically typed, and it... | 11 | 13 | 0 | 0 | I'm a relatively new hire, and I'm starting on a small, fairly simple project. The language that this project will be implemented in is still to be determined. The question basically boils down to - Java or Python?
Here's the dilemma: My manager would prefer it to be done in Python. I don't object to that, but I have ... | How much leeway do I have to leave myself to learn a new language? | 0 | 0.033321 | 1 | 0 | 0 | 670 |
2,330,393 | 2010-02-24T23:11:00.000 | 3 | 0 | 1 | 0 | 0 | python,macos,title,menubar | 0 | 2,330,448 | 0 | 2 | 0 | false | 0 | 0 | Since your program is interpreted by Python, then what actually is run is Python itself - the interpreter program. You would have to have your Python script merged with Python into a single executable and that would be able to have a separate name. For windows there is py2exe, that does that, but I have no idea if ther... | 1 | 9 | 0 | 0 | I have been building a large python program for a while, and would like to know how I would go about setting the title of the program? On a mac the title of program, which has focus, is shown in the top left corner of the screen, next the apple menu. Currently this only shows the word "Python", but I would of course li... | How to set the program title in python | 0 | 0.291313 | 1 | 0 | 0 | 12,479 |
2,330,857 | 2010-02-25T01:00:00.000 | 0 | 1 | 0 | 0 | 0 | python | 0 | 2,330,884 | 0 | 3 | 1 | false | 0 | 0 | For a simple-to-code method, I suggest using ast.parse() or eval() to create a dictionary from your string, and then accessing the fields as usual. The difference between the two functions above is that ast.parse can only evaluate base types, and is therefore more secure if someone can give you a string that could cont... | 1 | 1 | 0 | 0 | i have a string
'''
{"session_key":"3.KbRiifBOxY_0ouPag6__.3600.1267063200-16423986","uid":164
23386,"expires":12673200,"secret":"sm7WM_rRtjzXeOT_jDoQ__","sig":"6a6aeb66
64a1679bbeed4282154b35"}
'''
how to get the value .
thanks | which is the best way to get the value of 'session_key','uid','expires' | 0 | 0 | 1 | 0 | 1 | 115 |
2,345,607 | 2010-02-26T23:57:00.000 | 0 | 0 | 1 | 1 | 0 | python,windows,python-idle | 1 | 29,289,580 | 0 | 7 | 0 | false | 0 | 0 | Just add IDLE's path to your PATH environment variable.
For example I created an environment variable called IDLE_PATH and set the value to C:\Python27\Lib\idlelib
Then in my PATH variable I added ;%IDLE_PATH%; and open a new cmd prompt or in console2 just open a new tab and run idle <file_name> to open the file, you w... | 2 | 10 | 0 | 0 | I've tried many variations of this command: idle.py -e filepath, but it simply starts IDLE like normal, not opening any extra windows for editing, and not throwing any errors.
So how can I do the equivalent of opening IDLE, file>open>filepath via the command line (or perhaps even a Python module)? | starting Python IDLE from command line to edit scripts | 1 | 0 | 1 | 0 | 0 | 58,831 |
2,345,607 | 2010-02-26T23:57:00.000 | 2 | 0 | 1 | 1 | 0 | python,windows,python-idle | 1 | 39,559,184 | 0 | 7 | 0 | false | 0 | 0 | first make sure you have location of idle in path
I am using "python3.5".So mine looks like this:
C:\Program Files\Python35\Lib\idlelib.Yours may differ.
use this following command:idle -r file_name.py to run the file
or just idle file_name.py to edit
or start idle -r file_name.py ^&exit | 2 | 10 | 0 | 0 | I've tried many variations of this command: idle.py -e filepath, but it simply starts IDLE like normal, not opening any extra windows for editing, and not throwing any errors.
So how can I do the equivalent of opening IDLE, file>open>filepath via the command line (or perhaps even a Python module)? | starting Python IDLE from command line to edit scripts | 1 | 0.057081 | 1 | 0 | 0 | 58,831 |
2,352,342 | 2010-02-28T19:35:00.000 | 8 | 0 | 1 | 0 | 0 | c++,python,dictionary,hashmap,tr1 | 0 | 2,352,356 | 0 | 1 | 0 | true | 0 | 0 | Keys in all C++ map/set containers are const and thus immutable (after added to the container).
Notice that C++ containers are not specific to string keys, you can use any objects, but the constness will prevent modifications after the key is copied to the container. | 1 | 9 | 0 | 0 | I have a question related to understanding of how python dictionaries work.
I remember reading somewhere strings in python are immutable to allow hashing, and it is the same reason why one cannot directly use lists as keys, i.e. the lists are mutable (by supporting .append) and hence they cannot be used as dictionary ... | The difference between python dict and tr1::unordered_map in C++ | 1 | 1.2 | 1 | 0 | 0 | 1,825 |
2,353,963 | 2010-03-01T05:02:00.000 | 1 | 0 | 0 | 1 | 0 | python,winapi | 0 | 2,354,011 | 0 | 6 | 0 | false | 0 | 0 | Find out how to do what you want using commands (on the command line) and script these commands instead. | 2 | 13 | 0 | 0 | I want to make a Python script that automates the process of setting up a VPN server in Windows XP, but the only way I know how to do it is using the Windows GUI dialogs. How would I go about figuring out what those dialogs are doing to the system and designing a Python script to automate it? | Automate Windows GUI operations with Python | 0 | 0.033321 | 1 | 0 | 0 | 13,254 |
2,353,963 | 2010-03-01T05:02:00.000 | 0 | 0 | 0 | 1 | 0 | python,winapi | 0 | 26,197,899 | 0 | 6 | 0 | false | 0 | 0 | PyAutoGUI can be installed with pip from PyPI. It's cross platform and can control the mouse & keyboard. It has the features of pywinauto and a few more on top. It can't identify windows or GUI controls, but it does have basic screenshot & image recognition features to click on particular buttons. And it's well-documen... | 2 | 13 | 0 | 0 | I want to make a Python script that automates the process of setting up a VPN server in Windows XP, but the only way I know how to do it is using the Windows GUI dialogs. How would I go about figuring out what those dialogs are doing to the system and designing a Python script to automate it? | Automate Windows GUI operations with Python | 0 | 0 | 1 | 0 | 0 | 13,254 |
2,359,994 | 2010-03-01T23:49:00.000 | 0 | 1 | 0 | 0 | 0 | python,xcode | 0 | 2,360,880 | 0 | 4 | 0 | false | 0 | 0 | A lot of people like eclipse with PyDev for python, although I don't know how wel it works on OS X with apple's mishandling of java. | 2 | 3 | 0 | 0 | Could anyone tell me how to use pure Python without Cocoa support in Xcode? I can only find the Cocoa-Python template on the Internet.
Thanks in advance. | Pure Python in Xcode? | 0 | 0 | 1 | 0 | 0 | 4,138 |
2,359,994 | 2010-03-01T23:49:00.000 | 0 | 1 | 0 | 0 | 0 | python,xcode | 0 | 2,360,692 | 0 | 4 | 0 | false | 0 | 0 | Just about the best IDE for editing and running Python code is actually still emacs. The python-mode for emacs does a wonderful job of maintaining whitespace and, with a bit of configuration, emacs is truly a powerful editor.
Pretty radically different than your typical GUI editor, certainly, and some find it quite di... | 2 | 3 | 0 | 0 | Could anyone tell me how to use pure Python without Cocoa support in Xcode? I can only find the Cocoa-Python template on the Internet.
Thanks in advance. | Pure Python in Xcode? | 0 | 0 | 1 | 0 | 0 | 4,138 |
2,373,446 | 2010-03-03T17:22:00.000 | 0 | 1 | 0 | 0 | 0 | python,django,unit-testing,automated-tests,windmill | 0 | 2,468,981 | 0 | 1 | 0 | false | 1 | 0 | Ok, so couldn't find out how to do this so I'm running the website under Apache and using the windmill standard jstests parameter to run the Javascript tests against this. | 1 | 0 | 0 | 0 | I'm using the Windmill test system and have it running using test_windmill for Django which works fine for the Python tests. I'd like this to run a suite of Javascript tests also whilst the Django test server is running. I've used the run_js_tests call from the Windmill shell which works fine but I can't find a way to ... | How do I run Javascript tests in Windmill when using test_windmill for Django? | 0 | 0 | 1 | 0 | 0 | 354 |
2,374,233 | 2010-03-03T19:18:00.000 | 3 | 1 | 0 | 0 | 0 | python,c,64-bit,porting,psyco | 0 | 3,738,027 | 0 | 4 | 0 | false | 0 | 0 | Psyco assumes that sizeof(int) == sizeof(void*) a bit all over the place. That's much harder than just writing down 64bit calling conventions and assembler. On the sidenote, pypy has 64bit jit support these days.
Cheers,
fijal | 2 | 10 | 0 | 0 | The Psyco docs say:
Just for reference, Psyco does not
work on any 64-bit systems at all.
This fact is worth being noted again,
now that the latest Mac OS/X 10.6
"Snow Leopart" comes with a default
Python that is 64-bit on 64-bit
machines. The only way to use Psyco on
OS/X 10.6 is by recompiling a custom... | What are the possible pitfalls in porting Psyco to 64-bit? | 0 | 0.148885 | 1 | 0 | 0 | 1,103 |
2,374,233 | 2010-03-03T19:18:00.000 | 3 | 1 | 0 | 0 | 0 | python,c,64-bit,porting,psyco | 0 | 2,374,371 | 0 | 4 | 0 | true | 0 | 0 | Since psyco is a compiler, it would need to be aware of the underlying assembly language to generate useful code. That would mean it would need to know about the 8 new registers, new opcodes for 64 bit code, etc.
Furthermore, to interop with the existing code, it would need to use the same calling conventions as 64 ... | 2 | 10 | 0 | 0 | The Psyco docs say:
Just for reference, Psyco does not
work on any 64-bit systems at all.
This fact is worth being noted again,
now that the latest Mac OS/X 10.6
"Snow Leopart" comes with a default
Python that is 64-bit on 64-bit
machines. The only way to use Psyco on
OS/X 10.6 is by recompiling a custom... | What are the possible pitfalls in porting Psyco to 64-bit? | 0 | 1.2 | 1 | 0 | 0 | 1,103 |
2,375,125 | 2010-03-03T21:30:00.000 | 1 | 1 | 0 | 1 | 0 | python,linux,fonts,debian,python-imaging-library | 0 | 2,375,489 | 0 | 2 | 0 | false | 0 | 0 | you best bet is to do a find on all the fonts on the system, and then use ImagesFont.load() on the results of that list. I don't know where the fonts are on Debian, but they should be in a well known folder you can just do an os.walk and then feed the filenames in that way. | 2 | 4 | 0 | 0 | I'm looking for a way to list all fonts installed on a linux/Debian system, and then generate images of some strings using these fonts. I'm looking for your advice as I kind of see how to do each part, but not to do both:
To list all fonts on a UNIX system, xlsfonts can do the trick:
import os
list_of_fonts=os.popen("... | Generate image for each font on a linux system using Python | 0 | 0.099668 | 1 | 0 | 0 | 894 |
2,375,125 | 2010-03-03T21:30:00.000 | 1 | 1 | 0 | 1 | 0 | python,linux,fonts,debian,python-imaging-library | 0 | 2,375,457 | 0 | 2 | 0 | true | 0 | 0 | You can do this using pango, through the pygtk package. Pango can list fonts and render them. | 2 | 4 | 0 | 0 | I'm looking for a way to list all fonts installed on a linux/Debian system, and then generate images of some strings using these fonts. I'm looking for your advice as I kind of see how to do each part, but not to do both:
To list all fonts on a UNIX system, xlsfonts can do the trick:
import os
list_of_fonts=os.popen("... | Generate image for each font on a linux system using Python | 0 | 1.2 | 1 | 0 | 0 | 894 |
2,376,355 | 2010-03-04T01:40:00.000 | 0 | 0 | 1 | 0 | 0 | python,math,finance | 0 | 2,427,737 | 0 | 2 | 0 | true | 0 | 0 | Thanks for the assistance even though my requirements were a bit vague. After consulting someone who is extremely versed in financial mathematics, I determined that a simple formula was not an appropriate solution.
What I ended up doing is "exploding" the months into the component days using xrange() and iterating ove... | 1 | 0 | 0 | 0 | (I asked this question earlier today, but I did a poor job of explaining myself. Let me try again)
I have a client who is an industrial maintenance company. They sell service agreements that are prepaid 20 hour blocks of a technician's time. Some of their larger customers might burn through that agreement in two weeks... | Python and a "time value of money" problem | 0 | 1.2 | 1 | 0 | 0 | 987 |
2,386,421 | 2010-03-05T11:48:00.000 | 0 | 0 | 1 | 0 | 0 | python,pep | 0 | 2,386,453 | 0 | 7 | 0 | false | 0 | 0 | Either add it to the tracker, or join the developer mailing list and suggest it there. Better to do that if you feel you can contribute at least to developing the specification, if not the feature itself. | 3 | 9 | 0 | 0 | Suppose I think I have a great idea for some feature that should be in python's standard library.
Not something of the magnitude of a new keyword etc, just a suggestion for another decorator that would help a lot, IMO.
How can I suggest such a feature to the consideration of the "python committee :)"? | how can I make a suggestion for a new feature in python | 0 | 0 | 1 | 0 | 0 | 1,127 |
2,386,421 | 2010-03-05T11:48:00.000 | 0 | 0 | 1 | 0 | 0 | python,pep | 0 | 2,386,461 | 0 | 7 | 0 | false | 0 | 0 | An alternative to the issue tracker suggested by mpalcona: you can submit it for discussion on the python-dev mailing list.
And always, a reference implementation (something that works, even if not in all cases and not efficiently) is always welcomed. | 3 | 9 | 0 | 0 | Suppose I think I have a great idea for some feature that should be in python's standard library.
Not something of the magnitude of a new keyword etc, just a suggestion for another decorator that would help a lot, IMO.
How can I suggest such a feature to the consideration of the "python committee :)"? | how can I make a suggestion for a new feature in python | 0 | 0 | 1 | 0 | 0 | 1,127 |
2,386,421 | 2010-03-05T11:48:00.000 | 0 | 0 | 1 | 0 | 0 | python,pep | 0 | 2,387,822 | 0 | 7 | 0 | false | 0 | 0 | Don't waste time "suggesting" things. Invest time doing things.
Simply do this.
Build it.
Use it.
Post it to SourceForge.
Put a link to the SourceForge project on PyPi.
Done.
If it's actually a "great" idea, then everyone will use it and someone will recommend adding it to the standard library.
If it's not a "great"... | 3 | 9 | 0 | 0 | Suppose I think I have a great idea for some feature that should be in python's standard library.
Not something of the magnitude of a new keyword etc, just a suggestion for another decorator that would help a lot, IMO.
How can I suggest such a feature to the consideration of the "python committee :)"? | how can I make a suggestion for a new feature in python | 0 | 0 | 1 | 0 | 0 | 1,127 |
2,392,949 | 2010-03-06T15:20:00.000 | 0 | 1 | 0 | 0 | 0 | .net,python,active-directory,directoryservices | 0 | 14,938,596 | 0 | 2 | 0 | false | 0 | 0 | The problem with some of these properties is that you can see them on the UI via Active Directory Users and Computers, but you cannot set them (or see them) via ADSI Editor.
Usually, for properties that aren't directly available from a DirectoryEntry object, you can use its Properties collection as described by Tim Ro... | 1 | 0 | 0 | 0 | I need to set properties related to Remote Desktop Services on Active Directory users in .NET (i.e., via System.DirectoryServices), but I can't see that these properties are exposed by the API? I know there is a COM interface for this purpose, IADsTSUserEx. Please show me how I can get at these properties in .NET :) Be... | How do I change Remote Desktop Services properties of AD users in .NET? | 0 | 0 | 1 | 0 | 0 | 2,366 |
2,401,789 | 2010-03-08T14:03:00.000 | 0 | 1 | 0 | 0 | 0 | python,unit-testing,aop | 0 | 2,402,152 | 0 | 3 | 1 | false | 1 | 0 | Well... let's see. In my opinion you are testing three different things here (sorry for the "Java AOP jargon"):
the features implemented by the interceptors (i.e. the methods that implement the functions activated at the cutpoints)
the coverage of the filters (i.e. whether the intended cutpoints are activated correctl... | 2 | 4 | 0 | 0 | I'd like to know what would you propose as the best way to unit test aspect-oriented application features (well, perhaps that's not the best name, but it's the best I was able to come up with :-) ) such as logging or security?
These things are sort of omni-present in the application, so how to test them properly?
E.g. ... | Unit testing aspect-oriented features | 0 | 0 | 1 | 0 | 0 | 258 |
2,401,789 | 2010-03-08T14:03:00.000 | 1 | 1 | 0 | 0 | 0 | python,unit-testing,aop | 0 | 2,796,926 | 0 | 3 | 1 | false | 1 | 0 | IMHO, the way of testing users permissions to the pages depends on the design of your app and design of the framework you're using.
Generally, it's probably enough to cover your permission checker decorator with unit tests to make sure it always works as expected and then write a test that cycles through your 'views' (... | 2 | 4 | 0 | 0 | I'd like to know what would you propose as the best way to unit test aspect-oriented application features (well, perhaps that's not the best name, but it's the best I was able to come up with :-) ) such as logging or security?
These things are sort of omni-present in the application, so how to test them properly?
E.g. ... | Unit testing aspect-oriented features | 0 | 0.066568 | 1 | 0 | 0 | 258 |
2,409,168 | 2010-03-09T13:04:00.000 | 2 | 0 | 1 | 1 | 0 | python | 0 | 2,409,213 | 0 | 2 | 0 | false | 0 | 0 | You could write a installer (using NSIS or something) that does two things :
install LateX (or make sure there is an installation of latex available), potentially by calling another installer
then install your python script (which can assume latex is now available) | 1 | 1 | 0 | 0 | I wanted to know how can I make standalone application in python.
Basically what I am doing right now is I have a template.tex file and my script generate the pdf by giving some input values.
So I have to make exe file for windows and same for linux.
I can use cx_freeze for creating exe file.
But my problem is most of ... | standalone application in python | 1 | 0.197375 | 1 | 0 | 0 | 467 |
2,414,616 | 2010-03-10T04:56:00.000 | 1 | 0 | 1 | 1 | 0 | c#,c++,python | 0 | 2,414,677 | 0 | 5 | 0 | false | 0 | 0 | The first solution would be to fix your EXE, so it does not crash. If you can not fix it now, you probably need to add exception handling, so you can catch the exception, and not close the EXE.
Second solution is to write simple guard programm that will start your simple .exe and will monitor specific process handle. I... | 1 | 0 | 0 | 0 | I have a simple .exe that needs to be running continuously.
Unfortunately, sometimes it crashes unexpectedly, and there's nothing that can be done for this.
I'm thinking of like a C# program that scans the running application tree on a timer and if the process stops running it re-launches it... ? Not sure how to do th... | How to make script/program to make it so an application is always running? | 0 | 0.039979 | 1 | 0 | 0 | 221 |
2,417,705 | 2010-03-10T14:39:00.000 | 1 | 0 | 0 | 0 | 0 | python,gtk,pygtk,mplayer | 0 | 2,944,206 | 0 | 2 | 0 | false | 0 | 1 | You need to tell mplayer to zoom video according to window size. This can be done either in command line (-zoom) or in the configuration file (zoom = 1). | 1 | 0 | 0 | 0 | I've wrote a piece of code in python and pygtk for an embeded mplayer in a gui.
I assume I use GtkSocket and the slave mode of mplayer with the -wid option.
But I've got an issue, when the size of my GTK window is smaller than my stream, the stream appears to be cropped. And when the size of my window is bigger than my... | Dynamic resize with MPlayer and PyGTK | 0 | 0.099668 | 1 | 0 | 0 | 1,512 |
2,419,770 | 2010-03-10T19:11:00.000 | 76 | 0 | 1 | 0 | 0 | python,generator | 0 | 2,421,288 | 0 | 6 | 0 | false | 0 | 0 | In Python <= 2.5, use gen.next(). This will work for all Python 2.x versions, but not Python 3.x
In Python >= 2.6, use next(gen). This is a built in function, and is clearer. It will also work in Python 3.
Both of these end up calling a specially named function, next(), which can be overridden by subclassing. In Python... | 4 | 143 | 0 | 0 | Very basic question - how to get one value from a generator in Python?
So far I found I can get one by writing gen.next(). I just want to make sure this is the right way? | How to get one value at a time from a generator function in Python? | 0 | 1 | 1 | 0 | 0 | 99,132 |
2,419,770 | 2010-03-10T19:11:00.000 | 5 | 0 | 1 | 0 | 0 | python,generator | 0 | 60,391,726 | 0 | 6 | 0 | false | 0 | 0 | To get the value associated with a generator object in python 3 and above use next(<your generator object>).
subsequent calls to next() produces successive object values in the queue. | 4 | 143 | 0 | 0 | Very basic question - how to get one value from a generator in Python?
So far I found I can get one by writing gen.next(). I just want to make sure this is the right way? | How to get one value at a time from a generator function in Python? | 0 | 0.16514 | 1 | 0 | 0 | 99,132 |
2,419,770 | 2010-03-10T19:11:00.000 | 189 | 0 | 1 | 0 | 0 | python,generator | 0 | 2,419,782 | 0 | 6 | 0 | true | 0 | 0 | Yes, or next(gen) in 2.6+. | 4 | 143 | 0 | 0 | Very basic question - how to get one value from a generator in Python?
So far I found I can get one by writing gen.next(). I just want to make sure this is the right way? | How to get one value at a time from a generator function in Python? | 0 | 1.2 | 1 | 0 | 0 | 99,132 |
2,419,770 | 2010-03-10T19:11:00.000 | 1 | 0 | 1 | 0 | 0 | python,generator | 0 | 37,890,506 | 0 | 6 | 0 | false | 0 | 0 | In python 3 you don't have gen.next(), but you still can use next(gen).
A bit bizarre if you ask me but that's how it is. | 4 | 143 | 0 | 0 | Very basic question - how to get one value from a generator in Python?
So far I found I can get one by writing gen.next(). I just want to make sure this is the right way? | How to get one value at a time from a generator function in Python? | 0 | 0.033321 | 1 | 0 | 0 | 99,132 |
2,420,219 | 2010-03-10T20:11:00.000 | 5 | 0 | 1 | 0 | 0 | python,memory,data-structures,matrix,swap | 0 | 2,420,257 | 0 | 4 | 0 | false | 0 | 0 | You need a database, if the data will exceed memory. The indexing of dictionaries isn't designed for good performance when a dictionary is bigger than memory. | 2 | 4 | 0 | 0 | I have a python program that is going to eat a lot of memory, primarily in a dict. This dict will be responsible for assigning a unique integer value to a very large set of keys. As I am working with large matrices, I need a key-to-index correspondence that can also be recovered from (i.e., once matrix computations a... | How does OS handle a python dict that's larger than memory? | 0 | 0.244919 | 1 | 0 | 0 | 1,227 |
2,420,219 | 2010-03-10T20:11:00.000 | 1 | 0 | 1 | 0 | 0 | python,memory,data-structures,matrix,swap | 0 | 2,420,260 | 0 | 4 | 0 | true | 0 | 0 | It will just end up in swap trashing, because a hash table has very much randomized memory access patterns.
If you know that the map exceeds the size of the physical memory, you could consider using a data structure on the disk in the first place. This especially if you don't need the data structure during the computat... | 2 | 4 | 0 | 0 | I have a python program that is going to eat a lot of memory, primarily in a dict. This dict will be responsible for assigning a unique integer value to a very large set of keys. As I am working with large matrices, I need a key-to-index correspondence that can also be recovered from (i.e., once matrix computations a... | How does OS handle a python dict that's larger than memory? | 0 | 1.2 | 1 | 0 | 0 | 1,227 |
2,435,281 | 2010-03-12T19:32:00.000 | 0 | 0 | 0 | 0 | 0 | python,database,postgresql | 0 | 2,435,639 | 0 | 1 | 0 | true | 0 | 0 | To make sure we're on the same page, is the following correct?
You're inserting the photo information into the Photo table immediately after the user uploads the photo but before he/she submits the form;
When the user submits the form, you're inserting a row into the User table;
One of the items in that row is informa... | 1 | 0 | 0 | 0 | Let's say I have an user registration form. In this form, I have the option for the user to upload a photo. I have an User table and Photo table. My User table has a "PathToPhoto" column. My question is how do I fill in the "PathToPhoto" column if the photo is uploaded and inserted into Photo table before the user i... | Database: storing data from user registration form | 0 | 1.2 | 1 | 1 | 0 | 397 |
2,439,039 | 2010-03-13T16:22:00.000 | 1 | 0 | 0 | 0 | 1 | python,wxwidgets | 0 | 2,439,208 | 0 | 2 | 0 | false | 0 | 1 | You can embed IE, but I think that's about it. wxWebKit is working on a wx add-on to use WebKit as an embedded browser in wx, but I think it's still a work in progress. | 1 | 0 | 0 | 0 | I need to show a webpage (a complex page with script and stuff, no static html) in a frame or something. It's for a desktop application, I'm using python 2.6 + wxPython 2.8.10.1. I need to catch some events too (mostly about changing page). I've found some samples using the webview module in a gtk application, but I co... | how to embed a webpage using wx? | 0 | 0.099668 | 1 | 0 | 0 | 788 |
2,440,579 | 2010-03-13T23:53:00.000 | 3 | 0 | 1 | 0 | 1 | python,macos,gcc,distutils,setup.py | 0 | 2,440,981 | 0 | 2 | 0 | true | 0 | 0 | I'm guessing you've installed 2.6 on 10.5 using the python.org OS X installer. In that case, the flags are accurate and you should not try to change them. The python.org installers are built using the so-called 10.4u SDK and with a deployment target of 10.3, allowing one installer image to work on Mac OS X systems fr... | 1 | 2 | 0 | 0 | I'm trying to install matplotlib on my mac setup. I find that setup.py has inaccurate flags, in particular the isysroot points to an earlier SDK.
Where does setup.py get its info and how can i fix it?
I'm on MacOS 10.5.8, XCode 3.1.2 and Python 2.6 (default config was 2.5) | Compiler options wrong with python setup.py | 0 | 1.2 | 1 | 0 | 0 | 1,851 |
2,445,193 | 2010-03-15T05:04:00.000 | 7 | 0 | 1 | 0 | 0 | python | 0 | 2,445,239 | 0 | 5 | 0 | false | 0 | 0 | Python is dynamically typed: all variables can refer to an object of any type. id and name can be anything, but the actual objects are of types like int and str. 0 is a literal that is parsed to make an int object, and 'John' a literal that makes a str object. Many object types do not have literals and are returned by ... | 3 | 6 | 0 | 0 | Sorry if this is quite noobish to you, but I'm just starting out to learn Python after learning C++ & Java, and I am wondering how in the world I could just declare variables like id = 0 and name = 'John' without any int's or string's in front! I figured out that perhaps it's because there are no ''s in a number, but h... | How does Python differentiate between the different data types? | 1 | 1 | 1 | 0 | 0 | 1,782 |
2,445,193 | 2010-03-15T05:04:00.000 | 13 | 0 | 1 | 0 | 0 | python | 0 | 2,445,233 | 0 | 5 | 0 | true | 0 | 0 | The literal objects you mention carry (pointers to;-) their own types with them of course, so when a name's bound to that object the problem of type doesn't arise -- the object always has a type, the name doesn't -- just delegates that to the object it's bound to.
There's no "figuring out" in def increase(first, second... | 3 | 6 | 0 | 0 | Sorry if this is quite noobish to you, but I'm just starting out to learn Python after learning C++ & Java, and I am wondering how in the world I could just declare variables like id = 0 and name = 'John' without any int's or string's in front! I figured out that perhaps it's because there are no ''s in a number, but h... | How does Python differentiate between the different data types? | 1 | 1.2 | 1 | 0 | 0 | 1,782 |
2,445,193 | 2010-03-15T05:04:00.000 | 4 | 0 | 1 | 0 | 0 | python | 0 | 2,445,220 | 0 | 5 | 0 | false | 0 | 0 | When it comes to assigning literal values to variables, the type of the literal value can be inferred at the time of lexical analysis. For example, anything matching the regular expression (-)?[1-9][0-9]* can be inferred to be an integer literal. If you want to convert it to a float, there needs to be an explicit cas... | 3 | 6 | 0 | 0 | Sorry if this is quite noobish to you, but I'm just starting out to learn Python after learning C++ & Java, and I am wondering how in the world I could just declare variables like id = 0 and name = 'John' without any int's or string's in front! I figured out that perhaps it's because there are no ''s in a number, but h... | How does Python differentiate between the different data types? | 1 | 0.158649 | 1 | 0 | 0 | 1,782 |
2,447,118 | 2010-03-15T12:45:00.000 | 1 | 0 | 1 | 0 | 0 | java,python | 0 | 2,495,504 | 0 | 13 | 0 | false | 1 | 0 | Try to find algorithms that you understand well and see how they are implemented in python standard libraries.
Persist. :) | 4 | 34 | 0 | 0 | I've been writing Java for the last couple of years , and now I've started to write in python (in addition).
The problem is that when I look at my Python code it looks like someone tried to hammer Java code into a python format , and it comes out crappy because - well , python ain't Java.
Any tips on how to escape th... | Programming in Python vs. programming in Java | 1 | 0.015383 | 1 | 0 | 0 | 7,368 |
2,447,118 | 2010-03-15T12:45:00.000 | 0 | 0 | 1 | 0 | 0 | java,python | 0 | 2,447,141 | 0 | 13 | 0 | false | 1 | 0 | Learn a few other languages. It will help you make the difference between algorithms (the structure of processing, unchanged between languages) and the local syntaxic features of the language. Then you can "write Foo in Bar" for any combination of languages "Foo" and "Bar". | 4 | 34 | 0 | 0 | I've been writing Java for the last couple of years , and now I've started to write in python (in addition).
The problem is that when I look at my Python code it looks like someone tried to hammer Java code into a python format , and it comes out crappy because - well , python ain't Java.
Any tips on how to escape th... | Programming in Python vs. programming in Java | 1 | 0 | 1 | 0 | 0 | 7,368 |
2,447,118 | 2010-03-15T12:45:00.000 | 0 | 0 | 1 | 0 | 0 | java,python | 0 | 2,495,445 | 0 | 13 | 0 | false | 1 | 0 | Eat Python, Sleep Python and Drink Python. That is the only way........ | 4 | 34 | 0 | 0 | I've been writing Java for the last couple of years , and now I've started to write in python (in addition).
The problem is that when I look at my Python code it looks like someone tried to hammer Java code into a python format , and it comes out crappy because - well , python ain't Java.
Any tips on how to escape th... | Programming in Python vs. programming in Java | 1 | 0 | 1 | 0 | 0 | 7,368 |
2,447,118 | 2010-03-15T12:45:00.000 | 3 | 0 | 1 | 0 | 0 | java,python | 0 | 2,448,287 | 0 | 13 | 0 | false | 1 | 0 | Definitely not a panacea but I think you should try some code golf in Python. Obviously nobody should write "golfed" code IRL, but finding the most terse way to express something really forces you to exploit the built in functionality of the language. | 4 | 34 | 0 | 0 | I've been writing Java for the last couple of years , and now I've started to write in python (in addition).
The problem is that when I look at my Python code it looks like someone tried to hammer Java code into a python format , and it comes out crappy because - well , python ain't Java.
Any tips on how to escape th... | Programming in Python vs. programming in Java | 1 | 0.046121 | 1 | 0 | 0 | 7,368 |
2,452,488 | 2010-03-16T06:24:00.000 | 3 | 0 | 1 | 1 | 0 | python,security,filesystems,sandbox | 0 | 2,452,503 | 0 | 3 | 0 | false | 0 | 0 | You are probably best to use a virtual machine like VirtualBox or VMware (perhaps even creating one per user/session).
That will allow you some control over other resources such as memory and network as well as disk
The only python that I know of that has such features built in is the one on Google App Engine. That m... | 1 | 4 | 0 | 0 | I have a web service to which users upload python scripts that are run on a server. Those scripts process files that are on the server and I want them to be able to see only a certain hierarchy of the server's filesystem (best: a temporary folder on which I copy the files I want processed and the scripts).
The server w... | faking a filesystem / virtual filesystem | 1 | 0.197375 | 1 | 0 | 0 | 1,877 |
2,456,926 | 2010-03-16T18:11:00.000 | 0 | 0 | 0 | 0 | 0 | python,pylons | 1 | 2,457,303 | 0 | 1 | 0 | false | 1 | 1 | I'm assuming that "I can only get the first value" means you've got a series of checkboxes with the same value for the 'name' attribute within your form?
Now, if that's the case and you're wanting a list of boolean values based on whether or not the boxes are checked or not, you'll need to do two things:
First, whe... | 1 | 1 | 0 | 0 | I have been trying to add some check boxes in a pylons mako. However I don't know how to get their values in the controller. It seems that it can only get the first value of the check boxes. I tried using form encode but i got several errors. Is there an easier way to do this?
Thanks | Checkboxes with pylons | 0 | 0 | 1 | 0 | 0 | 1,306 |
2,460,401 | 2010-03-17T07:04:00.000 | 2 | 0 | 1 | 0 | 1 | python,matplotlib,tkinter,break,python-idle | 0 | 31,151,803 | 0 | 4 | 0 | false | 0 | 0 | I had same issue in Canopy Python Editor, and I was able to interrupt python session with CTRL+. ("dot" button). Hope that helps, or they probably do things in a similar ways | 3 | 11 | 0 | 0 | I have a python script that uses plt.show() as it's last instruction. When it runs, IDLE just hangs after the last instruction. I get the image but I don't get the prompt back.
On other scripts I typically use ctrl-c to break the program (sometimes doesn't work immediately) but how do I get the prompt back with the plt... | How to stop Python program execution in IDLE | 0 | 0.099668 | 1 | 0 | 0 | 54,617 |
2,460,401 | 2010-03-17T07:04:00.000 | 7 | 0 | 1 | 0 | 1 | python,matplotlib,tkinter,break,python-idle | 0 | 2,460,438 | 0 | 4 | 0 | true | 0 | 0 | I have seen this problem with IDLE and matplotlib when using them on Windows. I don't know the exact cause, but Ctrl-c a couple times has typically worked for me. If that doesn't work for you, you can use the normal interpreter instead of write your plot directly to a file instead of the screen.
This is one of those (p... | 3 | 11 | 0 | 0 | I have a python script that uses plt.show() as it's last instruction. When it runs, IDLE just hangs after the last instruction. I get the image but I don't get the prompt back.
On other scripts I typically use ctrl-c to break the program (sometimes doesn't work immediately) but how do I get the prompt back with the plt... | How to stop Python program execution in IDLE | 0 | 1.2 | 1 | 0 | 0 | 54,617 |
2,460,401 | 2010-03-17T07:04:00.000 | 7 | 0 | 1 | 0 | 1 | python,matplotlib,tkinter,break,python-idle | 0 | 20,615,556 | 0 | 4 | 0 | false | 0 | 0 | Ctrl+F6
(Restart shell)
or Shell->Restart Shell | 3 | 11 | 0 | 0 | I have a python script that uses plt.show() as it's last instruction. When it runs, IDLE just hangs after the last instruction. I get the image but I don't get the prompt back.
On other scripts I typically use ctrl-c to break the program (sometimes doesn't work immediately) but how do I get the prompt back with the plt... | How to stop Python program execution in IDLE | 0 | 1 | 1 | 0 | 0 | 54,617 |
2,460,491 | 2010-03-17T07:28:00.000 | 1 | 0 | 0 | 0 | 0 | python,mysql,database,datetime,date | 0 | 2,460,546 | 0 | 3 | 0 | false | 0 | 0 | Solved.
I just did this:
datetime.datetime.now() ...insert that into the column. | 1 | 5 | 0 | 0 | I am using Python MySQLDB, and I want to insert this into DATETIME field in Mysql . How do I do that with cursor.execute? | In Python, if I have a unix timestamp, how do I insert that into a MySQL datetime field? | 0 | 0.066568 | 1 | 1 | 0 | 9,981 |
2,464,704 | 2010-03-17T18:09:00.000 | 1 | 0 | 1 | 1 | 1 | python,subprocess,watchdog | 0 | 2,464,752 | 0 | 2 | 0 | false | 0 | 0 | I've done this same thing to process web statistics using a semaphore. Essentially, as processes are created, the semaphore is incremented. When they exit, it's decremented. The creation process is blocked when the semaphore blocks.
This actually fires off threads, which run external processes down execution path a... | 1 | 2 | 0 | 0 | I need it to open 10 processes, and each time one of them finishes I want to wait few seconds and start another one.
It seems pretty simple, but somehow I can't get it to work. | How to implement a master/watchdog script in python? | 0 | 0.099668 | 1 | 0 | 0 | 1,275 |
2,465,056 | 2010-03-17T18:59:00.000 | 2 | 0 | 0 | 1 | 0 | python,google-app-engine,artificial-intelligence | 0 | 2,471,015 | 0 | 3 | 0 | false | 1 | 0 | If the game is turn based then it would probably be best to avoid the Cron task and just update the NPCs every time the player moves. I'm not sure how big of a map you are planning on but you may consider even having the player object find the NPCs that are close to it and call their AI routine. That way NPCs that are... | 3 | 1 | 0 | 0 | I am currently in the planning stages of a game for google app engine, but cannot wrap my head around how I am going to handle AI. I intend to have persistant NPCs that will move about the map, but short of writing a program that generates the same XML requests I use to control player actions, than run it on another s... | Artificial Intelligence in online game using Google App Engine | 0 | 0.132549 | 1 | 0 | 0 | 1,026 |
2,465,056 | 2010-03-17T18:59:00.000 | 2 | 0 | 0 | 1 | 0 | python,google-app-engine,artificial-intelligence | 0 | 2,471,126 | 0 | 3 | 0 | false | 1 | 0 | Bear in mind that you can also break up your updates into multiple requests (internally): do a bit of work, redirect to the same handler but different state; do more work; etc. (I'm failing somehow to comment on Peter Recore's answer, which is where this really belongs.)
I see that the free service only allows 100k ta... | 3 | 1 | 0 | 0 | I am currently in the planning stages of a game for google app engine, but cannot wrap my head around how I am going to handle AI. I intend to have persistant NPCs that will move about the map, but short of writing a program that generates the same XML requests I use to control player actions, than run it on another s... | Artificial Intelligence in online game using Google App Engine | 0 | 0.132549 | 1 | 0 | 0 | 1,026 |
2,465,056 | 2010-03-17T18:59:00.000 | 3 | 0 | 0 | 1 | 0 | python,google-app-engine,artificial-intelligence | 0 | 2,465,142 | 0 | 3 | 0 | true | 1 | 0 | Will your game be turn based or real time?
Either way, I think you have 2 options to look into. One is to use the Cron feature so you can schedule NPC updates at regular intervals, the other is to stick a "update NPCs" task into the Task Queue every time a human player moves. | 3 | 1 | 0 | 0 | I am currently in the planning stages of a game for google app engine, but cannot wrap my head around how I am going to handle AI. I intend to have persistant NPCs that will move about the map, but short of writing a program that generates the same XML requests I use to control player actions, than run it on another s... | Artificial Intelligence in online game using Google App Engine | 0 | 1.2 | 1 | 0 | 0 | 1,026 |
2,467,609 | 2010-03-18T04:55:00.000 | -6 | 0 | 0 | 1 | 0 | python,linux | 0 | 2,467,717 | 0 | 6 | 0 | false | 0 | 0 | No reason to use python. Avoid writing a shell script in Python and go with something like bash or an equivalent. | 2 | 32 | 0 | 0 | How would I download files (video) with Python using wget and save them locally? There will be a bunch of files, so how do I know that one file is downloaded so as to automatically start downloding another one?
Thanks. | Using wget via Python | 0 | -1 | 1 | 0 | 1 | 92,663 |
2,467,609 | 2010-03-18T04:55:00.000 | 9 | 0 | 0 | 1 | 0 | python,linux | 0 | 2,467,646 | 0 | 6 | 0 | false | 0 | 0 | No reason to use os.system. Avoid writing a shell script in Python and go with something like urllib.urlretrieve or an equivalent.
Edit... to answer the second part of your question, you can set up a thread pool using the standard library Queue class. Since you're doing a lot of downloading, the GIL shouldn't be a pr... | 2 | 32 | 0 | 0 | How would I download files (video) with Python using wget and save them locally? There will be a bunch of files, so how do I know that one file is downloaded so as to automatically start downloding another one?
Thanks. | Using wget via Python | 0 | 1 | 1 | 0 | 1 | 92,663 |
2,469,849 | 2010-03-18T12:45:00.000 | 1 | 0 | 1 | 1 | 0 | python,pydev,enthought | 0 | 9,306,753 | 0 | 7 | 0 | false | 0 | 0 | I am running Python 3, so I had to make these changes to get python.exe as my interpreter.
File:
C:\EasyEclipse-for-LAMP-1.2.2.2\extensions\pydev-1.3.3\eclipse\plugins\org.python.pydev_1.3.3\PySrc\interpreterInfo.py
Edit all occurrences of "print ..." to "print(...)" (the ... is whatever is being printed), so wrap it i... | 2 | 16 | 0 | 0 | I downloaded Pydev plugin for Eclipse (3.5.2) today on Mac OSX 10.5.8. To be able to use Pydev, I need to configure the interpreter in Eclipse. I am not clear what exactly I need to do here, or what this step does. I want to make sure that when I run programs from Eclipse using Pydev, it uses the Enthought Python Distr... | Configuring Pydev Interpreter in Eclipse to use Enthought Python Distribution | 0 | 0.028564 | 1 | 0 | 0 | 20,897 |
2,469,849 | 2010-03-18T12:45:00.000 | 12 | 0 | 1 | 1 | 0 | python,pydev,enthought | 0 | 4,060,609 | 0 | 7 | 0 | false | 0 | 0 | Mac OS 10.6.4:
Selecting the interpreter as /Library/Frameworks/Python.framework/Versions/2.7/Python did not work.
I had to select /Library/Frameworks/Python.framework/Versions/2.7/bin/python | 2 | 16 | 0 | 0 | I downloaded Pydev plugin for Eclipse (3.5.2) today on Mac OSX 10.5.8. To be able to use Pydev, I need to configure the interpreter in Eclipse. I am not clear what exactly I need to do here, or what this step does. I want to make sure that when I run programs from Eclipse using Pydev, it uses the Enthought Python Distr... | Configuring Pydev Interpreter in Eclipse to use Enthought Python Distribution | 0 | 1 | 1 | 0 | 0 | 20,897 |
2,476,234 | 2010-03-19T09:45:00.000 | 1 | 1 | 0 | 0 | 1 | python,twisted,xmpp,irc,fifo | 0 | 2,476,445 | 0 | 2 | 0 | false | 0 | 0 | The fifo is the problem. Read from a socket instead. This will fit info the Twisted event-driven model much better. Trying to do things outside the control of the reactor is usually the wrong approach.
---- update based on feedback that the fifo is an external constraint, not avoidable ----
OK, the central issue is tha... | 2 | 4 | 0 | 0 | Im trying to write some kind of multi protocol bot (jabber/irc) that would read messages from fifo file (one liners mostly) and then send them to irc channel and jabber contacts. So far, I managed to create two factories to connect to jabber and irc, and they seem to be working.
However, I've problem with reading the ... | Python (Twisted) - reading from fifo and sending read data to multiple protocols | 0 | 0.099668 | 1 | 0 | 1 | 1,766 |
2,476,234 | 2010-03-19T09:45:00.000 | 3 | 1 | 0 | 0 | 1 | python,twisted,xmpp,irc,fifo | 0 | 2,478,970 | 0 | 2 | 0 | false | 0 | 0 | You can read/write on a file descriptor without blocking the reactor as you do with sockets, by the way doesn't sockets use file descriptors?
In your case create a class that implements twisted.internet.interfaces.IReadDescriptor and add to reactor using twisted.internet.interfaces.IReactorFDSet.addReader. For an examp... | 2 | 4 | 0 | 0 | Im trying to write some kind of multi protocol bot (jabber/irc) that would read messages from fifo file (one liners mostly) and then send them to irc channel and jabber contacts. So far, I managed to create two factories to connect to jabber and irc, and they seem to be working.
However, I've problem with reading the ... | Python (Twisted) - reading from fifo and sending read data to multiple protocols | 0 | 0.291313 | 1 | 0 | 1 | 1,766 |
2,486,737 | 2010-03-21T10:41:00.000 | 3 | 1 | 1 | 0 | 0 | python | 0 | 2,486,751 | 0 | 3 | 0 | false | 0 | 0 | First you can try psyco, that may give you a speed up as much as 10x, but 2x is more typical
If you can post the code up somewhere, perhaps someone can point out how to leverage numpy.
If your task doesn't map well only numpy then cython is a good choice to convert a intensive function or two into C code just by adding... | 1 | 0 | 0 | 0 | I wrote a number crunching python code. The calculations involved can take hours. Is it possible somehow to compile it to binary?
Thanks | Convert python script to binary executable | 1 | 0.197375 | 1 | 0 | 0 | 2,921 |
2,487,033 | 2010-03-21T12:22:00.000 | 1 | 0 | 1 | 0 | 0 | python,controls,port,device | 0 | 21,833,149 | 0 | 4 | 0 | false | 0 | 0 | but whatever.. someone will look for the answer at some point:
I'm on a mac (osx 10.9).. I successfully installed libusb with mac ports, but was getting the "no backend available" message. It's because python can't find the usb dylibs.
You have to add the path to your libusb to your $DYLD_LIBRARY_PATH (e.g. /opt/loc... | 1 | 7 | 0 | 0 | i am using python on ubuntu 9.04
say i have two usb devices connected to a single PC. how can i identify the devices in python code.....for example like
if usb port id == A
write data to device 1
if usb port id == B
write data to device 2
any ideas.... | usb device identification | 0 | 0.049958 | 1 | 0 | 0 | 39,244 |
2,488,142 | 2010-03-21T18:17:00.000 | 2 | 0 | 0 | 0 | 1 | python,django,mod-python | 0 | 2,488,505 | 0 | 1 | 0 | false | 1 | 0 | There are two obvious reasons to why this might happen:
djangobb_forum is not on your Python path
There is no __init__.py in the djangobb_forum folder
If the code says from djangobb_forum import ... then you need to have the parent folder of djangobb_forum on your Python path. | 1 | 4 | 0 | 0 | I've installed Djangobb app on my server (Debian, mod_python) by cloning original source. The only things I've changed is database options in settings.py. All needed components are installed - syncdb query was executed right.
But, when I'm trying to enter on my forum, it returns me error:
ImproperlyConfigured: Error i... | Djangobb problem | 0 | 0.379949 | 1 | 0 | 0 | 1,302 |
2,488,670 | 2010-03-21T20:55:00.000 | 1 | 0 | 1 | 0 | 0 | python,algorithm,cluster-analysis,character-encoding | 0 | 2,489,898 | 0 | 2 | 0 | false | 0 | 0 | You should be able to treat your words as numerals in a strange base. For example, let's say you have a..z as your charset (26 characters), 4 character strings, and you want to distribute among equally 10 machines. Then there are a total of 26^4 strings, so each machine gets 26^4/10 strings. The first machine will g... | 1 | 1 | 1 | 0 | My question is rather complicated for me to explain, as i'm not really good at maths, but i'll try to be as clear as possible.
I'm trying to code a cluster in python, which will generate words given a charset (i.e. with lowercase: aaaa, aaab, aaac, ..., zzzz) and make various operations on them.
I'm searching how to c... | python parallel computing: split keyspace to give each node a range to work on | 0 | 0.099668 | 1 | 0 | 0 | 260 |
2,488,710 | 2010-03-21T21:04:00.000 | 1 | 0 | 0 | 0 | 0 | python,django,django-admin,shopping-cart,django-nonrel | 0 | 2,488,729 | 0 | 3 | 0 | false | 1 | 0 | Sounds like you want two related models - Item and Option. Item would contain the name of the item, and Option would contain the option - eg size - and the price of that option. You would then set up your admin to use an inline form for Option. | 1 | 2 | 0 | 0 | Basically I am writing a simple shopping cart. Each item can have multiple prices. (i.e. shirts where each size is priced differently). I would like to have a single price field in my admin panel, where when the first price is entered, an additional price field pops up. However I am kind of at a loss as to how to do th... | django admin - adding fields on the fly | 0 | 0.066568 | 1 | 0 | 0 | 515 |
2,491,819 | 2010-03-22T11:35:00.000 | 9 | 0 | 1 | 0 | 0 | python,class,init | 0 | 2,491,843 | 0 | 12 | 0 | false | 0 | 0 | __init__ doesn't return anything and should always return None. | 1 | 140 | 0 | 0 | I have a class with an __init__ function.
How can I return an integer value from this function when an object is created?
I wrote a program, where __init__ does command line parsing and I need to have some value set. Is it OK set it in global variable and use it in other member functions? If so how to do that? So far,... | How to return a value from __init__ in Python? | 0 | 1 | 1 | 0 | 0 | 195,099 |
2,502,385 | 2010-03-23T18:02:00.000 | 0 | 0 | 0 | 1 | 0 | python,image,vbscript,batch-file,console-application | 0 | 2,502,963 | 0 | 4 | 0 | false | 0 | 1 | Try TK, it is included with python. Also, PyGtk is lighter than wxPython, but I ended up bitting the bullet and using wxPython for the same purpose recently, it is heavy, but it didn't have any affect on the script performance. | 1 | 2 | 0 | 0 | Any ideas how I can display an image file (bmp or png) centered on the screen as an application splash screen when running a Windows console script based on a batch file, vbscript/wscript or Python console script?
I'm not interested in a wxPython solution - that's too much overhead just to implement a cosmetic feature ... | Display an image as a splash screen when running Windows batch file, vbscript/wscript or Python console script | 0 | 0 | 1 | 0 | 0 | 5,541 |
2,504,386 | 2010-03-23T23:27:00.000 | 1 | 0 | 0 | 0 | 0 | python,django,django-models | 0 | 2,504,441 | 0 | 3 | 0 | false | 1 | 0 | Quoth my elementary chemistry teacher: "If you don't write it down, it didn't happen", therefore save logs in a file.
Since the log information is disjoint from your application data (it's meta-data, actually), keep them separate. You could log to a database table but it should be distinct from your model.
Text pickle ... | 1 | 6 | 0 | 0 | I have various models of which I would like to keep track and collect statistical data.
The problem is how to store the changes throughout time.
I thought of various alternative:
Storing a log in a TextField, open it and update it every time the model is saved.
Alternatively pickle a list and store it in a TextField.
... | Keeping track of changes - Django | 0 | 0.066568 | 1 | 0 | 0 | 1,579 |
2,531,717 | 2010-03-28T02:44:00.000 | 1 | 0 | 1 | 0 | 0 | python,django,keyword | 0 | 2,531,927 | 0 | 2 | 0 | false | 0 | 0 | Abbreviations like NO for navigation officer or OR for operations room need a little care lest you cause a SNAFU ;-) One suspects that better results could be obtained from "Find the NO and send her to the OR" by tagging the words with parts of speech using the context ... hint 1: "the OR" should result in "the [noun]"... | 2 | 1 | 0 | 0 | I'm building a website in django that needs to extract key words from short (twitter-like) messages.
I've looked at packages like topia.textextract and nltk - but both seem to be overkill for what I need to do. All I need to do is filter words like "and", "or", "not" while keeping nouns and verbs that aren't conjunctiv... | Key word extraction in Python | 0 | 0.099668 | 1 | 0 | 0 | 1,322 |
2,531,717 | 2010-03-28T02:44:00.000 | 3 | 0 | 1 | 0 | 0 | python,django,keyword | 0 | 2,531,724 | 0 | 2 | 0 | true | 0 | 0 | You can make a set sw of the "stop words" you want to eliminate (maybe copy it once and for all from the stop words corpus of NLTK, depending how familiar you are with the various natural languages you need to support), then apply it very simply.
E.g., if you have a list of words sent that make up the sentence (shorn o... | 2 | 1 | 0 | 0 | I'm building a website in django that needs to extract key words from short (twitter-like) messages.
I've looked at packages like topia.textextract and nltk - but both seem to be overkill for what I need to do. All I need to do is filter words like "and", "or", "not" while keeping nouns and verbs that aren't conjunctiv... | Key word extraction in Python | 0 | 1.2 | 1 | 0 | 0 | 1,322 |
2,537,065 | 2010-03-29T10:02:00.000 | 5 | 0 | 0 | 1 | 0 | python,django,cgi,webserver,tornado | 0 | 3,244,176 | 0 | 2 | 0 | false | 1 | 0 | Main feature of Tornado is that it is high performance web-server written in Python, for creating web applications using Python programming language.
Running Tornado as CGI application negates the very reason it exists, because running CGI scripts is expensive in terms of performance, and most probably there is no way ... | 1 | 2 | 0 | 0 | Tornado is a webserver + framework like Django but for real-time features.
On my server I don't have a python module or wsgi module so I thought
CGI.
Is there a way to get Tornado ( or Django ) works by using CGI folder ?
If yes, Could you explain me how do I do that ? | Tornado or Django works with CGI? | 0 | 0.462117 | 1 | 0 | 0 | 1,611 |
2,541,702 | 2010-03-29T22:34:00.000 | 3 | 0 | 0 | 0 | 0 | python,lotus-notes,lotus | 0 | 2,542,163 | 0 | 3 | 0 | false | 1 | 0 | The short answer is, unfortunately you will need the Notes client installed. There are a few ways to access data from an NSF such as NotesSQL, COM, C/C++, but all rely on the Lotus C API at the core, and you'll need a notes client and a notes ID file to gain access via that API. | 3 | 0 | 0 | 0 | I am looking for a programatic way to access content in a Lotus Notes database (.nsf file) without having Lotus Notes software installed.
Python would be preferred but I'm also willing to look at other languages e.g. C/C++ or other means e.g. SQL
From what I have read, all of the methods e.g. Python COM access, pyodbc ... | Access to content of Lotus Notes database without Lotus Notes software installed | 0 | 0.197375 | 1 | 0 | 0 | 3,704 |
2,541,702 | 2010-03-29T22:34:00.000 | 0 | 0 | 0 | 0 | 0 | python,lotus-notes,lotus | 0 | 2,551,002 | 0 | 3 | 0 | false | 1 | 0 | Like Ken says, inevitably there has to be a server in the mix. If you're searching for specific text in a Notes / Domino application, and looking to replace it, there's a tool out there which does this: Teamstudio Configurator.
Configurator also has an API (written in Lotusscript, which is very like old-skool VB) so yo... | 3 | 0 | 0 | 0 | I am looking for a programatic way to access content in a Lotus Notes database (.nsf file) without having Lotus Notes software installed.
Python would be preferred but I'm also willing to look at other languages e.g. C/C++ or other means e.g. SQL
From what I have read, all of the methods e.g. Python COM access, pyodbc ... | Access to content of Lotus Notes database without Lotus Notes software installed | 0 | 0 | 1 | 0 | 0 | 3,704 |
2,541,702 | 2010-03-29T22:34:00.000 | 1 | 0 | 0 | 0 | 0 | python,lotus-notes,lotus | 0 | 2,607,921 | 0 | 3 | 0 | false | 1 | 0 | If this is a one-time need, you may be able to find sites that will do some simple Domino/Notes hosting for free. If you could put the NSF up to a service like that, you could then use Domino URL's (REST) to extract the data and search for links, etc. | 3 | 0 | 0 | 0 | I am looking for a programatic way to access content in a Lotus Notes database (.nsf file) without having Lotus Notes software installed.
Python would be preferred but I'm also willing to look at other languages e.g. C/C++ or other means e.g. SQL
From what I have read, all of the methods e.g. Python COM access, pyodbc ... | Access to content of Lotus Notes database without Lotus Notes software installed | 0 | 0.066568 | 1 | 0 | 0 | 3,704 |
2,550,308 | 2010-03-31T03:25:00.000 | 0 | 0 | 0 | 0 | 0 | python,django,views | 0 | 2,550,450 | 0 | 2 | 0 | false | 1 | 0 | whenever the view needs a particular object from the ORM, it attempts to fetch it using any "id" parameter in several ways (e.g. as a slug, as a database id) (this may be a bad practice...)
So... why not just expect a model instance to be passed in as a parameter? Or a QuerySet from which you will take element 0? Th... | 2 | 0 | 0 | 0 | These are the techniques that I use regularly to make my views reusable:
take the template_name as an argument with a default
take an optional extra_context which defaults to empty {}
right before the template is rendered the context is updated with the extra_context
for further re-usability, call any callable in ex... | how to write re-usable views in django? | 0 | 0 | 1 | 0 | 0 | 151 |
2,550,308 | 2010-03-31T03:25:00.000 | 0 | 0 | 0 | 0 | 0 | python,django,views | 0 | 2,550,339 | 0 | 2 | 0 | false | 1 | 0 | I would think that doing all of those puts a large burden on your urlconf to get everything right. Perhaps making a function that takes all that and hardcoding your views to be a glorified wrapper around said function would be better. | 2 | 0 | 0 | 0 | These are the techniques that I use regularly to make my views reusable:
take the template_name as an argument with a default
take an optional extra_context which defaults to empty {}
right before the template is rendered the context is updated with the extra_context
for further re-usability, call any callable in ex... | how to write re-usable views in django? | 0 | 0 | 1 | 0 | 0 | 151 |
2,550,370 | 2010-03-31T03:45:00.000 | 3 | 0 | 1 | 0 | 0 | c#,visual-studio,ironpython,ironruby | 0 | 2,550,627 | 0 | 2 | 0 | true | 0 | 1 | You can't add reference to a project since it's a Visual Studio thing.
I suggest that during the development process, call import (IronPython) or require (IronRuby) with the full path of your project assembly like c:\dev\MyProject\bin\Debug\MyProject.dll. | 1 | 2 | 0 | 0 | I know how to reference an existing .dll to IronPython, but is there any way to add my project as a reference like I can between Visual Studio projects?
Or is it best practice to create a separate class library? | Any way to add my C# project as a reference in IronPython / IronRuby? | 1 | 1.2 | 1 | 0 | 0 | 1,069 |
2,553,088 | 2010-03-31T13:04:00.000 | 2 | 0 | 0 | 0 | 1 | python,django,django-admin | 0 | 2,553,104 | 0 | 4 | 0 | false | 1 | 0 | do you have permission to write to the directory? | 2 | 0 | 0 | 1 | I'm totally new to django, and I'm using its documentation to get help on how to use it
but seems like something is missing. i installed django using setup.py install command
and i added the ( django/bin ) to system path variable but. i still cant start a new project
i use the following syntax to start a project :
d... | Django newbie question: can't start a new project | 0 | 0.099668 | 1 | 0 | 0 | 2,582 |
2,553,088 | 2010-03-31T13:04:00.000 | 0 | 0 | 0 | 0 | 1 | python,django,django-admin | 0 | 2,559,610 | 0 | 4 | 0 | false | 1 | 0 | check whether you have djagno or not and the it is in python path or not.if using linux go to terminal type python and then try to import django | 2 | 0 | 0 | 1 | I'm totally new to django, and I'm using its documentation to get help on how to use it
but seems like something is missing. i installed django using setup.py install command
and i added the ( django/bin ) to system path variable but. i still cant start a new project
i use the following syntax to start a project :
d... | Django newbie question: can't start a new project | 0 | 0 | 1 | 0 | 0 | 2,582 |
2,561,542 | 2010-04-01T15:28:00.000 | 3 | 0 | 0 | 1 | 0 | python,eclipse,wxpython | 0 | 12,983,874 | 0 | 3 | 0 | false | 0 | 1 | wxPython install by default to the following path /usr/local/lib/wxPython-2.9.4.0
When adding a path to the Interpreter libraries section in the eclipse preferences add this path:
/usr/local/lib/wxPython-2.9.4.0/lib/python2.7/site-packages/wx-2.9.4-osx_cocoa | 2 | 3 | 0 | 1 | I've been browsing documentation, but haven't been able to find a straightforward tutorial, so I apologize if this is a really simple question.
Anyway, I have eclipse with pydev installed on MAC OSX, and I want configure wxPython to work with eclipse, how do I do this? Once I've downloaded wxpython, what steps do I tak... | Configuring Eclipse with wxPython | 0 | 0.197375 | 1 | 0 | 0 | 8,700 |
2,561,542 | 2010-04-01T15:28:00.000 | 7 | 0 | 0 | 1 | 0 | python,eclipse,wxpython | 0 | 2,562,141 | 0 | 3 | 0 | false | 0 | 1 | Vinay's answer above is correct. However, if code completion is not picking it up, you might need to add the WX directory to the Pydev's interpreter library path.
Window | Preferences | Pydev |
Interpreter - Python | Libraries
If wx is not present, New Folder and select the install directory. | 2 | 3 | 0 | 1 | I've been browsing documentation, but haven't been able to find a straightforward tutorial, so I apologize if this is a really simple question.
Anyway, I have eclipse with pydev installed on MAC OSX, and I want configure wxPython to work with eclipse, how do I do this? Once I've downloaded wxpython, what steps do I tak... | Configuring Eclipse with wxPython | 0 | 1 | 1 | 0 | 0 | 8,700 |
2,563,788 | 2010-04-01T21:22:00.000 | 0 | 1 | 1 | 0 | 0 | python,windows,audio,pywin32 | 0 | 10,114,610 | 0 | 3 | 0 | true | 0 | 0 | PyAudiere turns out to be the most convenient. It allows me to simply play an MP3, rather than generate the sound on the fly. | 1 | 3 | 0 | 0 | I am trying to get python to make noise when certain things happen. Preferably, i would like to play music of some kind, however some kind of distinctive beeping would be sufficient, like an electronic timer going off. I have thus far only been able to make the system speaker chime using pywin32's Beep, however this si... | Making Noise with Python | 0 | 1.2 | 1 | 0 | 0 | 1,463 |
2,565,776 | 2010-04-02T08:43:00.000 | 0 | 0 | 0 | 0 | 0 | python,wxpython,cursor | 0 | 2,565,793 | 0 | 2 | 0 | true | 1 | 0 | Use two cursors and change them on events as they need to be. | 1 | 0 | 0 | 0 | I want to use the google maps hand cursor in Python but I don't know how to do it.
I've downloaded the cursor but I only get to use the hand open, I also have a event that "closes" the hand when clicked but I don't know how can I change the style cursor on it.
I say this because the google maps hand cursor has two styl... | How use the google maps hand cursor in Python? | 0 | 1.2 | 1 | 0 | 0 | 593 |
2,569,503 | 2010-04-02T22:21:00.000 | 3 | 0 | 1 | 0 | 0 | python,hash,mixed-case | 0 | 2,569,508 | 0 | 2 | 0 | true | 0 | 0 | you can base64 encode the output of the hash. This has a couple of additional characters beyond those you mentioned. | 1 | 1 | 0 | 0 | I am having a hard time figuring out a reasonable way to generate a mixed-case hash in Python.
I want to generate something like: aZeEe9E
Right now I'm using MD5, which doesn't generate case-sensitive hashes.
Do any of you know how to generate a hash value consisting of upper- and lower- case characters + numbers?
-
Ok... | How to generate a mixed-case hash in Python? | 0 | 1.2 | 1 | 0 | 0 | 1,256 |
2,570,193 | 2010-04-03T04:03:00.000 | 0 | 0 | 0 | 0 | 0 | python,django,twitter | 0 | 2,570,547 | 0 | 3 | 0 | false | 1 | 0 | I'm not sure exactly what you're asking, but what's wrong with something like {{ user.get_absolute_url }}? For the tag detail URLs, it really depends on what you're looking for, but you would have to construct the url and view for that yourself. | 1 | 0 | 0 | 0 | I'm writing a twitter-like note-taking web app.
In a page the latest 20 notes of the user will be listed,
and when the user scroll to the bottom of the browser window more items will be loaded and rendered.
The initial 20 notes are part of the generated html of my django template, but the other dynamically loaded item... | How to convert tag-and-username-like text into proper links in a twitter message? | 0 | 0 | 1 | 0 | 0 | 207 |
2,573,135 | 2010-04-04T00:28:00.000 | 2 | 1 | 0 | 0 | 0 | python | 0 | 2,573,225 | 0 | 19 | 0 | false | 0 | 0 | Not precisely what you're asking for, but I think it's good advice.
Learn another language, doesn't matter too much which. Each language has it's own ideas and conventions that you can learn from. Learn about the differences in the languages and more importantly why they're different. Try a purely functional languag... | 5 | 659 | 0 | 0 | I've been learning, working, and playing with Python for a year and a half now. As a biologist slowly making the turn to bio-informatics, this language has been at the very core of all the major contributions I have made in the lab. I more or less fell in love with the way Python permits me to express beautiful solutio... | Python progression path - From apprentice to guru | 0 | 0.02105 | 1 | 0 | 0 | 383,814 |
2,573,135 | 2010-04-04T00:28:00.000 | 24 | 1 | 0 | 0 | 0 | python | 0 | 4,147,969 | 0 | 19 | 0 | false | 0 | 0 | If you're in and using python for science (which it seems you are) part of that will be learning and understanding scientific libraries, for me these would be
numpy
scipy
matplotlib
mayavi/mlab
chaco
Cython
knowing how to use the right libraries and vectorize your code is essential for scientific computing.
I wante... | 5 | 659 | 0 | 0 | I've been learning, working, and playing with Python for a year and a half now. As a biologist slowly making the turn to bio-informatics, this language has been at the very core of all the major contributions I have made in the lab. I more or less fell in love with the way Python permits me to express beautiful solutio... | Python progression path - From apprentice to guru | 0 | 1 | 1 | 0 | 0 | 383,814 |
2,573,135 | 2010-04-04T00:28:00.000 | 41 | 1 | 0 | 0 | 0 | python | 0 | 2,576,226 | 0 | 19 | 0 | false | 0 | 0 | I'll give you the simplest and most effective piece of advice I think anybody could give you: code.
You can only be better at using a language (which implies understanding it) by coding. You have to actively enjoy coding, be inspired, ask questions, and find answers by yourself.
Got a an hour to spare? Write code that ... | 5 | 659 | 0 | 0 | I've been learning, working, and playing with Python for a year and a half now. As a biologist slowly making the turn to bio-informatics, this language has been at the very core of all the major contributions I have made in the lab. I more or less fell in love with the way Python permits me to express beautiful solutio... | Python progression path - From apprentice to guru | 0 | 1 | 1 | 0 | 0 | 383,814 |
2,573,135 | 2010-04-04T00:28:00.000 | 12 | 1 | 0 | 0 | 0 | python | 0 | 2,573,531 | 0 | 19 | 0 | false | 0 | 0 | Thoroughly Understand All Data Types and Structures
For every type and structure, write a series of demo programs that exercise every aspect of the type or data structure. If you do this, it might be worthwhile to blog notes on each one... it might be useful to lots of people! | 5 | 659 | 0 | 0 | I've been learning, working, and playing with Python for a year and a half now. As a biologist slowly making the turn to bio-informatics, this language has been at the very core of all the major contributions I have made in the lab. I more or less fell in love with the way Python permits me to express beautiful solutio... | Python progression path - From apprentice to guru | 0 | 1 | 1 | 0 | 0 | 383,814 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.