|
what is '1000 projects'?
'fullinterview.com' is a educational content website dedicated to finding and realizing final year projects for btech, be, mtech, mca students, here you can search, find your projects and get guidance from experts the below are the different technological projects.
visual Studio projects
.net projects,
asp projects,
c & ds projects,
c++ projects (all),
cold fusion projects,
delphi projects,
java projects,
perl projects,
php projects,
sql projects,
vc++ projects,
visual basic projects.
how it works?
well, everything on this site is submitted by the student and professional community. after you submit your project, it is being verified and approved by our administrator. after approval, other people can read/discuss it, save to favorites.
more number of projects?
here you can find morethan 1000 projects on different technologies, if u want to get more projects please visit our sister sites www.fullinterview.com & Chetanasprojects.com
Category Articles
What is Python?
Added on Thu, Jan 7, 2010
Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has... Read More
How do you make an array in Python?
Added on Thu, Jan 7, 2010
Use a list: ["this", 1, "is", "an", "array"] Lists are equivalent to C or Pascal arrays in their time complexity; the primary difference is that a Python list can contain objects of many different types. The array module also provides methods... Read More
Why can't I use an assignment in an expression?
Added on Thu, Jan 7, 2010
Many people used to C or Perl complain that they want to use this C idiom: while (line = readline(f)) { ...do something with line... } where in Python you're forced to write this: while True: line = f.readline() if not line: ... Read More
What is tuple?
Added on Thu, Jan 7, 2010
Tuples are similar to lists. They cannot be modified once they are declared. They are similar to strings. When items are defined in parenthesis separated by commas then they are called as Tuples. Tuples are used in situations where the user cannot... Read More
State and explain about Strings?
Added on Thu, Jan 7, 2010
Strings are almost used everywhere in python. When you use single and double quotes for a statement in python it preserves the white spaces as such. You can use double quotes and single quotes in triple quotes. There are many other strings such as... Read More
Explain about classes in strings?
Added on Thu, Jan 7, 2010
Classes are the main feature of any object oriented programming. When you use a class it creates a new type. Creating class is the same as in other programming languages but the syntax differs. Here we create an object or instance of the class... Read More
Explain and statement about list?
Added on Thu, Jan 7, 2010
As the name specifies list holds a list of data items in an orderly manner. Sequence of data items can be present in a list. In python you have to specify a list of items with a comma and to make it understand that we are specifying a list we have... Read More
Explain about indexing and slicing operation in sequences?
Added on Thu, Jan 7, 2010
Tuples, lists and strings are some examples about sequence. Python supports two main operations which are indexing and slicing. Indexing operation allows you to fetch a particular item in the sequence and slicing operation allows you to retrieve an... Read More
Explain about raising error exceptions
Added on Thu, Jan 7, 2010
In python programmer can raise exceptions using the raise statement. When you are using exception statement you should also specify about error and exception object. This error should be related to the derived class of the Error. We can use this to... Read More
What is a Lambda form?
Added on Thu, Jan 7, 2010
This lambda statement is used to create a new function which can be later used during the run time. Make_repeater is used to create a function during the run time and it is later called at run time. Lambda function takes expressions only in order to... Read More
Explain about assert statement?
Added on Thu, Jan 7, 2010
Assert statement is used to assert whether something is true or false. This statement is very useful when you want to check the items in the list for true or false function. This statement should be predefined because it interacts with the user and... Read More
Explain about repr function?
Added on Thu, Jan 7, 2010
This function is used to obtain a string representation of an object. This function helps you in obtaining a printable representation of the object. This function also makes it possible to obtain specific return from the object. This can be made... Read More
Explain about pickling and unpickling?
Added on Thu, Jan 7, 2010
Python has a standard module known as Pickle which enables you to store a specific object at some destination and then you can call the object back at later stage. While you are retrieving the object this process is known as unpickling. By specifying... Read More
Is there a tool to help find bugs or perform static analysis?
Added on Thu, Jan 7, 2010
PyChecker is a static analysis tool that finds bugs in Python source code and warns about code complexity and style. Pylint is another tool that checks if a module satisfies a coding standard, and also makes it possible to write plug-ins to add a... Read More
How do you set a global variable in a function?
Added on Thu, Jan 7, 2010
Did you do something like this? x = 1 # make a global def f(): print x # try to print the global ... for j in range(100): if q>3: x=4 Any variable assigned in a function is local to that function. unless it is specifically declared... Read More
What are the rules for local and global variables in Python?
Added on Thu, Jan 7, 2010
In Python, variables that are only referenced inside a function are implicitly global. If a variable is assigned a new value anywhere within the function's body, it's assumed to be a local. If a variable is ever assigned a new value inside... Read More
How can I pass optional or keyword parameters from one function to another?
Added on Thu, Jan 7, 2010
Collect the arguments using the * and ** specifier in the function's parameter list; this gives you the positional arguments as a tuple and the keyword arguments as a dictionary. You can then pass these arguments when calling another function by... Read More
How do you make a higher order function in Python?
Added on Thu, Jan 7, 2010
You have two choices: you can use nested scopes or you can use callable objects. For example, suppose you wanted to define linear(a,b) which returns a function f(x) that computes the value a*x+b. Using nested scopes: def linear(a,b): def result(x... Read More
How do I share global variables across modules?
Added on Thu, Jan 7, 2010
The canonical way to share information across modules within a single program is to create a special module (often called config or cfg). Just import the config module in all modules of your application; the module then becomes available as a... Read More
Explain about the dictionary function in Python?
Added on Thu, Jan 7, 2010
A dictionary is a place where you will find and store information on address, contact details, etc. In python you need to associate keys with values. This key should be unique because it is useful for retrieving information. Also note that strings... Read More
How do I copy an object in Python?
Added on Thu, Jan 7, 2010
In general, try copy.copy() or copy.deepcopy() for the general case. Not all objects can be copied, but most can. Some objects can be copied more easily. Dictionaries have a copy() method: newdict = olddict.copy() Sequences can be copied by... Read More
How can I find the methods or attributes of an object?
Added on Thu, Jan 7, 2010
In general, try copy.copy() or copy.deepcopy() for the general case. Not all objects can be copied, but most can. Some objects can be copied more easily. Dictionaries have a copy() method: For an instance x of a user-defined class, dir(x) returns... Read More
How do you remove duplicates from a list?
Added on Thu, Jan 7, 2010
If you don't mind reordering the list, sort it and then scan from the end of the list, deleting duplicates as you go: if List: List.sort() last = List[-1] for i in range(len(List)-2, -1, -1): if last==List[i]: del List[i] else: last=List... Read More
How do I create a multidimensional list?
Added on Thu, Jan 7, 2010
You probably tried to make a multidimensional array like this: A = [[None] * 2] * 3 This looks correct if you print it: >>> A [[None, None], [None, None], [None, None]] But when you assign a value, it shows up in multiple places... Read More
I want to do a complicated sort: can you do a Schwartzman Transform in Python?
Added on Thu, Jan 7, 2010
Yes, it's quite simple with list comprehensions. The technique, attributed to Randal Schwartz of the Perl community, sorts the elements of a list by a metric which maps each element to its "sort value". To sort a list of strings by their... Read More
How can I overload constructors (or methods) in Python?
Added on Thu, Jan 7, 2010
This answer actually applies to all methods, but the question usually comes up first in the context of constructors. In C++ you'd write class C { C() { cout << "No arguments "; } C(int i) { cout << "Argument is " << i ... Read More
How can my code discover the name of an object?
Added on Thu, Jan 7, 2010
Generally speaking, it can't, because objects don't really have names. Essentially, assignment always binds a name to a value; The same is true of def and class statements, but in that case the value is a callable. Consider the following... Read More
How do I convert a number to a string?
Added on Thu, Jan 7, 2010
To convert, e.g., the number 144 to the string '144', use the built-in function str(). If you want a hexadecimal or octal representation, use the built-in functions hex() or oct(). For fancy formatting, use the % operator on strings, e.g. "... Read More
How do I modify a string in place?
Added on Thu, Jan 7, 2010
You can't, because strings are immutable. If you need an object with this ability, try converting the string to a list or use the array module: >>> s = "Hello, world" >>> a = list(s) >>>print a ['H', 'e... Read More
How do I use strings to call functions/methods?
Added on Thu, Jan 7, 2010
There are various techniques. * The best is to use a dictionary that maps strings to functions. The primary advantage of this technique is that the strings do not need to match the names of the functions. This is also the primary technique used to... Read More
Is there an equivalent to Perl's chomp() for removing trailing newlines from strings?
Added on Thu, Jan 7, 2010
Starting with Python 2.2, you can use S.rstrip(" ") to remove all occurences of any line terminator from the end of the string S without removing other trailing whitespace. If the string S represents more than one line, with several empty lines at... Read More
Is there a scanf() or sscanf() equivalent?
Added on Thu, Jan 7, 2010
Not as such. For simple input parsing, the easiest approach is usually to split the line into whitespace-delimited words using the split() method of string objects and then convert decimal strings to numeric values using int() or float(). split()... Read More
How do I convert between tuples and lists?
Added on Thu, Jan 7, 2010
he function tuple(seq) converts any sequence (actually, any iterable) into a tuple with the same items in the same order. For example, tuple([1, 2, 3]) yields (1, 2, 3) and tuple('abc') yields ('a', 'b', 'c').... Read More
What's a negative index?
Added on Thu, Jan 7, 2010
Python sequences are indexed with positive numbers and negative numbers. For positive numbers 0 is the first index 1 is the second index and so forth. For negative indices -1 is the last index and -2 is the penultimate (next to last) index and so... Read More
How do I iterate over a sequence in reverse order?
Added on Thu, Jan 7, 2010
If it is a list, the fastest solution is list.reverse() try: for x in list: "do something with x" finally: list.reverse() This has the disadvantage that while you are in the loop, the list is temporarily reversed. If you don't like... Read More
How do I apply a method to a sequence of objects?
Added on Thu, Jan 7, 2010
Use a list comprehension: result = [obj.method() for obj in List] More generically, you can try the following function: def method_map(objects, method, arguments): """method_map([a,b], "meth", (1,2)) gives [a.meth(1,2), b.meth(1,2)]""" ... Read More
How do I call a method defined in a base class from a derived class that overrides it?
Added on Thu, Jan 7, 2010
If you're using new-style classes, use the built-in super() function: class Derived(Base): def meth (self): super(Derived, self).meth() If you're using classic classes: For a class definition such as class Derived(Base): ... you can... Read More
How can I organize my code to make it easier to change the base class?
Added on Thu, Jan 7, 2010
You could define an alias for the base class, assign the real base class to it before your class definition, and use the alias throughout your class. Then all you have to change is the value assigned to the alias. Incidentally, this trick is also... Read More
How do I create static class data and static class methods?
Added on Thu, Jan 7, 2010
Static data (in the sense of C++ or Java) is easy; static methods (again in the sense of C++ or Java) are not supported directly. For static data, simply define a class attribute. To assign a new value to the attribute, you have to explicitly use... Read More
How do I find the current module name?
Added on Thu, Jan 7, 2010
module can find out its own module name by looking at the predefined global variable __name__. If this has the value '__main__', the program is running as a script. Many modules that are usually used by importing them also provide a... Read More
When I edit an imported module and reimport it, the changes don't show up. Why does this happen?
Added on Thu, Jan 7, 2010
For reasons of efficiency as well as consistency, Python only reads the module file on the first time a module is imported. If it didn't, in a program consisting of many modules where each one imports the same basic module, the basic module... Read More
Where is the math.py (socket.py, regex.py, etc.) source file?
Added on Thu, Jan 7, 2010
There are (at least) three kinds of modules in Python: 1. modules written in Python (.py); 2. modules written in C and dynamically loaded (.dll, .pyd, .so, .sl, etc); 3. modules written in C and linked with the interpreter; to get a list of... Read More
How do I make a Python script executable on Unix?
Added on Thu, Jan 7, 2010
You need to do two things: the script file's mode must be executable and the first line must begin with #! followed by the path of the Python interpreter. The first is done by executing chmod +x scriptfile or perhaps chmod 755 scriptfile. ... Read More
Why don't my signal handlers work?
Added on Thu, Jan 7, 2010
The most common problem is that the signal handler is declared with the wrong argument list. It is called as handler(signum, frame) so it should be declared with two arguments: def handler(signum, frame): Read More
How do I test a Python program or component?
Added on Thu, Jan 7, 2010
Python comes with two testing frameworks. The doctest module finds examples in the docstrings for a module and runs them, comparing the output with the expected output given in the docstring. The unittest module is a fancier testing framework... Read More
None of my threads seem to run: why?
Added on Thu, Jan 7, 2010
As soon as the main thread exits, all threads are killed. Your main thread is running too quickly, giving the threads no time to do any work. A simple fix is to add a sleep to the end of the program that's long enough for all the threads to... Read More
How do I parcel out work among a bunch of worker threads?
Added on Thu, Jan 7, 2010
Use the Queue module to create a queue containing a list of jobs. The Queue class maintains a list of objects with .put(obj) to add an item to the queue and .get() to return an item. The class will take care of the locking necessary to ensure that... Read More
How do I delete a file?
Added on Thu, Jan 7, 2010
Use os.remove( filename) or os.unlink(filename); Read More
How do I copy a file?
Added on Thu, Jan 7, 2010
The shutil module contains a copyfile() function. Read More
How do I read (or write) binary data?
Added on Thu, Jan 7, 2010
or complex data formats, it's best to use the struct module. It allows you to take a string containing binary data (usually numbers) and convert it to Python objects; and vice versa. For example, the following code reads two 2- byte... Read More
How do I run a subprocess with pipes connected to both input and output?
Added on Thu, Jan 7, 2010
Use the popen2 module. For example: import popen2 fromchild, tochild = popen2.popen2("command") tochild.write("input ") tochild.flush() output = fromchild.readline() Read More
How can I mimic CGI form submission (METHOD=POST)?
Added on Thu, Jan 7, 2010
I would like to retrieve web pages that are the result of POSTing a form. Is there existing code that would let me do this easily? Yes. Here's a simple example that uses httplib: #!/usr/local/bin/ python import httplib, sys, time ... Read More
How do I send mail from a Python script?
Added on Thu, Jan 7, 2010
Use the standard library module smtplib. Here's a very simple interactive mail sender that uses it. This method will work on any host that supports an SMTP listener. import sys, smtplib fromaddr = raw_input("From: ") toaddrs =... Read More
How do I avoid blocking in the connect() method of a socket?
Added on Thu, Jan 7, 2010
The select module is commonly used to help with asynchronous I/O on sockets. Read More
Are there any interfaces to database packages in Python?
Added on Thu, Jan 7, 2010
Yes. Python 2.3 includes the bsddb package which provides an interface to the BerkeleyDB library. Interfaces to disk-based hashes such as DBM and GDBM are also included with standard Python. Read More
How do I generate random numbers in Python
Added on Thu, Jan 7, 2010
The standard module random implements a random number generator. Usage is simple: import random random.random() This returns a random floating point number in the range [0, 1). Read More
Can I create my own functions in C?
Added on Thu, Jan 7, 2010
Yes, you can create built-in modules containing functions, variables, exceptions and even new types in C. Read More
Can I create my own functions in C++?
Added on Thu, Jan 7, 2010
Yes, using the C compatibility features found in C++. Place extern "C" { ... } around the Python include files and put extern "C" before each function that is going to be called by the Python interpreter. Global or static C++ objects with... Read More
How can I execute arbitrary Python statements from C?
Added on Thu, Jan 7, 2010
The highest-level function to do this is PyRun_SimpleString() which takes a single string argument to be executed in the context of the module __main__ and returns 0 for success and -1 when an exception occurred (including SyntaxError). If you want... Read More
How can I evaluate an arbitrary Python expression from C?
Added on Thu, Jan 7, 2010
Call the function PyRun_String() from the previous question with the start symbol Py_eval_input; it parses an expression, evaluates it and returns its value. Read More
How do I extract C values from a Python object?
Added on Thu, Jan 7, 2010
That depends on the object's type. If it's a tuple, PyTupleSize(o) returns its length and PyTuple_GetItem(o, i) returns its i'th item. Lists have similar functions, PyListSize(o) and PyList_GetItem(o, i). For strings, PyString_Size... Read More
How do I call an object's method from C?
Added on Thu, Jan 7, 2010
The PyObject_CallMethod() function can be used to call an arbitrary method of an object. The parameters are the object, the name of the method to call, a format string like that used with Py_BuildValue(), and the argument values: PyObject * ... Read More
How do I catch the output from PyErr_Print() (or anything that prints to stdout/stderr)?
Added on Thu, Jan 7, 2010
In Python code, define an object that supports the write() method. Assign this object to sys.stdout and sys.stderr. Call print_error, or just allow the standard traceback mechanism to work. Then, the output will go wherever your write() method... Read More
How do I access a module written in Python from C?
Added on Thu, Jan 7, 2010
You can get a pointer to the module object as follows: module = PyImport_ImportModule("<modulename>"); If the module hasn't been imported yet (i.e. it is not yet present in sys.modules), this initializes the module; otherwise it... Read More
How do I interface to C++ objects from Python?
Added on Thu, Jan 7, 2010
Depending on your requirements, there are many approaches. To do this manually, begin by reading the "Extending and Embedding" document. Realize that for the Python run-time system, there isn't a whole lot of difference between C and C++ -- so... Read More
How do I tell "incomplete input" from "invalid input"?
Added on Thu, Jan 7, 2010
Sometimes you want to emulate the Python interactive interpreter's behavior, where it gives you a continuation prompt when the input is incomplete (e.g. you typed the start of an "if" statement or you didn't close your parentheses or... Read More
How do I run a Python program under Windows?
Added on Thu, Jan 7, 2010
This is not necessarily a straightforward question. If you are already familiar with running programs from the Windows command line then everything will seem obvious; otherwise, you might need a little more guidance. There are also differences... Read More
How do I make python scripts executable?
Added on Thu, Jan 7, 2010
On Windows 2000, the standard Python installer already associates the .py extension with a file type (Python.File) and gives that file type an open command that runs the interpreter (D:Program FilesPythonpython.exe "%1" %*). This is enough to make... Read More
How do I debug an extension
Added on Thu, Jan 7, 2010
When using GDB with dynamically loaded extensions, you can't set a breakpoint in your extension until your extension is loaded. In your .gdbinit file (or interactively), add the command: br _PyImport_LoadDynamicModule Then, when you run... Read More
How can I embed Python into a Windows application?
Added on Thu, Jan 7, 2010
Embedding the Python interpreter in a Windows app can be summarized as follows: 1. Do _not_ build Python into your .exe file directly. On Windows, Python must be a DLL to handle importing modules that are themselves DLL's. (This is the first... Read More
The classical "Hello World" in python CGI fashion:
Added on Thu, Jan 7, 2010
#!/usr/ bin/env python print "Content-Type: text/html" print print """ <html> <body> <h2>Hello World! </body> </html> """ To test your setup save it with the .py extension, upload it to your server as text... Read More
How to Debugging in python?
Added on Thu, Jan 7, 2010
Syntax and header errors are hard to catch unless you have access to the server logs. Syntax error messages can be seen if the script is run in a local shell before uploading to the server. For a nice exceptions report there is the cgitb module.... Read More
Where is Freeze for Windows?
Added on Thu, Jan 7, 2010
Freeze" is a program that allows you to ship a Python program as a single stand-alone executable file. It is not a compiler; your programs don't run any faster, but they are more easily distributable, at least to platforms with the same OS and... Read More
What is Python good for?
Added on Thu, Jan 7, 2010
Python is a high-level general-purpose programming language that can be applied to many different classes of problems. The language comes with a large standard library that covers areas such as string processing (regular expressions, Unicode,... Read More
How to use Cookies for Web python ?
Added on Thu, Jan 7, 2010
HTTP is said to be a stateless protocol. What this means for web programmers is that every time a user loads a page it is the first time for the server. The server can't say whether this user has ever visited that site, if is he in the middle of... Read More
How do I get a beta test version of Python?
Added on Thu, Jan 7, 2010
Alpha and beta releases are available from http://www.python.org/download/. All releases are announced on the comp. lang.python and comp.lang.python.announce newsgroups and on the Python home page, at http://www.python.org/; an RSS feed of news is... Read More
How to use Sessions for Web python ?
Added on Thu, Jan 7, 2010
Sessions are the server side version of cookies. While a cookie persists data (or state) at the client, sessions do it at the server. Sessions have the advantage that the data do not travel the network thus making it both safer and faster although... Read More
How do I submit bug reports and patches for Python?
Added on Thu, Jan 7, 2010
To report a bug or submit a patch, please use the Roundup installation at http://bugs.python.org/. You must have a Roundup account to report bugs; this makes it possible for us to contact you if we have follow-up questions. It will also enable... Read More
Where in the world is www.python.org located?
Added on Thu, Jan 7, 2010
It's currently in Amsterdam, graciously hosted by XS4ALL. Read More
Why is it called Python?
Added on Thu, Jan 7, 2010
At the time when he began implementing Python, Guido van Rossum was also reading the published scripts from "Monty Python's Flying Circus" (a BBC comedy series from the seventies, in the unlikely case you didn't know). It occurred to him... Read More
How stable is Python?
Added on Thu, Jan 7, 2010
Very stable. New, stable releases have been coming out roughly every 6 to 18 months since 1991, and this seems likely to continue. Currently there are usually around 18 months between major releases. With the introduction of retrospective "bugfix"... Read More
Why are Python strings immutable?
Added on Thu, Jan 7, 2010
There are several advantages. One is performance: knowing that a string is immutable means we can allocate space for it at creation time, and the storage requirements are fixed and unchanging. This is also one of the reasons for the distinction... Read More
How are dictionaries implemented?
Added on Thu, Jan 7, 2010
Python's dictionaries are implemented as resizable hash tables. Compared to B-trees, this gives better performance for lookup (the most common operation by far) under most circumstances, and the implementation is simpler. Dictionaries work... Read More
Explain about the programming language python?
Added on Thu, Jan 7, 2010
Python is a very easy language and can be learnt very easily than other programming languages. It is a dynamic object oriented language which can be easily used for software development. It supports many other programming languages and has extensive... Read More
Explain about the use of python for web programming?
Added on Thu, Jan 7, 2010
Python can be very well used for web programming and it also has some special features which make you to write the programming language very easily. Some of the features which it supports are Web frame works, Cgi scripts, Webservers, Content... Read More
State some programming language features of Python?
Added on Thu, Jan 7, 2010
Python supports many features and is used for cutting edge technology. Some of them are 1) A huge pool of data types such as lists, numbers and dictionaries. 2) Supports notable features such as classes and multiple inheritance. 3) Code can be... Read More
How is python interpreted?
Added on Thu, Jan 7, 2010
Python has an internal software mechanism which makes your programming easy. Program can run directly from the source code. Python translates the source code written by the programmer into intermediate language which is again translated it into the... Read More
Does python support object oriented scripting?
Added on Thu, Jan 7, 2010
Python supports object oriented programming as well as procedure oriented programming. It has features which make you to use the program code for many functions other than Python. It has useful objects when it comes to data and functionality. It is... Read More
Describe about the libraries of Python?
Added on Thu, Jan 7, 2010
Python library is very huge and has some extensive libraries. These libraries help you do various things involving CGI, documentation generation, web browsers, XML, HTML, cryptography, Tk, threading, web browsing, etc. Besides the standard... Read More
|