|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Hello... I'm hoping some people can provide some insight to the following:
1) Can I pass variables of primitive types (like ints, bools, longs, etc) by reference in Python, as in C++? If not, what's the best way to emulate this behavior -- to make a "wrapper" class for the primitive type, and to pass an object of this class holding the primitive type variable by reference? 2) I'm working a peer-to-peer program written in Python. Thus I need to make extensive use of Python's socket interface. I was wondering if any of you have ever written programs in Python that establish a large number of connections simultaneously (as in, between 16 and 32), and if so, when all these connections are idle, or barely using the bandwidth of your DSL/cable line, have you noticed any slowdown? I bring this up because my roommate complained that my using BitTorrent was slowing down his Internet connection significantly -- even though I was only downloading at 5K/sec, and we share a DSL line! A friend of mine related a similar experience with his roommate using BitTorrent. I'm hoping to attribute this to the way BitTorrent functions/how it is coded, and not Python itself. Thanks! - tps |
|
#2
|
|||
|
|||
|
Well, as for (2): Remember that most DSL connections are half-duplex, which means that the total bandwidth is shared by downloading connections and uploading connections; even more, most DSL connections are asymmetric, which means that the download bandwidth and the upload bandwidth are different in magnitude. But even if your upload bandwidth is less than your download bandwidth, the total bandwidth is shared as if they were equal. If you use half your upload bandwidth, half your download bandwidth will be gone.
|
|
#3
|
|||
|
|||
|
Hrmmm, point noted percivall. Although I remember uploading at only 5K/sec as well, so that might not have been the issue.
Thanks for the info, however. As for point #1, ignore it -- I figured something out ![]() - tps |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Random assorted questions :) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|