Python is a dynamic, high-level language. Its design focuses on clear syntax, an intuitive approach to object-oriented programming, and making the right way to do things obvious. Python supports modules, exceptions, had an extensive standard module library. Python can also be embedded in other ...
-3
votes
0answers
12 views
Python Multiprocessing Queue file discriptor [migrated]
I wanted to know if the queue had a file descriptor and how to find it?
5
votes
2answers
106 views
How does a symbol table relate to a namespace?
The official tutorial uses the term symbol table in a few places where I would expect the term namespace.
1. Defining functions
The execution of a function introduces a new symbol table used for ...
0
votes
1answer
100 views
How do I get an open source project off the ground? [closed]
I just finished laying down the groundwork for an opensource project that I hope to carry out, and then I realized I don't really have a way of reaching my intended audience (new Python programmers), ...
-2
votes
0answers
73 views
in Python, how do I change this value? [closed]
My assignment is to make a new function that takes canvas.rectangle as an argument then change the "fill". My question is, how do I modify the "fill" in "canvas.rectangle", and/or the "background" in ...
-7
votes
0answers
119 views
which is the best programming language for developing a GUI software? [closed]
Comparing different programming languages available among the
Java
VB
Python
C
C++
which among them is better than the other based on the following :
Connectivity with others like an XML file, ...
-1
votes
0answers
77 views
How is file navigation in Sublime Text 2 so fast? [closed]
In Sublime Text 2, one can simply launch the editor, drag a folder into it, and press Ctrl+P to pretty much instantly open any file in that folder. As far as I can see the number of files in the ...
3
votes
4answers
319 views
Why isn't the ‘format’ method more widely used in Python?
I'm probably missing something here, after searching I couldn't find an answer.
I've explored quite a few Python projects and one thing I keep noticing is the fact that the majority of them continue ...
-3
votes
3answers
102 views
Learning Python [closed]
what is the best approach to master a library in python. Since any library has so much method and classes it becomes very difficult to remember them. Like for example I am reading this werkzeug ...
-1
votes
0answers
17 views
How to perform excel operation via Python? [migrated]
I am working on a project and want to write excel and csv files from python 3 on my windows server. Can anyone help if the goal could be achieved from python ?
A HOW would be utterly appreciated.
...
-5
votes
0answers
26 views
SQLAlchemy help [closed]
Ok! Let me be more specific. How to maintain exactly one copy of module or instance object across my application? I am asking this in the context of SQLAlchemy's preference of single instance of the ...
6
votes
4answers
294 views
'import module' vs. 'from module import function'
I have always been using this method:
from sys import argv
and use argv with just argv. But there is a convention of using this:
import sys
and using the argv by sys.argv
The second method ...
4
votes
0answers
195 views
How has having multiple implementations affected Python [closed]
Python has 5 implementations listed on their homepage:
Python / CPython
IronPython
PyPy
Jython
Stackless Python*
When considered against languages such as PHP or even Java that seems like a lot of ...
-1
votes
0answers
20 views
Running windows shell commands with python [migrated]
How can we interact with OS shell using Python ?
I want to run windows cmd commands via python. How can it be achieved ?
12
votes
3answers
741 views
Why Was Python Written with the GIL?
The global interpreter lock (GIL) seems to be often cited as a major reason why threading and the like is a touch tricky in Python - which raises the question "Why was that done in the first place?"
...
0
votes
0answers
76 views
Python web application architecture [closed]
I am learning SQLAlchemy and for that I am trying to make a blog from scratch. But every time I start I get stuck on one or two issues, like:
What should my package look like?
How and when to ...
5
votes
1answer
292 views
Is using '{}' within format strings considered Pythonic?
I just learned you can write
'{}{}'.format(string_a, string_b)
instead of
'{0}{1}'.format(string_a, string_b)
in Python, i.e. you can omit the numerals for the string format parameters when you ...
0
votes
0answers
88 views
STAF/STAX and python alternative
We are looking into replacing some homegrown pieces and the candidates are:
STAF (http://staf.sourceforge.net/)
anything mature in python
My colleague Kevin has looked into STAF so I am ...
2
votes
3answers
148 views
When to import names into the global namespace? (using x::y, from x import y etc.)
I've been programming in various languages for about 10 years now. And I still haven't figured out when it is a good idea to import something into the global namespace (using x::y in C++, from x ...
-1
votes
3answers
122 views
Brief python overview / introduction for programmers [closed]
I'm amazed that I can't find a brief and very concise python introduction, similar to the very excellent one for perl, in spite of hours of googling.
That is, something like this:
Single page (no ...
8
votes
4answers
280 views
Strategy for keeping up with (Python) language changes
Writing code that will still run years from now
Programming languages change.
Libraries change.
Some code from 5, 10, or even 20 years ago might still run and produce expected results, whereas some ...
0
votes
1answer
79 views
Why does flask use Jinja2 and not xpath?
I'm just starting out with python and since I'm coming from a PHP background (thus have to adjust my mind to wrap around new concepts) one major question still stands without answer - why does Flask ...
2
votes
1answer
92 views
Good serialization solution for communication between Python AND Haskell programs? [closed]
I found this:
http://msgpack.org/
But.. I've never used it, so I don't know what whether it is much good. Anybody has proposals?
Basic requirements:
serialize as many data structures used ...
0
votes
0answers
51 views
Portability: Python's C/C++ libraries/extensions vs JRuby's Java libraries
I've had some discussion with colleagues who chose to go with JRuby along the following line of argumentation:
JRuby can make use of anything that is available in Java, ergo such programs are more ...
0
votes
1answer
232 views
Is python lambda “really formal” λ-calculus or just share the name?
Now and then I use the Python lambda. Is it so formal that it is safe to say that you can do formal lambda calculus with it? I just used it but I didn't fully understand whether the python lambda and ...
0
votes
0answers
56 views
Resources for Python Developers [closed]
I'm developing an online course for beginning python programmers starting from basic syntax through object oriented design and GUI. I'd like to include some helpful community resources like Code ...
1
vote
1answer
116 views
Python for first programming / web development job [closed]
I've been teaching myself python and django for a couple of years, but I don't seem to find many entry-level python jobs in the UK. If I'm looking to begin a career in programmming / web development, ...
1
vote
2answers
136 views
What is the best way to plot 3D/2D plots with real time data? [closed]
First of all, I like to use Python, because it is easy to work with. I am not a programmer, so I prefer anything that is easy to use and understand. I understand that it might be faster to program 3D ...
2
votes
2answers
105 views
Changing __class__ in a factory?
I'm parsing a set of XML files of different kinds (these kinds are known in advance).
These are my requirements:
I want an object to represent each XML document (object-xml mapping)
I'd rather ...
0
votes
0answers
28 views
Python: What could I do differently to slim down my Python code? [migrated]
Could I code differently to slim down the point of this Python source code? The point of the program is too get the users total amount and add it too the shipping cost. The shipping cost is determined ...
-1
votes
0answers
28 views
Object tree in python vs DOM with Javascript [migrated]
I am trying to do some python app (Pyside/Qt), and can't figure how to proceed object as argument to another function. With Javascript I can access to any object/element in DOM. Does I need to build ...
2
votes
2answers
236 views
How to fix bad fundamentals? [closed]
I am a native PHP developer, and have been for about a year or so. I love PHP and it was very easy for me to learn, but I have developed some bad habits along the way due to never having a formal ...
-3
votes
0answers
50 views
How do i decode a url from a file for python? [closed]
I dont know how to make my program work with files. My program works fine when i store it in a variable but not when i try opening a file and getting the url from there.
-4
votes
0answers
155 views
What is a good book if i want to learn Java [closed]
I am wondering if you could help me find a good book to learn Java programming language. I have been looking around for a good (first) programming language, (now that I have mastered HTML and CSS) ...
1
vote
3answers
161 views
Hacking Python “Requests” library.. How to start as an intermediate pythonista?
My question is conceptual, yet extremely vital for me.
I'm an intermediate Python developer. I know fair enough about it, and actually use it on a daily basis. Now, I would like to transform my ...
8
votes
2answers
257 views
In python, is it considered better to define a module with functions or a module with a class that contains functions? [closed]
In my code either of the above two options would work equally well but I am interested in finding out the pros and cons of both approaches.
-4
votes
1answer
93 views
Downloading public files in Google Drive (Python) [closed]
Suppose that someone gives me a link that enables me to download a public file in Google Drive.
I want to write a program that can read the link and then download it as a text file.
For example, ...
-4
votes
0answers
132 views
Scala vs Pyton for a Java developer for quick scripts and other - NOT FLAME WAR! [closed]
I've read a lot of posts about this language vs that language and too many of them seem highly religious and not especially helpful to my quest. I am a Java developer who has worked in the Java ...
-1
votes
0answers
26 views
How to install a msi using python script? [migrated]
Is there any python script to install a msi? I need to install msi and run it without showing any dialogue modal.
I have msi on my folder c:\user\documents and i have a wxpython GUI developed using ...
-3
votes
0answers
72 views
Rabin fingerprint implementation in Python
I am implementing kind of chunk-level data deduplication system in Python.
I cannot figure out how Rabin fingerprint (aka. Rabin hash) works but still need to use it because it's helpful in ...
4
votes
2answers
160 views
Ensuring conceptual integrity in Python project with multiple programmers
One objection that I have often heard raised against Python that it is difficult to synchronize a team of many programmers on large Python project. Note: that synchronization is possible in such a ...
1
vote
1answer
61 views
Splitting documentation between docstrings and sphinx
I'm using a combination of docstrings and Sphinx to document my Python programs. With Sphinx's autodoc, I can write a lot of documentation into the source as docstrings. Is there any standard for ...
1
vote
4answers
272 views
NodeJS as an avenue towards learning JavaScript [closed]
I'm a backend programmer who works mainly in Python. I'll probably never want to be a full time front end developer, but with the goal of growing my skill set, I would like to become at least passably ...
-2
votes
1answer
123 views
Sending binary data from a computer to a server using HTTP or sockets [closed]
I am working on a script which can send data to a remote server computer and I am wondering which is better to achieve this functionality, the high level functionality provided by HTTP or just raw ...
-7
votes
1answer
103 views
How to change color of text in python 2.7 [closed]
How to change color of text in puthon 2.7
print "/////////!WARNING you don't have enough fuel please fly to nearest airport!/////////"
print ...
2
votes
1answer
153 views
Loop Invariants in Python
I have a bit of experience with loop invariants but I'm not really clear on them. I'm trying to learn them through an example in Python. Can someone point one out or help me understand?
I've ...
3
votes
2answers
66 views
Machine Learning With Categorical and Continuous Data
This question could go here or on S.O. perhaps...
Suppose that your training dataset contains both categorical and continuous data such as this setup:
Animal, breed, sex, age, weight, ...
2
votes
1answer
106 views
call sub function based on variable value
I have a function containing other functions. These function are called based on value of variable action.
These sub functions are logically grouped - i.e., they all deal with file manipulation.
...
2
votes
1answer
97 views
How should I distinguish between built-in types in Python?
I have a function that accepts either a string or a dictionary as an argument. That is, it can be called as either:
lookup_person({name: "John Smith", age: 57})
or
lookup_person("John Smith")
My ...
1
vote
2answers
103 views
Simplest token-system for authenticating and authorizating
I want to make Python script that will accept input from Vim and send it to my web-site. So basically I want to make Vim my text-editor for blog articles.
Of course, I need to authenticate and ...
11
votes
4answers
403 views
Why store a function inside a python dictionary?
I'm a python beginner, and I just learned a technique involving dictionaries and functions. The syntax is easy and it seems like a trivial thing, but my python senses are tingling. Something tells me ...