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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1,037,673 | 2009-06-24T10:58:00.000 | 4 | 0 | 0 | 0 | python,tkinter,pyqt,pygtk,pyobjc | 1,037,810 | 9 | false | 0 | 1 | Not really sure what you mean by "heavyweight."
wx uses native controls on each platform, and is about as easy to use in Python as I can imagine; after all, GUI APIs are complex because GUIs can get complex.
I think wx, for the effort required to build a window and the quality of what shows up on screen, is great. I d... | 6 | 9 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | Pure python gui library? | 0.088656 | 0 | 0 | 5,803 |
1,037,673 | 2009-06-24T10:58:00.000 | 2 | 0 | 0 | 0 | python,tkinter,pyqt,pygtk,pyobjc | 1,037,705 | 9 | false | 0 | 1 | I think it's about not inventig the wheel. It would work, but why should you do that? All the GUI libraries you mentioned are stable and more or less bullet proofen.
I could imagine that there are some experiments implementing a pure python library. But I never saw one. Everything about GUIs is hard work and a pure pyt... | 6 | 9 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | Pure python gui library? | 0.044415 | 0 | 0 | 5,803 |
1,037,673 | 2009-06-24T10:58:00.000 | 10 | 0 | 0 | 0 | python,tkinter,pyqt,pygtk,pyobjc | 1,037,722 | 9 | true | 0 | 1 | The path of least effort and best results would be to learn what it takes to deploy an app using those existing GUI libraries. | 6 | 9 | 0 | Python has a lot of GUI libraries: tkinter, wxWidgets, pyGTK etc. But all these GUIs need to be installed and quite heavyweight, so it's a bit complex to deploy end-user GUI python apps that relay on mentioned GUI libraries.
Recently, I have thought about python's built-in ctypes module. Theoretically, it's possible to... | Pure python gui library? | 1.2 | 0 | 0 | 5,803 |
1,038,182 | 2009-06-24T12:54:00.000 | 0 | 0 | 0 | 0 | wxpython | 14,180,592 | 3 | false | 1 | 1 | stylesheet, not slidesheet.
f = open('NAMEOFSTYLESHEET.css','w')
f.write('#ID{}\n.class{}') | 1 | 0 | 0 | How to convert HTML CSS file to wxPython files? That is, how to create slidsheet in wxPython like HTML CSS files? | HTML conversion | 0 | 0 | 0 | 677 |
1,040,135 | 2009-06-24T18:36:00.000 | 2 | 0 | 1 | 0 | python,oop | 1,040,169 | 2 | false | 0 | 0 | I would try assigning the configuration to a variable.
configVariable = config.get(parameters)
Then you can pass the configuration variable to other modules as necessary. | 2 | 2 | 0 | I'm using the ConfigParser to read the configuration information stored in a file. I'm able to read the content and use it across other modules in the project. I'm not sure if the configuration file is read every time I call config.get(parameters). How can I make sure that the configuration information is read only onc... | reading a configuration information only once in Python | 0.197375 | 0 | 0 | 601 |
1,040,135 | 2009-06-24T18:36:00.000 | 1 | 0 | 1 | 0 | python,oop | 1,040,220 | 2 | false | 0 | 0 | The default implementation of the ConfigParser class reads its data only once. | 2 | 2 | 0 | I'm using the ConfigParser to read the configuration information stored in a file. I'm able to read the content and use it across other modules in the project. I'm not sure if the configuration file is read every time I call config.get(parameters). How can I make sure that the configuration information is read only onc... | reading a configuration information only once in Python | 0.099668 | 0 | 0 | 601 |
1,043,382 | 2009-06-25T11:19:00.000 | 2 | 0 | 1 | 0 | python,encryption | 1,051,793 | 4 | false | 0 | 0 | I looked at the ezPyCrypto library that was recommended in another answer.
Please don't use this library. It is very incomplete and in some cases incorrect and highly insecure. Public key algorithms have many pitfalls and need to be implemented carefully.
For example, RSA message should use a padding scheme such as PKC... | 1 | 2 | 0 | I need to take a string in Python and encrypt it using a public key.
Can anyone give me an example or recommendation about how to go about doing this? | Encrypt a string using a public key | 0.099668 | 0 | 0 | 2,977 |
1,043,528 | 2009-06-25T11:59:00.000 | 2 | 0 | 0 | 0 | python,web-services,database-design | 1,043,653 | 5 | true | 0 | 0 | Server 1: Convert rows to JSON, call the RESTful api of second with JSON data
Server 2: listens on a URI e.g. POST /data , get json data convert back to dictionary or ORM objects, insert into db
sqlalchemy/sqlobject and simplejson is what you need. | 2 | 2 | 0 | I have a system sitting on a "Master Server", that is periodically transferring quite a few chunks of information from a MySQL DB to another server in the web.
Both servers have a MySQL Server and an Apache running. I would like an easy-to-use solution for this.
Currently I'm looking into:
XMLRPC
RestFul Services
a si... | Best Practise for transferring a MySQL table to another server? | 1.2 | 1 | 0 | 810 |
1,043,528 | 2009-06-25T11:59:00.000 | 0 | 0 | 0 | 0 | python,web-services,database-design | 1,043,595 | 5 | false | 0 | 0 | Assuming your situation allows this security-wise, you forgot one transport mechanism: simply opening a mysql connection from one server to another.
Me, I would start by thinking about one script that ran regularly on the write server and opens a read only db connection to the read server (A bit of added security) and ... | 2 | 2 | 0 | I have a system sitting on a "Master Server", that is periodically transferring quite a few chunks of information from a MySQL DB to another server in the web.
Both servers have a MySQL Server and an Apache running. I would like an easy-to-use solution for this.
Currently I'm looking into:
XMLRPC
RestFul Services
a si... | Best Practise for transferring a MySQL table to another server? | 0 | 1 | 0 | 810 |
1,043,735 | 2009-06-25T12:52:00.000 | 5 | 1 | 1 | 0 | python,security,encryption | 1,043,762 | 4 | false | 0 | 0 | The most secure encryption is no encryption. Passwords should be reduced to a hash. This is a one-way transformation, making the password (almost) unrecoverable.
When giving someone a code, you can do the following to be actually secure.
(1) generate some random string.
(2) give them the string.
(3) save the hash o... | 1 | 5 | 0 | I am making a little webgame that has tasks and solutions, the solutions are solved by entering a code given to user after completion of a task. To have some security (against cheating) i dont want to store the codes genereted by the game in plain text. But since i need to be able to give a player the code when he has ... | What is the most secure python "password" encryption | 0.244919 | 0 | 0 | 4,268 |
1,044,473 | 2009-06-25T15:06:00.000 | 1 | 1 | 0 | 1 | python,solaris,yaml,beanstalkd | 1,048,086 | 3 | false | 0 | 0 | After looking in the code (beanstalkc):
your client has send his 'list-tubes' message, and is waiting for an answer.
(until you kill it)
your server doesn't answer or can't send the answer to the client.
(or the answer is shorter than the client expect)
is a network-admin at your side (or site) :-) | 2 | 2 | 0 | i am using Solaris 10 OS(x86). i installed beanstalkd and it starts fine by using command "beanstalkd -d -l hostip -p 11300".
i have Python 2.4.4 on my system i installed YAML and beanstalkc python libraries to connect beanstalkd with python my problem is when i try to write some code:
import beanstalkc
beanstalk = bea... | BeanStalkd on Solaris doesnt return anything when called from the python library | 0.066568 | 0 | 0 | 394 |
1,044,473 | 2009-06-25T15:06:00.000 | 1 | 1 | 0 | 1 | python,solaris,yaml,beanstalkd | 1,093,128 | 3 | true | 0 | 0 | I might know what is wrong: don't start it in daemon (-d) mode. I have experienced the same and by accident I found out what is wrong.
Or rather, I don't know what is wrong, but it works without running it in daemon mode.
./beanstalkd -p 9977 &
as an alternative. | 2 | 2 | 0 | i am using Solaris 10 OS(x86). i installed beanstalkd and it starts fine by using command "beanstalkd -d -l hostip -p 11300".
i have Python 2.4.4 on my system i installed YAML and beanstalkc python libraries to connect beanstalkd with python my problem is when i try to write some code:
import beanstalkc
beanstalk = bea... | BeanStalkd on Solaris doesnt return anything when called from the python library | 1.2 | 0 | 0 | 394 |
1,045,334 | 2009-06-25T17:59:00.000 | 1 | 1 | 1 | 0 | c#,.net,python | 1,045,606 | 12 | false | 0 | 0 | IF you are looking for reasons to convert them, I can think of a few. These don't necessarily mean you should, these are just possible reasons in the "recode" corner.
Maintainability
If you have a dev-shop that is primarily C# focused, then have python applications around may not be useful for maintainability reasons... | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 0.016665 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 8 | 1 | 1 | 0 | c#,.net,python | 1,045,361 | 12 | false | 0 | 0 | There's IronPython , a python implementation for .NET. You could port it to that if you really need to get away from the "standard" python vm and onto the .NET platform | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 1 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | -1 | 1 | 1 | 0 | c#,.net,python | 1,045,479 | 12 | false | 0 | 0 | i will convert it from language a to language b for 1 million dollars. <--- this would be the only business reason I would consider legit. | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | -0.016665 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 1 | 1 | 1 | 0 | c#,.net,python | 1,046,028 | 12 | false | 0 | 0 | Short and to the point answer: No, there is no reason. | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 0.016665 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 0 | 1 | 1 | 0 | c#,.net,python | 1,045,561 | 12 | false | 0 | 0 | Some reasons that come to mind:
Performance
Easier to find developers
Huge huge huge developer and tools
ecosystem
But I second what the others have stated: if it ain't broke, don't fix it. Unless your boss is saying, "hey, we're moving all our crap to .NET", or you're presented with some other business reason for m... | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 0 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 0 | 1 | 1 | 0 | c#,.net,python | 1,045,532 | 12 | false | 0 | 0 | The only thing I can think of is the performance boost C# will give you. | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 0 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 1 | 1 | 1 | 0 | c#,.net,python | 1,045,512 | 12 | false | 0 | 0 | As long as the application is running fine there is no reason to switch to C#. | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 0.016665 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 6 | 1 | 1 | 0 | c#,.net,python | 1,045,356 | 12 | false | 0 | 0 | Leave them as Python unless you hear a very good business reason to convert. | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 1 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 4 | 1 | 1 | 0 | c#,.net,python | 1,045,446 | 12 | false | 0 | 0 | Changing languages just for the sake of changing languages is rarely a good idea. If the app is doing its obj then let it do its job. If you've got a corporate mandate to only use C#, that may be a different story (estimate the work involved, give the estimate to management, let them decide to pursue it or write up a... | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 0.066568 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 1 | 1 | 1 | 0 | c#,.net,python | 1,045,349 | 12 | false | 0 | 0 | I would not convert unless you are converting as part of an enterprise-wide switch from one language to another. Even then I would avoid converting until absolutely necessary. If it works, why change it? | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 0.016665 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 13 | 1 | 1 | 0 | c#,.net,python | 1,045,351 | 12 | true | 0 | 0 | Quote: "If it doesn't break, don't fix it."
Unless your company is moving towards .NET and/or there are no more qualified Python developer available anymore, then don't. | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 1.2 | 0 | 0 | 406 |
1,045,334 | 2009-06-25T17:59:00.000 | 3 | 1 | 1 | 0 | c#,.net,python | 1,045,378 | 12 | false | 0 | 0 | If you're the only Python developer in a C# shop, then it makes plenty of sense to convert. If you quit tomorrow, no one will be able to maintain these systems. | 12 | 4 | 0 | I have written several Python tools for my company. Is there any good reason to convert them from Python to C# now that their usefulness has been proven? Would I be better off just leaving them in Python? | Is there any good reason to convert an app written in python to c#? | 0.049958 | 0 | 0 | 406 |
1,046,068 | 2009-06-25T20:30:00.000 | 3 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,149 | 11 | false | 0 | 0 | In Java and Python, architecture details are abstracted away so that it is in fact more or less impossible to write architecture-dependant code.
With C++, this is an entirely different matter - you can certainly write code that does not depend on architecture details, but you have be careful to avoid pitfalls, specific... | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 0.054491 | 0 | 0 | 1,267 |
1,046,068 | 2009-06-25T20:30:00.000 | 1 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,141 | 11 | false | 0 | 0 | If you are programming in Python or in Java, the interpreter and the virtual machine respectively abstract this layer of the architecture. You then need not to worry if it's running on a 32 or 64 bits architecture.
The same cannot be said for C++, in which you'll have to ask yourself sometimes if you are running on a 3... | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 0.01818 | 0 | 0 | 1,267 |
1,046,068 | 2009-06-25T20:30:00.000 | 0 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,113 | 11 | false | 0 | 0 | In C++, you have to be very careful if you want to write code that works indifferently on 32 or 64 bits.
Many people wrongly assume that int can store a pointer, for example. | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 0 | 0 | 0 | 1,267 |
1,046,068 | 2009-06-25T20:30:00.000 | 0 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,737 | 11 | false | 0 | 0 | A 32 bit machine will allow you to have a maximum of 4 GB of addressable virtual memory. (In practice, it's even less than that, usually 2 GB or 3 GB depending on the OS and various linker options.) On a 64 bit machine, you can have a HUGE virtual address space (in any practical sense, limited only by disk) and a pre... | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 0 | 0 | 0 | 1,267 |
1,046,068 | 2009-06-25T20:30:00.000 | 2 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,182 | 11 | false | 0 | 0 | As long as you do things correctly, you almost never need to know for most languages. On many, you never need to know, as the language behavior doesn't vary (Java, for example, specifies the runtime behavior precisely).
In C++ and C, doing things correctly includes not making assumptions about int. Don't put pointers... | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 0.036348 | 0 | 0 | 1,267 |
1,046,068 | 2009-06-25T20:30:00.000 | 0 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,298 | 11 | false | 0 | 0 | With java and .net you don't really have to bother with it unless you are doing very low level stuff like twiddling bits. If you are using c, c++, fortran you might get by but I would actually recommend using things like "stdint.h" where you use definitive declares like uint64_t and uint32_t so as to be explicit. Also,... | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 0 | 0 | 0 | 1,267 |
1,046,068 | 2009-06-25T20:30:00.000 | 0 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,100 | 11 | false | 0 | 0 | You will need to care about "endian-ness" only if you send and receive raw C structs
over the wire like
ret = send(socket, &myStruct, sizeof(myStruct));
However this is not a recommended practice.
It's recommended that you define a protocol between the parties such it doesn't matter
the parties' machine architecture... | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 0 | 0 | 0 | 1,267 |
1,046,068 | 2009-06-25T20:30:00.000 | 16 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,099 | 11 | true | 0 | 0 | correct for most circumstances
The runtime/language/compiler will abstract those details unless you are dealing directly with word sizes or binary at a low level.
Even byteorder is abstracted by the NIC/Network stack in the kernel. It is translated for you. When programming sockets in C, you do sometimes have to deal w... | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 1.2 | 0 | 0 | 1,267 |
1,046,068 | 2009-06-25T20:30:00.000 | 16 | 1 | 0 | 0 | java,c++,python,64-bit,32-bit | 1,046,128 | 11 | false | 0 | 0 | Knowing how things work, be it how the virtual machine works, and how it works on your platform, or how certain C++ constructs are transformed into assembly will always make you a better programmer, because you will understand why things should be done the way they are.
You need to understand things like memory to know... | 9 | 6 | 0 | Let's say I'm programming in Java or Python or C++ for a simple problem, could be to build an TCP/UDP echo server or computation of factorial. Do I've to bother about the architecture details, i.e., if it is 32 or 64-bit?
IMHO, unless I'm programming something to do with fairly low-level stuff then I don't have to both... | Would one have to know the machine architecture to write code? | 1 | 0 | 0 | 1,267 |
1,046,157 | 2009-06-25T20:42:00.000 | 0 | 0 | 0 | 0 | python,wxpython | 1,046,259 | 2 | false | 0 | 1 | When the window is restored it is (on some platforms) repainted using EVT_PAINT handler.
The solution is e.g. to draw the same lines in OnPaint(). Or buffer what you draw. See the wxBufferedDC class. | 1 | 1 | 0 | In my wx.Frame based wxpython application, I draw some lines on a panel when some events occur by creating wx.ClientDC instances when needed. The only problem is, if the window is minimized and then restored, the lines disappear! Is there some kind of method that I should override or event to bind to that will allow me... | wxpython: How can I redraw something when a window is retored? | 0 | 0 | 0 | 541 |
1,046,847 | 2009-06-26T00:28:00.000 | 4 | 1 | 0 | 0 | php,python,memcached | 1,046,859 | 2 | false | 0 | 0 | By default, the PHP client stores keys in PHP's serialized format (which Python won't understand by default). If the Python client does something similar (using its own serialization format), that'd be your problem.
You can always use telnet/netcat to see what exactly is getting stored. | 2 | 1 | 0 | I'm storing a value in memcached using PHP's Memcache extension and trying to retrieve it in a daemon written in Python sitting behind my webapp. But, it keeps returning None or throwing "local variable 'val' referenced before assignment".
I'm sure I'm looking for the same key, and there's only one mc server available... | Accessing a PHP-set memcache key from Python | 0.379949 | 0 | 0 | 1,069 |
1,046,847 | 2009-06-26T00:28:00.000 | 1 | 1 | 0 | 0 | php,python,memcached | 4,357,288 | 2 | false | 0 | 0 | You could serialise the "data" into json, which I've done once. | 2 | 1 | 0 | I'm storing a value in memcached using PHP's Memcache extension and trying to retrieve it in a daemon written in Python sitting behind my webapp. But, it keeps returning None or throwing "local variable 'val' referenced before assignment".
I'm sure I'm looking for the same key, and there's only one mc server available... | Accessing a PHP-set memcache key from Python | 0.099668 | 0 | 0 | 1,069 |
1,047,021 | 2009-06-26T02:04:00.000 | 41 | 0 | 1 | 0 | python,operators,overriding | 31,546,707 | 4 | false | 0 | 0 | In addition to what's correctly given in answers above, it is worth explicitly clarifying that when __iadd__ is overriden, the x += y operation does NOT end with the end of __iadd__ method.
Instead, it ends with x = x.__iadd__(y). In other words, Python assigns the return value of your __iadd__ implementation to the ob... | 1 | 85 | 0 | Is it possible to override += in Python? | Overriding "+=" in Python? (__iadd__() method) | 1 | 0 | 0 | 59,684 |
1,047,306 | 2009-06-26T04:19:00.000 | 1 | 0 | 0 | 1 | python,twisted,orbited | 1,047,755 | 5 | false | 0 | 0 | I'd suggest you use Twisted. ;) It has both chat clients and chat servers. Then you also need a web framework. I'd use either Grok or BFD, but there are many Python Web Frameworks around, and few of them are really bad. | 2 | 5 | 0 | i want to build a site similar to www.omegle.com. can any one suggest me some ideas.
I think its built usning twisted , orbiter comet server. | Chat comet site using python and twisted | 0.039979 | 0 | 0 | 4,166 |
1,047,306 | 2009-06-26T04:19:00.000 | 3 | 0 | 0 | 1 | python,twisted,orbited | 1,047,805 | 5 | true | 0 | 0 | Twisted is a good choice. I used it a few years ago to build a server for a browser-based online game I wrote - it kept track of clients, served them replies to Ajax requests, and used HTML5 Server-Sent DOM Events as well. Worked rather painlessly thanks to Twisted's good HTTP library.
For a Python web framework, I per... | 2 | 5 | 0 | i want to build a site similar to www.omegle.com. can any one suggest me some ideas.
I think its built usning twisted , orbiter comet server. | Chat comet site using python and twisted | 1.2 | 0 | 0 | 4,166 |
1,048,446 | 2009-06-26T10:44:00.000 | 1 | 0 | 1 | 0 | wxpython | 1,048,463 | 1 | false | 0 | 1 | You need to give your text control the TE_PASSWORD style.
(As Jørn's comment points out, this isn't "encryption" - I'm assuming you're only talking about the visual presentation of the password.) | 1 | 0 | 0 | I am developing an student attendance application in wxpython and I need to know how to ensure that password field doesn't echo characters to the screen.
Forexample :if I give the name as moni means then it should be displayed as in format of **** | Hiding characters typed into password field | 0.197375 | 0 | 0 | 427 |
1,048,651 | 2009-06-26T11:36:00.000 | 1 | 0 | 1 | 1 | python,deployment,wxpython,multiprocessing,py2exe | 1,124,797 | 4 | false | 0 | 0 | When you run py2exe, look closely at the final messages when it's completed. It gives you a list of DLLs that it says are needed by the program, but that py2exe doesn't automatically bundle.
Many in the list are reliably available on any Windows install, but there will be a few that you should manually bundle into your... | 2 | 1 | 0 | I have a problem: I used py2exe for my program, and it worked on my computer. I packaged it with Inno Setup (still worked on my computer), but when I sent it to a different computer, I got the following error when trying to run the application: "CreateProcess failed; code 14001." The app won't run.
(Note: I am using wx... | Problem deploying Python program (packaged with py2exe) | 0.049958 | 0 | 0 | 2,683 |
1,048,651 | 2009-06-26T11:36:00.000 | 1 | 0 | 1 | 1 | python,deployment,wxpython,multiprocessing,py2exe | 1,048,732 | 4 | false | 0 | 0 | You should be able to install that MS redistributable thingy as a part of your InnoSetup setup exe. | 2 | 1 | 0 | I have a problem: I used py2exe for my program, and it worked on my computer. I packaged it with Inno Setup (still worked on my computer), but when I sent it to a different computer, I got the following error when trying to run the application: "CreateProcess failed; code 14001." The app won't run.
(Note: I am using wx... | Problem deploying Python program (packaged with py2exe) | 0.049958 | 0 | 0 | 2,683 |
1,049,648 | 2009-06-26T15:10:00.000 | 1 | 0 | 0 | 1 | python,subprocess | 1,049,684 | 2 | true | 0 | 0 | Are you using shell=True option for subprocess? | 2 | 3 | 0 | I have created temporary named files, with the tempfile libraries NamedTemporaryFile method.
I have written to them flushed the buffers, and I have not closed them (or else they might go away)
I am trying to use the subprocess module to call some shell commands using these generated files.
subprocess.call('cat %s' % f.... | subprocess module: using the call method with tempfile objects | 1.2 | 0 | 0 | 819 |
1,049,648 | 2009-06-26T15:10:00.000 | 3 | 0 | 0 | 1 | python,subprocess | 1,049,697 | 2 | false | 0 | 0 | Why don't you make your NamedTemporaryFiles with the optional parameter delete=False? That way you can safely close them knowing they won't disappear, use them normally afterwards, and explicitly unlink them when you're done. This way everything will work cross-platform, too. | 2 | 3 | 0 | I have created temporary named files, with the tempfile libraries NamedTemporaryFile method.
I have written to them flushed the buffers, and I have not closed them (or else they might go away)
I am trying to use the subprocess module to call some shell commands using these generated files.
subprocess.call('cat %s' % f.... | subprocess module: using the call method with tempfile objects | 0.291313 | 0 | 0 | 819 |
1,050,089 | 2009-06-26T16:39:00.000 | 1 | 1 | 0 | 0 | php,python,perl,parsing,feed | 1,050,136 | 4 | false | 0 | 0 | Most modern languages scripting languages allow you to do all of these things. Because of that, I think your choice of language should be based on what you and the people who read your code know.
In Perl I'd make use of the following modules:
Net::FTP to access the ftp sites.
DBI to insert data into your database.
Mo... | 1 | 2 | 0 | I've been having to do some basic feed processing. So, get a file via ftp, process it (i.e. get the fields I care about), and then update the local database. And similarly the other direction: get data from db, create file, and upload by ftp. The scripts will be called by cron.
I think the idea would be for each type o... | Get remote text file, process, and update database - approach and scripting language to use? | 0.049958 | 0 | 0 | 1,025 |
1,051,254 | 2009-06-26T20:54:00.000 | -1 | 0 | 1 | 0 | python,package,skype,python-import | 1,051,265 | 19 | false | 0 | 0 | Go option #2. If ImportError is thrown, then the package is not installed (or not in sys.path). | 3 | 148 | 0 | What's a good way to check if a package is installed while within a Python script? I know it's easy from the interpreter, but I need to do it within a script.
I guess I could check if there's a directory on the system that's created during the installation, but I feel like there's a better way. I'm trying to make sure... | Check if Python Package is installed | -0.010526 | 0 | 0 | 234,729 |
1,051,254 | 2009-06-26T20:54:00.000 | 0 | 0 | 1 | 0 | python,package,skype,python-import | 58,277,135 | 19 | false | 0 | 0 | Hmmm ... the closest I saw to a convenient answer was using the command line to try the import. But I prefer to even avoid that.
How about 'pip freeze | grep pkgname'? I tried it and it works well. It also shows you the version it has and whether it is installed under version control (install) or editable (develop). | 3 | 148 | 0 | What's a good way to check if a package is installed while within a Python script? I know it's easy from the interpreter, but I need to do it within a script.
I guess I could check if there's a directory on the system that's created during the installation, but I feel like there's a better way. I'm trying to make sure... | Check if Python Package is installed | 0 | 0 | 0 | 234,729 |
1,051,254 | 2009-06-26T20:54:00.000 | 1 | 0 | 1 | 0 | python,package,skype,python-import | 62,093,901 | 19 | false | 0 | 0 | I would like to comment to @ice.nicer reply but I cannot, so ...
My observations is that packages with dashes are saved with underscores, not only with dots as pointed out by @dwich comment
For example, you do pip3 install sphinx-rtd-theme, but:
importlib.util.find_spec(sphinx_rtd_theme) returns an Object
importlib.ut... | 3 | 148 | 0 | What's a good way to check if a package is installed while within a Python script? I know it's easy from the interpreter, but I need to do it within a script.
I guess I could check if there's a directory on the system that's created during the installation, but I feel like there's a better way. I'm trying to make sure... | Check if Python Package is installed | 0.010526 | 0 | 0 | 234,729 |
1,051,275 | 2009-06-26T21:02:00.000 | 2 | 0 | 0 | 0 | python,curl,amazon-s3,amazon-web-services,boto | 1,051,338 | 6 | false | 0 | 0 | I don't know anything about python, but in general you would want to break the task down into smaller chunks so that they can be run concurrently. You could break it down by file type, or alphabetical or something, and then run a separate script for each portion of the break down. | 2 | 3 | 0 | What's the Fastest way to get a large number of files (relatively small 10-50kB) from Amazon S3 from Python? (In the order of 200,000 - million files).
At the moment I am using boto to generate Signed URLs, and using PyCURL to get the files one by one.
Would some type of concurrency help? PyCurl.CurlMulti object?
I ... | Downloading a Large Number of Files from S3 | 0.066568 | 0 | 1 | 3,744 |
1,051,275 | 2009-06-26T21:02:00.000 | 0 | 0 | 0 | 0 | python,curl,amazon-s3,amazon-web-services,boto | 1,051,408 | 6 | false | 0 | 0 | I've been using txaws with twisted for S3 work, though what you'd probably want is just to get the authenticated URL and use twisted.web.client.DownloadPage (by default will happily go from stream to file without much interaction).
Twisted makes it easy to run at whatever concurrency you want. For something on the ord... | 2 | 3 | 0 | What's the Fastest way to get a large number of files (relatively small 10-50kB) from Amazon S3 from Python? (In the order of 200,000 - million files).
At the moment I am using boto to generate Signed URLs, and using PyCURL to get the files one by one.
Would some type of concurrency help? PyCurl.CurlMulti object?
I ... | Downloading a Large Number of Files from S3 | 0 | 0 | 1 | 3,744 |
1,051,652 | 2009-06-26T23:02:00.000 | 0 | 0 | 1 | 0 | python,multithreading,locking,twisted,mutex | 1,302,967 | 2 | false | 0 | 0 | Twisted lets you write event-driven code in a single thread. Multiple events can write to standard Python non-thread-safe data structures in a safe matter, and non-thread-safe data structures can be used as mutexes. If you do start using threads, then you have to worry about these things. But you don't have to use t... | 1 | 2 | 0 | I'm using the Twisted framework, and am getting RPCs asynchronously. I have another function which does a task every 2 seconds, and sleeps in between. This is called through reactor.callInThread. These depend on a shared resources, so I need some thread-safe way of accessing them. How does one go about using critical s... | Mutex in Python Twisted | 0 | 0 | 0 | 3,964 |
1,052,716 | 2009-06-27T11:54:00.000 | 4 | 0 | 0 | 1 | python,multiprocessing,atexit | 1,053,223 | 3 | false | 0 | 0 | When you fork to make a child process, that child is an exact copy of the parent -- including of course registered exit functions as well as all other code and data structures. I believe that's the issue you're observing -- of course it's not mentioned in each and every module, because it necessarily applies to every s... | 1 | 4 | 0 | I am writing a daemon program using python 2.5. In the main process an exit handler is registered with atexit module, it seems that the handler gets called when each child process ends, which is not I expected.
I noticed this behavior isn't mentioned in python atexit doc, anybody knows the issue? If this is how it sh... | Is registered atexit handler inherited by spawned child processes? | 0.26052 | 0 | 0 | 2,133 |
1,052,957 | 2009-06-27T14:52:00.000 | 3 | 0 | 0 | 1 | python,macos,postgresql | 1,052,990 | 3 | true | 0 | 0 | macports tells me that the psycopg2 package has a dependency on the postgres client and libraries (but not the db server). If you successfully installed psycopg, then you should be good to go.
If you haven't installed yet, consider using macports or fink to deal with dependency resolution for you. In most cases, this w... | 1 | 2 | 0 | I want to access a postgreSQL database that's running on a remote machine, from Python in OS/X. Do I have to install postgres on the mac as well? Or will psycopg2 work on its own.
Any hints for a good installation guide for psycopg2 for os/x? | psycopg2 on OSX: do I have to install PostgreSQL too? | 1.2 | 1 | 0 | 4,829 |
1,052,969 | 2009-06-27T14:56:00.000 | 1 | 0 | 0 | 0 | python,windows,emacs,elisp,ropemacs | 1,052,995 | 7 | false | 0 | 0 | You can roll your own in bash/cmd.exe. The windows emacs distribution comes with a .bat file called runemacs.bat which accepts files to open as arguments. Write a small script and it should be able to open everything up from one icon. | 1 | 7 | 0 | I say "project file" in the loosest sense. I have a few python projects that I work on with ropemacs using emacs W32 for Windows. What would be ideal is if I could have an icon I could click on on my desktop to open up emacs, open up the rope project, and set the speed bar in the top-level directory of that project. ... | Is there any way to create a "project file" in Emacs? | 0.028564 | 0 | 0 | 2,471 |
1,053,794 | 2009-06-27T22:41:00.000 | 1 | 0 | 1 | 0 | python,windows | 1,053,888 | 2 | false | 0 | 0 | just FYI, since both c:\python25 and c:\python26 are on PATH, I copy C:\Python25\python.exe to C:\Python25\py25.exe, and copy C:\Python26\python.exe to C:\Python26\py26.exe
Then just type py25(or py26) get the specific version. | 2 | 5 | 0 | I have two python installations, 2.5 and 2.6
I want to change the default python interpreter from 2.5 to 2.6.
Anyone know how? | Changing python interpreter windows | 0.099668 | 0 | 0 | 7,934 |
1,053,794 | 2009-06-27T22:41:00.000 | 10 | 0 | 1 | 0 | python,windows | 1,053,856 | 2 | true | 0 | 0 | PYTHONPATH is NOT what you are looking for. That is for varying where Python's "import" looks for packages and modules.
You need to change the PATH variable in your environment so that it contains e.g. "....;c:\python26;...." instead of "....;c:\python25;....". Click on start > control panel > system > advanced > envir... | 2 | 5 | 0 | I have two python installations, 2.5 and 2.6
I want to change the default python interpreter from 2.5 to 2.6.
Anyone know how? | Changing python interpreter windows | 1.2 | 0 | 0 | 7,934 |
1,055,443 | 2009-06-28T18:27:00.000 | 3 | 0 | 1 | 1 | python | 1,055,554 | 7 | false | 0 | 0 | just run the Python interpeter and type the command
import "lib_name"
if it gives an error, you don't have the lib installed...else you are good to go | 4 | 13 | 0 | I'm just starting out with Python, and have found out that I can import various libraries. How do I find out what libraries exist on my Mac that I can import? How do I find out what functions they include?
I seem to remember using some web server type thing to browse through local help files, but I may have imagined th... | How do I find out what Python libraries are installed on my Mac? | 0.085505 | 0 | 0 | 30,575 |
1,055,443 | 2009-06-28T18:27:00.000 | 39 | 0 | 1 | 1 | python | 1,055,453 | 7 | false | 0 | 0 | From the Python REPL (the command-line interpreter / Read-Eval-Print-Loop), type help("modules") to see a list of all your available libs.
Then to see functions within a module, do help("posix"), for example. If you haven't imported the library yet, you have to put quotes around the library's name. | 4 | 13 | 0 | I'm just starting out with Python, and have found out that I can import various libraries. How do I find out what libraries exist on my Mac that I can import? How do I find out what functions they include?
I seem to remember using some web server type thing to browse through local help files, but I may have imagined th... | How do I find out what Python libraries are installed on my Mac? | 1 | 0 | 0 | 30,575 |
1,055,443 | 2009-06-28T18:27:00.000 | 2 | 0 | 1 | 1 | python | 1,055,474 | 7 | false | 0 | 0 | On Leopard, depending on the python package you're using and the version number, the modules can be found in /Library/Python:
/Library/Python/2.5/site-packages
or in /Library/Frameworks
/Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages
(it could also be 3.0 or whatever version)...
I gues... | 4 | 13 | 0 | I'm just starting out with Python, and have found out that I can import various libraries. How do I find out what libraries exist on my Mac that I can import? How do I find out what functions they include?
I seem to remember using some web server type thing to browse through local help files, but I may have imagined th... | How do I find out what Python libraries are installed on my Mac? | 0.057081 | 0 | 0 | 30,575 |
1,055,443 | 2009-06-28T18:27:00.000 | 3 | 0 | 1 | 1 | python | 1,055,520 | 7 | false | 0 | 0 | You can install another library: yolk.
yolk is a python package manager and will show you everything you have added via pypi. But it will also show you site-packages added through whatever local package manager you run. | 4 | 13 | 0 | I'm just starting out with Python, and have found out that I can import various libraries. How do I find out what libraries exist on my Mac that I can import? How do I find out what functions they include?
I seem to remember using some web server type thing to browse through local help files, but I may have imagined th... | How do I find out what Python libraries are installed on my Mac? | 0.085505 | 0 | 0 | 30,575 |
1,056,051 | 2009-06-28T23:37:00.000 | 1 | 1 | 0 | 0 | python,c,interop,cross-domain | 1,056,105 | 9 | false | 0 | 1 | I haven't used an IPC approach for Python<->C communication but it should work pretty well. I would have the C program do a standard fork-exec and use redirected stdin and stdout in the child process for the communication. A nice text-based communication will make it very easy to develop and test the Python program. | 3 | 52 | 0 | I want to extend a large C project with some new functionality, but I really want to write it in Python. Basically, I want to call Python code from C code. However, Python->C wrappers like SWIG allow for the OPPOSITE, that is writing C modules and calling C from Python.
I'm considering an approach involving IPC or RP... | How do you call Python code from C code? | 0.022219 | 0 | 0 | 79,185 |
1,056,051 | 2009-06-28T23:37:00.000 | 0 | 1 | 0 | 0 | python,c,interop,cross-domain | 1,621,442 | 9 | false | 0 | 1 | apparently Python need to be able to compile to win32 dll, it will solve the problem
In such a way that converting c# code to win32 dlls will make it usable by any development tool | 3 | 52 | 0 | I want to extend a large C project with some new functionality, but I really want to write it in Python. Basically, I want to call Python code from C code. However, Python->C wrappers like SWIG allow for the OPPOSITE, that is writing C modules and calling C from Python.
I'm considering an approach involving IPC or RP... | How do you call Python code from C code? | 0 | 0 | 0 | 79,185 |
1,056,051 | 2009-06-28T23:37:00.000 | 7 | 1 | 0 | 0 | python,c,interop,cross-domain | 1,056,087 | 9 | false | 0 | 1 | Have you considered just wrapping your python application in a shell script and invoking it from within your C application?
Not the most elegant solution, but it is very simple. | 3 | 52 | 0 | I want to extend a large C project with some new functionality, but I really want to write it in Python. Basically, I want to call Python code from C code. However, Python->C wrappers like SWIG allow for the OPPOSITE, that is writing C modules and calling C from Python.
I'm considering an approach involving IPC or RP... | How do you call Python code from C code? | 1 | 0 | 0 | 79,185 |
1,058,273 | 2009-06-29T13:22:00.000 | 1 | 0 | 1 | 0 | python,math,functional-programming | 1,058,290 | 5 | false | 0 | 0 | I would call it function compositor or something like that | 4 | 1 | 0 | What should 'foo' be called, given the following?
x.items is a set, y.values is a set.
function a(key) returns an ordered list of x.items
function b(x.item) returns a single y.value
Define foo(a, b), which returns a function, d, such that d(key) returns a list of y.values defined by: map(b, a(key)).
This feels like a f... | What should I call this function composition? | 0.039979 | 0 | 0 | 276 |
1,058,273 | 2009-06-29T13:22:00.000 | 0 | 0 | 1 | 0 | python,math,functional-programming | 1,058,328 | 5 | false | 0 | 0 | The synergy engine. | 4 | 1 | 0 | What should 'foo' be called, given the following?
x.items is a set, y.values is a set.
function a(key) returns an ordered list of x.items
function b(x.item) returns a single y.value
Define foo(a, b), which returns a function, d, such that d(key) returns a list of y.values defined by: map(b, a(key)).
This feels like a f... | What should I call this function composition? | 0 | 0 | 0 | 276 |
1,058,273 | 2009-06-29T13:22:00.000 | 1 | 0 | 1 | 0 | python,math,functional-programming | 1,107,216 | 5 | false | 0 | 0 | I would call that function permuted_values
What you are doing is equivalent to iterating over a hash map using a permutation based on your key. | 4 | 1 | 0 | What should 'foo' be called, given the following?
x.items is a set, y.values is a set.
function a(key) returns an ordered list of x.items
function b(x.item) returns a single y.value
Define foo(a, b), which returns a function, d, such that d(key) returns a list of y.values defined by: map(b, a(key)).
This feels like a f... | What should I call this function composition? | 0.039979 | 0 | 0 | 276 |
1,058,273 | 2009-06-29T13:22:00.000 | 0 | 0 | 1 | 0 | python,math,functional-programming | 1,058,402 | 5 | false | 0 | 0 | Here's are example names for a, b, and foo that might help (I don't like these, but they're sort of like what I'm getting at):
items_by_key(key)
value_by_item(item)
values_by_key(items_by_key, value_by_item) | 4 | 1 | 0 | What should 'foo' be called, given the following?
x.items is a set, y.values is a set.
function a(key) returns an ordered list of x.items
function b(x.item) returns a single y.value
Define foo(a, b), which returns a function, d, such that d(key) returns a list of y.values defined by: map(b, a(key)).
This feels like a f... | What should I call this function composition? | 0 | 0 | 0 | 276 |
1,059,214 | 2009-06-29T16:26:00.000 | 0 | 0 | 0 | 0 | python,performance,wxpython,tkinter,richtextediting | 1,070,836 | 2 | false | 0 | 1 | It kind of avoids the question slightly, but could you use wxStyledTextCtrl instead? | 2 | 0 | 0 | I've made a small tool that parses a chunk of text, does some simple processing (retrieves values from a dictionary, a few regex, etc.) and then spits the results.
In order to make easier to read the results, I made two graphic ports, one with tkInter and other with wxPython, so the output is nicely displayed in a Text... | wxPython RichTextCtrl much slower than tkInter Text? | 0 | 0 | 0 | 1,031 |
1,059,214 | 2009-06-29T16:26:00.000 | 1 | 0 | 0 | 0 | python,performance,wxpython,tkinter,richtextediting | 1,189,222 | 2 | true | 0 | 1 | I'm copying here the comment that solved the problem:
Have you tried using Freeze() and
Thaw() to only update the display
after you are done appending the
coloured text? – mghie Jun 30 at 7:20 | 2 | 0 | 0 | I've made a small tool that parses a chunk of text, does some simple processing (retrieves values from a dictionary, a few regex, etc.) and then spits the results.
In order to make easier to read the results, I made two graphic ports, one with tkInter and other with wxPython, so the output is nicely displayed in a Text... | wxPython RichTextCtrl much slower than tkInter Text? | 1.2 | 0 | 0 | 1,031 |
1,059,594 | 2009-06-29T17:56:00.000 | 0 | 0 | 1 | 1 | python,installation,distutils | 1,085,582 | 2 | false | 0 | 0 | using "python2.3" can be wrong if another (default) installation patched PATH to itself only.
Task can be solved by:
finding full path to desired python interpreter, on ActivePython it is C:\Python26 for default installation of Python 2.6
make a full path to binary (in this case C:\Python26\python.exe)
execute module ... | 1 | 1 | 0 | I have a Windows machine with Python 2.3, 2.6 and 3.0 installed and 2.5 installed with Cygwin. I've downloaded the pexpect package but when I run "python setup.py install" it installs to the 2.6 installation.
How could I have it install to the Cygwin Python installation, or any other installation? | How do I install with distutils to a specific Python installation? | 0 | 0 | 0 | 327 |
1,060,334 | 2009-06-29T20:28:00.000 | 1 | 0 | 0 | 0 | python,pylons,payment-gateway,payment | 1,060,758 | 3 | false | 0 | 0 | That's something usual to do. Please follow the instructions your payment gateway gives you on how to send info to them, and write the code. If you have some issue, feel free to ask a more specific question. | 2 | 2 | 0 | I'm building an application that eventually needs to process cc #s. I'd like to handle it completely in my app, and then hand off the information securely to my payment gateway. Ideally the user would have no interaction with the payment gateway directly.
Any thoughts? Is there an easier way? | payment processing - pylons/python | 0.066568 | 0 | 0 | 1,120 |
1,060,334 | 2009-06-29T20:28:00.000 | 1 | 0 | 0 | 0 | python,pylons,payment-gateway,payment | 1,063,700 | 3 | false | 0 | 0 | You will probably find that it's easier to just let the payment gateway handle it. It's best to leave PCI compliance to the experts. | 2 | 2 | 0 | I'm building an application that eventually needs to process cc #s. I'd like to handle it completely in my app, and then hand off the information securely to my payment gateway. Ideally the user would have no interaction with the payment gateway directly.
Any thoughts? Is there an easier way? | payment processing - pylons/python | 0.066568 | 0 | 0 | 1,120 |
1,063,626 | 2009-06-30T13:14:00.000 | 7 | 0 | 0 | 0 | python,django,unicode | 1,063,665 | 2 | true | 1 | 0 | You are probably storing the template in a non-unicode encoding, such as latin-1. I believe Django assumes that templates are in UTF-8 by default (though there is a setting to override this).
Your editor should be capable of saving the template file in the UTF-8 encoding (probably via a dropdown on the save as page, t... | 1 | 5 | 0 | I have some french letters (é, è, à...) in a django template but when it is loaded by django, an UnicodeDecodeError exception is raised.
If I don't load the template but directly use a python string. It works ok.
Is there something to do to use unicode with django template? | how to use french letters in a django template? | 1.2 | 0 | 0 | 4,002 |
1,063,770 | 2009-06-30T13:45:00.000 | -10 | 0 | 0 | 0 | python,transactions,pyodbc | 1,063,879 | 2 | false | 0 | 0 | I don't think pyodbc has any specific support for transactions. You need to send the SQL command to start/commit/rollback transactions. | 1 | 15 | 0 | I have a username which I must change in numerous (up to ~25) tables. (Yeah, I know.) An atomic transaction seems to be the way to go for this sort of thing. However, I do not know how to do this with pyodbc. I've seen various tutorials on atomic transactions before, but have never used them.
The setup: Windows pla... | In Python, Using pyodbc, How Do You Perform Transactions? | -1 | 1 | 0 | 27,883 |
1,064,520 | 2009-06-30T15:56:00.000 | 2 | 0 | 0 | 0 | python,django,api,django-models,django-admin | 1,064,563 | 2 | false | 1 | 0 | Web services API's are just more URL's.
These WS API URL's map to view functions.
The WS view functions handle GET and POST (and possibly PUT and DELETE).
The WS view functions use Forms as well as the Models to make things happen.
It is, in a way, like an admin interface. Except, there's no HTML.
The WS view function... | 1 | 2 | 0 | I am adding MetaWeblog API support to a Django CMS, and am not quite sure how to layer the application.
I am using django_xmlrpc, which allows me to map to parameterised functions for each request. It is just a case of what level do I hook in calls to the django application from the service functions (AddPage, EditPage... | What is the best way to add an API to a Django application? | 0.197375 | 0 | 0 | 299 |
1,065,964 | 2009-06-30T20:46:00.000 | 1 | 0 | 0 | 0 | python,ide,pylons | 3,596,813 | 9 | false | 0 | 1 | Try Aptana Studio... It's eclipse+pydev+web stuff, it doesnt have any specific pylons stuff or mako support. But eclipse+pydev alone is great + all the nice jscript+html+css stuff aptana adds. | 4 | 8 | 0 | I have been reading through this wonderful website regarding the recommended Python IDEs and have narrowed it down to either
WingIDE
KomodoIDE
which you guys will recommend for the purpose of developing Pylons apps? I know that most questions have been asked pertaining to Python IDEs but how about Python web framewor... | Recommended IDE for developing Pylons apps | 0.022219 | 0 | 0 | 4,484 |
1,065,964 | 2009-06-30T20:46:00.000 | 0 | 0 | 0 | 0 | python,ide,pylons | 2,364,669 | 9 | false | 0 | 1 | Wow, I've also been looking for a good Pylons web app IDE. Seems like KomodoIDE 5.1 kicks some serious ass. I love the support for Mako and that it supports pretty much all of the SCMs.
I've been using Textmate, but KomodoIDE will take over from now onwards | 4 | 8 | 0 | I have been reading through this wonderful website regarding the recommended Python IDEs and have narrowed it down to either
WingIDE
KomodoIDE
which you guys will recommend for the purpose of developing Pylons apps? I know that most questions have been asked pertaining to Python IDEs but how about Python web framewor... | Recommended IDE for developing Pylons apps | 0 | 0 | 0 | 4,484 |
1,065,964 | 2009-06-30T20:46:00.000 | 1 | 0 | 0 | 0 | python,ide,pylons | 4,134,659 | 9 | false | 0 | 1 | +1 for Spyder. Never heard of it before reading this page. Working great so far. | 4 | 8 | 0 | I have been reading through this wonderful website regarding the recommended Python IDEs and have narrowed it down to either
WingIDE
KomodoIDE
which you guys will recommend for the purpose of developing Pylons apps? I know that most questions have been asked pertaining to Python IDEs but how about Python web framewor... | Recommended IDE for developing Pylons apps | 0.022219 | 0 | 0 | 4,484 |
1,065,964 | 2009-06-30T20:46:00.000 | 0 | 0 | 0 | 0 | python,ide,pylons | 1,085,987 | 9 | true | 0 | 1 | after very very careful comparison, KomodoIDE 5.1 is most suitable for my purposes.
Reasons:
Extensibility
Support for Mako and YUI (required by me)
Native interface support (no GTK unfamiliarity)
Support for Mercurial SCM (required by me)
thats all I guess. I am extremely satisfied with KomodoIDE and have just shell... | 4 | 8 | 0 | I have been reading through this wonderful website regarding the recommended Python IDEs and have narrowed it down to either
WingIDE
KomodoIDE
which you guys will recommend for the purpose of developing Pylons apps? I know that most questions have been asked pertaining to Python IDEs but how about Python web framewor... | Recommended IDE for developing Pylons apps | 1.2 | 0 | 0 | 4,484 |
1,066,710 | 2009-07-01T00:01:00.000 | 0 | 0 | 1 | 0 | python,multiprocessing | 1,066,750 | 4 | false | 0 | 0 | Sure you can. Expecially if you are using fork to spawn child processes, they works as perfectly normal processes (like the father). Thread management is quite different, but you can also use "second level" sub-treading.
Pay attention to not over-complicate your program, as example program with two level threads are n... | 1 | 4 | 0 | I want to do a program and want make a the spawn like this process -> n process -> n process
can the second level spawn process with multiprocessing ? using multiprocessinf module of python 2.6
thnx | Multiprocessing in python with more then 2 levels | 0 | 0 | 0 | 2,092 |
1,068,573 | 2009-07-01T11:21:00.000 | 2 | 0 | 0 | 0 | python,django,formatting,django-templates | 1,068,601 | 4 | false | 1 | 0 | Since you are doing static comparison (no queries needed), you should go for the most DRY and easy to implement option. In this case, I would go for option 4, make a template filter. Then you could do value|filter to get the class you would need to set the background colour. Template filters are actually a bit simpler ... | 1 | 8 | 0 | What is the correct way to do conditional formatting in Django?
I have a model that contains a date field, and I would like to display a list of records, but colour the rows depending on the value of that date field. For example, records that match today's date I want to be yellow, records that is before today I want g... | Django way to do conditional formatting | 0.099668 | 0 | 0 | 6,131 |
1,070,932 | 2009-07-01T19:37:00.000 | 0 | 0 | 0 | 0 | python,windows,mfc,file | 1,071,011 | 1 | true | 0 | 1 | I think that the Python code needs to know the document structure.
Maybe you should make a python wrapper of your c++ code.
In this case, I would recommend to use http://sourceforge.net/projects/pycpp/>pycpp which is my opinion a great library for making python extensions in c++. | 1 | 1 | 0 | I want to use Python to access MFC document files generically? Can CArchive be used to query a file and view the structure, or does Python, in opening the document, need to know more about the document structure in order to view the contents? | How To: View MFC Doc File in Python | 1.2 | 0 | 0 | 216 |
1,071,071 | 2009-07-01T20:03:00.000 | 2 | 0 | 0 | 0 | python,nginx,pylons,paste,paster | 1,071,117 | 7 | false | 0 | 0 | As I understand your question, you start some application to listen on port 5000. Then without stopping it (?), you try to start another instance to listen on het same port? If so, you won't succeed.
You can always check what application is listening on what port number by using netstat (for both Windows and UNIX-like ... | 3 | 4 | 0 | I'm running pylons and I did this:
paster server development.ini
It's running on :5000
But when I try to run the command again:
paster serve development.ini
I get this message:
socket.error: [Errno 98] Address already in use
Any ideas? | Pylons: address already in use when trying to serve | 0.057081 | 0 | 0 | 14,021 |
1,071,071 | 2009-07-01T20:03:00.000 | 1 | 0 | 0 | 0 | python,nginx,pylons,paste,paster | 2,933,318 | 7 | false | 0 | 0 | This has also happened to me when the server died unexpectedly, and didn't close it's socket's properly. Essentially, the socket is still listed as open with the operating system, even though the process has died. I've found if I wait for 30-60 seconds, the OS will realize the associated process has died, and cleanup t... | 3 | 4 | 0 | I'm running pylons and I did this:
paster server development.ini
It's running on :5000
But when I try to run the command again:
paster serve development.ini
I get this message:
socket.error: [Errno 98] Address already in use
Any ideas? | Pylons: address already in use when trying to serve | 0.028564 | 0 | 0 | 14,021 |
1,071,071 | 2009-07-01T20:03:00.000 | 0 | 0 | 0 | 0 | python,nginx,pylons,paste,paster | 8,516,490 | 7 | false | 0 | 0 | your default port 8080 is using.
you should add '-p 10000'
after command to take port 10000 | 3 | 4 | 0 | I'm running pylons and I did this:
paster server development.ini
It's running on :5000
But when I try to run the command again:
paster serve development.ini
I get this message:
socket.error: [Errno 98] Address already in use
Any ideas? | Pylons: address already in use when trying to serve | 0 | 0 | 0 | 14,021 |
1,072,028 | 2009-07-02T00:51:00.000 | 2 | 0 | 1 | 0 | python,python-3.x | 1,072,044 | 3 | false | 0 | 0 | Without a really compelling reason to upgrade, I would stick with what works. I looked at upgrading the scripts I use daily and it was too much work for no benefit that I could see.
"If it ain't broke, don't fix it!" | 1 | 4 | 0 | So with the final releases of Python 3.0 (and now 3.1), a lot of people are facing the worry of how to upgrade without losing half their codebase due to backwards incompatibility.
What are people's best tips for avoiding the many pitfalls that will almost-inevitably result from switching to the next-generation of pytho... | Tips on upgrading to python 3.0? | 0.132549 | 0 | 0 | 1,513 |
1,072,530 | 2009-07-02T04:42:00.000 | 3 | 1 | 1 | 0 | c#,.net,python,dynamic-languages | 1,073,426 | 8 | false | 0 | 0 | You're going to experience quite a bit of culture-shock going from C# to the wild duck-typed outback of Python. Lack of types and intellisense can be pretty daunting. Good thing that you're experienced in JavaScript. Also know that indent-sensitive block rules of Python can be very confusing for the inexperience (usual... | 2 | 22 | 0 | I have been doing active development in C# for several years now. I primarily build enterprise application and in house frameworks on the .NET stack.
I've never had the need to use any other mainstream high level languages besides C# for my tasks, since .NET is the standard platform we use.
There are some legacy Pytho... | Learning Python for a .NET developer | 0.07486 | 0 | 0 | 14,771 |
1,072,530 | 2009-07-02T04:42:00.000 | 4 | 1 | 1 | 0 | c#,.net,python,dynamic-languages | 1,072,788 | 8 | false | 0 | 0 | There is a big initial hurdle of getting comfortable with dynamic typing. The first step is when you look at Python-code and realize that variables aren't defined anywhere, you just create them out of thin air, which feels like jumping over a cliff. There is a brief moment before your hang glider catches the air proper... | 2 | 22 | 0 | I have been doing active development in C# for several years now. I primarily build enterprise application and in house frameworks on the .NET stack.
I've never had the need to use any other mainstream high level languages besides C# for my tasks, since .NET is the standard platform we use.
There are some legacy Pytho... | Learning Python for a .NET developer | 0.099668 | 0 | 0 | 14,771 |
1,072,920 | 2009-07-02T07:02:00.000 | -1 | 0 | 0 | 0 | php,python,frameworks | 1,073,087 | 8 | false | 1 | 0 | Kentico,Umbraco and Sitefinity,DotNetNuke are meant for developers/designers/integrators. Use Wordpress or if you are looking for .NET version use Community server. | 2 | 7 | 0 | Hi,
Which are the user friendly frameworks for building personal sites? Specially if that comes with little programming knowledge. And integrated jquery will be great. python or php based framework will do better.
I tried wordpress and joomla! But those are far more complex for a simple personal site with personal blog... | user friendly framework for personal website? | -0.024995 | 0 | 0 | 6,057 |
1,072,920 | 2009-07-02T07:02:00.000 | 0 | 0 | 0 | 0 | php,python,frameworks | 22,913,432 | 8 | false | 1 | 0 | AnchorCMS gets a lot of good feedback, give it a try. | 2 | 7 | 0 | Hi,
Which are the user friendly frameworks for building personal sites? Specially if that comes with little programming knowledge. And integrated jquery will be great. python or php based framework will do better.
I tried wordpress and joomla! But those are far more complex for a simple personal site with personal blog... | user friendly framework for personal website? | 0 | 0 | 0 | 6,057 |
1,075,304 | 2009-07-02T16:16:00.000 | 3 | 1 | 0 | 1 | python,eclipse,pydev,scons | 1,075,694 | 6 | true | 1 | 0 | I'm not an Eclipse expert, but since you didn't get any other answer...
If you make the SCons source a part of the Eclipse project, and run the whole command from within Eclipse it should work like any Eclipse debugging. SCons is written in Python, there is no reason it shouldn't be debuggable in Eclipse just like anyt... | 5 | 4 | 0 | I'm a newbie to SCons and also using pydev. Can someone help me with instructions on how to debug scons scripts using Eclipse and pydev? Is it even possible considering the fact that SCons is a seperate app and not an extension to python? | How to debug SCons scripts using eclipse and pydev? | 1.2 | 0 | 0 | 2,414 |
1,075,304 | 2009-07-02T16:16:00.000 | 0 | 1 | 0 | 1 | python,eclipse,pydev,scons | 45,216,082 | 6 | false | 1 | 0 | As an addendum: on Windows, I had to copy the scons-installed files to reside under C:\Python27\Lib\site-packages\scons in order for this to work. Adding the original installed location, qualified with the version number, to the PYTHONPATH, did not work. | 5 | 4 | 0 | I'm a newbie to SCons and also using pydev. Can someone help me with instructions on how to debug scons scripts using Eclipse and pydev? Is it even possible considering the fact that SCons is a seperate app and not an extension to python? | How to debug SCons scripts using eclipse and pydev? | 0 | 0 | 0 | 2,414 |
1,075,304 | 2009-07-02T16:16:00.000 | 1 | 1 | 0 | 1 | python,eclipse,pydev,scons | 15,386,322 | 6 | false | 1 | 0 | On MAC to debug scons through pydev follow Lennart's answer but with one simply addition.
Using Finder (or terminal) browse to where scons is installed. You can find this with the "which" command.
e.g. which scons
-> /usr/local/bin/scons
Make a copy of the scons file and call it scons.py.
Now when you create the Debug ... | 5 | 4 | 0 | I'm a newbie to SCons and also using pydev. Can someone help me with instructions on how to debug scons scripts using Eclipse and pydev? Is it even possible considering the fact that SCons is a seperate app and not an extension to python? | How to debug SCons scripts using eclipse and pydev? | 0.033321 | 0 | 0 | 2,414 |
1,075,304 | 2009-07-02T16:16:00.000 | 6 | 1 | 0 | 1 | python,eclipse,pydev,scons | 1,077,102 | 6 | false | 1 | 0 | You are right. Since the SCons is python based, the SCons scripts are debuggable via EClipse PyDev. For this, you need to do the following in the debug configuration...
1. Under the main tab, set the main module to the SCons file which will be available under the python/scripts directory if you have installed SCons. ... | 5 | 4 | 0 | I'm a newbie to SCons and also using pydev. Can someone help me with instructions on how to debug scons scripts using Eclipse and pydev? Is it even possible considering the fact that SCons is a seperate app and not an extension to python? | How to debug SCons scripts using eclipse and pydev? | 1 | 0 | 0 | 2,414 |
1,075,304 | 2009-07-02T16:16:00.000 | 0 | 1 | 0 | 1 | python,eclipse,pydev,scons | 32,887,089 | 6 | false | 1 | 0 | I've since gain more experience with SCons / Python and I'd recommend using python's pdb module. To use it simply add the following code to your SCons/Python files.
import pdb; pdb.set_trace()
When the file is run from the command line a breakpoint will be hit at this line. I also moved away from Eclipse. A lightweight... | 5 | 4 | 0 | I'm a newbie to SCons and also using pydev. Can someone help me with instructions on how to debug scons scripts using Eclipse and pydev? Is it even possible considering the fact that SCons is a seperate app and not an extension to python? | How to debug SCons scripts using eclipse and pydev? | 0 | 0 | 0 | 2,414 |
1,075,391 | 2009-07-02T16:32:00.000 | 7 | 1 | 0 | 1 | python,linux,ext3 | 1,075,459 | 2 | true | 0 | 0 | no need for ext3-specific hooks; just check lsof, or more exactly, /proc/<pid>/fd/* and /proc/<pid>/fdinfo/* (that's where lsof gets it's info, AFAICT). There you can check if the file is open, if it's writeable, and the 'cursor' position.
That's not the whole picture; but any more is done in processpace by stdlib on ... | 1 | 4 | 0 | We have several cron jobs that ftp proxy logs to a centralized server. These files can be rather large and take some time to transfer. Part of the requirement of this project is to provide a logging mechanism in which we log the success or failure of these transfers. This is simple enough.
My question is, is there a wa... | Does python have hooks into EXT3 | 1.2 | 0 | 0 | 640 |
1,077,273 | 2009-07-02T23:57:00.000 | 0 | 0 | 1 | 0 | python,django,ide | 1,108,063 | 9 | false | 0 | 0 | You should notice that cscope targets only the UNIX, Linux OSs. | 4 | 11 | 0 | A specific example: becoming familiar with django's project source code (core, contrib, utils, etc.). Example of a useful tool: ctags - it allows you to "jump" to the file+location where a function/method is defined. Wondering about other tools that developers use (example: is there a tool that given a function x(), ... | tools to aid in browsing/following (large) python projects' source code | 0 | 0 | 0 | 5,688 |
1,077,273 | 2009-07-02T23:57:00.000 | 0 | 0 | 1 | 0 | python,django,ide | 1,077,377 | 9 | false | 0 | 0 | This is subjective so I think it should probably be a community wiki. That said, the best thing you can probably do to make browsing large projects is to be familiar with hotkeys provided in your favourite IDE. Using the keyboard to browse through large source code is much easier than manually scrolling through text, h... | 4 | 11 | 0 | A specific example: becoming familiar with django's project source code (core, contrib, utils, etc.). Example of a useful tool: ctags - it allows you to "jump" to the file+location where a function/method is defined. Wondering about other tools that developers use (example: is there a tool that given a function x(), ... | tools to aid in browsing/following (large) python projects' source code | 0 | 0 | 0 | 5,688 |
1,077,273 | 2009-07-02T23:57:00.000 | 1 | 0 | 1 | 0 | python,django,ide | 1,078,006 | 9 | false | 0 | 0 | Many (or even most, I should say) IDE's help you in this by enabling you do go to variable and function definitions, often by just Ctrl+click, or showing you class overviews where you can see all methods and attributes a class has including those inherited, and letting you go to their definition, etc, etc, etc. I can't... | 4 | 11 | 0 | A specific example: becoming familiar with django's project source code (core, contrib, utils, etc.). Example of a useful tool: ctags - it allows you to "jump" to the file+location where a function/method is defined. Wondering about other tools that developers use (example: is there a tool that given a function x(), ... | tools to aid in browsing/following (large) python projects' source code | 0.022219 | 0 | 0 | 5,688 |
1,077,273 | 2009-07-02T23:57:00.000 | 0 | 0 | 1 | 0 | python,django,ide | 1,077,398 | 9 | false | 0 | 0 | Document it as you go. Leave trails, improve the structure, and keep notes. By the time you've found you way around the enter codebase, you'll have a good map. | 4 | 11 | 0 | A specific example: becoming familiar with django's project source code (core, contrib, utils, etc.). Example of a useful tool: ctags - it allows you to "jump" to the file+location where a function/method is defined. Wondering about other tools that developers use (example: is there a tool that given a function x(), ... | tools to aid in browsing/following (large) python projects' source code | 0 | 0 | 0 | 5,688 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.