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,818,969
2009-11-30T10:20:00.000
3
0
0
0
python,selenium
1,819,059
2
false
0
0
You should be able to use the stop and start commands. You will need to ensure that you are not clearing cookies between sessions, and depending on the browser you're launching you may also need to use the -browserSessionReuse command line option.
2
1
0
I'm writing a script which needs the browser that selenium is operating close and re-open, without losing its cookies. Any idea on how to go about it? Basically, it's a check to see that if the user opens and closes his browser, his cookies stay intact.
Close and open a new browser in Selenium
0.291313
0
1
1,370
1,818,969
2009-11-30T10:20:00.000
0
0
0
0
python,selenium
1,819,042
2
false
0
0
This is a feature of the browser and not your concern: If there is a bug in the browser, then there is little you can do. If you need to know whether a certain version of the browser works correctly, then define a manual test (write a document that explains the steps), do it once and record the result somewhere (like "...
2
1
0
I'm writing a script which needs the browser that selenium is operating close and re-open, without losing its cookies. Any idea on how to go about it? Basically, it's a check to see that if the user opens and closes his browser, his cookies stay intact.
Close and open a new browser in Selenium
0
0
1
1,370
1,819,903
2009-11-30T13:42:00.000
1
0
0
0
javascript,python,testing,selenium,selenium-rc
1,902,514
2
false
1
0
If you are purely testing that the JavaScript functions are performing the correct calculations with the given inputs, I would suggest separating your JavaScript from your page and use a JavaScript testing framework to test the functionality. Testing low level code using Selenium is a lot of unnecessary overhead. If ...
1
3
0
My Application has a lot of calculation being done in JavaScript according to how and when the user acts on the application. The project prints out valuable information (through console calls) as to how this calculation is going on, and so we can easily spot any NaNs creeping in. We are planning to integrate Selenium (...
Javascript communication with Selenium (RC)
0.099668
0
1
2,109
1,820,657
2009-11-30T15:55:00.000
1
0
1
0
python
1,820,679
7
false
0
0
The standard library, especially the built-in functions. They seem trivial but can yield impressive results! It really pays to know the basics of a default python installation. If you doubt that just follow the Stack Overflow python questions. Some answers are just amazing :)
1
3
0
Though there can be many but as i am very new to python so which modules or classes within standard libraries i should know when programming in python, especially when i am practicing programming challenges from a C++ book? Libraries which can make my life easier? Since there can be no single correct answer, i am makin...
Must Standard libraries for python beginner
0.028564
0
0
2,252
1,822,541
2009-11-30T21:32:00.000
10
0
1
0
python,multithreading
1,977,542
2
true
0
0
Two points: In officially released Python versions (2.4, 2.5... up to 3.1), an RLock is much slower than a Lock, because Locks are implemented in C and RLocks in Python (this will change in 3.2) A Lock can be released from any thread (not necessarily the thread which acquire()d it), while an RLock has to be released b...
2
15
0
the threading module in Python provides two kinds of locks: A common lock and a reentrant lock. It seems to me, that if I need a lock, I should always prefer the RLock over the Lock; mainly to prevent deadlock situations. Besides that, I see two points, when to prefer a Lock over a RLock: RLock has a more complicated ...
Is RLock a sensible default over Lock?
1.2
0
0
4,111
1,822,541
2009-11-30T21:32:00.000
3
0
1
0
python,multithreading
1,822,925
2
false
0
0
Normally you should structure your code such that you never need to recursively lock in normal operation (basically it forces you to use locks tightly around the protected datastructures they are are protecting). Therefore you want to catch an anomalous recursive locking.
2
15
0
the threading module in Python provides two kinds of locks: A common lock and a reentrant lock. It seems to me, that if I need a lock, I should always prefer the RLock over the Lock; mainly to prevent deadlock situations. Besides that, I see two points, when to prefer a Lock over a RLock: RLock has a more complicated ...
Is RLock a sensible default over Lock?
0.291313
0
0
4,111
1,823,372
2009-12-01T00:46:00.000
0
0
0
0
python,django,django-models
1,823,488
2
false
1
0
There are a variety of ways to do this. I suggest the following: Django has a messaging framework, built by design to show messages to users only once when the software creates them. Whenever X is created/modified/deleted etc, you can add the message to the user via User.message_set.create(message='Whatever you like')....
1
0
0
I have a simple webapp in Django for an iPhone app. I want to prompt the user to review our product, but just once. I then don't want to show that prompt again. So would the best practise way of implementing this to be to add a new entry to the user profile model with a bolean field: "reviewed" - and then set that flag...
Set and use flags against a users profile model in Django
0
0
0
1,168
1,823,431
2009-12-01T01:08:00.000
2
1
1
0
c++,python,algorithm,graph
1,823,545
13
false
0
0
I also vote for python. When do algorithm, we tend to work on the algorithm itself rather than language, low level details. Basically, we works on abstraction level. And using python, we're less likely to be side-tracked. But if you're very familiar and comfortable with C++ and can use it freely to express your idea, ...
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
0.03076
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
1
1
1
0
c++,python,algorithm,graph
1,823,577
13
false
0
0
If using C++ means that STL is fair game, I'd say that it deserves serious consideration. STL is a fantastic library, combining structures, iterators, and algorithms. I love the Python recommendations, but if I could use STL I'd reconsider C++.
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
0.015383
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
2
1
1
0
c++,python,algorithm,graph
1,823,589
13
false
0
0
With C++, you'd sometimes be concentrating more on the language issues than the problem itself, so Python. I'd even be recommending you do it in a higher-level language like Matlab (although the language itself can be a bit ugly).
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
0.03076
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
0
1
1
0
c++,python,algorithm,graph
1,823,580
13
false
0
0
Remember that Python is compiled to bytecode and then interpreted in a VM. So, in performance isn't better (faster) than C++.
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
0
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
3
1
1
0
c++,python,algorithm,graph
1,823,479
13
false
0
0
Algorithms are fine in Python (allthough you can only fly one OS scheduled python thread due to the global lock); however, when it comes to data structures + algorithms you need fixed complexity guarantees, and this case you mix Python with C. I suppose what I have said applies more to long running computations. You ca...
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
0.046121
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
4
1
1
0
c++,python,algorithm,graph
1,823,473
13
false
0
0
I would go for python. And if you really need the performance, then you can always write C/C++ extensions and use them in python.
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
0.061461
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
8
1
1
0
c++,python,algorithm,graph
1,823,434
13
false
0
0
A bit subjective, but I'd vote for python because it has good libraries and abstracts a lot of the low level 'detail' that you'd have to consider when using c++...
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
1
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
6
1
1
0
c++,python,algorithm,graph
1,823,440
13
false
0
0
I did all my algorithms work in college in C++ because I knew it. If I'd had to learn a language at the same time, I would have picked Python most likely.
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
1
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
6
1
1
0
c++,python,algorithm,graph
1,823,447
13
false
0
0
I am under the impression that it really depends from what you mean by faster. Faster to develop: go python. Faster to run: go C++. However python can use a lot of external C libraries, so the difference in processing time might not be that relevant, depending on the type of implementation.
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
1
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
5
1
1
0
c++,python,algorithm,graph
1,823,457
13
false
0
0
At my university the 500 students in the "Algorithms and Datastructures" class get to choose the language they want. Python is by far the most popular choice there, and personally I'm happy I also chose that, even though I already knew C++.
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
0.076772
0
0
1,482
1,823,431
2009-12-01T01:08:00.000
23
1
1
0
c++,python,algorithm,graph
1,823,475
13
true
0
0
I think you're looking for Python, because you can: Focus on the algorithms themselves and not have to worry about other detail like memory management. Do more with less code The syntax is almost like working with pseudo code. There is great built in language support for lists, tuples, list comprehensions, etc... B...
11
4
0
I am trying to work on some problems and algorithms. I know C++ but a friend told me that it would be better if done with Python.As it would be much faster to develop and less time is spent in programming details which does not actually earn anything solution wise. EDIT 2: I plan to use python-graph lib from Google-cod...
which is a better language (C++ or Python) for complex problem solving exercises (ex. Graphs)?
1.2
0
0
1,482
1,825,692
2009-12-01T11:51:00.000
1
0
0
0
python,macos,clipboard
6,888,324
7
false
0
0
if you just wanted to put text into the mac clipboard, you could use the shell's pbcopy command.
1
41
0
I'd like my python program to place some text in the Mac clipboard. Is this possible?
Can python send text to the Mac clipboard
0.028564
0
0
23,252
1,828,040
2009-12-01T18:38:00.000
1
0
1
0
python,visual-studio,google-app-engine
1,828,477
4
true
0
0
Thanks for all the responses. I did scan through some Python IDEs (and their screenshots) and decided to check out IronPythonStudio. My .py files now get colour coded nicely, and there's some intellisense :) Unfortunately Ctrl+K,D doesn't work, but it's much nicer to code than the plain yellow text I had earlier. For a...
1
2
0
I've started messing around with Google App Engine, writing Python. I love Visual Studio for many reasons, but currently my .py files just look like text. I've searched the web looking for a way to get it to highlight python files (intellisense would be a nice bonus, but not required) but turned up nothing. There are o...
Python syntax highlighting / Intellisense?
1.2
0
0
2,992
1,828,345
2009-12-01T19:32:00.000
4
0
0
0
python,image-processing,python-imaging-library,rounded-corners
1,839,511
4
true
0
0
So, okay, i found the solution. I used the supersampling method bobince proposed before, but i found that the images become blurry. So, I would not provide the full code, but i'll explain my solution. It may seem kind of idiotistic, but i haven't found any other way to do it without involving any other libraries. With ...
1
15
0
Is there any way to make nice round corners with python? Currently PIL and GD2 are used in my project. Both of them have an arc() method, that allows you to draw a quater-circle, but the quater-circle is not antialiased, so the image looks crispy. Is there any neat way to make antialiased/smooth round corners?
Any way to make nice antialiased round corners for images in python?
1.2
0
0
11,006
1,828,567
2009-12-01T20:10:00.000
3
0
1
0
python,qt,qt4,pyqt,pyqt4
1,828,607
1
true
0
1
If the underlaying C++ methods are virtual, your Python methods that override them will be called any time C++ code calls them. If they are just regular methods, any C++ code will call the original C++ methods by default (Python code will call the Python methods though, because it sees the Python object and all methods...
1
4
0
The usual way to use Qt widgets from Python seems to be to subclass them. Qt widget classes have a great many methods, so inevitably I'm going to end up adding a method to the subclass, with the same name as one inherited from the Qt widget. In Python, all methods are virtual, so what I'm concerned about is that some Q...
PyQt subclassing
1.2
0
0
1,972
1,829,256
2009-12-01T22:02:00.000
0
0
0
0
python,sqlite,compression
1,829,601
3
false
0
0
what sort of parsing do you do before you put it in the database? I get the impression that it is fairly simple with a single table holding each entry - if not then my apologies. Compression is all about removing duplication, and in a log file most of the duplication is between entries rather than within each entry s...
2
0
0
I recently created a script that parses several web proxy logs into a tidy sqlite3 db file that is working great for me... with one snag. the file size. I have been pressed to use this format (a sqlite3 db) and python handles it natively like a champ, so my question is this... what is the best form of string compres...
Python 3: Best string compression method to minimize the size of a sqlite3 db
0
1
0
2,957
1,829,256
2009-12-01T22:02:00.000
0
0
0
0
python,sqlite,compression
1,832,688
3
false
0
0
Instead of inserting compression/decompression code into your program, you could store the table itself on a compressed drive.
2
0
0
I recently created a script that parses several web proxy logs into a tidy sqlite3 db file that is working great for me... with one snag. the file size. I have been pressed to use this format (a sqlite3 db) and python handles it natively like a champ, so my question is this... what is the best form of string compres...
Python 3: Best string compression method to minimize the size of a sqlite3 db
0
1
0
2,957
1,829,872
2009-12-02T00:15:00.000
1
0
1
0
python,datetime,sqlite
48,429,766
3
false
0
0
Note: In Python3, I had to change the SQL to something like: SELECT jobid, startedTime as "st [timestamp]" FROM job (I had to explicitly name the column.)
1
84
0
I'm using the sqlite3 module in Python 2.6.4 to store a datetime in a SQLite database. Inserting it is very easy, because sqlite automatically converts the date to a string. The problem is, when reading it it comes back as a string, but I need to reconstruct the original datetime object. How do I do this?
How to read datetime back from sqlite as a datetime instead of string in Python?
0.066568
1
0
58,748
1,830,042
2009-12-02T01:03:00.000
0
0
0
0
python,mako
1,830,276
1
true
1
0
You have two OO design choices for your page controllers. Common features can be handled two ways. Inheritance. All page controllers are subclasses of a common class that provides the common attributes. Delegation. All page controllers are part of a pipeline where some common process (either before or after the page...
1
1
0
I'm using Mako's inheritance features to factor out common page elements, like a header and footer, into a "base.mako" template. Page-specific controllers use their own templates, which inherit base.mako. base.mako needs a set of variables -- for example, the name of the logged-on user goes in the header for all page...
Good way to pass variables for common elements to Mako templates?
1.2
0
0
1,022
1,830,370
2009-12-02T02:49:00.000
0
0
0
1
python,process,kill
1,853,165
3
false
0
0
Zombie processes are actually just an entry in the process table. They do not run, they don't consume memory; the entry just stays because the parent hasn't checked their exit code. You can either do a double fork as Gonzalo suggests, or you can filter out all ps lines with a Z in the S column.
2
1
0
In my Python script, I first launch a subprocess by subprocess.Popen(). Then later on, I want to kill that subprocess by kill -9 Pid. What I found is that after the kill is executed, the subprocess is "stopped" because the GUI window of that process disappeared immediately. But when I perform a "ps aux" right after the...
why Ghost Process appears after kill -9
0
0
0
845
1,830,370
2009-12-02T02:49:00.000
0
0
0
1
python,process,kill
1,830,395
3
false
0
0
I think -9 signal lets the process to try to handle kill and spend some time housekeeping. You can try just kill the process without signal. Edit: oh, its actually -15 signal, that lets process die gracefully. never mind.
2
1
0
In my Python script, I first launch a subprocess by subprocess.Popen(). Then later on, I want to kill that subprocess by kill -9 Pid. What I found is that after the kill is executed, the subprocess is "stopped" because the GUI window of that process disappeared immediately. But when I perform a "ps aux" right after the...
why Ghost Process appears after kill -9
0
0
0
845
1,831,212
2009-12-02T07:33:00.000
0
1
0
0
c++,python,bignum,gmp,arbitrary-precision
1,831,277
3
false
0
0
Did you do profiling ? Of Python and C++ whole applications. So that you know that you really need that additional speed. Try Python 3k it now have any-length integers implemented!
1
5
0
I have been using python's native bignums for an algorithm and decided to try and speed it up by converting it to C++. When I used long longs, the C++ was about 100x faster than the python, but when I used GMP bindings in C++, it was only 10x faster than the python (for the same cases that fit in long longs). Is there ...
Bignum implementation that has efficient addition of small integers
0
0
0
1,568
1,831,979
2009-12-02T10:21:00.000
2
0
0
0
python,compilation,mysql
1,832,065
2
false
0
0
If you've only built one architecture (i386 / PPC) then it won't work on Macs with the opposite architecture. Are the machines that don't work PPC machines, by any chance? Sometimes build configurations are set up to build only the current architecture by default - I haven't build Python-MySQLDB so I'm not sure if this...
1
0
0
I want to use Python-MySQLDB library on Mac so I have compiled the source code to get the _mysql.so under Mac10.5 with my Intel iMac (i386) This _mysql.co works in 2 of my iMacs and another Macbook. But that's it, it doesn't work in any other Macs. Does this mean some machine specific info got compiled into the file?
Why _mysql.co that compiled on one Mac doesn't work on another?
0.197375
1
0
106
1,832,767
2009-12-02T13:02:00.000
1
0
1
0
asp.net,visual-studio,visual-studio-2008,ironpython
1,836,945
1
true
0
0
You'll need to dig into the object's dictionary. This should be the dict field on the object. If the variable is in the class instead you'll need to dig into the class and then into the classes dictionary. Unfortunately it's rather painful to do right now. This is already improved for a future release of IronPytho...
1
1
0
I need to inspect the value of a variable inside a class in asp.net IronPython in Visual Studio 2008. Visual Studio 2008 inspector doesnt work for IronPython (if the inspector works in VS 2008 for asp.net IronPython and it isnt working for me plz tell me) and you can't use Response.write - Response.end inside a class. ...
Variable inspection in Visual Studio 2008 in asp.net IronPython inside a class
1.2
0
0
237
1,832,893
2009-12-02T13:25:00.000
4
0
1
0
python,regex,unicode,ucd,character-properties
1,852,463
6
false
0
0
Note that while \p{Ll} has no equivalent in Python regular expressions, \p{Zs} should be covered by '(?u)\s'. The (?u), as the docs say, “Make \w, \W, \b, \B, \d, \D, \s and \S dependent on the Unicode character properties database.” and \s means any spacing character.
2
71
0
Perl and some other current regex engines support Unicode properties, such as the category, in a regex. E.g. in Perl you can use \p{Ll} to match an arbitrary lower-case letter, or p{Zs} for any space separator. I don't see support for this in either the 2.x nor 3.x lines of Python (with due regrets). Is anybody aware o...
Python regex matching Unicode properties
0.132549
0
0
17,447
1,832,893
2009-12-02T13:25:00.000
4
0
1
0
python,regex,unicode,ucd,character-properties
1,833,228
6
false
0
0
You're right that Unicode property classes are not supported by the Python regex parser. If you wanted to do a nice hack, that would be generally useful, you could create a preprocessor that scans a string for such class tokens (\p{M} or whatever) and replaces them with the corresponding character sets, so that, for ex...
2
71
0
Perl and some other current regex engines support Unicode properties, such as the category, in a regex. E.g. in Perl you can use \p{Ll} to match an arbitrary lower-case letter, or p{Zs} for any space separator. I don't see support for this in either the 2.x nor 3.x lines of Python (with due regrets). Is anybody aware o...
Python regex matching Unicode properties
0.132549
0
0
17,447
1,834,829
2009-12-02T18:22:00.000
1
1
0
0
python,ruby-on-rails,pylons
1,864,605
5
false
1
0
Clarity and ease of use are some of Pythons biggest selling points. In saying that, the different Python web frameworks cover almost the entire spectrum from small and simple all the way up to large and complex with everything in between. You should find that most Python web frameworks have less 'magic' than Rails - ie...
1
2
0
I have been working with Ruby on Rails for over a year now and have been offered some development work with Python. I would like know if development with Python is as enjoyable as Ruby in terms of the clarity and ease of use. And how well is Python suited for Web development. I've heard of Pylons being a direct port of...
Python after Ruby on Rails
0.039979
0
0
1,541
1,834,850
2009-12-02T18:26:00.000
46
1
1
1
python,powershell,scripting
1,835,086
8
false
0
0
Python works as a great, all-purpose tool if you're looking to replace CMD and BAT scripts on your Windows boxes, and can also be written to run scripts on your (L)inux boxes, too. It's a great, flexible language and can handle many tasks you throw at it. That being said, PowerShell is an amazingly versatile tool for a...
6
32
0
What are the advantages of Python, PowerShell, and other scripting environments? We would like to standardize our scripting and are currently using bat and cmd files as the standard. I think Python would be a better option than these, but am also researching PowerShell and other scripting tools. The scripts would be ...
Python, PowerShell, or Other?
1
0
0
44,901
1,834,850
2009-12-02T18:26:00.000
3
1
1
1
python,powershell,scripting
1,836,471
8
false
0
0
If all you do is spawning a lot of system specific programs with no or little programming logic behind then OS specific shell might be a better choice than a full general purpose programming language.
6
32
0
What are the advantages of Python, PowerShell, and other scripting environments? We would like to standardize our scripting and are currently using bat and cmd files as the standard. I think Python would be a better option than these, but am also researching PowerShell and other scripting tools. The scripts would be ...
Python, PowerShell, or Other?
0.07486
0
0
44,901
1,834,850
2009-12-02T18:26:00.000
2
1
1
1
python,powershell,scripting
1,835,112
8
false
0
0
I find it sad no one yet mentioend good ol' Perl.
6
32
0
What are the advantages of Python, PowerShell, and other scripting environments? We would like to standardize our scripting and are currently using bat and cmd files as the standard. I think Python would be a better option than these, but am also researching PowerShell and other scripting tools. The scripts would be ...
Python, PowerShell, or Other?
0.049958
0
0
44,901
1,834,850
2009-12-02T18:26:00.000
2
1
1
1
python,powershell,scripting
1,834,895
8
false
0
0
The questions is kind of vague, but Python is much more portable than PowerShell; however, Python isn't that prevalent on Windows. But on the other hand, I don't believe PowerShell scripts will work on a Windows machine that doesn't have PowerShell. Meaning they may not work in the old fashioned cmd shell. I think y...
6
32
0
What are the advantages of Python, PowerShell, and other scripting environments? We would like to standardize our scripting and are currently using bat and cmd files as the standard. I think Python would be a better option than these, but am also researching PowerShell and other scripting tools. The scripts would be ...
Python, PowerShell, or Other?
0.049958
0
0
44,901
1,834,850
2009-12-02T18:26:00.000
20
1
1
1
python,powershell,scripting
1,836,342
8
false
0
0
We would like to standardize our scripting and are currently using bat and cmd files as the standard. It sounds like Windows is your predominate environment. If so, PowerShell would be much better than Python. PowerShell is included with Windows Server 2008. No need to deploy/install Python runtime on every new ser...
6
32
0
What are the advantages of Python, PowerShell, and other scripting environments? We would like to standardize our scripting and are currently using bat and cmd files as the standard. I think Python would be a better option than these, but am also researching PowerShell and other scripting tools. The scripts would be ...
Python, PowerShell, or Other?
1
0
0
44,901
1,834,850
2009-12-02T18:26:00.000
2
1
1
1
python,powershell,scripting
1,834,979
8
false
0
0
One advantage to Python is the availability of third-party libraries and an extensive built-in standard library. You can do a lot of powerful operations quickly and easily with Python on a variety of operating systems and environments. That's one reason we use Python here at the office not only as a scripting language ...
6
32
0
What are the advantages of Python, PowerShell, and other scripting environments? We would like to standardize our scripting and are currently using bat and cmd files as the standard. I think Python would be a better option than these, but am also researching PowerShell and other scripting tools. The scripts would be ...
Python, PowerShell, or Other?
0.049958
0
0
44,901
1,835,668
2009-12-02T20:43:00.000
1
0
0
0
python,http
1,837,070
3
false
1
0
also: web.py (webpy.org) paste (pythonpaste.org)
1
2
0
There is CherryPy. Are there any others?
What Python-only HTTP/1.1 web servers are available?
0.066568
0
1
507
1,835,930
2009-12-02T21:27:00.000
8
0
1
1
python,zip
1,835,980
2
true
0
0
How would it overtake 2.5? You can install both in parallel, just make sure that you unselect the option to "Register Extensions" during the install of 2.6. I have several Python installations on my PC in parallel, one of them my "standard" one that I expect to run when I doubleclick on a .py file, and the other one to...
2
1
0
Not the source codes, thats the only thing i seem to find. I can't install py2.6 because it would overtake 2.5 and cause mayor mess in my pc.
Need a zip of Python 2.6 for windows
1.2
0
0
1,012
1,835,930
2009-12-02T21:27:00.000
2
0
1
1
python,zip
1,836,803
2
false
0
0
I have Pythons 2.3, 2.4, 2.5, 2.6, and 3.1 all installed on my PC. Download the .msi from python.org, and install it.
2
1
0
Not the source codes, thats the only thing i seem to find. I can't install py2.6 because it would overtake 2.5 and cause mayor mess in my pc.
Need a zip of Python 2.6 for windows
0.197375
0
0
1,012
1,836,061
2009-12-02T21:49:00.000
2
0
0
0
python,database
1,836,125
2
false
0
0
Well...DBAPI is that frontend: This API has been defined to encourage similarity between the Python modules that are used to access databases. By doing this, we hope to achieve a consistency leading to more easily understood modules, code that is generally more portable across databases, and a broader reach o...
1
1
0
Does there exist, or is there an intention to create, a universal database frontend for Python like Perl's DBI? I am aware of Python's DB-API, but all the separate packages are leaving me somewhat aggravated.
Python universal database interface?
0.197375
1
0
1,158
1,836,884
2009-12-03T00:29:00.000
-1
1
0
0
python,mediawiki,wikitext
2,321,542
3
false
0
1
pywikipedia i have found to be best
1
1
0
I need to render wikitext (pulled from the database of a mediawiki of it's relevant) and display in some other format (ultimately to be rendered as a PDF, but basically any other format will do). I can definately hack together something that does the job but ultimately I'll be writing it as I go along, and I can see th...
Render wikitext with Python
-0.066568
0
0
2,209
1,836,987
2009-12-03T00:59:00.000
6
0
0
0
python,google-app-engine,pycurl
1,837,397
5
false
1
0
Twill and mechanize don't do Javascript, and Qt and Selenium can't run on App Engine ((1)), which only supports pure Python code. I do not know of any pure-Python Javascript interpreter, which is what you'd need to deploy a JS-supporting scraper on App Engine:-(. Maybe there's something in Java, which would at least a...
1
4
0
I want to automate interaction with a webpage. I've been using pycurl up til now but eventually the webpage will use javascript so I'm looking for alternatives . A typical interaction is "open the page, search for some text, click on a link (which opens a form), fill out the form and submit". We're deploying on Google ...
Automate interaction with a webpage in python
1
0
1
9,387
1,837,686
2009-12-03T04:43:00.000
18
1
1
0
python,c,utf-8,compression
1,837,697
6
false
0
0
Just use gzip compression, and save 60-70% with 0% effort!
3
2
0
I wish to take a file encoded in UTF-8 that doesn't use more than 128 different characters, then move it to a 7-bit encoding to save the 1/8 of space. For example, if I have a 16 MB text file that only uses the first 128(ascii) characters, I would like to shave off the extra bit to reduce the file to 14MB. How would I ...
Compressing UTF-8(or other 8-bit encoding) to 7 or fewer bits
1
0
0
2,837
1,837,686
2009-12-03T04:43:00.000
0
1
1
0
python,c,utf-8,compression
1,839,384
6
false
0
0
"this would simply leave an extra 0 on the binary string--11011001 might get mapped to 01000001 rather than 1000001, and I won't actually save space." Correct. Your plan will do nothing.
3
2
0
I wish to take a file encoded in UTF-8 that doesn't use more than 128 different characters, then move it to a 7-bit encoding to save the 1/8 of space. For example, if I have a 16 MB text file that only uses the first 128(ascii) characters, I would like to shave off the extra bit to reduce the file to 14MB. How would I ...
Compressing UTF-8(or other 8-bit encoding) to 7 or fewer bits
0
0
0
2,837
1,837,686
2009-12-03T04:43:00.000
-2
1
1
0
python,c,utf-8,compression
1,838,614
6
false
0
0
What you need is UTF-7. Edit: UTF-7 has the advantage of bloating "only" special characters, so if special characters are rare in the input, you get far less bytes than by just converting UTF-8 to 7 bit. That's what UTF-7 is for.
3
2
0
I wish to take a file encoded in UTF-8 that doesn't use more than 128 different characters, then move it to a 7-bit encoding to save the 1/8 of space. For example, if I have a 16 MB text file that only uses the first 128(ascii) characters, I would like to shave off the extra bit to reduce the file to 14MB. How would I ...
Compressing UTF-8(or other 8-bit encoding) to 7 or fewer bits
-0.066568
0
0
2,837
1,838,047
2009-12-03T06:26:00.000
0
0
0
0
python
1,870,291
3
false
1
0
if you just want to download the image, theres two strategies you can try: use a something like Firebug or Chrome developer tools. right click the element in question, click "inspect element", and look at the css properties of the element. if you look around, you should find something like background-image style or ...
2
0
0
When I view the source of page, I do not find the image src. but the image is displayed on the page. This image is generated by some server side code. I am using the selenium for testing. I want to download this image for verification/comparison. How to get that image using python?
How to get the URL Image which is displyed by script
0
0
1
163
1,838,047
2009-12-03T06:26:00.000
0
0
0
0
python
1,838,243
3
false
1
0
If you aren't seeing an actual image tag in the HTML, your next step would seem to be figuring out how its being displayed. The first place I'd suggest looking is in the .css files for this page. Images can actually be embedded using CSS, and this seems like the next likely option after being in the HTML code itself. ...
2
0
0
When I view the source of page, I do not find the image src. but the image is displayed on the page. This image is generated by some server side code. I am using the selenium for testing. I want to download this image for verification/comparison. How to get that image using python?
How to get the URL Image which is displyed by script
0
0
1
163
1,838,170
2009-12-03T06:57:00.000
-1
0
1
0
python,string,unicode,python-3.x
1,838,285
8
true
0
0
There has been NO CHANGE in Unicode internal representation between Python 2.X and 3.X. It's definitely NOT UTF-16. UTF-anything is a byte-oriented EXTERNAL representation. Each code unit (character, surrogate, etc) has been assigned a number from range(0, 2 ** 21). This is called its "ordinal". Really, the documentat...
2
36
0
In Python 3.x, a string consists of items of Unicode ordinal. (See the quotation from the language reference below.) What is the internal representation of Unicode string? Is it UTF-16? The items of a string object are Unicode code units. A Unicode code unit is represented by a string object of one item and can ...
What is internal representation of string in Python 3.x
1.2
0
0
16,363
1,838,170
2009-12-03T06:57:00.000
0
0
1
0
python,string,unicode,python-3.x
1,838,228
8
false
0
0
I think, Its hard to judge difference between UTF-16, which is just a sequences of 16 bit words, to Python's string object. And If python is compiled with Unicode=UCS4 option, it will be comparing between UTF-32 and Python string. So, better consider, they are in different category, although you can transform each othe...
2
36
0
In Python 3.x, a string consists of items of Unicode ordinal. (See the quotation from the language reference below.) What is the internal representation of Unicode string? Is it UTF-16? The items of a string object are Unicode code units. A Unicode code unit is represented by a string object of one item and can ...
What is internal representation of string in Python 3.x
0
0
0
16,363
1,839,348
2009-12-03T11:28:00.000
1
1
0
1
python,logging,pipe
1,839,366
1
true
1
0
Pipes are one of the fastest I/O mechanisms available. It's just a shared buffer. Nothing more. If the receiving end of your pipe is totally overwhelmed, you may have an issue. But you have no evidence of that right now. If you have 10's of processes started by FastCGI, each can have their own independent log file...
1
0
0
I'm writing a web app using python with web.py, and I want to implement my own logging system. I'd like to log detailed information about each request that come to python (static files are handled by web servers). Currently I'm thinking about writing the logs to a pipe. On the other side, there should be cronolog. My m...
python web app logging through pipe? (performance concerned)
1.2
0
0
514
1,841,565
2009-12-03T17:34:00.000
15
0
1
0
python,valueerror
44,722,473
21
false
0
0
The reason is that you are getting an empty string or a string as an argument into int. Check if it is empty or it contains alpha characters. If it contains characters, then simply ignore that part.
6
561
0
Why do I get this error? ValueError: invalid literal for int() with base 10: ''.
ValueError: invalid literal for int() with base 10: ''
1
0
0
2,671,706
1,841,565
2009-12-03T17:34:00.000
27
0
1
0
python,valueerror
55,803,849
21
false
0
0
I found a work around. Python will convert the number to a float. Simply calling float first then converting that to an int will work: output = int(float(input))
6
561
0
Why do I get this error? ValueError: invalid literal for int() with base 10: ''.
ValueError: invalid literal for int() with base 10: ''
1
0
0
2,671,706
1,841,565
2009-12-03T17:34:00.000
-2
0
1
0
python,valueerror
15,370,574
21
false
0
0
I was getting similar errors, turns out that the dataset had blank values which python could not convert to integer.
6
561
0
Why do I get this error? ValueError: invalid literal for int() with base 10: ''.
ValueError: invalid literal for int() with base 10: ''
-0.019045
0
0
2,671,706
1,841,565
2009-12-03T17:34:00.000
2
0
1
0
python,valueerror
24,059,374
21
false
0
0
Please test this function (split()) on a simple file. I was facing the same issue and found that it was because split() was not written properly (exception handling).
6
561
0
Why do I get this error? ValueError: invalid literal for int() with base 10: ''.
ValueError: invalid literal for int() with base 10: ''
0.019045
0
0
2,671,706
1,841,565
2009-12-03T17:34:00.000
-1
0
1
0
python,valueerror
53,628,251
21
false
0
0
I got into the same issue when trying to use readlines() inside for loop for same file object... My suspicion is firing readling() inside readline() for same file object caused this error. Best solution can be use seek(0) to reset file pointer or Handle condition with setting some flag then create new object for same f...
6
561
0
Why do I get this error? ValueError: invalid literal for int() with base 10: ''.
ValueError: invalid literal for int() with base 10: ''
-0.009524
0
0
2,671,706
1,841,565
2009-12-03T17:34:00.000
0
0
1
0
python,valueerror
69,284,162
21
false
0
0
I faced this error in Django - Once in my models I had a DateTimeField() with some saved objects on it. then when I changed the field to DateField(). To solve this; I simply edited my Database(db.sqlite3) as I changed the date value from this format 2021-08-09 13:05:45 to this 2021-08-09, And that was all.
6
561
0
Why do I get this error? ValueError: invalid literal for int() with base 10: ''.
ValueError: invalid literal for int() with base 10: ''
0
0
0
2,671,706
1,841,737
2009-12-03T18:00:00.000
1
1
1
1
python,perl,bash,hash,batch-processing
1,847,365
13
false
0
0
Hm, interesting problem. Try the following (the mktest function is just for testing -- TDD for bash! :) Edit: Added support for whirlpool hashes. code cleanup better quoting of filenames changed array-syntax for test part-- should now work with most korn-like shells. Note that pdksh does not support :-based parameter ...
1
3
0
Problem Specification: Given a directory, I want to iterate through the directory and its non-hidden sub-directories,  and add a whirlpool hash into the non-hidden file's names. If the script is re-run it would would replace an old hash with a new one. <filename>.<extension>   ==>  <filename>.<a-whirlpool-hash>.<exten...
Hashing Multiple Files
0.015383
0
0
4,430
1,842,208
2009-12-03T19:13:00.000
1
1
1
0
php,python,linux,theory
1,847,687
8
false
0
0
If you're doing any multi threading development, pick Python over PHP.
5
3
0
I've never used python before. I've used php for about 5 years now. I plan to learn python, but I'm not sure what for yet. If I can think of a project that might be better to do in python, I'll use that to learn it. Edit: just to add this as an important note, I do mean strictly for linux, not multi-platform. Edit 2: I...
From a coder's perspective, what kind of project should I choose python over php for where both could do the job?
0.024995
0
0
640
1,842,208
2009-12-03T19:13:00.000
1
1
1
0
php,python,linux,theory
1,845,431
8
false
0
0
My company was contracted to build a web application last year, and the client specified that it should be done in Flex. Now, this application should have been a web application, but we had a unique opportunity to try something new. We had absolutely no idea what we were doing at the time, but it was a great learning e...
5
3
0
I've never used python before. I've used php for about 5 years now. I plan to learn python, but I'm not sure what for yet. If I can think of a project that might be better to do in python, I'll use that to learn it. Edit: just to add this as an important note, I do mean strictly for linux, not multi-platform. Edit 2: I...
From a coder's perspective, what kind of project should I choose python over php for where both could do the job?
0.024995
0
0
640
1,842,208
2009-12-03T19:13:00.000
3
1
1
0
php,python,linux,theory
1,842,248
8
false
0
0
A project you want to maintain over any length of time. I've had to maintain PHP code and there is something about the fact that you can mix HTML and code that makes PHP stuff a nightmare. Python has a much higher level of abstraction and makes more maintainable code much easier to write and much more importantly for m...
5
3
0
I've never used python before. I've used php for about 5 years now. I plan to learn python, but I'm not sure what for yet. If I can think of a project that might be better to do in python, I'll use that to learn it. Edit: just to add this as an important note, I do mean strictly for linux, not multi-platform. Edit 2: I...
From a coder's perspective, what kind of project should I choose python over php for where both could do the job?
0.07486
0
0
640
1,842,208
2009-12-03T19:13:00.000
1
1
1
0
php,python,linux,theory
1,842,267
8
false
0
0
Anything that requires background processing or any significant amount of code that doesn't just show a user a page. Python is really good as a scripting language, and writing a command line Python script is commonplace; writing a PHP script to do command line work is rare.
5
3
0
I've never used python before. I've used php for about 5 years now. I plan to learn python, but I'm not sure what for yet. If I can think of a project that might be better to do in python, I'll use that to learn it. Edit: just to add this as an important note, I do mean strictly for linux, not multi-platform. Edit 2: I...
From a coder's perspective, what kind of project should I choose python over php for where both could do the job?
0.024995
0
0
640
1,842,208
2009-12-03T19:13:00.000
5
1
1
0
php,python,linux,theory
1,843,790
8
false
0
0
PHP for websites. Python for pretty much anything else, such as commandline tools, long-running scripts, daemons, etcetera. If you're writing a PHP script and you're reaching for functions in the posix extenstion, shared memory or other low-level stuff then that's generally a sign that Python would be better suited. It...
5
3
0
I've never used python before. I've used php for about 5 years now. I plan to learn python, but I'm not sure what for yet. If I can think of a project that might be better to do in python, I'll use that to learn it. Edit: just to add this as an important note, I do mean strictly for linux, not multi-platform. Edit 2: I...
From a coder's perspective, what kind of project should I choose python over php for where both could do the job?
0.124353
0
0
640
1,842,360
2009-12-03T19:36:00.000
0
0
0
0
python,facebook
1,844,379
1
true
1
0
The opening of a window for facebook auth is the way facebook set up their authentication for facebook connect. I don't think they offer another way of authenticating users, and I doubt you'd be able to work-around/circumvent this method without breaking their terms of use Sorry I don't have better news for you :/
1
0
0
Is it possible for web application that is created by the same owner as facebook application to have access to facebook application without going through a explicit session opening exercise? Most of the work is done on server side and I need to access facebook application directly from backend server. Each time the web...
Facebook login without opening another window/popup
1.2
0
0
1,221
1,842,414
2009-12-03T19:47:00.000
62
0
1
0
python,built-in,dir
1,842,423
4
true
0
0
It gives you a directory of all attributes of an object. This is not a directory as used in file systems, but the standard usage: a listing of names or data.
3
70
0
In Python there is a built-in function called dir. This is used to get a list of all the attributes for an object. I understand what it does, but I am confused about why it is called dir. How is this name related to getting the attributes from an object?
Why is 'dir()' named 'dir' in python?
1.2
0
0
8,512
1,842,414
2009-12-03T19:47:00.000
96
0
1
0
python,built-in,dir
48,912,069
4
false
0
0
IIRC I named it after the DIR command in DOS.
3
70
0
In Python there is a built-in function called dir. This is used to get a list of all the attributes for an object. I understand what it does, but I am confused about why it is called dir. How is this name related to getting the attributes from an object?
Why is 'dir()' named 'dir' in python?
1
0
0
8,512
1,842,414
2009-12-03T19:47:00.000
3
0
1
0
python,built-in,dir
1,842,428
4
false
0
0
You're retrieving a "directory", a list of all of the stuff that's available in some resource.
3
70
0
In Python there is a built-in function called dir. This is used to get a list of all the attributes for an object. I understand what it does, but I am confused about why it is called dir. How is this name related to getting the attributes from an object?
Why is 'dir()' named 'dir' in python?
0.148885
0
0
8,512
1,842,593
2009-12-03T20:15:00.000
1
0
0
0
python,django,timer
1,842,622
3
false
1
0
You should not use some in-process/memory timer objects since your django app can run in multiple processes... I suggest create this "timers" in database (like "expire" datetime field for your product model) and use cron job that will mark expired objects to be available
3
0
0
I'm using Django to create registration/payment application for a limited number of products. I want to create a timer so that when a user chooses to purchase a product, that product will then displayed as "already taken". But, if the user the user does not go through with the purchase and the timer runs out, the p...
Timer object in Django
0.066568
0
0
2,462
1,842,593
2009-12-03T20:15:00.000
-2
0
0
0
python,django,timer
1,842,666
3
true
1
0
Fork it. Have your model use three states for a product: available, taken, and purchased. When a user initiates an action that marks the product as taken, spawn a new process that will mark the product to available in 3 minutes if it is not purchased.
3
0
0
I'm using Django to create registration/payment application for a limited number of products. I want to create a timer so that when a user chooses to purchase a product, that product will then displayed as "already taken". But, if the user the user does not go through with the purchase and the timer runs out, the p...
Timer object in Django
1.2
0
0
2,462
1,842,593
2009-12-03T20:15:00.000
6
0
0
0
python,django,timer
1,842,844
3
false
1
0
I would not use a timer for such situation because it can give some complexity. What will happen to your timers if the process is restarted. That't the case with some internet providers who restart the process on a regular basis. Maybe you are facing a similar situation. I would add a 'taken_time' datetimefield to your...
3
0
0
I'm using Django to create registration/payment application for a limited number of products. I want to create a timer so that when a user chooses to purchase a product, that product will then displayed as "already taken". But, if the user the user does not go through with the purchase and the timer runs out, the p...
Timer object in Django
1
0
0
2,462
1,842,798
2009-12-03T20:44:00.000
1
0
1
1
python,windows,performance,macos,mercurial
1,845,290
6
false
0
0
I run Python locally on Windows XP and 7 as well as OSX on my Macbook. I've seen no noticable performance differences in the command line interpreter, wx widget apps run the same, and Django apps also perform virtually identically. One thing I noticed at work was that the Kaspersky virus scanner tended to slow the pyt...
5
13
0
Is Python generally slower on Windows vs. a *nix machine? Python seems to blaze on my Mac OS X machine whereas it seems to run slower on my Window's Vista machine. The machines are similar in processing power and the vista machine has 1GBs more memory. I particularly notice this in Mercurial but I figure this may sim...
Python Performance on Windows
0.033321
0
0
9,943
1,842,798
2009-12-03T20:44:00.000
1
0
1
1
python,windows,performance,macos,mercurial
1,845,271
6
false
0
0
Maybe the python has more depend on a lot of files open (import different modules). Windows doesn't handle file open as efficiently as Linux. Or maybe Linux probably have more utilities depend on python and python scripts/modules are more likely to be buffered in the system cache.
5
13
0
Is Python generally slower on Windows vs. a *nix machine? Python seems to blaze on my Mac OS X machine whereas it seems to run slower on my Window's Vista machine. The machines are similar in processing power and the vista machine has 1GBs more memory. I particularly notice this in Mercurial but I figure this may sim...
Python Performance on Windows
0.033321
0
0
9,943
1,842,798
2009-12-03T20:44:00.000
0
0
1
1
python,windows,performance,macos,mercurial
37,372,277
6
false
0
0
Interestingly I ran a direct comparison of a popular Python app on a Windows 10 x64 Machine (low powered admittedly) and a Ubuntu 14.04 VM running on the same machine. I have not tested load speeds etc, but am just looking at processor usage between the two. To make the test fair, both were fresh installs and I duplica...
5
13
0
Is Python generally slower on Windows vs. a *nix machine? Python seems to blaze on my Mac OS X machine whereas it seems to run slower on my Window's Vista machine. The machines are similar in processing power and the vista machine has 1GBs more memory. I particularly notice this in Mercurial but I figure this may sim...
Python Performance on Windows
0
0
0
9,943
1,842,798
2009-12-03T20:44:00.000
1
0
1
1
python,windows,performance,macos,mercurial
1,843,044
6
false
0
0
No real numbers here but it certainly feels like the start up time is slower on Windows platforms. I regularly switch between Ubuntu at home and Windows 7 at work and it's an order of magnitude faster starting up on Ubuntu, despite my work machine being at least 4x the speed. As for runtime performance, it feels about...
5
13
0
Is Python generally slower on Windows vs. a *nix machine? Python seems to blaze on my Mac OS X machine whereas it seems to run slower on my Window's Vista machine. The machines are similar in processing power and the vista machine has 1GBs more memory. I particularly notice this in Mercurial but I figure this may sim...
Python Performance on Windows
0.033321
0
0
9,943
1,842,798
2009-12-03T20:44:00.000
0
0
1
1
python,windows,performance,macos,mercurial
1,846,141
6
false
0
0
With the OS and network libraries, I can confirm slower performance on Windows, at least for versions =< 2.6. I wrote a CLI podcast-fetcher script which ran great on Ubuntu, but then wouldn't download anything faster than about 80 kB/s (where ~1.6 MB/s is my usual max) on either XP or 7. I could partially correct t...
5
13
0
Is Python generally slower on Windows vs. a *nix machine? Python seems to blaze on my Mac OS X machine whereas it seems to run slower on my Window's Vista machine. The machines are similar in processing power and the vista machine has 1GBs more memory. I particularly notice this in Mercurial but I figure this may sim...
Python Performance on Windows
0
0
0
9,943
1,843,219
2009-12-03T21:57:00.000
0
0
1
0
c#,python,visual-studio,transition
1,843,265
16
false
0
0
I'm not too familiar with Python so I'll give some general advice. Make sure to print out some reference pages of common functions. Keep them by you(or pinned to a wall or desk) at all times when your programming.. I'm traditionally a "stone age" developer and after developing in VS for a few months I'm finding my hobb...
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
2
0
1
0
c#,python,visual-studio,transition
1,843,298
16
false
0
0
You could always start with IronPython and continue to develop in Visual Studio.
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0.024995
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
1
0
1
0
c#,python,visual-studio,transition
1,844,168
16
false
0
0
Same way you do anything else that doesn't have IntelliStuff. I'm betting you wrote that question without the aid of an IntelliEnglish computer program that showed you a list of verbs you could use and automatically added punctuation at the end of your sentences, for example. :-)
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0.012499
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
0
0
1
0
c#,python,visual-studio,transition
1,843,273
16
false
0
0
I've only ever used IDLE for python development and it is not fun in the least. I would recommend getting your favorite text editor, mine is notepad++, and praying for a decent plugin for it. I only ever had to go from Eclipse to Visual Studio so my opinions are generally invalid in these contexts.
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
5
0
1
0
c#,python,visual-studio,transition
1,843,269
16
false
0
0
One step at a time? Start off with simple programs (things you can write with your eyes closed in C#), and keep going... You will end up knowing the API by heart.
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0.062419
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
1
0
1
0
c#,python,visual-studio,transition
1,843,406
16
false
0
0
Don't worry about intellisense. Python is really simple and there really isn't that much to know, so after a few projects you'll be conceiving of python code while driving, eating, etc., without really even trying. Plus, python's built in text editor (IDLE) has a wimpy version of intellisense that has always been more ...
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0.012499
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
2
0
1
0
c#,python,visual-studio,transition
1,843,362
16
false
0
0
The python ide from wingware is pretty nice. Thats what I ended up using going from visual studio C++/.net to doing python.
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0.024995
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
4
0
1
0
c#,python,visual-studio,transition
1,843,434
16
false
0
0
<rant> This is sort of the reason that I think being a good visual studio user makes you a bad developer. Instead of learning an API, you look in the object browser until you find something that sounds more or less like what you are looking for, instantiate it, then hit . and start looking for what sounds like the righ...
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0.049958
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
0
0
1
0
c#,python,visual-studio,transition
1,847,072
16
false
0
0
I suggest going cold turkey - languages like Python shine with great text editors. Choose one you want to become amazing at (vim, emacs, etc.) and never look back.
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0
0
0
10,335
1,843,219
2009-12-03T21:57:00.000
1
0
1
0
c#,python,visual-studio,transition
38,883,895
16
false
0
0
A mistake people coming from C# or Java make a lot is recreate a large class hierarchy like is common in those languages. With Python this is almost never useful. Instead, learn about duck typing. And don't worry too much about the lack of static typing: in practice, it's almost never an issue.
10
9
0
i feel like i'm going back to the stone age. how do i relearn to develop without intellisense (pydev intellisense doesn't count).. in general, how does one successfully leave the comfort of visual studio ?
how to transition from C# to python?
0.012499
0
0
10,335
1,844,630
2009-12-04T03:19:00.000
4
0
0
0
python,qt4,pyqt
1,844,678
2
true
0
1
The easy solution would be to have an interior widget, not an interior layout. You could assign the layout you desire to the widget, then just remove/hide the widget when you want to do so. A good rule of thumb is if you just want to arrange how widgets appear, then use a layout; if you want to hide/show them as a gr...
1
3
0
In PyQt 4.5, I have a layout inside another layout. I'd like to remove the sublayout from its parent, and hide it. I can say parent_layout.removeItem(child_layout) to remove the layout from its parent, but it still shows on the widget. I can't find any way to hide it in one step, as QLayout doesn't have a hide() met...
Remove a sublayout in qt?
1.2
0
0
2,317
1,847,120
2009-12-04T14:02:00.000
0
0
0
0
javascript,python,xmpp,wsgi
1,881,020
3
false
1
0
I have found a lot of issues with Openfire and TLS are not with the xmpp lib :( -- SleekXMPP in the trunk has been converted to Python 3.0 and the branch is maintained for Python 2.5 Unlike Julien, I would only go with Twisted Words if you really need the power of Twisted or if you are already using Twisted. IMO Sleek...
1
3
0
I want to learn how to use XMPP and to create a simple web application with real collaboration features. I am writing the application with Python(WSGI), and the application will require javascript enabled because I am going to use jQuery or Dojo. I have downloaded Openfire for the server and which lib to choose? SleekX...
Best XMPP Library for Python Web Application
0
0
1
1,373
1,847,534
2009-12-04T15:06:00.000
3
0
0
0
c#,python,web-services,xml-rpc
1,847,560
4
false
0
0
They are completely different protocols, you need to find out the protocol used by the web service you wish to consume and program to that. Web services is really just a concept XML-RPC, SOAP and REST are actual technologies the implement this concept. These implementations are not interoperable (without some translati...
3
3
0
Are they just the same protocol or something different? I am just confused about it. Actually, I want to call a web service written in C# with ASP.NET by Python. I have tried XMLRPC but it seems just did not work. So what is the actually difference among them? Thanks.
Can anyone explain the difference between XMLRPC, SOAP and also the C# Web Service?
0.148885
0
1
2,232
1,847,534
2009-12-04T15:06:00.000
5
0
0
0
c#,python,web-services,xml-rpc
1,847,573
4
true
0
0
All of them use the same transport protocol (HTTP). XMLRPC formats a traditional RPC call with XML for remote execution. SOAP wraps the call in a SOAP envelope (still XML, different formatting, oriented towards message based services rather than RPC style calls). If you're using C#, your best bet is probably SOAP based...
3
3
0
Are they just the same protocol or something different? I am just confused about it. Actually, I want to call a web service written in C# with ASP.NET by Python. I have tried XMLRPC but it seems just did not work. So what is the actually difference among them? Thanks.
Can anyone explain the difference between XMLRPC, SOAP and also the C# Web Service?
1.2
0
1
2,232
1,847,534
2009-12-04T15:06:00.000
1
0
0
0
c#,python,web-services,xml-rpc
3,913,857
4
false
0
0
xml-rpc: Its a mechanism to call remote procedure & function accross network for distributed system integration. It uses XML based message document and HTTP as transport protocol. Further, it only support 6 basic data type as well as array for communication. SOAP: SOAP is also XML-based protocol for information exchang...
3
3
0
Are they just the same protocol or something different? I am just confused about it. Actually, I want to call a web service written in C# with ASP.NET by Python. I have tried XMLRPC but it seems just did not work. So what is the actually difference among them? Thanks.
Can anyone explain the difference between XMLRPC, SOAP and also the C# Web Service?
0.049958
0
1
2,232
1,848,464
2009-12-04T17:28:00.000
2
0
1
0
python,pdf,parsing,text-extraction,information-extraction
1,850,290
2
false
0
0
That's a difficult problem to solve since visually similar PDFs may have a wildly differing structure depending on how they were produced. In the worst case the library would need to basically act like an OCR. On the other hand, the PDF may contain sufficient structure and metadata for easy removal of tables and figure...
1
83
0
I'm looking for a PDF library which will allow me to extract the text from a PDF document. I've looked at PyPDF, and this can extract the text from a PDF document very nicely. The problem with this is that if there are tables in the document, the text in the tables is extracted in-line with the rest of the document tex...
PDF Parsing Using Python - extracting formatted and plain texts
0.197375
0
0
126,787
1,849,324
2009-12-04T20:03:00.000
2
0
1
0
python,algorithm,dictionary,hash
1,849,328
7
false
0
0
A Python dictionary has no concept of order. So you can't depend on a specific order while iterating. This is deliberate: since it's a hashmap it's unavoidable if you want 'fast lookups'!
3
19
0
If I have a dictionary in Python, and I iterate through it once, and then again later, is the iteration order guaranteed to be preserved given that I didn't insert, delete, or update any items in the dictionary? (But I might have done look-ups).
Do dicts preserve iteration order if they are not modified?
0.057081
0
0
4,350
1,849,324
2009-12-04T20:03:00.000
3
0
1
0
python,algorithm,dictionary,hash
1,849,367
7
false
0
0
It might be preserved in some implementations, but don't count on it, as it is not a part of the Dict spec.
3
19
0
If I have a dictionary in Python, and I iterate through it once, and then again later, is the iteration order guaranteed to be preserved given that I didn't insert, delete, or update any items in the dictionary? (But I might have done look-ups).
Do dicts preserve iteration order if they are not modified?
0.085505
0
0
4,350
1,849,324
2009-12-04T20:03:00.000
1
0
1
0
python,algorithm,dictionary,hash
1,849,368
7
false
0
0
As Christophe said, a dictionary is used to organise key/value pairs because of the fast access time it provides. If you application needs a fixed index, you should look at the other data structures that provide a specific/known order. Having said that, it should be safe to assume that the order doesn't change unless i...
3
19
0
If I have a dictionary in Python, and I iterate through it once, and then again later, is the iteration order guaranteed to be preserved given that I didn't insert, delete, or update any items in the dictionary? (But I might have done look-ups).
Do dicts preserve iteration order if they are not modified?
0.028564
0
0
4,350
1,849,376
2009-12-04T20:12:00.000
1
1
1
0
python,ruby,programming-languages,language-features,language-design
1,871,126
4
false
0
0
Python's import provides a very explicit kind of namespace: the namespace is the path, you don't have to look into files to know what namespace they do their definitions in, and your file is not cluttered with namespace definitions. This makes the namespace scheme of an application simple and fast to understand (just l...
2
9
0
Ruby uses require, Python uses import. They're substantially different models, and while I'm more used to the require model, I can see a few places where I think I like import more. I'm curious what things people find particularly easy — or more interestingly, harder than they should be — with each of these models. I...
What are the advantages and disadvantages of the require vs. import methods of loading code?
0.049958
0
0
6,271
1,849,376
2009-12-04T20:12:00.000
4
1
1
0
python,ruby,programming-languages,language-features,language-design
1,870,801
4
false
0
0
A nice property of require is that it is actually a method defined in Kernel. Thus you can override it and implement your own packaging system for Ruby, which is what e.g. Rubygems does! PS: I am not selling monkey patching here, but the fact that Ruby's package system can be rewritten by the user (even to work like py...
2
9
0
Ruby uses require, Python uses import. They're substantially different models, and while I'm more used to the require model, I can see a few places where I think I like import more. I'm curious what things people find particularly easy — or more interestingly, harder than they should be — with each of these models. I...
What are the advantages and disadvantages of the require vs. import methods of loading code?
0.197375
0
0
6,271
1,849,447
2009-12-04T20:26:00.000
-1
0
1
0
c++,python,regex,algorithm,overlap
1,849,615
3
false
0
0
In theory, the problem you describe is impossible. In practice, if you have a manageable number of regular expressions that use a limited subset or of regexp syntax, and/or a limited selection of strings that can be used to match against the container of regular expressions, you might be able to solve it. Assuming you'...
1
28
0
I have a container of regular expressions. I'd like to analyze them to determine if it's possible to generate a string that matches more than 1 of them. Short of writing my own regex engine with this use case in mind, is there an easy way in C++ or Python to solve this problem?
How can you detect if two regular expressions overlap in the strings they can match?
-0.066568
0
0
5,839