Q_Id
int64
337
49.3M
CreationDate
stringlengths
23
23
Users Score
int64
-42
1.15k
Other
int64
0
1
Python Basics and Environment
int64
0
1
System Administration and DevOps
int64
0
1
Tags
stringlengths
6
105
A_Id
int64
518
72.5M
AnswerCount
int64
1
64
is_accepted
bool
2 classes
Web Development
int64
0
1
GUI and Desktop Applications
int64
0
1
Answer
stringlengths
6
11.6k
Available Count
int64
1
31
Q_Score
int64
0
6.79k
Data Science and Machine Learning
int64
0
1
Question
stringlengths
15
29k
Title
stringlengths
11
150
Score
float64
-1
1.2
Database and SQL
int64
0
1
Networking and APIs
int64
0
1
ViewCount
int64
8
6.81M
1,524,713
2009-10-06T10:15:00.000
0
0
0
0
python,django
1,524,724
4
false
1
0
You could make a Date object in javascript. Check the current time and depending on the time, you set the img src to whatever image you want for that time of day :) or hide the image through myimg.style.visibility = "hidden" if you dont want to display an image at that moment.
2
1
0
I'm supposed to display images at certain times of the day on the webpage, Please can anyone tell me how to go about it
How do I display images at different times on webpage
0
0
1
328
1,524,713
2009-10-06T10:15:00.000
0
0
0
0
python,django
1,524,812
4
false
1
0
If you need to change the image before a page refresh, you could use jquery ajax call to get the correct image. jquery has some interval functionality which would allow this.
2
1
0
I'm supposed to display images at certain times of the day on the webpage, Please can anyone tell me how to go about it
How do I display images at different times on webpage
0
0
1
328
1,527,230
2009-10-06T18:21:00.000
0
0
0
0
python,rss,python-3.x,feed
1,568,128
4
false
0
0
Start porting feedparser to Python 3.1.
1
8
0
Anyone know of a good feed parser for python 3.1? I was using feedparser for 2.5 but it doesn't seem to be ported to 3.1 yet, and it's apparently more complicated than just running 2to3.py on it. Any help?
Python 3.1 RSS Parser?
0
0
1
3,122
1,527,395
2009-10-06T18:56:00.000
3
0
1
0
python,properties,instance,setter,instance-variables
1,527,494
4
false
0
0
Simply trusting the user is not necessarily a bad thing; if you are just writing a quick Python program to be used once and thrown away, you might very well just trust that the user not alter the pid field. IMHO the most Pythonic way to enforce the read-only field is to use a property that raises an exception on an att...
1
9
0
I use @property to ensure that changes to an objects instance variables are wrapped by methods where I need to. What about when an instance has an variable that logically should not be changed? Eg, if I'm making a class for a Process, each Process instance should have a PID attribute that will frequently be accessed b...
Constant instance variables?
0.148885
0
0
4,830
1,528,583
2009-10-06T23:10:00.000
11
0
0
0
python,django,voting
1,528,617
4
false
1
0
Whatever you do, make sure that it's submitted by POST and not GET; GET requests should never alter database information.
1
29
0
I am making a small app that lets users vote items either up or down. I'm using Django (and new to it!). I am just wondering, what is the best way to present the upvote link to the user. As a link, button or something else? I have already done something like this in php with a different framework but I'm not sure if I ...
Django Vote Up/Down method
1
0
0
12,621
1,529,128
2009-10-07T01:59:00.000
0
0
0
0
python,windows,django,authentication,frameworks
1,529,146
2
false
1
0
If the only thing the WIN32 app uses the MS-SQL Server for is Authentication/Authorization then you could write a new Authentication/Authorization provider that uses a set of Web Services (that you would have to create) that expose the Django provider.
1
1
0
I have a web service with Django Framework. My friend's project is a WIN32 program and also a MS-sql server. The Win32 program currently has a login system that talks to a MS-sql for authentication. However, we would like to INTEGRATE this login system as one. Please answer the 2 things: I want scrap the MS-SQL to use...
Can a WIN32 program authenticate into Django authentication system, using MYSQL?
0
1
0
203
1,529,584
2009-10-07T05:07:00.000
1
0
1
1
python,macos,osx-leopard
1,529,596
3
false
0
0
It probably failed because /var/log has user set to root and group set to wheel. Try running your python code as root and it will probably work.
1
1
0
how can i create new file in /var/log directory using python language in OSX leopard? i tried to do it using os.open function but i get "permission denied" thanks in advance
how to create new file using python
0.066568
0
0
1,509
1,529,896
2009-10-07T06:41:00.000
2
1
0
0
python,ruby,scripting-language
1,529,931
11
false
0
0
Script languages have no differences compared with other languages in the sense that you still have to break your problems into manageable pieces -- that is, functions. So, instead of testing the whole script after finishing the whole script, I prefer to test those small functions before integrating them. TDD always h...
4
6
0
I am basically from the world of C language programming, now delving into the world of scripting languages like Ruby and Python. I am wondering how to do debugging. At present the steps I follow is, I complete a large script, Comment everything but the portion I want to check Execute the script Though it works, I am...
Debugging a scripting language like ruby
0.036348
0
0
1,224
1,529,896
2009-10-07T06:41:00.000
10
1
0
0
python,ruby,scripting-language
1,529,996
11
true
0
0
Your sequence seems entirely backwards to me. Here's how I do it: I write a test for the functionality I want. I start writing the script, executing bits and verifying test results. I review what I'd done to document and publish. Specifically, I execute before I complete. It's way too late by then. There are debugg...
4
6
0
I am basically from the world of C language programming, now delving into the world of scripting languages like Ruby and Python. I am wondering how to do debugging. At present the steps I follow is, I complete a large script, Comment everything but the portion I want to check Execute the script Though it works, I am...
Debugging a scripting language like ruby
1.2
0
0
1,224
1,529,896
2009-10-07T06:41:00.000
0
1
0
0
python,ruby,scripting-language
1,531,112
11
false
0
0
The debugging method you described is perfect for a static language like C++, but given that the language is so different, the coding methods are similarly different. One of the big very important things in a dynamic language such as Python or Ruby is the interactive toplevel (what you get by typing, say python on the ...
4
6
0
I am basically from the world of C language programming, now delving into the world of scripting languages like Ruby and Python. I am wondering how to do debugging. At present the steps I follow is, I complete a large script, Comment everything but the portion I want to check Execute the script Though it works, I am...
Debugging a scripting language like ruby
0
0
0
1,224
1,529,896
2009-10-07T06:41:00.000
2
1
0
0
python,ruby,scripting-language
1,530,723
11
false
0
0
My question is, is there any better way of debugging?" Yes. Your approach, "1. I complete a large script, 2. Comment everything but the portion I want to check, 3. Execute the script" is not really the best way to write any software in any language (sorry, but that's the truth.) Do not write a large anything. Ever. Do...
4
6
0
I am basically from the world of C language programming, now delving into the world of scripting languages like Ruby and Python. I am wondering how to do debugging. At present the steps I follow is, I complete a large script, Comment everything but the portion I want to check Execute the script Though it works, I am...
Debugging a scripting language like ruby
0.036348
0
0
1,224
1,530,245
2009-10-07T08:21:00.000
0
1
1
0
c++,python,garbage-collection
1,532,646
6
false
0
0
As you have got your answer, now it's better to know the cons of automated garbage collection: it requires large amounts of extra memory and not suitable for hard real-time deadline applications.
2
3
0
I heard that Python has automated "garbage collection" , but C++ does not. What does that mean?
I heard that Python has automated "garbage collection" , but C++ does not. What does that mean?
0
0
0
1,606
1,530,245
2009-10-07T08:21:00.000
2
1
1
0
c++,python,garbage-collection
1,530,267
6
false
0
0
It basically means the way they handle memory resources. When you need memory you usually ask for it to the OS and then return it back. With python you don't need to worry about returning it, with C++ you need to track what you asked and return it back, one is easier, the other performant, you choose your tool.
2
3
0
I heard that Python has automated "garbage collection" , but C++ does not. What does that mean?
I heard that Python has automated "garbage collection" , but C++ does not. What does that mean?
0.066568
0
0
1,606
1,530,960
2009-10-07T11:08:00.000
1
0
0
0
python,numpy,memory-management
1,534,340
4
false
0
0
On possible option is to do a single pass through the file first to count the number of rows, without loading them. The other option is to double your table size each time, which has two benefits: You will only re-alloc memory log(n) times where n is the number of rows. You only need 50% more ram than your largest tab...
1
11
1
I have a series of large text files (up to 1 gig) that are output from an experiment that need to be analysed in Python. They would be best loaded into a 2D numpy array, which presents the first question: As the number of rows is unknown at the beginning of the loading, how can a very large numpy array be most efficie...
Incrementally building a numpy array and measuring memory usage
0.049958
0
0
6,464
1,531,551
2009-10-07T13:10:00.000
12
0
1
0
python,vim
4,533,586
11
false
0
0
If you want to yank everything except the { use yi{ (or yi}). If you to include the curly braces use ya{ (or ya}). The i and a modifiers mean in and all. To yank a word no matter where in the word you are: yiw To yank the contents of parentheses: yi); if you want to include them, use ya( You can do the same for " ...
7
26
0
Is it possible to yank an entire block of Python code in Vim? Be it a def, for, if, etc. block...
How to yank an entire block in Vim?
1
0
0
17,152
1,531,551
2009-10-07T13:10:00.000
31
0
1
0
python,vim
1,531,576
11
true
0
0
You can yank a paragraph with y}. This will not yank all the methods if you have a blank line though.
7
26
0
Is it possible to yank an entire block of Python code in Vim? Be it a def, for, if, etc. block...
How to yank an entire block in Vim?
1.2
0
0
17,152
1,531,551
2009-10-07T13:10:00.000
0
0
1
0
python,vim
46,510,217
11
false
0
0
Just fold the class using za and then use visual mode ( V ) to select the collapsed class. This way you don't have to scroll too much. Then just yank with y. When you are done yanking unfold the class with za again.
7
26
0
Is it possible to yank an entire block of Python code in Vim? Be it a def, for, if, etc. block...
How to yank an entire block in Vim?
0
0
0
17,152
1,531,551
2009-10-07T13:10:00.000
4
0
1
0
python,vim
1,534,987
11
false
0
0
You can combine a search with yank, so if your function ends with return retval you can type y/return retval
7
26
0
Is it possible to yank an entire block of Python code in Vim? Be it a def, for, if, etc. block...
How to yank an entire block in Vim?
0.072599
0
0
17,152
1,531,551
2009-10-07T13:10:00.000
2
0
1
0
python,vim
1,534,960
11
false
0
0
Enter visual line selection by pressing 'V' When finished selecting the block pres 'y' Paste it somewhere with 'p' or 'P'
7
26
0
Is it possible to yank an entire block of Python code in Vim? Be it a def, for, if, etc. block...
How to yank an entire block in Vim?
0.036348
0
0
17,152
1,531,551
2009-10-07T13:10:00.000
4
0
1
0
python,vim
1,531,977
11
false
0
0
I usually just use visual block mode. Shift-V, move, and 'y'ank the highlighted block. There's only so many shortcuts I can keep in memory at once :)
7
26
0
Is it possible to yank an entire block of Python code in Vim? Be it a def, for, if, etc. block...
How to yank an entire block in Vim?
0.072599
0
0
17,152
1,531,551
2009-10-07T13:10:00.000
0
0
1
0
python,vim
46,537,673
11
false
0
0
In .py file, press Esc Press shift V to enter visual line mode Highlight with up and down arrow keys Press d to delete the selected rows Go to the row you would like to place the lines and press p to paste lines after a row or press shift P to paste before a row Hope that helps.
7
26
0
Is it possible to yank an entire block of Python code in Vim? Be it a def, for, if, etc. block...
How to yank an entire block in Vim?
0
0
0
17,152
1,532,306
2009-10-07T15:20:00.000
2
0
1
1
python,windows,registry
1,532,868
3
false
0
0
HKEY_CURRENT_USER maps to a HKEY_USERS\{id} key. Try finding the id by matching the HKEY_USERS{id}\Volatile Environment\USERNAME key to the username of the user (by enumerating/iterating over the {id}s that are present on the system). When you find the match just use HKEY_USERS{id} as if it was HKEY_CURRENT_USER
1
1
0
In my application I run subprocesses under several different user accounts. I need to be able to read some of the information written to the registry by these subprocesses. Each one is writing to HKEY_CURRENT_USER, and I know the user account name that they are running under. In Python, how can I read values from HKEY_...
Reading HKEY CURRENT USER from the registry in Python, specifying the user
0.132549
0
0
8,899
1,532,720
2009-10-07T16:28:00.000
5
1
1
0
python,multithreading,md5,crc32,hashlib
1,533,036
6
false
0
0
It's an algorithm selection problem, rather than a library/language selection problem! There appears to be two points to consider primarily: how much would the disk I/O affect the overall performance? what is the expected reliability of the error detection feature? Apparently, the answer to the second question is som...
5
6
0
i need to transfer large files across network and need to create checksum for them on hourly basis. so the speed for generating checksum is critical for me. somehow i can't make zlib.crc32 and zlib.adler32 working with files larger than 4GB on Windows XP Pro 64bit machine. i suspect i've hit the 32bit limitation here? ...
the fastest way to create checksum for large files in python
0.16514
0
0
17,263
1,532,720
2009-10-07T16:28:00.000
1
1
1
0
python,multithreading,md5,crc32,hashlib
1,532,764
6
false
0
0
You cannot possibly use more than one core to calculate MD5 hash of a large file because of the very nature of MD5: it expects a message to be broken up in chunks and fed into hashing function in strict sequence. However, you can use one thread to read a file into internal queue, and then calculate hash in a separate t...
5
6
0
i need to transfer large files across network and need to create checksum for them on hourly basis. so the speed for generating checksum is critical for me. somehow i can't make zlib.crc32 and zlib.adler32 working with files larger than 4GB on Windows XP Pro 64bit machine. i suspect i've hit the 32bit limitation here? ...
the fastest way to create checksum for large files in python
0.033321
0
0
17,263
1,532,720
2009-10-07T16:28:00.000
3
1
1
0
python,multithreading,md5,crc32,hashlib
1,533,255
6
false
0
0
First, there is nothing inherent in any of the CRC algorithms that would prevent them working on an arbitrary length of data (however, a particular implementation might well impose a limit). However, in a file syncing application, that probably doesn't matter, as you may not want to hash the entire file when it gets la...
5
6
0
i need to transfer large files across network and need to create checksum for them on hourly basis. so the speed for generating checksum is critical for me. somehow i can't make zlib.crc32 and zlib.adler32 working with files larger than 4GB on Windows XP Pro 64bit machine. i suspect i've hit the 32bit limitation here? ...
the fastest way to create checksum for large files in python
0.099668
0
0
17,263
1,532,720
2009-10-07T16:28:00.000
2
1
1
0
python,multithreading,md5,crc32,hashlib
1,540,992
6
false
0
0
You might be hitting a size limit for files in XP. The 64-bit gives you more addressing space (removing the 2GB (or so) addressing space per application), but probably does nothing for the file size problem.
5
6
0
i need to transfer large files across network and need to create checksum for them on hourly basis. so the speed for generating checksum is critical for me. somehow i can't make zlib.crc32 and zlib.adler32 working with files larger than 4GB on Windows XP Pro 64bit machine. i suspect i've hit the 32bit limitation here? ...
the fastest way to create checksum for large files in python
0.066568
0
0
17,263
1,532,720
2009-10-07T16:28:00.000
1
1
1
0
python,multithreading,md5,crc32,hashlib
1,532,779
6
false
0
0
md5 itself can't be run in parallel. However you can md5 the file in sections (in parallel) and the take an md5 of the list of hashes. However that assumes that the hashing is not IO-limited, which I would suspect it is. As Anton Gogolev suggests - make sure that you're reading the file efficiently (in large power-of-2...
5
6
0
i need to transfer large files across network and need to create checksum for them on hourly basis. so the speed for generating checksum is critical for me. somehow i can't make zlib.crc32 and zlib.adler32 working with files larger than 4GB on Windows XP Pro 64bit machine. i suspect i've hit the 32bit limitation here? ...
the fastest way to create checksum for large files in python
0.033321
0
0
17,263
1,533,259
2009-10-07T02:00:00.000
1
0
0
0
python,mysql,windows,django
1,581,622
1
true
1
0
The Win32 client can act like a web client to pass the user's credentials to the server. You will want to store the session cookie you get once you are authenticated and use that cookie in all following requests
1
0
0
I have a web service with Django Framework. My friend's project is a WIN32 program and also a MS-sql server. The Win32 program currently has a login system that talks to a MS-sql for authentication. However, we would like to INTEGRATE this login system as one. Please answer the 2 things: I want scrap the MS-SQL to use...
Can a WIN32 program authenticate into Django authentication system, using MYSQL?
1.2
1
0
103
1,534,070
2009-10-07T20:40:00.000
2
0
0
0
python
1,537,103
8
false
1
0
Whose web server? If it is a web server provided by a web hosting company or someone else and you don't have control over it, you need to ascertain in what way they support the use of Python for writing web applications. It isn't enough to know just that they have Python available. As pointed out by others, is likely t...
1
11
0
Most likely it's a dumb question for those who knows the answer, but I'm a beginner, and here it goes: I have a Python script which I run in a command-line with some parameter, and it prints me some results. Let's say results are some HTML code. I never done any Python programming for web, and couldn't figure it out......
Python: how to show results on a web page?
0.049958
0
0
29,818
1,534,210
2009-10-07T21:11:00.000
1
0
1
1
python,virtualenv,virtualenvwrapper
65,076,532
36
false
0
0
Surprised that no one has mentioned conda so far. I have found this is a lot more straightforward than the other methods mentioned here. Let's say I have python 3.9 and python 2.7 and a project I am working on was python 3.5.4, I could simply create the isolated virtual env for 3.5.4 with the conda command without down...
6
1,453
0
I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtualenv with a different version of Python? I compiled Python 2.6.2 and would like to use it with some virtualenv. Is it enough to overwrite the binary ...
Use different Python version with virtualenv
0.005555
0
0
1,338,259
1,534,210
2009-10-07T21:11:00.000
1
0
1
1
python,virtualenv,virtualenvwrapper
57,087,622
36
false
0
0
Yes you just need to install the other version of python, and define the location of your other version of python in your command like : virtualenv /home/payroll/Documents/env -p /usr/bin/python3
6
1,453
0
I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtualenv with a different version of Python? I compiled Python 2.6.2 and would like to use it with some virtualenv. Is it enough to overwrite the binary ...
Use different Python version with virtualenv
0.005555
0
0
1,338,259
1,534,210
2009-10-07T21:11:00.000
2
0
1
1
python,virtualenv,virtualenvwrapper
55,512,212
36
false
0
0
This was a bug with virtualenv. Just upgrading your pip should be the fix. pip install --upgrade virtualenv
6
1,453
0
I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtualenv with a different version of Python? I compiled Python 2.6.2 and would like to use it with some virtualenv. Is it enough to overwrite the binary ...
Use different Python version with virtualenv
0.011111
0
0
1,338,259
1,534,210
2009-10-07T21:11:00.000
1
0
1
1
python,virtualenv,virtualenvwrapper
56,665,285
36
false
0
0
It worked for me on windows with python 2 installation : Step 1: Install python 3 version . Step 2: create a env folder for the virtual environment. Step 3 : c:\Python37\python -m venv c:\path\to\env. This is how i created Python 3 virtual environment on my existing python 2 installation.
6
1,453
0
I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtualenv with a different version of Python? I compiled Python 2.6.2 and would like to use it with some virtualenv. Is it enough to overwrite the binary ...
Use different Python version with virtualenv
0.005555
0
0
1,338,259
1,534,210
2009-10-07T21:11:00.000
23
0
1
1
python,virtualenv,virtualenvwrapper
51,188,487
36
false
0
0
These two commands should work fine. virtualenv -p python2 myenv (For python2) virtualenv -p python3 myenv (For python3)
6
1,453
0
I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtualenv with a different version of Python? I compiled Python 2.6.2 and would like to use it with some virtualenv. Is it enough to overwrite the binary ...
Use different Python version with virtualenv
1
0
0
1,338,259
1,534,210
2009-10-07T21:11:00.000
8
0
1
1
python,virtualenv,virtualenvwrapper
39,574,443
36
false
0
0
Even easier, by using command substitution to find python2 for you: virtualenv -p $(which python2) <path/to/new/virtualenv/> Or when using virtualenvwrapper : mkvirtualenv -p $(which python2) <env_name>
6
1,453
0
I have a Debian system currently running with python 2.5.4. I got virtualenv properly installed, everything is working fine. Is there a possibility that I can use a virtualenv with a different version of Python? I compiled Python 2.6.2 and would like to use it with some virtualenv. Is it enough to overwrite the binary ...
Use different Python version with virtualenv
1
0
0
1,338,259
1,534,450
2009-10-07T21:52:00.000
0
1
1
0
c#,c++,python
1,534,470
10
false
0
1
As someone familiar with C# and .NET you should consider IronPython. Python for .NET. This would be a good way to leverage what you know and learn a new dynamic language at the same time.
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
0
0
0
1,673
1,534,450
2009-10-07T21:52:00.000
7
1
1
0
c#,c++,python
1,534,460
10
false
0
1
I Am a little scared of C++ because developing anything in it takes ages. I'm not sure how you can say that when you say yourself that you have no experience in the language. C++ is a good tool for some things, Python is good for other things. What you want to do should be driving this decision, not the technology i...
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
1
0
0
1,673
1,534,450
2009-10-07T21:52:00.000
5
1
1
0
c#,c++,python
1,534,467
10
false
0
1
Python may be easier to get started with, but a dynamically typed scripting language is a very different language from C# or C++. You will learn more about programming learning it than you will by hopping to a close cousin of a language you already know. Really, solid familiarity with at least one scripting language ...
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
0.099668
0
0
1,673
1,534,450
2009-10-07T21:52:00.000
2
1
1
0
c#,c++,python
1,534,729
10
true
0
1
C# is a little closer to Java and C++ than it is to Python, so learn Python first out of the two. However, my advice would be: Stick with your current language and learn more techniques, such as a wider range of algorithms, functional programming, design by contract, unit testing, OOAD, etc. learn C (focus on figuring...
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
1.2
0
0
1,673
1,534,450
2009-10-07T21:52:00.000
3
1
1
0
c#,c++,python
1,534,483
10
false
0
1
If you want to apply to Google then Python might be the one to go for, surely MS would like the C# already. If nothing else the competition would not be as fierce as there are much more folk out there with multi years of C++ experience. Also Python gives you a broader language skill and would be a good path to more l...
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
0.059928
0
0
1,673
1,534,450
2009-10-07T21:52:00.000
0
1
1
0
c#,c++,python
1,534,589
10
false
0
1
You might be interested in looking at Windows Powershell. It's the latest scripting technology from Microsoft, built on .NET, and can be extended via C#. Granted, it's not as portable as C++ or Python, but it would leverage your C#/.NET experience more readily. Otherwise, I would suggest C++ (and possibly C). Microsoft...
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
0
0
0
1,673
1,534,450
2009-10-07T21:52:00.000
1
1
1
0
c#,c++,python
1,534,645
10
false
0
1
C++ is usually used when speed, and low-level OS access is involved. It's a good skill to have if you want to expand. Python allows you to do thing quickly, and it's quite easy to learn, and provides more power than you'd expect from a scripting language, and probably one of the fastest ones out there. C++ isn't exactl...
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
0.019997
0
0
1,673
1,534,450
2009-10-07T21:52:00.000
1
1
1
0
c#,c++,python
1,534,651
10
false
0
1
If you want to apply to Google and/ or Microsoft then I'd say that of the two you need both! Given more choice, probably C++ and one other language - either dynamic, functional, or both (Scala might be a good choice too). It's not necessarily about whether you'd use the languages themselves but more about the different...
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
0.019997
0
0
1,673
1,534,450
2009-10-07T21:52:00.000
1
1
1
0
c#,c++,python
1,534,556
10
false
0
1
Why not learn some of each. Studying a language for a week or so won't make you an expert, but it will answer a lot of questions in your head and plant a seed for the future. It's important to not just read through exercises. Find some simple problems that can be programmed in a page or two at most and solve them with ...
9
2
0
I am a corporate C# programmer. I found some time to invest into myself and stumbed upon a dilemma. Where to go from now? C#/.NET is easy to learn, develop for, etc. In future I would want to apply to Microsoft or Google, and want to invest spare time wisely, so what I will learn will flourish in future. So: Python or ...
C++ or Python for C# programmer?
0.019997
0
0
1,673
1,535,261
2009-10-08T02:12:00.000
1
1
0
0
php,python,mysql,tracking
1,535,794
9
false
0
0
If accuracy is important, you can do it slightly slower with MySql... create a HEAP / Memory table to store your counter values. These a in-memory tables that are blazingly fast. You can write the data into a normal table at intervals. Based on the app engine ideas, you could use memcache as a temporary store for your...
4
7
0
I want to write a hit counter script to keep track of hits on images on a website and the originating IPs. Impressions are upwards of hundreds of thousands per day, so the counters will be incremented many times a second. I'm looking for a simple, self-hosted method (php, python scripts, etc.). I was thinking of using...
How to write an efficient hit counter for websites
0.022219
0
0
6,857
1,535,261
2009-10-08T02:12:00.000
4
1
0
0
php,python,mysql,tracking
1,536,049
9
false
0
0
You could take your webserver's Access log (Apache: access.log) and evaluate it time and again (cronjob) in case you do not need to have the data at hand at the exact moment in time when someone visits your site. Usually, the access.log is generated anyway and contains the requested resource as well as time, date and t...
4
7
0
I want to write a hit counter script to keep track of hits on images on a website and the originating IPs. Impressions are upwards of hundreds of thousands per day, so the counters will be incremented many times a second. I'm looking for a simple, self-hosted method (php, python scripts, etc.). I was thinking of using...
How to write an efficient hit counter for websites
0.088656
0
0
6,857
1,535,261
2009-10-08T02:12:00.000
7
1
0
0
php,python,mysql,tracking
1,535,311
9
false
0
0
A fascinating subject. Incrementing a counter, simple as it may be, just has to be a transaction... meaning, it can lock out the whole DB for longer than makes sense!-) It can easily be the bottleneck for the whole system. If you need rigorously exact counts but don't need them to be instantly up-to-date, my favorite...
4
7
0
I want to write a hit counter script to keep track of hits on images on a website and the originating IPs. Impressions are upwards of hundreds of thousands per day, so the counters will be incremented many times a second. I'm looking for a simple, self-hosted method (php, python scripts, etc.). I was thinking of using...
How to write an efficient hit counter for websites
1
0
0
6,857
1,535,261
2009-10-08T02:12:00.000
0
1
0
0
php,python,mysql,tracking
1,900,337
9
false
0
0
I've done something very similar, on a similar scale (multiple servers, hundreds of domains, several thousand hits per hour) and log file analysis was definitely the way to go. (It also checked hit rates, weighted them by file type, and blacklisted IP addresses at the firewall if they were making too many requests; it...
4
7
0
I want to write a hit counter script to keep track of hits on images on a website and the originating IPs. Impressions are upwards of hundreds of thousands per day, so the counters will be incremented many times a second. I'm looking for a simple, self-hosted method (php, python scripts, etc.). I was thinking of using...
How to write an efficient hit counter for websites
0
0
0
6,857
1,535,702
2009-10-08T04:54:00.000
7
0
1
0
python,standardized
1,537,045
3
false
0
0
There are "standards" and there are "standards". Most folks mostly mean that a standard is passed by a standards-writing organization: ISO, ECMA, EIA, etc. Lawyers call these De Jure Standards. There's the force of law. Further, there are "De Facto Standards". Some folks, also, corrupt the word by adding "Industry S...
1
20
0
I stumbled upon this 'list of programming' languages and found that popular languages like Python are not standardized? Why is that, and what does 'Standardized' mean anyway?
Python not a standardized language?
1
0
0
4,338
1,537,298
2009-10-08T11:40:00.000
2
1
0
0
python,deployment,virtualenv
1,537,585
3
true
1
0
You already mentioned buildout, and it's all you need. Google for example buildouts for the different parts. Takes a while to set it up the first time, but then you can reuse the setup between different projects too. Let supervisord start everything, not just the python server. Then start supervisord at reboot either f...
1
2
0
I'm starting a new webapp project in Python to get into the Agile mind-set and I'd like to do things "properly" with regards to deployment. However, I'm finding the whole virtualenv/fabric/zc.buildout/etc stuff a little confusing - I'm used to just FTP'ing PHP files to a server and pointing a webserver at it. After dep...
What do I need to know/learn for automated python deployment?
1.2
0
0
1,087
1,538,589
2009-10-08T15:36:00.000
0
0
1
0
python
1,538,805
11
false
0
0
What if you break it up into syllables and then use those to construct words to compare to your dictionary. It's still a brute force method, but it would surely speed things up a bit.
3
1
0
I'm wondering how to proceed with this task, take this string for example "thingsandstuff". How could I generate all possible strings out of this string as to look them up individually against an english dictionary? The goal is to find valid english words in a string that does not contain space. Thanks
How to sort all possible words out of a string?
0
0
0
3,534
1,538,589
2009-10-08T15:36:00.000
0
0
1
0
python
1,538,687
11
false
0
0
Well here is my idea Find all possible strings containing 1 character from the original Find all possible strings containing 2 characters from the original ... Same thing up to the length of the original string Then add all up and go match with your dictionary
3
1
0
I'm wondering how to proceed with this task, take this string for example "thingsandstuff". How could I generate all possible strings out of this string as to look them up individually against an english dictionary? The goal is to find valid english words in a string that does not contain space. Thanks
How to sort all possible words out of a string?
0
0
0
3,534
1,538,589
2009-10-08T15:36:00.000
3
0
1
0
python
1,538,637
11
false
0
0
The brute force approach, i.e. checking every substring, is computationally unfeasible even for strings of middling lengths (a string of length N has O(N**2) substrings). Unless there is a pretty tight bound on the length of strings you care about, that doesn't scale well. To make things more feasible, more knowledge i...
3
1
0
I'm wondering how to proceed with this task, take this string for example "thingsandstuff". How could I generate all possible strings out of this string as to look them up individually against an english dictionary? The goal is to find valid english words in a string that does not contain space. Thanks
How to sort all possible words out of a string?
0.054491
0
0
3,534
1,538,663
2009-10-08T15:48:00.000
9
0
1
0
python,string,immutability,tuples
1,538,689
6
false
0
0
One big advantage of making them immutable is that they can be used as keys in a dictionary. I'm sure the internal data structures used by dictionaries would get quite messed up if the keys were allowed to change.
4
56
0
I am not sure why strings and tuples were made to be immutable; what are the advantages and disadvantage of making them immutable?
Why are python strings and tuples are made immutable?
1
0
0
17,290
1,538,663
2009-10-08T15:48:00.000
3
0
1
0
python,string,immutability,tuples
1,538,686
6
false
0
0
pros: Performance cons: you can't change mutables.
4
56
0
I am not sure why strings and tuples were made to be immutable; what are the advantages and disadvantage of making them immutable?
Why are python strings and tuples are made immutable?
0.099668
0
0
17,290
1,538,663
2009-10-08T15:48:00.000
4
0
1
0
python,string,immutability,tuples
3,165,540
6
false
0
0
Immutable types are conceptually much simpler than mutable ones. For example, you don't have to mess with copy constructors or const-correctness like in C++. The more types are immutable, the easier the language gets. Thus the easiest languages are the pure functional ones without any global state (because lambda calcu...
4
56
0
I am not sure why strings and tuples were made to be immutable; what are the advantages and disadvantage of making them immutable?
Why are python strings and tuples are made immutable?
0.132549
0
0
17,290
1,538,663
2009-10-08T15:48:00.000
3
0
1
0
python,string,immutability,tuples
10,837,060
6
false
0
0
Perl has mutable strings and seems to function just fine. The above seems like a lot of hand waving and rationalization for an arbitrary design decision. My answer to the question of why Python has immutable strings, because Python creator Guido van Rossum wanted it that way and he now has legions of fans that will de...
4
56
0
I am not sure why strings and tuples were made to be immutable; what are the advantages and disadvantage of making them immutable?
Why are python strings and tuples are made immutable?
0.099668
0
0
17,290
1,540,011
2009-10-08T19:45:00.000
0
1
0
0
python,http,xml-rpc
1,540,053
3
false
0
0
Is there a reason not to run a real webserver out front with url rewrites to the two ports you are usign now? It's going to make life much easier in the long run
2
0
0
I have a server that has to respond to HTTP and XML-RPC requests. Right now I have an instance of SimpleXMLRPCServer, and an instance of BaseHTTPServer.HTTPServer with a custom request handler, running on different ports. I'd like to run both services on a single port. I think it should be possible to modify the CGIXM...
Python HTTP server with XML-RPC
0
0
1
849
1,540,011
2009-10-08T19:45:00.000
0
1
0
0
python,http,xml-rpc
1,543,370
3
true
0
0
Use SimpleXMLRPCDispatcher class directly from your own request handler.
2
0
0
I have a server that has to respond to HTTP and XML-RPC requests. Right now I have an instance of SimpleXMLRPCServer, and an instance of BaseHTTPServer.HTTPServer with a custom request handler, running on different ports. I'd like to run both services on a single port. I think it should be possible to modify the CGIXM...
Python HTTP server with XML-RPC
1.2
0
1
849
1,540,214
2009-10-08T20:27:00.000
7
1
0
0
python,client-side
1,540,379
8
false
0
0
Silverlight can run IronPython, so you can make Silverlight applications. Which is client-side.
3
68
0
If yes are there any frameworks/Tutorials/tips/etc recommended? N00b at Python but I have tons of PHP experience and wanted to expand my skill set. I know Python is great at server side execution, just wanted to know about client side as well.
Can Python be used for client side web development?
1
0
1
54,388
1,540,214
2009-10-08T20:27:00.000
-1
1
0
0
python,client-side
1,540,233
8
false
0
0
No. Browsers don't run Python.
3
68
0
If yes are there any frameworks/Tutorials/tips/etc recommended? N00b at Python but I have tons of PHP experience and wanted to expand my skill set. I know Python is great at server side execution, just wanted to know about client side as well.
Can Python be used for client side web development?
-0.024995
0
1
54,388
1,540,214
2009-10-08T20:27:00.000
3
1
0
0
python,client-side
7,437,506
8
false
0
0
On Windows, any language that registers for the Windows Scripting Host can run in IE. At least the ActiveState version of Python could do that; I seem to recall that has been superseded by a more official version these days. But that solution requires the user to install a python interpreter and run some script or .reg...
3
68
0
If yes are there any frameworks/Tutorials/tips/etc recommended? N00b at Python but I have tons of PHP experience and wanted to expand my skill set. I know Python is great at server side execution, just wanted to know about client side as well.
Can Python be used for client side web development?
0.07486
0
1
54,388
1,541,249
2009-10-09T00:21:00.000
48
0
0
0
python,django
1,541,322
1
true
1
0
I don't know if you really need an example, it's quite easy: if you know it's one object that matches your query, use get. It will fail if it's more than one. otherwise use filter, which gives you a list of objects. To be more precise: MyTable.objects.get(id=x).whatever gives you the whatever property of your object...
1
20
0
What is the difference, please explain them in laymen's terms with examples. Thanks!
Difference between GET and FILTER in Django model layer
1.2
0
0
9,344
1,541,620
2009-10-09T03:14:00.000
8
0
1
0
python,reference,argument-passing,object-reference
1,541,625
3
true
0
0
Python does pass arguments by value but the value you are receiving is a copy of the reference (incidentally this is the exact same way that C#, VB.NET, and Java behave as well). This is the important thing to remember: Objects are not passed by reference - object references are passed by value. Since you have a copy...
1
1
0
This may be for most languages in general, but I'm not sure. I'm a beginner at Python and have always worked on copies of lists in C# and VB. But in Python whenever I pass a list as an argument and enumerate through using a "for i in range," and then change the value of the list argument, the input values actually ch...
Why Does List Argument in Python Behave Like ByRef?
1.2
0
0
1,307
1,541,722
2009-10-09T03:59:00.000
0
0
0
1
java,.net,python,web-services,google-app-engine
17,356,271
3
false
1
0
Python has a .NET alternative called IronPython. But I don't think it will work in GAE as it supports only pure python. I am also facing a similar problem trying to port a source written in C#.net into GAE compatible code. I'm going to work around it by re-inventing the spokes of the wheel (not the wheel itself) by re-...
1
3
0
Does anyone know of a .net wrapper around either python or java Google App Engine services? Any help appreciated // :)
A .net wrapper for Google App Engine?
0
0
0
3,521
1,541,776
2009-10-09T04:24:00.000
6
0
1
1
python,macos,installation,upgrade
1,541,785
7
false
0
0
May I suggest you leave the "Default" be, and install Python in /usr/local/bin. Download python Unzip it ./configure make sudo make install done. Since /usr/local/bin comes before /usr/bin in the $PATH, you will invoke 2.6 when you type python, but the OS will remain stable...
2
14
0
I'd like to upgrade the default python installation (2.5.1) supplied with OS X Leopard to the latest version. Please let me know how I can achieve this. Thanks
Upgrade Python to 2.6 on Mac
1
0
0
13,472
1,541,776
2009-10-09T04:24:00.000
20
0
1
1
python,macos,installation,upgrade
1,541,850
7
false
0
0
When an OS is distributed with some specific Python release and uses it for some OS functionality (as is the case with Mac OS X, as well as many Linux distros &c), you should not tamper in any way with the system-supplied Python (as in, "upgrading" it and the like): while Python strives for backwards compatibility with...
2
14
0
I'd like to upgrade the default python installation (2.5.1) supplied with OS X Leopard to the latest version. Please let me know how I can achieve this. Thanks
Upgrade Python to 2.6 on Mac
1
0
0
13,472
1,543,820
2009-10-09T13:39:00.000
1
0
1
0
javascript,python,haskell,list-comprehension
1,543,985
4
false
0
0
Comprehensions is very powerful in Haskell to a large extent because Haskell is functional, so it makes extremely much sense for them to be. Python is not functional so it makes less sense. You can make a lot of complex things with comprehensions in Python but it quickly becomes hard to read, thereby defeating the whol...
1
6
0
Looking at comprehensions in Python and Javascript, so far I can't see some of the main features that I consider most powerful in comprehensions in languages like Haskell. Do they allow things like multiple generators? Or are they just a basic map-filter form? If they don't allow multiple generators, I find them qui...
Comprehensions in Python and Javascript are only very basic?
0.049958
0
0
441
1,544,550
2009-10-09T15:38:00.000
1
1
0
0
python,phone-call
1,545,365
3
false
0
0
I've used Skype4Py very successfully. Keep in mind though it does require Skype to be installed and costs the standard rate for SkypeOut.
1
8
0
I'm writting a small python script notify me when certain condition met. I used smtplib which does the emailing for me, but I also want the script to call my cell phone as well. I can't find a free library for phone callings. Does anyone know any?
Is there a free python library for phone calling?
0.066568
0
0
7,113
1,545,606
2009-10-09T19:16:00.000
0
0
0
0
python,algorithm,cluster-analysis,k-means
1,545,672
8
false
0
0
You can also use GDAL, which has many many functions to work with spatial data.
1
49
1
I am looking for Python implementation of k-means algorithm with examples to cluster and cache my database of coordinates.
Python k-means algorithm
0
0
0
89,635
1,545,878
2009-10-09T20:25:00.000
6
0
1
0
python,regex
1,545,896
5
true
0
0
I'm curious as to why you are using a regular expression for this simple string replacement. The only advantage that I can see is that you can do it in one line of code instead of two, but I personally think that a replacement method is clearer than a regex for something like this. The string object has a replace metho...
2
1
0
I'd like to replace " and - with "" nothing! make it disappear. s = re.sub(r'[^\w\s]', '', s) this makes all punctuation disappear, but I just want those 2 characters. Thanks.
How to replace the quote " and hyphen character in a string with nothing in Python?
1.2
0
0
6,076
1,545,878
2009-10-09T20:25:00.000
1
0
1
0
python,regex
1,545,898
5
false
0
0
re.sub('[-"]', '', s)
2
1
0
I'd like to replace " and - with "" nothing! make it disappear. s = re.sub(r'[^\w\s]', '', s) this makes all punctuation disappear, but I just want those 2 characters. Thanks.
How to replace the quote " and hyphen character in a string with nothing in Python?
0.039979
0
0
6,076
1,547,365
2009-10-10T08:09:00.000
1
0
0
0
python,database,python-3.x
10,863,434
6
false
0
0
pymongo works with Python 3 now.
3
3
0
I'm coding a small piece of server software for the personal use of several users. Not hundreds, not thousands, but perhaps 3-10 at a time. Since it's a threaded server, SQLite doesn't work. It complains about threads like this: ProgrammingError: SQLite objects created in a thread can only be used in that same thread....
A database for python 3?
0.033321
1
0
3,552
1,547,365
2009-10-10T08:09:00.000
0
0
0
0
python,database,python-3.x
1,547,384
6
false
0
0
You could create a new sqlite object in each thread, each using the same database file. For such a small number of users you might not come across the problems with concurrency, unless they are all writing to it very heavily.
3
3
0
I'm coding a small piece of server software for the personal use of several users. Not hundreds, not thousands, but perhaps 3-10 at a time. Since it's a threaded server, SQLite doesn't work. It complains about threads like this: ProgrammingError: SQLite objects created in a thread can only be used in that same thread....
A database for python 3?
0
1
0
3,552
1,547,365
2009-10-10T08:09:00.000
0
0
0
0
python,database,python-3.x
1,550,870
6
false
0
0
Surely a pragmatic option is to just use one SQLite connection per thread.
3
3
0
I'm coding a small piece of server software for the personal use of several users. Not hundreds, not thousands, but perhaps 3-10 at a time. Since it's a threaded server, SQLite doesn't work. It complains about threads like this: ProgrammingError: SQLite objects created in a thread can only be used in that same thread....
A database for python 3?
0
1
0
3,552
1,547,520
2009-10-10T09:49:00.000
1
1
0
0
python,http,soap
1,547,642
2
false
0
0
I wrote something like this in Boo, using a .Net HTTPListener, because I too had to implement someone else's defined WSDL. The WSDL I was given used document/literal form (you'll need to make some adjustments to this information if your WSDL uses rpc/encoded). I wrapped the HTTPListener in a class that allowed client ...
1
1
0
I need to implement a small test utility which consumes extremely simple SOAP XML (HTTP POST) messages. This is a protocol which I have to support, and it's not my design decision to use SOAP (just trying to prevent those "why do you use protocol X?" answers) I'd like to use stuff that's already in the basic python 2....
A minimalist, non-enterprisey approach for a SOAP server in Python
0.099668
0
1
515
1,547,526
2009-10-10T09:53:00.000
7
0
1
0
python,with-statement
1,547,628
5
true
0
0
Just use try-finally. Really, this may be nice as a mental exercise, but if you actually do it in code you care about you will end up with ugly, hard to maintain code.
2
7
0
Can you suggest a way to code a drop-in replacement for the "with" statement that will work in Python 2.4? It would be a hack, but it would allow me to port my project to Python 2.4 more nicely. EDIT: Removed irrelevant metaclass sketch
Improvizing a drop-in replacement for the "with" statement for Python 2.4
1.2
0
0
1,912
1,547,526
2009-10-10T09:53:00.000
1
0
1
0
python,with-statement
3,524,603
5
false
0
0
If you are OK with using def just to get a block, and decorators that immediately execute, you could use the function signature to get something more natural for the named case. import sys def with(func): def decorated(body = func): contexts = body.func_defaults try: exc = None, None, N...
2
7
0
Can you suggest a way to code a drop-in replacement for the "with" statement that will work in Python 2.4? It would be a hack, but it would allow me to port my project to Python 2.4 more nicely. EDIT: Removed irrelevant metaclass sketch
Improvizing a drop-in replacement for the "with" statement for Python 2.4
0.039979
0
0
1,912
1,548,086
2009-10-10T14:24:00.000
0
0
0
1
python,linux,ubuntu,trafficshaping
1,548,761
4
false
0
0
Is there any reason you wish to use python? As mentioned, it will likely only hand-off to already developed tools for this purpose. However, if you look around, you can find things such as Click! modular router, XORP, and others that provide a drop-in for things you want to do - not to mention all the suggestions alrea...
1
5
0
Where can I learn about controlling/interrogating the network interface under Linux? I'd like to get specific application upload/download speeds, and enforce a speed limit for a specific application. I'd particularly like information that can help me write a traffic shaping application using Python.
Traffic shaping under Linux
0
0
0
4,040
1,548,620
2009-10-10T17:56:00.000
0
0
0
0
python
1,548,641
7
false
0
1
I started Python over a year ago too, also C++ background. I've learned that everything is simpler in Python, you don't need to worry so much if you're doing it right, you probably are. Most of the things came natural. I can't say I've read a book or anything, I usually pested the guys in #python on freenode a lot an...
2
4
0
I have a background in C++ and Java and Objective C programming, but i am finding it hard to learn python, basically where its "Main Function" or from where the program start executing. So is there any tutorial/book which can teach python to people who have background in C++ or Java. Basically something which can show ...
Python for C++ or Java Programmer
0
0
0
463
1,548,620
2009-10-10T17:56:00.000
0
0
0
0
python
1,548,801
7
false
0
1
The pithiest comment I guess is that the entry point is the 1st line of your script that is not a function or a class. You don't necessarily need to use the if hack unless you want to and your script is meant to be imported.
2
4
0
I have a background in C++ and Java and Objective C programming, but i am finding it hard to learn python, basically where its "Main Function" or from where the program start executing. So is there any tutorial/book which can teach python to people who have background in C++ or Java. Basically something which can show ...
Python for C++ or Java Programmer
0
0
0
463
1,549,606
2009-10-11T01:42:00.000
1
0
0
0
python,django
1,549,656
2
false
1
0
Try removing the space between the rec.artist_name and the |. So you should have this: {{ rec.artist_name|safe }} That'll fix the autoescaping, but I think the other commentors are correct in saying that you're storing the %20 into the db. So you'll probably have to fix it on that end of things.
1
0
0
simple%20minds is displayed when do this: {{ rec.artist_name }} How do I remove the %20...and make it spaces? When I put | safe as a fitler, the error is: Could not parse the remainder: ' | safe' from 'active.artist_name | safe' Thanks.
Why does this happen in my template for Django?
0.099668
0
0
180
1,550,226
2009-10-11T09:06:00.000
0
0
1
0
python,setup.py,pypi
68,721,587
17
false
0
0
I have a develop egg link set up with python setup.py develop under a conda environment and with pip uninstall <packagename> the egg link is removed. At least in this scenario, pip uninstall is one way to do this.
5
894
0
I have installed a python package with python setup.py install. How do I uninstall it?
python setup.py uninstall
0
0
0
502,972
1,550,226
2009-10-11T09:06:00.000
2
0
1
0
python,setup.py,pypi
57,790,918
17
false
0
0
At {virtualenv}/lib/python2.7/site-packages/ (if not using virtualenv then {system_dir}/lib/python2.7/dist-packages/) Remove the egg file (e.g. distribute-0.6.34-py2.7.egg) If there is any from file easy-install.pth, remove the corresponding line (it should be a path to the source directory or of an egg file).
5
894
0
I have installed a python package with python setup.py install. How do I uninstall it?
python setup.py uninstall
0.023525
0
0
502,972
1,550,226
2009-10-11T09:06:00.000
6
0
1
0
python,setup.py,pypi
1,550,237
17
false
0
0
Go to your python package directory and remove your .egg file, e.g.: In python 2.5(ubuntu): /usr/lib/python2.5/site-packages/ In python 2.6(ubuntu): /usr/local/lib/python2.6/dist-packages/
5
894
0
I have installed a python package with python setup.py install. How do I uninstall it?
python setup.py uninstall
1
0
0
502,972
1,550,226
2009-10-11T09:06:00.000
-1
0
1
0
python,setup.py,pypi
54,174,696
17
false
0
0
I had run python setup.py install once in my PyCharm, it installs all the packages into my conda base environment. Later when I want to remove all these packages, pip uninstall does not work. I had to delete them from /anaconda3/lib/python3.7/site-packages manually :( So I don't see the reason why they use setup.py ins...
5
894
0
I have installed a python package with python setup.py install. How do I uninstall it?
python setup.py uninstall
-0.011764
0
0
502,972
1,550,226
2009-10-11T09:06:00.000
0
0
1
0
python,setup.py,pypi
48,833,480
17
false
0
0
I had run "python setup.py install" at some point in the past accidentally in my global environment, and had much difficulty uninstalling. These solutions didn't help. "pip uninstall " didn't work with "Can't uninstall 'splunk-appinspect'. No files were found to uninstall." "sudo pip uninstall " didn't work "Cannot uni...
5
894
0
I have installed a python package with python setup.py install. How do I uninstall it?
python setup.py uninstall
0
0
0
502,972
1,552,260
2009-10-12T01:00:00.000
3
0
1
0
python,operator-overloading
1,552,285
4
false
0
0
Python's overloading is "safer" in general than C++'s -- for example, the assignment operator can't be overloaded, and += has a sensible default implementation. In some ways, though, overloading in Python is still as "broken" as in C++. Programmers should restrain the desire to "re-use" an operator for unrelated purpos...
2
14
0
From what I remember from my C++ class, the professor said that operator overloading is cool, but since it takes relatively a lot of thought and code to cover all end-cases (e.g. when overloading + you probably also want to overload ++ and +=, and also make sure to handle end cases like adding an object to itself etc.)...
Rules of thumb for when to use operator overloading in python
0.148885
0
0
8,475
1,552,260
2009-10-12T01:00:00.000
12
0
1
0
python,operator-overloading
1,552,267
4
false
0
0
I've written software with significant amounts of overloading, and lately I regret that policy. I would say this: Only overload operators if it's the natural, expected thing to do and doesn't have any side effects. So if you make a new RomanNumeral class, it makes sense to overload addition and subtraction etc. But don...
2
14
0
From what I remember from my C++ class, the professor said that operator overloading is cool, but since it takes relatively a lot of thought and code to cover all end-cases (e.g. when overloading + you probably also want to overload ++ and +=, and also make sure to handle end cases like adding an object to itself etc.)...
Rules of thumb for when to use operator overloading in python
1
0
0
8,475
1,553,114
2009-10-12T07:06:00.000
5
0
0
0
python,algorithm
1,553,126
4
true
0
0
Why not download some real open source repos and use those? Have you thought about what goes into the files? is that random data too?
1
2
1
I'd like to profile some VCS software, and to do so I want to generate a set of random files, in randomly arranged directories. I'm writing the script in Python, but my question is briefly: how do I generate a random directory tree with an average number of sub-directories per directory and some broad distribution of f...
Generate random directories/files given number of files and depth
1.2
0
0
3,603
1,554,546
2009-10-12T13:22:00.000
5
0
1
0
python,properties
1,554,639
8
false
0
0
A basic reason is really simply that it looks better. It is more pythonic. Especially for libraries. something.getValue() looks less nice than something.value In plone (a pretty big CMS), you used to have document.setTitle() which does a lot of things like storing the value, indexing it again and so. Just doing doc...
4
81
0
It appears to me that except for a little syntactic sugar, property() does nothing good. Sure, it's nice to be able to write a.b=2 instead of a.setB(2), but hiding the fact that a.b=2 isn't a simple assignment looks like a recipe for trouble, either because some unexpected result can happen, such as a.b=2 actually caus...
When and how to use the builtin function property() in python
0.124353
0
0
35,751
1,554,546
2009-10-12T13:22:00.000
1
0
1
0
python,properties
34,562,077
8
false
0
0
getters and setters are needed for many purposes, and are very useful because they are transparent to the code. Having object Something the property height, you assign a value as Something.height = 10, but if height has a getter and setter then at the time you do assign that value you can do many things in the procedur...
4
81
0
It appears to me that except for a little syntactic sugar, property() does nothing good. Sure, it's nice to be able to write a.b=2 instead of a.setB(2), but hiding the fact that a.b=2 isn't a simple assignment looks like a recipe for trouble, either because some unexpected result can happen, such as a.b=2 actually caus...
When and how to use the builtin function property() in python
0.024995
0
0
35,751
1,554,546
2009-10-12T13:22:00.000
15
0
1
0
python,properties
1,554,753
8
false
0
0
but hiding the fact that a.b=2 isn't a simple assignment looks like a recipe for trouble You're not hiding that fact though; that fact was never there to begin with. This is python -- a high-level language; not assembly. Few of the "simple" statements in it boil down to single CPU instructions. To read simplici...
4
81
0
It appears to me that except for a little syntactic sugar, property() does nothing good. Sure, it's nice to be able to write a.b=2 instead of a.setB(2), but hiding the fact that a.b=2 isn't a simple assignment looks like a recipe for trouble, either because some unexpected result can happen, such as a.b=2 actually caus...
When and how to use the builtin function property() in python
1
0
0
35,751
1,554,546
2009-10-12T13:22:00.000
3
0
1
0
python,properties
1,556,870
8
false
0
0
You are correct, it is just syntactic sugar. It may be that there are no good uses of it depending on your definition of problematic code. Consider that you have a class Foo that is widely used in your application. Now this application has got quite large and further lets say it's a webapp that has become very popular....
4
81
0
It appears to me that except for a little syntactic sugar, property() does nothing good. Sure, it's nice to be able to write a.b=2 instead of a.setB(2), but hiding the fact that a.b=2 isn't a simple assignment looks like a recipe for trouble, either because some unexpected result can happen, such as a.b=2 actually caus...
When and how to use the builtin function property() in python
0.07486
0
0
35,751
1,555,517
2009-10-12T16:22:00.000
1
1
0
0
php,python,nonblocking
1,555,614
6
false
0
0
What you need to do is have the PHP script execute another script that does the server call and then sends the user the request.
1
14
0
I have a two websites in php and python. When a user sends a request to the server I need php/python to send an HTTP POST request to a remote server. I want to reply to the user immediately without waiting for a response from the remote server. Is it possible to continue running a php/python script after sending a resp...
sending a non-blocking HTTP POST request
0.033321
0
1
12,400
1,555,968
2009-10-12T17:48:00.000
0
0
1
0
python,dictionary
1,556,417
4
false
0
0
If I were you and speed was a big concern, I'd probably create a new container class "DictMax" that'd keep track of it's largest non-zero value elements by having an internal stack of indexes, where the top element of the stack is always the key of the largest element in the dictionary. That way you'd get the largest e...
1
7
0
I'm new Python and trying to implement code in a more Pythonic and efficient fashion. Given a dictionary with numeric keys and values, what is the best way to find the largest key with a non-zero value? Thanks
Efficient way to find the largest key in a dictionary with non-zero value
0
0
0
22,538
1,556,668
2009-10-12T20:22:00.000
2
1
0
1
python,perl
1,557,216
8
false
0
0
Well, if you really want to write the GUI in another language (which, seriously, is just a bad idea, since it will cost you more than it could ever benefit you), the thing you should do is the following: Document your Perl app in terms of the services it provides. You should do it with XML Schema Definition - XSD - fo...
3
1
0
We have a sizable code base in Perl. For the forseeable future, our codebase will remain in Perl. However, we're looking into adding a GUI-based dashboard utility. We are considering writing the dashboard in Python (using tkinter or wx). The problem, however, is that we would like to leverage our existing Perl codebase...
Recommendations for perl-to-python interoperation?
0.049958
0
0
406
1,556,668
2009-10-12T20:22:00.000
1
1
0
1
python,perl
1,560,979
8
false
0
0
Interesting project: I would opt for loose-coupling and consider an XML-RPC or JSON based approach.
3
1
0
We have a sizable code base in Perl. For the forseeable future, our codebase will remain in Perl. However, we're looking into adding a GUI-based dashboard utility. We are considering writing the dashboard in Python (using tkinter or wx). The problem, however, is that we would like to leverage our existing Perl codebase...
Recommendations for perl-to-python interoperation?
0.024995
0
0
406
1,556,668
2009-10-12T20:22:00.000
7
1
0
1
python,perl
1,557,825
8
false
0
0
I hate to be another one in the chorus, but... Avoid the use of an alternate language Use Wx so it's native look and feel makes the application look "real" to non-technical audiences. Download the Padre source code and see how it does Wx Perl code, then steal rampantly from it's best tricks or maybe just gut it and us...
3
1
0
We have a sizable code base in Perl. For the forseeable future, our codebase will remain in Perl. However, we're looking into adding a GUI-based dashboard utility. We are considering writing the dashboard in Python (using tkinter or wx). The problem, however, is that we would like to leverage our existing Perl codebase...
Recommendations for perl-to-python interoperation?
1
0
0
406
1,557,972
2009-10-13T02:43:00.000
0
0
1
0
python,mysql,pylons,module,virtualenv
1,563,869
1
true
0
0
Ok Got it all figured out, After I installed the module on my normal python 2.6 install I went into my Python26 folder and low and behold I happened to find a file called MySQL-python-wininst which happened to be a list of all of the installed module files. Basicly it was two folders called MySQLdb and another called M...
1
0
0
I am doing some pylons work in a virtual python enviorment, I want to use MySQL with SQLalchemy but I can't install the MySQLdb module on my virtual enviorment, I can't use easyinstall because I am using a version that was compiled for python 2.6 in a .exe format, I tried running the install from inside the virtual en...
Install custom modules in a python virtual enviroment
1.2
1
0
442