questions/python
Hi, @There, Try this: Rollback pip to an older ...READ MORE
motion_detection.ipynb # Python program to implement # Webcam ...READ MORE
Hi, First thing YAML and JSON are not ...READ MORE
Hi, @Webinar, Are you getting any kind of ...READ MORE
While I'm Trying to Compare Two dates ...READ MORE
from nsepy import get_history from datetime import date import ...READ MORE
can you please help me on this. ...READ MORE
Hi, @Shabaj, Regarding your query, I hope this ...READ MORE
Hi@Aditya, It is working fine in my python ...READ MORE
Hello @kartik, Try this out: import socket s = socket.socket(socket.AF_INET, ...READ MORE
Hello @kartik, Just replace and with , and you're done: try: ...READ MORE
Hello @Kartik, Use socket and its gethostname() functionality. This will get the hostname of ...READ MORE
Hello @kartik, use os.chdir like this: os.chdir("/path/to/change/to") By the way, if you ...READ MORE
Hello @kartiK, If you need to pass UUID ...READ MORE
Hi, @There, Regarding your query I would suggest ...READ MORE
Hello @kartik, You can import isfunction from the inspect module. >>> from inspect ...READ MORE
If i understand your question correct then ...READ MORE
Hello @kartik, Try this out: >>> import os >>> os.path.abspath("mydir/myfile.txt") 'C:/example/cwd/mydir/myfile.txt' Also ...READ MORE
Hello @kartik, You can do: var = 1 if type(var) ...READ MORE
Hello @kartik, For Python 2.6 and later and ...READ MORE
Hello @Muhammad Umer, As per the Beautiful Soup Documentation: AttributeError: ...READ MORE
from shutil import copyfile copyfile(src, dst) Copy the contents ...READ MORE
import shutil shutil.rmtree('/folder_name') By design, rmtree fails on folder trees containing ...READ MORE
With new_list = my_list, you don't actually have ...READ MORE
os.remove() removes a file. os.rmdir() removes an empty directory. shutil.rmtree() deletes a ...READ MORE
from shutil import copyfile copyfile(src, dst) Copy the ...READ MORE
Hello geeks: Here is my models: class Room_Type(models.Model): """Django data ...READ MORE
It seems mysql_config is missing on your ...READ MORE
This works for me: $ pip install -r ...READ MORE
As of pip 1.3, there is a pip show command. $ ...READ MORE
Having tested this using Python 3.5 and ...READ MORE
I've found this snippet as an alternative ...READ MORE
Here is what you asked for: from functools ...READ MORE
some_list[-1] is the shortest and most Pythonic. In fact, ...READ MORE
One thing that is really helpful in ...READ MORE
You can use the + operator to combine them: listone ...READ MORE
Here's a generator that yields the chunks ...READ MORE
Use: pip install --install-option="--prefix=$PREFIX_PATH" package_name You might also want ...READ MORE
Use __import__ function to import the module by giving ...READ MORE
Use "getattr": obj = MyClass() try: ...READ MORE
I'm not sure that anything much could ...READ MORE
Use the type() builtin function: >>> i = 123 >>> type(i) <type ...READ MORE
Try hasattr(): if hasattr(a, 'property'): a.property The ...READ MORE
Yep, using the static method decorator class MyClass(object): ...READ MORE
You are running into the old problem with floating-point ...READ MORE
It's because any iterable can be joined ...READ MORE
Use random.choice() import random foo = ['a', 'b', 'c', 'd', ...READ MORE
Hi, @Shrinidhi, Kindly share your code snippet with ...READ MORE
Hello @Aruna, You can refer this for your ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.