473,811 Members | 3,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python Forum

Python programming language - Ask questions about python interpreter, control flow, data structures, modules errors, classes, standard library, gui, databases, unit testing, object oriented, structured programming and more.
3
1,279
thread by: Charlie of Bolton | last post Oct 11 '07 by: bartonc
Hi, I would like to know why, Idle is telling me that the IP is not defined, here is my error msg from Python Idle: Traceback (most recent call last): File "E:/Charlie Python/11 Octo 2007/test5.txt", line 62, in <module> print 'loss = ' + loss + ip
8
1,467
thread by: python101 | last post Oct 11 '07 by: bartonc
I would like to calculate the value of this series (for limited number of n) s=2(1/1 - 1/3 + 1/5 -1/7 + 1/9 - 1/11+...) I tried for-lop but it did not work well since the sign alternative (+, - , +, -...). Please help me My second question is how can I obtain this when using for loop to make a series >>>
4
2,209
thread by: Patrick C | last post Oct 11 '07 by: bartonc
Someone suggested I use reload when trying to reopen a script i've written (the suggestion was made in response to the problem ive reposted below) however when i do reload(modolename) i only get this... >>> reload(eps) <module 'eps' from 'eps.pyc'> i know this is incredibly amateur to say, but the person who suggested it had their reload...
1
1,198
thread by: BlueCrux | last post Oct 11 '07 by: Thomas Wittek
I'm trying to write a utility to crawl forums and strip posts to be gone through offline. Just the content, I don't need to get who posted or sigs or any identifying info. Can anyone suggest a library that is already geared toward this?
2
2,558
thread by: Licheng Fang | last post Oct 11 '07 by: Terry Reedy
On Apr 14 2003, 10:30 pm, Alex Martelli <al...@aleax.itwrote: Sorry to dig up this old thread, but I would like to know what's the rationale is. Why can't a nested function rebind a variable of an outer function? I was trying to write a function that creates another function and returns it when I came across this problem. These two...
2
8,216
thread by: patrimith | last post Oct 11 '07 by: Goldfish
Hi List, I am used to the following with Java: import some.package.MyClass; name = MyClass.class.getName(); The value for name will be "some.package.MyClass". For Python, I find:
4
1,346
thread by: Gerardo Herzig | last post Oct 11 '07 by: Gerardo Herzig
Hi all. Im reading the Gido's aproach using decorators at http://www.artima.com/weblogs/viewpost.jsp?thread=101605 It looks good to me, but the examples shows the functionality using functions. Now, when i try to give this decorator into a method, if i try the class test(object): @multimethod(...) def met(self, ...):
11
1,514
thread by: brad | last post Oct 11 '07 by: brad
Crazy question, but has anyone attempted this or seen Python code that does? For example, if a text file contained 'Guido' and or 'Robert' and or 'Susan', then we should return True, otherwise return False.
0
1,020
thread by: arturklis2 | last post Oct 11 '07 by: arturklis2
Guitars reviews, lessons, pictures, and more!!!!!!! http://guitars-masters.blogspot.com/
2
355
thread by: Anthon | last post Oct 11 '07 by: =?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=
I am trying to get at the python source code, but it seems svn.python.org is down, at least on port 80 (http) and 3690 (svn). This happened earlier this week and then it came back (at least yesterday). Are all the real ( ;-) ) developers using ssh+svn and not noticing this? Anthon
0
929
thread by: Sells, Fred | last post Oct 11 '07 by: Sells, Fred
I'm using ActiveState python on a windows box to talk to ACtive Directory. I'm running a Pyro Server on the same box. The client is Linux running std Python 2.4. It works just fine until the server codes calls some win32com.client api; then I get Traceback (most recent call last): File...
4
5,237
thread by: walterbyrd | last post Oct 11 '07 by: Tim Chase
According to hostmonster's list of features, they do support python. Does anybody have any experience with hostmonster?
1
2,336
thread by: tepples | last post Oct 11 '07 by: John J. Lee
The HTTP specification, RFC 2616, states that field names in HTTP headers are case insensitive. But I'm trying to use Python 2.5.1's urllib2 to interact with a web service offered by Amazon.com, which deviates from the HTTP spec in that it requires use of case-sensitive header names ReportName, ReportID, and NumberOfReports. I try to send...
3
1,399
thread by: kyosohma | last post Oct 11 '07 by: kyosohma
I am trying to figure out how to build binaries for Python packages and I've done it with MinGW. However, in my research, I've noticed that some of the programmers out there think that you should use the compiler that is used to compile the official Python distributions, which appears to be Visual Studio 2003. None of these programmers has...
1
6,760
thread by: Adam Atlas | last post Oct 11 '07 by: Matimus
What is the best way for a Python process (presumed to be a script run by the interpreter binary, not embedded in some other program) to restart itself? This is what I've been trying: import __main__ for path in sys.path: path += '/' + __main__.__file__ if os.access(path, os.F_OK): break else:
6
1,574
thread by: Matt Mackal | last post Oct 11 '07 by: Carl Banks
I have an application that occassionally is called upon to process strings that are a substantial portion of the size of memory. For various reasons, the resultant strings must fit completely in RAM. Occassionally, I need to join some large strings to build some even larger strings. Unfortunately, there's no good way of doing this without...
2
1,712
thread by: andreas.huesgen | last post Oct 11 '07 by: Andreas Huesgen
Hello, I am writing a commandline tool in Python which is often feed with lots of commandline arguments. In practice, the commandline already reached a critical length which is to long for Windows (some versions of Windows only support commandlines of up to 2047 characters). To work around this problem, wethought up the idea of bypassing the...
0
841
thread by: real.self | last post Oct 11 '07 by: real.self
Dear All, I am new to Python and SWIG, and I tried to search the SWIG mailinglist for my specific question, but I did not find it. And for a simple one c++ file, I can handle it successfully. Now I have a small project including several C files, file1.C file2.C file3.C file2.h file3.h , file1.C is the main() entry for my project, and...
10
2,287
thread by: Karlo Lozovina | last post Oct 11 '07 by: Bruno Desthuilliers
Hi, what's the best way to keep track of user-made subclasses, and instances of those subclasses? I just need a pointer in a right direction... thanks. -- Karlo Lozovina -- Mosor
0
805
thread by: hainguyen2x | last post Oct 11 '07 by: hainguyen2x
I'm trying to get a notification from the NT event for any new event using the DispatchWithEvents() function. Everything seems to be working the way I wanted, but I don't know how to get the properties of the event (ie. event type, message, etc.) from the OnObjectReady() callback. class SinkClass(object): def OnObjectReady(self, *args):...
2
25,214
thread by: stelegraph | last post Oct 11 '07 by: stelegraph
hi! i want to replace these characters: sex_m-designer_bw-size_42 so that i have the argument string: sex=m&designer=bw&size=42 i am working under zope 3. glad for any help you can give me (i am veryyyy new in python, so please speak slow).
2
4,104
thread by: Bruno Barberi Gnecco | last post Oct 11 '07 by: Bruno Barberi Gnecco
I'm getting the following exception when I call an external extension (pytst): /usr/lib/python2.5/threading.py:697: RuntimeWarning: tp_compare didn't return -1 or -2 for exception return _active Traceback (most recent call last): File "testDataMiner2.py", line 77, in <module> testPlace() File "testDataMiner2.py", line 41, in testPlace
4
6,949
thread by: mhearne808[insert-at-sign-here]gmail[insert-dot-he | last post Oct 11 '07 by: mhearne808[insert-at-sign-here]gmail[insert-dot-he
I'm missing something major here. I'm trying to add a directory to my python path using the PYTHONPATH environment variable, and it's being ignored by the Python interactive shell. Below is a capture of what I did. Note that my newfolder appears nowhere on the list of directories in sys.path. How do I get Python to pay attention to my...
2
1,231
thread by: Shriphani | last post Oct 11 '07 by: Laszlo Nagy
dictionary = gdbm.open('dictionary','c') dictionary = 'Openbox' dictionary.get('Ellipsize') the last line generates an attribute error. Can someone tell me what I am doing wrong? Regards, Shriphani Palakodety
24
2,965
true911m
thread by: true911m | last post Oct 11 '07 by: bartonc
I managed to give myself the capability to print to paper with just a couple function calls, but my efforts have stalled there. I would like to, minimally, be able to change a few page elements such as the typeface and margins, but it appears the properties and methods are buried much deeper than the examples I have encountered so far. All...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.