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
4,140,943
2010-11-10T03:20:00.000
0
1
1
0
python,emacs
4,143,655
2
false
0
0
PATH is only searched when a program is launched via the shell. For programs that are launched directly by Emacs (for example, via call-process), it's the exec-path variable that is searched.
2
1
0
how do I change the version of Python that emacs uses in the python-mode to the latest version that I just installed ? I tried setting the PATH in my init.el file to the path where the latest version of python resides but its not working.
Emacs on Mac for Python - python-mode keeps using the default Python version
0
0
0
811
4,140,943
2010-11-10T03:20:00.000
1
1
1
0
python,emacs
4,141,003
2
false
0
0
Set the variable python-python-command. This can be done via customize: M-x customize-option RET python-python-command RET Change the value to point to the appropriate binary.
2
1
0
how do I change the version of Python that emacs uses in the python-mode to the latest version that I just installed ? I tried setting the PATH in my init.el file to the path where the latest version of python resides but its not working.
Emacs on Mac for Python - python-mode keeps using the default Python version
0.099668
0
0
811
4,141,511
2010-11-10T05:32:00.000
4
1
0
1
java,c++,python,scons,gyp
7,201,456
5
false
0
1
I tried to do a Java / C++ / C++ To Java swig / (+ Protocol buffers) project in CMAKE and it was horrible! In such a case the problem with Cmake is, that the scripting language is extremely limited. I switched to Scons and everything got much easier.
4
6
0
I have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly easy to use and allow plugins (code-generators, c...
What are the SCons alternatives?
0.158649
0
0
2,318
4,141,511
2010-11-10T05:32:00.000
1
1
0
1
java,c++,python,scons,gyp
4,142,509
5
false
0
1
For Java and C++ projects you can take a look into Maven + Maven-nar-plugin but for Python i really don't know the best. May be other tools like CMake would fit better.
4
6
0
I have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly easy to use and allow plugins (code-generators, c...
What are the SCons alternatives?
0.039979
0
0
2,318
4,141,511
2010-11-10T05:32:00.000
9
1
0
1
java,c++,python,scons,gyp
4,141,589
5
false
0
1
CMake I use and prefer it for my projects. There's also Rake (comes with Ruby, but can be used for anything), which I regard rather highly.
4
6
0
I have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly easy to use and allow plugins (code-generators, c...
What are the SCons alternatives?
1
0
0
2,318
4,141,511
2010-11-10T05:32:00.000
1
1
0
1
java,c++,python,scons,gyp
4,143,403
5
false
0
1
In Java world ant is "lingua franca" for build systems. Ant supports a C++ task via ant-contrib - so you can compile your C++ code. With Ant's exec task you can still run swig on C++ code in order to get the wrappers. Then standard tasks as javac/jar can be used for java application build.
4
6
0
I have projects in C++, Java and Python. Projects in C++ export SWIG interfaces so they can be used by Java and Python projects. My question is: what building mechanism can I use to manage dependencies and build these projects? I have used SCons and GYP. They are fairly easy to use and allow plugins (code-generators, c...
What are the SCons alternatives?
0.039979
0
0
2,318
4,143,886
2010-11-10T11:18:00.000
10
0
0
0
python,django,django-admin
20,106,343
5
false
1
0
By default syncdb creates 3 security permissions for each model: Create (aka add) Change Delete If your logged in as Admin, you get EVERYTHING no matter what. But if you create a new user group called "General Access" (for example) then you can assign ONLY the CHANGE and DELETE permissions for all of your models. The...
1
182
0
I have a django site with lots of models and forms. I have many custom forms and formsets and inlineformsets and custom validation and custom querysets. Hence the add model action depends on forms that need other things, and the 'add model' in the django admin throughs a 500 from a custom queryset. Is there anyway to d...
Django Admin - Disable the 'Add' action for a specific model
1
0
0
61,849
4,145,053
2010-11-10T13:41:00.000
2
0
1
0
python,text-extraction
4,145,202
4
false
0
0
Already given others' advice for your text file format, I'm just stepping in giving another suggestion... If rewriting your file is possible, an easy solution could be to change it to ConfigParser-readable (and writable) file: [Horror] 1: Movie 2: Movie 3: Movie [Comedy] 1: Movie [Action] 1: Movie 2: Movie
1
1
0
Let's suppose I have a text file of movie genres with my favorite movies under each genre. [category] Horror: Movie Movie Movie [category] Comedy: Movie [category] Action: Movie Movie How would I create a function that extracts and packages all the movie titles below a certain [category] * into an array without...
Extract lines below category and stop when another category is reached
0.099668
0
0
208
4,145,282
2010-11-10T14:04:00.000
1
0
0
1
python,linux
4,145,649
3
false
0
0
Pardus initialization (http://www.pardus.org.tr/eng/projects/comar/SpeedingUpLinuxWithPardus.html) is based on python and in theory you can even start system with windows executable (through Wine of course). You can see a sample initialisation script there doing almost same thing with shell script but in a pythonic way...
1
1
0
I'm new to python. I want to create controlled script executed from /etc/init.d command like /etc/init.d something start/stop/restart Any advise appreciated.
/etc/init.d sh script
0.066568
0
0
2,766
4,145,350
2010-11-10T14:11:00.000
5
0
0
0
c#,java,python,user-interface,cross-platform
4,145,581
1
false
0
1
I'm a Python guy and use PyQt myself, and I can wholly recommend it. Concerning your cons: compilation, distribution and deployment more difficult? No, not really. For many projects, a full setup.py for e.g. cx_Freeze can be less than 30 lines that rarely need to change (most import dependencies are detected automati...
1
11
0
I'd like to develop a small/medium-size cross-platform application (including GUI). My background: mostly web applications with MVC architectures, both Python (Pylons + SqlAlchemy) and Java (know the language well, but don't like it that much). I also know some C#. So far, I have no GUI programming experience (neither ...
Python + QT, Windows Forms or Swing for a cross-platform application?
0.761594
1
0
3,111
4,146,971
2010-11-10T17:03:00.000
1
0
0
0
python,user-interface,text,tkinter,tkinter-entry
32,384,249
3
false
0
1
Update on using this method for Undo/Redo: I am creating a GUI with lot of frames and each contains at least ten or more 'entry' widgets. I used the History class and created one history object for each entry field that I had. I was able to store all entry widgets values in a list as done here. I am using 'trace' met...
1
4
0
Is there a way to add undo and redo capabilities in Tkinter Entry widgets or must I use single line Text widgets for this type of functionality? If the latter, are there any tips I should follow when configuring a Text widget to act as an Entry widget? Some features that might need tweaking include trapping the Retur...
Undo and Redo in an Tkinter Entry widget?
0.066568
0
0
4,108
4,147,202
2010-11-10T17:27:00.000
1
0
1
0
python,arguments
4,147,268
1
true
0
0
I assume you want something like this, or perhaps it will be helpful at least: def printObject(obj, attributes=()): for a in attributes: print getattr(obj, a)
1
0
0
I have to create a function, printObjects(attribute, option), which must print the objects based on a certain attribute. The attribute can take ints or strings as input. The option attribute is optional. How do I implement this for my class?
How can I handle attributes in python?
1.2
0
0
107
4,147,635
2010-11-10T18:15:00.000
1
0
1
0
c#,.net,c#-4.0,ironpython
4,148,115
3
false
0
0
If I really, really needed that I would create a wrapper DLL/EXE in another language. The Python code can then be stored as a resource in the DLL that is loaded when the assembly is first accessed.
2
9
0
Can I compile an IronPython code to EXE or DLL in a .NET runtime?
Compiling an IronPython code to EXE or DLL
0.066568
0
0
8,973
4,147,635
2010-11-10T18:15:00.000
6
0
1
0
c#,.net,c#-4.0,ironpython
4,149,905
3
true
0
0
Simply use clr.CompileModules in an IronPython script to convert it to a dll file. Or you can use pyc.py (found inside of your IronPythonInstallDirectory\Tools\Scripts) which can also generate an exe for you also.
2
9
0
Can I compile an IronPython code to EXE or DLL in a .NET runtime?
Compiling an IronPython code to EXE or DLL
1.2
0
0
8,973
4,149,086
2010-11-10T21:07:00.000
3
1
0
0
c++,python,serialization,boost,pickle
4,149,474
5
false
0
0
something that could automatically serialize all the members of a class This is not possible in C++. Python, C#, Java et al. use run-time introspection to achieve this. You can't do that in C++, RTTI is not powerful enough. In essence, there is nothing in the C++ language that would enable someone to discover the me...
4
11
0
Does anyone know of a "language level" facility for pickling in C++? I don't want something like Boost serialization, or Google Protocol Buffers. Instead, something that could automatically serialize all the members of a class (with an option to exclude some members, either because they're not serializable, or else b...
Python-style pickling for C++?
0.119427
0
0
3,405
4,149,086
2010-11-10T21:07:00.000
0
1
0
0
c++,python,serialization,boost,pickle
4,149,445
5
false
0
0
One quick way to do this that I got working once when I needed to save a struct to a file was to cast my struct to a char array and write it out to a file. Then when I wanted to load my struct back in, I would read the entire file (in binary mode), and cast the whole thing to my struct's type. Easy enough and exploits ...
4
11
0
Does anyone know of a "language level" facility for pickling in C++? I don't want something like Boost serialization, or Google Protocol Buffers. Instead, something that could automatically serialize all the members of a class (with an option to exclude some members, either because they're not serializable, or else b...
Python-style pickling for C++?
0
0
0
3,405
4,149,086
2010-11-10T21:07:00.000
7
1
0
0
c++,python,serialization,boost,pickle
4,149,141
5
true
0
0
I don't believe there's any way to do this in a language with no run-time introspection capabilities.
4
11
0
Does anyone know of a "language level" facility for pickling in C++? I don't want something like Boost serialization, or Google Protocol Buffers. Instead, something that could automatically serialize all the members of a class (with an option to exclude some members, either because they're not serializable, or else b...
Python-style pickling for C++?
1.2
0
0
3,405
4,149,086
2010-11-10T21:07:00.000
1
1
0
0
c++,python,serialization,boost,pickle
4,149,128
5
false
0
0
There's the standard C++ serialization with the << and >> operators, although you'll have to implement these for each of your classes (which it sounds like you don't want to do). Some practitioners say you should alway implement these operators, although of course, most of us rarely do.
4
11
0
Does anyone know of a "language level" facility for pickling in C++? I don't want something like Boost serialization, or Google Protocol Buffers. Instead, something that could automatically serialize all the members of a class (with an option to exclude some members, either because they're not serializable, or else b...
Python-style pickling for C++?
0.039979
0
0
3,405
4,149,112
2010-11-10T21:11:00.000
4
0
0
0
php,javascript,jquery,python
4,149,206
5
false
1
0
Well, for resizing it would of course be better to use GD... But indexed, I think. So that you have an upload script that automatically generates the images' in other sizes, and saves them somewhere. However, it matters whether you have more disk space, or performance... Performance would get worse IF you have many peo...
1
2
0
I'm working on project where we are trying to adopt and resize template images to the various resolutions. For example if the website is viewed in 800px width (800x600) and 1024px width or larger the image size should be viewed in same quality. I've had in mind to use sprite with 3 types of images for each range of th...
Dynamic images resizing
0.158649
0
0
375
4,149,598
2010-11-10T22:07:00.000
0
0
0
0
python,cgi,html-parsing
4,149,742
4
false
1
0
You can access only data, posted by form (or as GET parameters). So, you can extract data you need using JavaScript and post it through form
1
0
0
I would like to access any element in a web page. I know how to do that when I have a form (form = cgi.FieldStorage()), but not when I have, for example, a table. How can I do that? Thanks
How can I access any element in a web page with Python?
0
0
1
178
4,149,861
2010-11-10T22:46:00.000
1
1
1
0
php,python
4,149,942
4
false
0
0
If you are familiar with MVC start learning from Zend Framework I think it will be easier for you to understand php, right php developing this way with a right leg start. Object oriented business logics are same in any language. I really want to get into python so we can exchange knowledge ;)
2
10
0
I'm a 5 years Python programmer, but shortly I'll be also working with PHP. Could you recommend me some readings to getting in touch with this language having in mind my Python skills?
PHP for Python programmers?
0.049958
0
0
3,823
4,149,861
2010-11-10T22:46:00.000
0
1
1
0
php,python
4,149,875
4
false
0
0
the best resource IMHO is still php.net there are a ton of decent books out there, but I still prefer to rely on php.net for the latest and greatest.
2
10
0
I'm a 5 years Python programmer, but shortly I'll be also working with PHP. Could you recommend me some readings to getting in touch with this language having in mind my Python skills?
PHP for Python programmers?
0
0
0
3,823
4,150,443
2010-11-11T00:32:00.000
2
0
1
0
python,nltk
4,156,445
3
false
0
0
There are two options i can think of off the top of my head: Option one is to iterate over the sample POS-tagged corpora and simply build this mapping yourself. This gives you the POS tags that are associated with a particular word in the corpora. Option two is to build a hidden markov model POS tagger on the corpora, ...
2
0
1
Is there any package in python nltk that can produce all different parts of speech words for a given word. For example if i give add(verb) then it must produce addition(noun),additive(adj) and so on. Can anyone let me know?
Extract different POS words for a given word in python nltk
0.132549
0
0
430
4,150,443
2010-11-11T00:32:00.000
0
0
1
0
python,nltk
4,155,066
3
false
0
0
NLTK has a lot of clever things hiding away, so there might be a direct way of doing it. However, I think you may have to write your own code to work with the WordNet database.
2
0
1
Is there any package in python nltk that can produce all different parts of speech words for a given word. For example if i give add(verb) then it must produce addition(noun),additive(adj) and so on. Can anyone let me know?
Extract different POS words for a given word in python nltk
0
0
0
430
4,150,909
2010-11-11T02:26:00.000
0
0
0
0
python,multidimensional-array,numpy,subdomain,overlap
4,151,409
3
false
0
0
Can you say more? What model are you using? What are you modelling? How is it computed? Can you make the dimensions match to avoid the fit? (i.e. if B doesn't depend on all of A, only plug in the part of A that B models, or compute boring values for the parts of B that wouldn't overlap A and drop those values later)
2
6
1
I'm working with model output at the moment, and I can't seem to come up with a nice way of combining two arrays of data. Arrays A and B store different data, and the entries in each correspond to some spatial (x,y) point -- A holds some parameter, and B holds model output. The problem is that B is a spatial subsecti...
Where do two 2-D arrays begin to overlap each other?
0
0
0
1,367
4,150,909
2010-11-11T02:26:00.000
0
0
0
0
python,multidimensional-array,numpy,subdomain,overlap
4,191,918
3
false
0
0
I need to find the indexes at which they start to overlap So are you looking for indexes from A or from B? And is B strictly rectangular? Finding the bounding box or convex hull of B is really cheap.
2
6
1
I'm working with model output at the moment, and I can't seem to come up with a nice way of combining two arrays of data. Arrays A and B store different data, and the entries in each correspond to some spatial (x,y) point -- A holds some parameter, and B holds model output. The problem is that B is a spatial subsecti...
Where do two 2-D arrays begin to overlap each other?
0
0
0
1,367
4,151,153
2010-11-11T03:31:00.000
1
0
1
0
python,performance,runtime
4,151,160
1
true
0
0
Right after I posted, I figured you could make a list of the objects by the attribute needed before using heapify which would take O(n) linear time. This wouldn't affect the runtime of heapify or other heapq methods.
1
1
0
Since I'm trying to be efficient in this program I'm making, I thought I'd use the built in heapq module in python, but some of my objects have multiple attributes, like name and number. Is there a way to use the heapify method to heapify my objects based on a certain attribute? I don't see anything in the documentatio...
Python heapq module, heapify method on an object
1.2
0
0
664
4,151,746
2010-11-11T05:57:00.000
2
0
0
0
c++,python,qt,image-processing,pyqt
4,154,281
1
true
0
1
You can't expect to find a library for any specific task. In this case, you need image-processing library, which is able to: draw image region with transparent background. You have piece configuration, use it as a mask to cut out edges. save drawn image to some format. Qt graphics is totally able to do all that.
1
1
0
I'm working on a project involving puzzles made out of user-supplied images. I have been very hard-pressed to find a library that will serve my purposes. I would like to write the program in either Python or C++. I have been considering using Qt (or PyQt) to do it, so if you know of a library that will work with Qt it ...
Anyone know of a C++ or Python library that will divide an image into pieces of arbitrary shape?
1.2
0
0
174
4,153,969
2010-11-11T11:35:00.000
0
0
0
0
python,windows
4,154,614
3
false
0
0
I'm going to go out on a limb here, and suggest there probably isn't any Python library that can do this directly. Instead, you will need to call some C win32 functions from Python. I think your best bet is to split this up into two separate questions. The first question is "How do I programmatically, in Win32, initiat...
1
3
0
I'm working on windows xp. How can i write a simple script which would automatically log me out of this account and log into another account on this computer upon execution of a trigger point I set in my application?? Please help.
Python script to switch user automatically
0
0
0
3,490
4,155,126
2010-11-11T14:00:00.000
5
0
1
0
python,windows,memory-management
4,155,299
4
false
0
0
As far as I know there is no easy way to see what the memory consumption of a certain object is. It would be a non-trivial thing to do because references could be shared among objects. Here are my two favourite workarounds: Use the process manager. Have the program pause for before allocation. Write down the memory us...
2
3
0
I have some script that loads a lot of data to memory. I want to know how efficient the data stored in memory. So, I want to be able to know how many memory was used by python before I loaded data, and after I loaded data. Also I wondering, if it is some way to check memory usage of complex object. Let say i have nest...
How to find total amount of memory used by python process/object in windows
0.244919
0
0
950
4,155,126
2010-11-11T14:00:00.000
0
0
1
0
python,windows,memory-management
4,187,961
4
false
0
0
An alternative is that you could use windows's performance counters through pywin32
2
3
0
I have some script that loads a lot of data to memory. I want to know how efficient the data stored in memory. So, I want to be able to know how many memory was used by python before I loaded data, and after I loaded data. Also I wondering, if it is some way to check memory usage of complex object. Let say i have nest...
How to find total amount of memory used by python process/object in windows
0
0
0
950
4,155,955
2010-11-11T15:19:00.000
1
0
1
0
python,programming-languages
4,156,169
4
false
0
0
If you just want to learn a new language you could take a look at scala. The language is influenced by languages like ruby, python and erlang, but is staticaly typed and runs on the JVM. The speed is comparable to Java. And you can use all the java libraries, plus reuse a lot of your python code through jython.
2
1
1
I use python heavily for manipulating data and then packaging it for statistical modeling (R through RPy2). Feeling a little restless, I would like to branch out into other languages where Faster than python It's free There's good books, documentations and tutorials Very suitable for data manipulation Lots of librar...
moving on from python
0.049958
0
0
210
4,155,955
2010-11-11T15:19:00.000
1
0
1
0
python,programming-languages
4,157,423
4
false
0
0
I didn't see you mention SciPy on your list... I tend like R syntax better, but they cover much of the same ground. SciPy has faster matrix and array structures than the general purpose Python ones. Mostly places where I have wanted to use Cython, SciPy has been just as easy / fast. GNU/Octave is an open/free versi...
2
1
1
I use python heavily for manipulating data and then packaging it for statistical modeling (R through RPy2). Feeling a little restless, I would like to branch out into other languages where Faster than python It's free There's good books, documentations and tutorials Very suitable for data manipulation Lots of librar...
moving on from python
0.049958
0
0
210
4,156,328
2010-11-11T15:57:00.000
3
0
0
0
python,pickle,scapy
4,157,378
6
false
0
0
(This is more for reference, so no votes expected) The Scapy list scapy.ml@secdev.org is well-monitored and tends to be very responsive. If you don't get answers here, try there as well.
1
12
0
I need to pickle a scapy packet. Most of the time this works, but sometimes the pickler complains about a function object. As a rule of thumb: ARP packets pickle fine. Some UDP packets are problematic.
How to pickle a scapy packet?
0.099668
0
1
4,367
4,158,117
2010-11-11T18:51:00.000
2
0
1
0
python,eval,exec
4,158,176
8
false
0
0
You don't need to use them, and in my opinion you should avoid them. They are only useful in cases where you are generating the code itself, which in the end is going to most likely be considered bad practice. If you are considering using eval() for things like mathematical expressions, you would be better sanitizing t...
4
8
0
So I have understood what exec and eval and also compile do. But why would I need to use them? I am being unclear on the usage scenario. Can anyone give me some examples so that I can better appreciate the concept. Cause right I know it is all theory.
Use of exec and eval in Python
0.049958
0
0
4,288
4,158,117
2010-11-11T18:51:00.000
0
0
1
0
python,eval,exec
4,158,293
8
false
0
0
Here's a valid use case. In the python paste middleware (for web programming) when an exception is raised it creates a command line within the browser. This works be using methods like these. Also, in Blender there is an option to animate values using python expressions and this works using eval.
4
8
0
So I have understood what exec and eval and also compile do. But why would I need to use them? I am being unclear on the usage scenario. Can anyone give me some examples so that I can better appreciate the concept. Cause right I know it is all theory.
Use of exec and eval in Python
0
0
0
4,288
4,158,117
2010-11-11T18:51:00.000
5
0
1
0
python,eval,exec
4,158,418
8
true
0
0
I'll give an example in which I have used eval and where I think it was the best choice. I was writing a simple software testing utility ... something to test whether student exercises were conforming to the assignment requirements. The goal was to provide a way for a simple configuration file to serve as a test speci...
4
8
0
So I have understood what exec and eval and also compile do. But why would I need to use them? I am being unclear on the usage scenario. Can anyone give me some examples so that I can better appreciate the concept. Cause right I know it is all theory.
Use of exec and eval in Python
1.2
0
0
4,288
4,158,117
2010-11-11T18:51:00.000
1
0
1
0
python,eval,exec
13,633,975
8
false
0
0
I think I have a valid use. I am using Python 3.2.1 inside Blender 2.6.4 to modify a set of points with x,y coordinates (in the z-plane). The goal is to add concentric rings of new points around each existing point, with the rings behaving as ripples, (like when you drop a stone in a pond). The catch is that I want the...
4
8
0
So I have understood what exec and eval and also compile do. But why would I need to use them? I am being unclear on the usage scenario. Can anyone give me some examples so that I can better appreciate the concept. Cause right I know it is all theory.
Use of exec and eval in Python
0.024995
0
0
4,288
4,158,367
2010-11-11T19:19:00.000
72
0
0
0
python,charts,matplotlib
4,158,455
3
true
0
0
It was easier than I expected, I just did: pylab.subplot(4,4,10) and it worked.
1
51
1
Is it possible to get more than 9 subplots in matplotlib? I am on the subplots command pylab.subplot(449); how can I get a 4410 to work? Thank you very much.
more than 9 subplots in matplotlib
1.2
0
0
28,836
4,158,758
2010-11-11T20:03:00.000
0
0
0
1
python,logging,message-queue,task,celery
4,440,220
3
false
1
0
It sounds like some kind of 'watcher' would be ideal. If you can watch and consume the logs as a stream you could slurp the results as they come in. Since the watcher would be running seperately and therefore have no dependencies with respect to what it is watching I believe this would satisfy your requirements for a n...
1
5
0
I want to convert my homegrown task queue system into a Celery-based task queue, but one feature I currently have is causing me some distress. Right now, my task queue operates very coarsely; I run the job (which generates data and uploads it to another server), collect the logging using a variant on Nose's log capture...
How can I capture all of the python log records generated during the execution of a series of Celery tasks?
0
0
0
1,306
4,159,847
2010-11-11T22:21:00.000
2
0
0
1
python,client,bittorrent
4,159,871
1
true
0
0
The main bittorrent client, from bittorrent.com is all python based I believe. I have hacked it in the past, and it's very clean code easy to modify.
1
2
0
Is there any up-to-date bittorrent library which is written in python and can be used on windows to write client? Some time ago bitcomet was written in python and it was ok. Any alternatives? And second question: does bittorrent protocol change? For example what may happen if I will use old bitcomet library
Bittorrent up-to-date library written in python
1.2
0
0
484
4,160,082
2010-11-11T22:54:00.000
0
0
0
0
python,image
14,884,366
6
false
0
1
The easiest way is to use a web server I reckon. You can script a nice, simple server with bottle and turn out a UI with images. It depends what you want to do. Python can do it all, but needs something to work with. There's pygame and stuff like that if you're just starting out.
4
3
0
I am wondering, is it possible to display images in python?
How do you show a picture in python?
0
0
0
12,412
4,160,082
2010-11-11T22:54:00.000
1
0
0
0
python,image
4,160,323
6
false
0
1
The question needs more clearing up. Do you want to put the picture on a system display? Or on a window in a desktop app? Or render it to a http response? Python can do all these things in different manners, but for people to explain it - you need to specify your question a bit more.
4
3
0
I am wondering, is it possible to display images in python?
How do you show a picture in python?
0.033321
0
0
12,412
4,160,082
2010-11-11T22:54:00.000
0
0
0
0
python,image
4,160,130
6
false
0
1
The various OpenCV bindings for Python also provide ways to display images (and videos). Might be a bit heavy if you just want to display an image.
4
3
0
I am wondering, is it possible to display images in python?
How do you show a picture in python?
0
0
0
12,412
4,160,082
2010-11-11T22:54:00.000
5
0
0
0
python,image
4,160,121
6
false
0
1
Almost all GUI toolkits (wxWindows, pyQt, pyGTK, Tkinter) have Canvas or other-type widgets that allow you to draw an image. The standard library way to draw an image is to use Tkinter's Canvas widget.
4
3
0
I am wondering, is it possible to display images in python?
How do you show a picture in python?
0.16514
0
0
12,412
4,160,534
2010-11-12T00:16:00.000
3
0
1
0
python,console,ironpython,interactive,read-eval-print-loop
4,160,552
4
false
0
0
There are a few different ways I can think of to get the ... prompt. Starting (or continuing) a block def foo(): Unclosed parenthesis, brace, square bracket (and watch out for nesting) x = ( x = { x = [ Unclosed triple quoted string x = ''' Backslash at end of line: x = \
3
3
0
I'm implementing a custom (Iron)Python console. I need to display a >>> prompt in general, but when a statement is incomplete, I need to change the prompt to ... and gather more lines before executing them. How do I know if a line entered by a user is complete or if I need to read more lines? A simple way seems to be c...
Algorithm Python uses to decide between >>> and ... prompt in interactive console?
0.148885
0
0
308
4,160,534
2010-11-12T00:16:00.000
3
0
1
0
python,console,ironpython,interactive,read-eval-print-loop
4,160,638
4
false
0
0
The repl loop has full knowledge and access to the parser. If the parser state is such that it expects anything other than a statement, then the repl loop produces a .... In the case of unclosed parentheses, a statement would be illegal on the next line, because there's no possible subexpression which can contain a s...
3
3
0
I'm implementing a custom (Iron)Python console. I need to display a >>> prompt in general, but when a statement is incomplete, I need to change the prompt to ... and gather more lines before executing them. How do I know if a line entered by a user is complete or if I need to read more lines? A simple way seems to be c...
Algorithm Python uses to decide between >>> and ... prompt in interactive console?
0.148885
0
0
308
4,160,534
2010-11-12T00:16:00.000
1
0
1
0
python,console,ironpython,interactive,read-eval-print-loop
4,160,544
4
false
0
0
Did you use a : or a \ (or an unclosed delimiter, like brackets or parens)? The interactive interpreter shows a .... The actual logic might be a bit more complicated, but that's the basic rule.
3
3
0
I'm implementing a custom (Iron)Python console. I need to display a >>> prompt in general, but when a statement is incomplete, I need to change the prompt to ... and gather more lines before executing them. How do I know if a line entered by a user is complete or if I need to read more lines? A simple way seems to be c...
Algorithm Python uses to decide between >>> and ... prompt in interactive console?
0.049958
0
0
308
4,162,603
2010-11-12T07:52:00.000
2
0
1
0
python,django,utf-8,diacritics,transliteration
43,379,468
4
false
0
0
The simplest way I found: unicodedata.normalize('NFKD', s).encode("ascii", "ignore")
1
22
0
Hello I retrieve text based utf8 data from a foreign source which contains special chars such as u"ıöüç" while I want to normalize them to English such as "ıöüç" -> "iouc" . What would be the best way to achieve this ?
Python and character normalization
0.099668
0
0
11,977
4,163,456
2010-11-12T09:58:00.000
0
1
0
0
python
4,164,507
2
false
0
0
use the os.path module to manipulate path string (you need to import os) the current directory is os.path.abspath(os.curdir) join 2 parts of a path with os.path.join(dirname, filename): this will take care of inserting the right path separator ('\' or '/', depending on the operating system) for building the path
1
10
0
Using Python, how might one read a file's path from a remote server? This is a bit more clear to me on my local PC.
Python - how to read path file/folder from server
0
0
1
36,179
4,163,748
2010-11-12T10:37:00.000
2
0
0
0
javascript,python,ajax,google-app-engine,jquery
4,164,056
1
true
1
0
Stupid me... The ajax call was to localhost/broadcast and the browser address field was 127.0.0.1/broadcast ... the cookies for "different" domains ('127.0.0.1' != 'localhost') are not shared ofcourse... Then I haven't gone mad...
1
0
0
I have 2 pages, a static html page and a python script - hosted on [local] google app engine. /html/hello.html define as login: required /broadcast which is a python script when I access hello.html for the first time I am redirected to login page, I sign in, and then redirected back to hello.html. inside hello.html - a...
AJAX and browser GET calls appear to have different cookies
1.2
0
1
90
4,164,518
2010-11-12T12:17:00.000
0
0
1
0
python
4,164,577
2
false
0
0
I'm guessing you want to find a difference between two dates in seconds? If it's the case, then first get a timedelta (by simply subracting any two datetime objects with - operator). Then read the seconds field of the resulting object.
1
3
0
i have two datetime string like this '2010-08-31 04:35:50.176725' and '2010-09-05 04:35:50.176725' . now my question is how calculate seconds between two dates. i used time delta but its return in hour, minute formate. i want compltely in seconds.
Datetime to Second Conversion
0
0
0
11,875
4,164,962
2010-11-12T13:13:00.000
0
0
0
0
python,user-interface,tkinter
7,360,992
1
false
0
1
No, there is no way to do what you want. Tkinter only supports transparency on top-level windows.
1
0
0
Does Tkinter or underlying Tk framework support the ability to apply the equivalent of the attributes() method to Frames vs. Windows? Specifically: I have forms with a message area that I would like to fade away in jquery-like manner, eg. display a non-modal status message that fades away. I know I can fade a Tkinter w...
Python/Tkinter: Apply .attributes() method to Frame vs. Window?
0
0
0
502
4,165,452
2010-11-12T14:08:00.000
16
0
0
0
python,sqlalchemy,pylons,data-migration,migrate
4,165,496
4
false
1
0
What we do. Use "major version"."minor version" identification of your applications. Major version is the schema version number. The major number is no some random "enough new functionality" kind of thing. It's a formal declaration of compatibility with database schema. Release 2.3 and 2.4 both use schema version ...
1
63
0
I'm programming a web application using sqlalchemy. Everything was smooth during the first phase of development when the site was not in production. I could easily change the database schema by simply deleting the old sqlite database and creating a new one from scratch. Now the site is in production and I need to pres...
How to efficiently manage frequent schema changes using sqlalchemy?
1
1
0
32,073
4,165,824
2010-11-12T14:53:00.000
9
0
0
0
java,python,google-app-engine,integration,google-cloud-datastore
4,166,178
2
false
1
0
Different versions of an app share a datastore, and AFAIK you can still have a Java version of your app, and Python version, at the same time. It used to be a necessary hack to use features that were implemented in Python but not (yet) in Java, and quite possibly still is. Of course only one of those versions can be th...
1
4
0
I need to have a Java instance fetching data directly from the Python's instance datastore. I don't know if that's possible at all. Is the datastore transparent/unique, or each instance (if they can indeed coexist) has its separate datastore? Suming it up: how can a Java app fetch data from the datastore of a Python ap...
Can Java and Python coexist in the same app?
1
0
0
1,007
4,166,169
2010-11-12T15:31:00.000
5
0
0
0
python,gtk
4,169,956
2
false
0
1
The answer is actually not OS-specific -- you can do it within GTK. You can get a list of all the toplevel windows from the application using gtk.window_list_toplevels(), then iterate through it until you find one where window.is_active() returns True. If you want to consider other windows than the ones from your appli...
1
3
0
How would I get a handle to the active gtk.Window in python? (not a window I created, but the currently focused window).
Get active gtk window in python
0.462117
0
0
5,129
4,167,684
2010-11-12T18:07:00.000
0
0
0
0
python,apache,rest,mod-wsgi,mod-python
4,168,054
2
false
1
0
Check if mod_wsgi is loaded as a module into the httpd.conf Add apache host that points to a python/wsgi module which contains the 'def application' definition for your web-service. Resolve any path issues that maybe arise from your import handling. If this doesn't work, drop some error-dump here and we'll check.
1
0
0
Can anyone help me install Apache with mod_wsgi to run Python for implementation of RESTful Web services. We're trying to get rid of our existing Java REST services with Apache Tomcat. The installation platform is SUSE Linux Enterprise. Please provide a step by step installation procedure with required modules, as I tr...
Install Apache with mod_wsgi to use Python for RESTful web services and Apache for web pages
0
1
0
2,568
4,167,863
2010-11-12T18:29:00.000
1
0
0
0
python
4,168,693
1
true
1
0
Depending on how often the feeds are updated and how often you check, you could simply fix broken dates (if it's in the future, reset it to today), before adding them to the database. Other than that, you'd have to use some sort of ID—I think RSS has an ID field on each item. If your feeds are kept in order, you can ge...
1
1
0
I am writing a python script to combine about 20+ RSS feeds. I would like to use a custom solution instead of feedjack or planetfeed. I use feedparser to parse the feeds and mysql to cache them. The problem I am running into is determining which feeds have already been cached and which haven't. Some pseudo code fo...
best algorithm to combine multiple RSS feeds using Python
1.2
0
1
1,116
4,168,020
2010-11-12T18:49:00.000
0
0
0
0
python,database,pyqt
4,208,750
4
false
0
1
i guess its totally upto you ..but as far as i am concerned i personlly use sqlite, becoz it is easy to use and amazingly simple syntax whereas for MYSQL u can use it for complex apps and has options for performance tuning. but in end its totally upto u and wt your app requires
3
0
0
i want to create application in windows. i need to use databases which would be preferable best for pyqt application like sqlalchemy mysql etc.
which databases can be used better for pyqt application
0
1
0
535
4,168,020
2010-11-12T18:49:00.000
1
0
0
0
python,database,pyqt
4,294,636
4
false
0
1
SQlite is fine for a single user. If you are going over a network to talk to a central database, then you need a database woith a decent Python lirary. Take a serious look at MySQL if you need/want SQL. Otherwise, there is CouchDB in the Not SQL camp, which is great if you are storing documents, and can express sear...
3
0
0
i want to create application in windows. i need to use databases which would be preferable best for pyqt application like sqlalchemy mysql etc.
which databases can be used better for pyqt application
0.049958
1
0
535
4,168,020
2010-11-12T18:49:00.000
1
0
0
0
python,database,pyqt
4,512,428
4
false
0
1
If you want a relational database I'd recommend you to use SQLAlchemy, as you then get a choice as well as an ORM. Bu default go with SQLite, as per other recommendations here. If you don't need a relational database, take a look at ZODB. It's an awesome Python-only object-oriented database.
3
0
0
i want to create application in windows. i need to use databases which would be preferable best for pyqt application like sqlalchemy mysql etc.
which databases can be used better for pyqt application
0.049958
1
0
535
4,170,442
2010-11-13T01:33:00.000
0
1
0
0
python,unit-testing,sqlite
4,170,458
1
true
0
0
Technically, yes. The only thing that you need is some kind of scripting language or shell script that can talk to sqlite. You should think of a database like a file in a file system where you don't have to care about the file format. You just say, here are tables of data, with columns. And each row of that is one reco...
1
1
0
I have my own unit testing suite based on the unittest library. I would like to track the history of each test case being run. I would also like to identify after each run tests which flipped from PASS to FAIL or vice versa. I have very little knowledge about databases, but it seems that I could utilize sqlite3 for thi...
Using sqlite3 to track unit test results
1.2
1
0
280
4,170,477
2010-11-13T01:42:00.000
3
1
1
0
python,packaging,egg,sdist
4,170,898
1
true
0
0
One reason: eggs can include compiled C extension modules so that the end user does not need to have the necessary build tools and possible additional headers and libraries to build the extension module from scratch. The drawback to that is that the packager may need to supply multiple eggs to match each targeted plat...
1
1
0
About the only reason I can think of to distribute a python package as an egg is so that you can not include the .py files with your package (and only include .pyc files, which is a dubious way to protect your code anyway). Aside from that, I can't really think of any reason to upload a package as an egg rather than a...
Why would one use an egg over an sdist?
1.2
0
0
251
4,170,503
2010-11-13T01:50:00.000
0
1
1
0
python,categorization
4,170,680
3
false
0
0
Use a FullText search index in MySQL. Then use AJAX calls to query against your database.
1
3
0
I'm looking at writing a mashup app that will take submission titles from a subreddit and attempt to plot them on a map based on where they are likely to be relevant. I'd also like to add on things like Twitter later on. What I'm having difficulty planning is how to detect the most likely to be relevant country from th...
Extracting a country name from a text string
0
0
0
2,432
4,171,255
2010-11-13T06:12:00.000
0
0
0
0
javascript,python,django,image,video
4,171,467
3
false
1
0
You need specify the "Content-Type" in the http response header.
2
0
0
If I have a .mp4 file, it will automatically display a video (flash?) If it's a jpg, it'll just display the image... Edit: I want this embedded inside a webpage.
Is there a way to display any media, regardless of type? (especially in Django?)
0
0
0
85
4,171,255
2010-11-13T06:12:00.000
0
0
0
0
javascript,python,django,image,video
4,171,542
3
true
1
0
no, you must have file view generator, thats mean you have list of pic and video and then for each file generate correct player and tag its easy
2
0
0
If I have a .mp4 file, it will automatically display a video (flash?) If it's a jpg, it'll just display the image... Edit: I want this embedded inside a webpage.
Is there a way to display any media, regardless of type? (especially in Django?)
1.2
0
0
85
4,171,555
2010-11-13T08:01:00.000
1
0
1
1
python,linux,ms-word
4,171,572
2
false
0
0
Openoffice has some Python scripting ability. I only heard about it, haven't studied it nor used it.
1
1
0
I want to create new work document from sketch with Python on Linux platform, but do not know how to do that. I do not willing to use RTF or use pythondocx to create docx document. Is there any other way to do so? Remember, I need the document keeps the formatting. Thanks everyone's help!
How to create a well-formatted word document(.DOC) in python on Linux?
0.099668
0
0
4,741
4,171,842
2010-11-13T09:27:00.000
0
0
0
0
python,model-view-controller,pylons
4,178,834
2
false
1
0
This is probably where you start moving chunks of code to library functions, to the /lib part of your Pylons project. "Generated by a separate controller" is probably going too far - you merely need to not repeat yourself. Try using library functions to make sure that the correct data is available, then use Mako's in...
1
2
0
I have a main page in Python/Pylons project, which have multiple different blocks (e.g. news/demo/(registration|private zone)/...). My thought is that each block should be generated in a separate controller. How can I call another controller method in a main page controller?
python/pylons - multiple controllers for template
0
0
0
296
4,172,426
2010-11-13T12:11:00.000
1
0
0
0
python,button,tkinter,state
4,187,733
1
false
0
1
You are only changing button states based on events, right? There is no reason to 'poll' to see if a button state has changed. What you can do is build a function which does all of the calling for you, then call it with something like disable_buttons([okButton, graphButton, printButton]). When an event takes place tha...
1
0
0
I've done a few searches but I couldn't find anything about this topic. Perhaps because it is common programmer knowledge (I'm not a programmer, I've learned from necessity), or because I'm going about it the wrong way. I would like ideas/suggestions on how to manage button states for a GUI. For example, if I have a p...
How to handle button states efficiently in Tkinter
0.197375
0
0
851
4,172,659
2010-11-13T13:11:00.000
7
0
1
0
python,events,tkinter
4,172,710
3
true
0
0
There is no such list as far as I know. There is a list of most events on the bind man page, but each widget can itself issue events unique to that widget (eg: <<ListboxSelect>>). Those are documented on the man page for each widget.
1
11
0
I'm searching for a master list of all Tkinter events. I've been googling for such a list all all morning without success. Any references for such a list would be appreciated.
Master list of all Tkinter Events?
1.2
0
0
6,361
4,173,674
2010-11-13T17:05:00.000
1
0
1
1
python,ubuntu-10.04
4,173,876
4
false
0
0
You probably missing some libraries that are not bundled by default on Ubuntu with Python (I have no idea why they decided to split "core" python this way). You can try running apt-get build-dep python python-dev and build again (you might need to add other packages as well). Rule of thumb is that if Python complains a...
2
0
0
I want to install python2.5.5 in Ubuntu10.10, since Ubuntu10.10 now just supports python>=2.6, so I download source file from python website and try to install it use ./configure && make && sudo make install, it seems that python2.5.5 has been installed successfully, but when I want to use it, sometimes it says "no mo...
How to install python2.5.5 in Ubuntu10.10 with all libs bundled
0.049958
0
0
626
4,173,674
2010-11-13T17:05:00.000
1
0
1
1
python,ubuntu-10.04
4,174,467
4
false
0
0
You can add 10.04 to your apt sources, then you can install in the usual way after an apt-update
2
0
0
I want to install python2.5.5 in Ubuntu10.10, since Ubuntu10.10 now just supports python>=2.6, so I download source file from python website and try to install it use ./configure && make && sudo make install, it seems that python2.5.5 has been installed successfully, but when I want to use it, sometimes it says "no mo...
How to install python2.5.5 in Ubuntu10.10 with all libs bundled
0.049958
0
0
626
4,173,787
2010-11-13T17:32:00.000
2
0
1
0
python,string
4,173,811
8
false
0
0
Do a regular expression search for \blocal\b \b is a "word boundry" it can include beginnings of lines, ends of lines, punctuation, etc. You can also search case insensitively.
2
23
0
I have a string in which the word "LOCAL" occurs many times. I used the find() function to search for this word but it returns another word "Locally" as well. How can I match the word "local" exactly?
String exact match
0.049958
0
0
91,453
4,173,787
2010-11-13T17:32:00.000
1
0
1
0
python,string
4,173,805
8
false
0
0
Look for ' local '? Notice that Python is case sensitive.
2
23
0
I have a string in which the word "LOCAL" occurs many times. I used the find() function to search for this word but it returns another word "Locally" as well. How can I match the word "local" exactly?
String exact match
0.024995
0
0
91,453
4,173,883
2010-11-13T17:49:00.000
5
1
0
0
python,social-networking,pylons,get-satisfaction
4,174,212
1
true
0
0
So you're not interested in a fixed solution but want to program it yourself, do I get that correctly? If not: Go with a fixed solution. This will be a lot of programming effort, and whatever you want to do afterwards, doing it in another framework than you intended will be a much smaller problem. But if you're actuall...
1
3
0
I am looking for tutorials and/or examples of certain components of a social network web app that may include Python code examples of: user account auto-gen function(database) friend/follow function (Twitter/Facebook style) messaging/reply function (Twitter style) live chat function (Facebook style) blog function publ...
Where can I find Python code examples, or tutorials, of social networking style functions/components?
1.2
0
1
2,075
4,174,633
2010-11-13T20:51:00.000
4
1
1
0
python,emacs
4,174,664
4
false
0
0
That depends on what shell you are using, in GNU Emacs 23 there are at least 3 built in: shell - ugly, not working tab eshell - not ugly but tab not working term - not ugly and seems like ipython works with all goodies in it So you might want to try the term mode.
1
2
0
I'm using emacs for python, and I'd like to have a nice useable shell in emacs to run an interpreter alongside my editing. Is there any better emacs shell package out there? The default shell is awful.
Is there any way to get a better terminal in emacs?
0.197375
0
0
2,955
4,175,287
2010-11-13T23:29:00.000
0
0
1
0
python,path-finding
4,175,298
2
false
0
0
Have you looked at Google Maps, rather than Google Earth? This has roads and a routing engine.
1
3
0
I want to retrace maps from google earth these maps would then be used for calculating fastest route from A to B as well as location probability defined by some factors. How would i go about doing these? My first thought is pygame and using some already made ones or using them as a template.
Making maps and pathfinding AI
0
0
0
1,211
4,175,419
2010-11-14T00:04:00.000
10
1
0
0
php,python,apache
4,175,473
1
true
1
0
For http requests, you need to set your web server to hand over certain request to PHP and others to Python. From within PHP's scripts, if you need to call some Python executable scripts, use one of PHP's shell functions. e.g. exec() Yes it is possible. The djangobook is a nice tutorial that covers this in one of the e...
1
4
0
I have some Python scripts that I run on my desktop now for cutting up files. I want to put them on the web and write a simple front-end in PHP where a user uploads a file and it is passed as an argument to a python script on the web server and it is written out in chunks and the user can re-download the chunks. I know...
Mixing Python and PHP?
1.2
0
0
4,155
4,175,611
2010-11-14T01:07:00.000
0
0
0
0
python,ruby-on-rails,ruby,django
4,175,695
5
false
1
0
For a .Net developer try to start with www.pradosoft.com/ prado framework, it's PHP framework which looks exactly like ASP.NET .. try it
2
0
0
I am a web developer working mainly with C# on ASP.NET (Webforms and MVC).. I have worked previously with PHP and Other Frameworks and languages of the sort.. I am currently looking and focusing all my development on 2 platforms.. One Proprietary and Industry Class Framework (ASP.NET MVC) and One Opensource and Free Fr...
Which opensource web framework should a C# ASP.NET Guy Learn?
0
0
0
893
4,175,611
2010-11-14T01:07:00.000
1
0
0
0
python,ruby-on-rails,ruby,django
4,178,708
5
false
1
0
I am a .NET guy and also worked on PHP for a couple of months. At present I am learning Ruby and after completing basics, I am going to move on Rails. I would suggest you to go with Ruby and than Rails. Career-wise also, Ruby guys are in demand these days, at least in my country.
2
0
0
I am a web developer working mainly with C# on ASP.NET (Webforms and MVC).. I have worked previously with PHP and Other Frameworks and languages of the sort.. I am currently looking and focusing all my development on 2 platforms.. One Proprietary and Industry Class Framework (ASP.NET MVC) and One Opensource and Free Fr...
Which opensource web framework should a C# ASP.NET Guy Learn?
0.039979
0
0
893
4,175,697
2010-11-14T01:34:00.000
2
0
1
1
python,error-logging
4,175,711
2
false
0
0
Look at the traceback module. If you catch a RuntimeError, you can write it to the log (look at the logging module for that).
1
3
0
I am writting a daemon server using python, sometimes there are python runtime errors, for example some variable type is not correct. That error will not cause the process to exit. Is it possible for me to redirect such runtime error to a log file?
How to redirect python runtime errors?
0.197375
0
0
2,714
4,176,087
2010-11-14T03:35:00.000
3
0
1
0
c#,java,python,c
4,176,101
11
false
0
0
Yes, serialization is the only way to transmit data over the wire. Consider what the purpose of serialization is. You define the way that the class is stored. In memory tho, you have no way to know exactly where each portion of the class is. Especially if you have, for instance, a list, if it's been allocated early but...
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0.054491
0
0
3,339
4,176,087
2010-11-14T03:35:00.000
4
0
1
0
c#,java,python,c
4,176,102
11
false
0
0
Serialization of some kind is required, but this can take many forms. It can be something like dotNET serialization, that is handled by the language, or it can be a custom built format. Maybe a series of bytes where each byte represents some "magic value" that only you and your application understand. For example, in...
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0.072599
0
0
3,339
4,176,087
2010-11-14T03:35:00.000
0
0
1
0
c#,java,python,c
4,176,105
11
false
0
0
Binary serialization is not the only option. You can also serialize an object as an XML file, for example. Or as a JSON.
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0
0
0
3,339
4,176,087
2010-11-14T03:35:00.000
0
0
1
0
c#,java,python,c
4,176,230
11
false
0
0
I think you're asking the wrong question. Serialization is a concept in computer programming and there are certain requirements which must be satisfied for something to be considered a serialization mechanism. Any means of preparing data such that it can be transmitted or stored in such a way that another program (inc...
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0
0
0
3,339
4,176,087
2010-11-14T03:35:00.000
2
0
1
0
c#,java,python,c
4,176,793
11
false
0
0
Is serialization a must in order to transfer data across the wire? Literally no. It is conceivable that you can move data from one address space to another without serializing it. For example, a hypothetical system using distributed virtual memory could move data / objects from one machine to another by sending pages...
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0.036348
0
0
3,339
4,176,087
2010-11-14T03:35:00.000
0
0
1
0
c#,java,python,c
4,177,077
11
false
0
0
Having a messages as objects and serializing into bytes is a better way of understanding and managing what is transmitted over wire. In the old days protocols and data was much simpler, often, programmers just put bytes into output stream. Common understanding was shared by having well-known and simple specifications.
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0
0
0
3,339
4,176,087
2010-11-14T03:35:00.000
0
0
1
0
c#,java,python,c
4,176,100
11
false
0
0
For anything more complex than a primitive or a homogeneous run of primitives, yes.
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0
0
0
3,339
4,176,087
2010-11-14T03:35:00.000
0
0
1
0
c#,java,python,c
4,177,202
11
false
0
0
I would say serialization is needed to store the objects in file for persistence, but dynamically allocated pointers in objects need to be build again when we de-serialize, But the serialization for transfer depends on the physical protocol and the mechanism used, for example if i use UART to transfer data then its ser...
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0
0
0
3,339
4,176,087
2010-11-14T03:35:00.000
0
0
1
0
c#,java,python,c
4,176,254
11
false
0
0
Strictly speaking it isn't the only option; you could put an argument that "remoting" meets the meaning inthe text; here a fake object is created at the receiver that contains no state. All calls (methods, properties etc) are intercepted and only the call and result are transferred. This avoids the need to transfer the...
9
9
0
Below is something I read and was wondering if the statement is true. Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be "resurrected" later in the same or a...
Is serialization a must in order to transfer data across the wire?
0
0
0
3,339
4,176,256
2010-11-14T04:59:00.000
0
0
0
0
pdf,reporting-services,render,python-2to3
4,195,530
1
true
1
0
I was able to resolve using device info with startpage as 2 and endpage as int.maxvalue
1
0
0
I m rendering SSRS Report in pdf format. I want pages from 2 to Last page. Using deviceinfo is it possible?
SSRS Get from page 2 to end page
1.2
0
0
148
4,176,405
2010-11-14T06:10:00.000
11
0
0
1
python,twisted,nonblocking
4,176,590
1
true
0
0
Yes. The best practice is that this is a bad idea, and that you never really need to do it. It doesn't work with all reactors, and you certainly can't have two different libraries which want to do this. Why do you need to maintain your own main loop? Chances are, it's something like "I want to work with PyGame" or "...
1
6
0
Instead of running reactor.run(), I'd like to call something else (I dunno, like reactor.runOnce() or something) occasionally while maintaining my own main loop. Is there a best-practice for this with twisted?
What is the best way to control Twisted's reactor so that it is nonblocking?
1.2
0
0
1,443
4,177,907
2010-11-14T14:27:00.000
3
0
0
1
python,django,google-app-engine,django-nonrel
4,180,124
1
true
1
0
Yes, djangoappengine has a mail backend for GAE and it's enabled by default in your settings.py via "from djangoappengine.settings_base import *". You can take a look at the settings_base module to see all backends and default settings.
1
2
0
I'm using Django-nonrel for Google App Engine and I was wondering if it's possible to use Django's built-in mail API instead of GAE's mail API for sending mail. If it is, how do I do it? Sorry if this seems like a noob question. I just started learning Django and GAE recently and I can't work out this problem that I ha...
Can I use Django's mail API in Google App Engine?
1.2
0
0
670
4,178,742
2010-11-14T17:42:00.000
1
0
0
1
python,google-app-engine,mongodb,pymongo
4,179,091
3
false
1
0
It's not possible because you don't have access to networks sockets in App Engine. As long as you cannot access the database via HTTP, it's impossible.
1
4
0
I'm trying to use a MongoDB Database from a Google App Engine service is that possible? How do I install the PyMongo driver on Google App Engine? Thanks
is it possible to use PyMongo in Google App Engine?
0.066568
1
0
1,355
4,178,828
2010-11-14T18:04:00.000
2
0
0
0
python,sqlite
4,178,853
1
true
0
0
Because cursor.execute() doesn't actually return the data. Presumably you need that, so you need to run fetchall.
1
1
0
Why would I want to reference cursor.fetchall() if I can use cursor.execute directly?a Thanks
Why would I want to reference cursor.fetchall() if I can use cursor.execute directly?
1.2
0
0
131
4,179,077
2010-11-14T18:57:00.000
1
0
0
1
python,multithreading,sockets,admin-interface
4,179,129
3
false
0
0
python includes some multi-threading servers (SocketServer, BaseHTTPServer, xmlrpclib). You might want to look at Twisted as well, it is a powerful framework for networking.
2
1
0
I've built a very simple TCP server (in python) that when queried, returns various system level statistics of the host OS running said script. As part of my experimentation and goal to gain knowledge of python and its available libraries; i would like to build on an administration interface that a) binds to a separate...
Suggestions for developing a threaded tcp based admin interface
0.066568
0
0
178
4,179,077
2010-11-14T18:57:00.000
0
0
0
1
python,multithreading,sockets,admin-interface
4,179,107
3
false
0
0
Probably the easiest starting point would involve Python's xmlrpclib. Regarding threading, all threads can read all data in a Python program; only one thread at a time can modify any given object, so primitives such as lists and dicts will always be in a consistent state. Data structures (i.e. class objects) involving ...
2
1
0
I've built a very simple TCP server (in python) that when queried, returns various system level statistics of the host OS running said script. As part of my experimentation and goal to gain knowledge of python and its available libraries; i would like to build on an administration interface that a) binds to a separate...
Suggestions for developing a threaded tcp based admin interface
0
0
0
178
4,179,831
2010-11-14T21:38:00.000
5
0
1
0
python
4,179,849
4
true
0
0
It's not necessary to do so, but if you want you can have your method raise a TypeError if you know that the object is of a type that you cannot handle. One reason to do this is to help people to understand why the method call is failing and to give them some help fixing it, rather than giving them obscure error from t...
1
5
0
I have a function that is supposed to take a string, append things to it where necessary, and return the result. My natural inclination is to just return the result, which involved string concatenation, and if it failed, let the exception float up to the caller. However, this function has a default value, which I just...
What is the proper python way to write methods that only take a particular type?
1.2
0
0
134
4,179,879
2010-11-14T21:46:00.000
1
1
0
0
python,multithreading,load-testing
4,180,003
2
false
0
0
too many variables. 1000 at the same time... no. in the same second... possibly. bandwidth may well be the bottleneck. this is something best solved by experimentation.
1
4
0
I want to do a test load for a web page. I want to do it in python with multiple threads. First POST request would login user (set cookies). Then I need to know how many users doing the same POST request simultaneously can server take. So I'm thinking about spawning threads in which requests would be made in loop. I ha...
Python script load testing web page
0.099668
0
1
8,721
4,180,120
2010-11-14T22:41:00.000
5
0
0
0
python,django,model,django-queryset
4,180,322
1
true
1
0
If the ForeignKey is, as you describe in ModelB and you do mb = ModelB.objects.get(pk=prim_id) then the look up for the modela attribute is not a reverse lookup. you simply access the related object via mb.modela!
1
6
0
I have a django project which has two apps, one is AppA and AppB. Now AppA has a model ModelA which is referenced by the model ModelB in AppB, using modelA = models.ForeignKey(ModelA, related_name='tricky') Now in my view for AppA, when it shows ModelA, I do a get_object_or_404(ModelA, pk=prim_id). Then I want to get a...
Django reverse lookup by ForeignKey
1.2
0
0
7,718