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 ...

learn more… | top users | synonyms

0
votes
1answer
33 views

How to create different paths for users to take through the pages in my site?

I have a website where users are directed to go through a sequence of pages to perform a sequence of work tasks (transcribe a paragraph, answer a survey, interact with another user, etc). For short, ...
-1
votes
0answers
55 views

Which 3rd party library should every Python developer be familar with? [closed]

Besides numpy, which 3rd party library should every Python developer be familiar with? I know the standard library is rich, but I would like to know what is out there. I used numpy only because it ...
1
vote
0answers
65 views

What's the best way to create a static utility class in python? Is using metaclasses code smell?

Ok so I need to create a bunch of utility classes in python. Normally I would just use a simple module for this but I need to be able to inherit in order to share common code between them. The common ...
-2
votes
1answer
68 views

Separating signal chunks, better algorithm desired

This is my current challenge. I am looking for a good algorithm. http://i.stack.imgur.com/Q6b9z.gif from 0 to about 1480 you have values below 100. My goal is to separate those two big areas of ...
4
votes
4answers
208 views

Returning a boolean when success or failure is the sole concern

I often find myself returning a boolean from a method, that's used in multiple locations, in order to contain all the logic around that method in a single place. All the (internal) calling method ...
2
votes
1answer
51 views

Approaches to isolating tests that require a database? [duplicate]

Suppose I have component A,B,C that all put some data into a database. Each component depends on data in the database inserted by the previous component. How do I test these modules in isolation? I ...
0
votes
0answers
54 views

Books on Python equivalent to 'The design and evolution of C++', 'ruminations on C++', etc [closed]

If one wants to master C++ there are a host of books worth reading - Modern C++ Design, The Design and Evolution of C++, Ruminations on C++, Exceptional C++ and so on - are there equivalent books for ...
-3
votes
4answers
309 views

speed/performance of image processing python vs java vs c [closed]

I have a project in which I take a handful of images and coordinates, and combine them all into a single image based on those coordinates. (so not really image processing, just image ...
1
vote
2answers
713 views

Why do people consider Python a weak language? [closed]

I've been using Python for a little while now and I am enjoying it, but a few of my friends are telling me to start using a language like C# or Java instead and give these reasons: Python is a ...
-1
votes
0answers
183 views

Is there a reputation that C# and Java is for work while Ruby or Python is for fun? Why? [closed]

I heard this several times online or from colleagues. Many people use C# or Java at work-related project, but prefers Ruby or Python for fun or hobby-oriented projects. For example, in his blog post, ...
0
votes
1answer
94 views

Pros and cons of the following Parsing methods?

I'm thinking of making a Python-JavaScript converter/compile. I've been wondering about the pros and cons of the following methods to parse the Pythonic code, into JavaScript equivalent. Working ...
0
votes
0answers
7 views

Problem with matrices in Python [migrated]

I was writing a programm in Python (2.5.4), and I realized that my code was not working because of something very unusual. I am going to give an example: A = [[0]*2]*2 When I print A, I get: [[0, ...
0
votes
0answers
4 views

pefile How do I nullify the first 8 bytes of a file? [migrated]

How do I nullify the first 8 bytes of a file? this example does not work: import pefile pe = pefile.pe(In) pe.set_dword_at_rva(0,0) pe.set_dword_at_rva(0,4) pe.write(Out) pe.close() How i can ...
1
vote
2answers
85 views

Python reading from stdin while doing other tasks

I am trying to write a system log parser. It will receive messages from the FreeBsd syslog daemon through stdin. It will use those messages to determine if an ip should be banned or not. The problem ...
3
votes
1answer
80 views

Where should I store the files for python modules I install?

If I download a module for Python (such as alglib) and installing is simply a matter of running python setup.py install Where should I be keeping the files I download, or the files that get created ...
3
votes
1answer
34 views

Accepted best practices for setup.py of a forked project

Context: I was looking to see if there was a tool to do something (in my case I was looking for a proxy that would allow for http log inspection from a python test framework). There turned out to be ...
0
votes
0answers
55 views

Pythonic way to map a function from one module to a method of a global object

I'm writing a naive simulator for testing code which will run on an embedded system. The code being tested will import a bunch of modules, call functions in these modules and receive data on which it ...
0
votes
0answers
59 views

In general, what does an object need to have in order to be an iterator? [migrated]

In general, what does an object need to have in order to be an iterator? Programmatically, what does class need to have in Python to be used as an iterator?
3
votes
2answers
207 views

Getting practicality of PHP from Ruby or Python

I have a rather odd problem. I love the practicality of PHP - specifically that I can fairly safely assume that on any random server I'll have access to the MySQL libraries, and that I can go between ...
-3
votes
0answers
28 views

Python3 Print First File Line [closed]

How can I make Python3 print the first line of a file once I have loaded the file contents? In other words, what is Python3's equivalent to AWK's awk "NR==1"?
5
votes
5answers
513 views

Spoiled by Python convenience- and productivity-wise, spoiled by C++ speed-wise. Now unhappy with both [closed]

I'm currenetly struggling with choosing how to proceed as a programmer. I mainly programmed games and would like to continue. And for about 5 years or so I just used C++ and OpenGL, so I spent a lot ...
-1
votes
0answers
60 views

How to interpolate GPS data correctly? [migrated]

I'm working on a project that involves using linear interpolation to fit lines to lat/lng points. I'm pretty new at scientific programming related stuff, and I was wondering if people could steer me ...
0
votes
0answers
16 views

Storing data on the google app engine with python trouble [migrated]

I am attempting to store data via python on the datastore.. but i am not succeeding. I have looked at the documentation but still cannot manage to get my app working. I have the following code which ...
-3
votes
0answers
93 views

Which language would be more beneficial to learn for a PHP developer? [closed]

I know PHP and I want to impress myself by learning another language. I'm nowhere near an expert in PHP, but when I started to learn Laravel framework, I was like, "Wow, is this PHP? How cool is ...
0
votes
0answers
7 views

How to change ttk.Treeview column width and weight in Python 3.3 [migrated]

I have created a GUI for my application with Tkinter. I am using also a treeview widget. However I am unable to change its column widths and weights. How to do it properly? Sample: tree = ...
1
vote
1answer
391 views

Why does gmail use java? Is there really a advantage over something like php or python? [closed]

Note: I know that none of you (probably) work for google, so this is a lot more of a conceptual question. So yeah, i discovered that Gmail uses java and that got me thinking, Why? I personally never ...
10
votes
4answers
629 views

Why do some programmers categorize C, Python, C++ differently? - regarding level [duplicate]

I am taking an introductory course on python and the instructor says that python is a high level language and C and C++ are low level languages. It's just damn confusing. I thought that C, C++, ...
-1
votes
0answers
41 views

Python: Single Quotes Showing up in my Database [migrated]

I'm doing some python programming, inserting data into a MYSQL database for a project. I've been doing the coding, but noticed an odd artifact; Whenever I insert string data, my database includes the ...
4
votes
1answer
249 views

Is it possible to write a code without class methods, globals, and class variables? [closed]

I'm designing my own programming language for fun, and I'm thinking of making it fully Object-oriented (no statics, no globals, no class variables, no class methods), so I need to find a way to ...
0
votes
0answers
31 views

Python web application frontend for equipment diagnostics and interaction

My goal is to have a Python application that runs a web server which hosts the user interface, and based on interactions from a user in their browser, long running tasks get kicked off and through ...
1
vote
3answers
112 views

Is it better to save output from command in memory and store later or save in a temporary file and then move to final location?

I hope this is not off topic. I have to save output from a command to file, but only if length of this output is positive. I've thought about two solutions: save output to a python variable, check ...
-4
votes
0answers
109 views

Project suggestions for a beginner [closed]

I'm a rather beginner in Python and looking for project ideas. I don't want to reinvent the wheel and I just can't think of any ideas for a project which hasn't been implemented before. Also I want to ...
0
votes
2answers
73 views

What is the convention regarding class names that may already exist in the ORM?

This is a generic question about class names and ORMs, but for context; I'm working on a Flask web app in Python using SQLalchemy. I'm struggling with naming a new class that will contain the ...
-3
votes
0answers
32 views

Video Streaming verification in python [closed]

I have to play a video in different player and verify whether video is streaming or not. please suggest me some module in python
0
votes
3answers
122 views

Architecting Python application consisting of many small scripts

I am building an application which, at the moment, consists of many small Python scripts. Each Python script processes items from one Amazon SQS queue. Emails come into an initial queue and are ...
3
votes
1answer
155 views

How to keep unit tests independent?

I've read it at many places that unit tests should be independent. In my case I have a class that does data transformation. These steps must be done sequentially, otherwise they don't make sense. For ...
0
votes
0answers
57 views

data handling with javascript

Python has a very neat package called pandas which allows for quick data transformation; tables, aggregation, that sort of thing. A lot of these types of functionality can also be found in the python ...
-1
votes
0answers
106 views

Developing an online IDE [closed]

Firstly, I am doing this for a large project, and it is 100% necessary for it. I am an experienced programmer with strong knowledge of Python, C, Ruby, Javascript, JQuery, HTML/CSS (but I have no ...
0
votes
0answers
247 views

How to stay up to date as a programmer and developer [duplicate]

So I am going to college right now for computer science, and I am reading a lot of books on different languages that have nothing to do with my courses in school, and I found out that I am completely ...
23
votes
8answers
2k views

Is the algorithm more important than the programming language?

During the current (2013) Google Code Jam contest, there was a problem that took C++ and Java people 200+ lines of code as compared to Python people that solved the same problem only using 40 lines of ...
2
votes
1answer
67 views

How to create in Python Tkinter a widget that would act like a choice tree?

I would like to know if there is such widget in tk (or in any different standard Python 3 module), or how to create it: Of course it doesn't have to look like this, but it should offer same ...
3
votes
0answers
203 views

Is this over-abstraction? (And is there a name for it?)

I work on a large Django application that uses CouchDB as a database and couchdbkit for mapping CouchDB documents to objects in Python, similar to Django's default ORM. It has dozens of model classes ...
-1
votes
0answers
128 views

i have created the longest word in a text file [closed]

finding the longest word(s) in a text file that can be made from 9 letters.I'm new to python and I'm creating a game similar to downtown. I've created a function to find the longest word in the text ...
0
votes
0answers
61 views

Detecting computer/program shutdown in Python? [migrated]

I have a Python script that runs in a loop regularly making adjustments to my lighting system. When I shut down my computer, I'd like my script to detect that, and turn off the lights altogether. ...
2
votes
2answers
322 views

Are programming books in other languages useful for Python?

I'm a self-taught intermediate Python programmer; I frequently come across popular books on software development and programming written in other languages (often Java). Typical examples: ...
0
votes
1answer
60 views

Are Python sockets suitable for file synchronization?

I'm working in an organisation with limited funds. They can't afford a business account on Dropbox. However, they would find it useful to have all their files synchronized on local machines. I've ...
0
votes
0answers
8 views

python / quickly / glade webbrowser progress bar problems [migrated]

at the moment i am creating a web browser using a mix of python, quickly and glade. I have got everything set out that needs sorting but i seem to have a problem with getting the progress bar to ...
3
votes
0answers
62 views

Creating command line switches in python [migrated]

For example, sqlmap uses python sqlmap.py -h. This command above lists all available switches in sqlmap, and -h is a switch itself. When you are creating a python tool for use in terminal, what is ...
1
vote
0answers
81 views

Inheritance and constricted referencing

Let's say I have BaseA and BaseB classes. BaseB can have to several references of BaseA instances. Now, we have two other classes, DerivedA and DerivedB that respectively inherit from BaseA and BaseB. ...
-1
votes
1answer
73 views

Toolkit for cross-platform applications in Python [closed]

I would like to develop cross-platform GUI applications, which work on both Linux and Windows systems. I am now confused on which toolkit to use. I asked many of them and each one are saying different ...

1 2 3 4 5 12