Hello all!
I'm trying to build a python script to create circles, place them randomly within specific limits and the most important part is that the algorithm must be able to detect any intersecting circles and if any is found, move them to another position.
This script is to be used with ABAQUS finite element simulation package to create a laminated composite plate with embedded random fibers.
This first...
Search Result
Collapse
281 results in 0.0082 seconds.
Keywords
Members
Tags
-
Detection of intersecting circles on python
-
Python Dict-List
If you have a dict with a list how do you get the info from the list. -
Unable to create executable - error: invalid command 'py2exe'
Python version 2.7.1
py2exe installed successfully
version - py2exe-0.6.9.win32-py2.7
py2exe in python path
setup.py
Code:from distutils.core import setup import py2exe setup(console=['helloworld.py'])
Code:C:\Python27\Lib\distutils\dist.py:267: UserWarning: Unknown distribution option: 'console' warnings.warn(msg) usage: setup.py [global_opts]
-
Pixelperfect Collision, hitmask/blank error
I am trying to understand the way that pixelperfect collisions works, I have made a program using two circles(images) bouncing around in the pygame window. This is the script:
Code:import pygame, importedfunctions, random pygame.init() clock = pygame.time.Clock() screen = pygame.display.set_mode([640,480]) class BallClass(pygame.sprite.Sprite): def __init__(self, x,y): pygame.sprite.Sprite.__init__(self)
-
How to get the value of msExchMailboxGuid from Actvie Directory
I can get some attributes of an user of Active Directory by python script as follows:
Code:import win32com.client ldap="SELECT cn, mail From 'LDAP://OU=XXXXXXXX,DC=center,DC=intranet,DC=sinotrans'" c = win32com.client.Dispatch('ADODB.Connection') c.Open('Provider=ADsDSOObject') rs,rc = c.Execute(ldap) rs.MoveFirst() while not rs.EOF: for e in rs.fields:
-
Removing spaces and empty lines from a file Using Python
Hello
I have a file which contains a value 2000,00. but it contains spaces after 2000,00 and empty lines.
I want to remove all the spaces and empty lines, If some one can give some Idea,
Thanks -
How to correctly set a cookie value in headers
Maybe you will help me in this "simple" case:
Code:request2 = urllib.request.Request(url) cj2 = http.cookiejar.CookieJar() urlOpener2 = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj2)) url2 = urlOpener2.open(request2) allinfo2 = url2.info()
-
ravenchild started a topic Python script - How to set the right serwer, when I perform request/open of applicatiin PythonPython script - How to set the right serwer, when I perform request/open of applicati
Python 3.2.2
I want to check HTTP status code (eg. 200 or 404) on some www application.
There are five server, and each server have a copy of this www application (The user is automatically redirected to the application on the server with low traffic/sometimes on random server).
Suppose that the name of servers is: 0,1,2,3,4
I want to check HTTP status code on page of www application on a particular server (which I choose).... -
My javascript functions do not work in Python?
Code:#!C:/Python27/python.exe import cgi form = cgi.FieldStorage() a=int(form.getvalue('a','0'),0) b=int(form.getvalue('b','0'),0) print """Content-type: text/html <html> <head> <title>Greeting Page</title> </head> <b><h1>Welcome!</h1></b> <body>
-
Making graphics appear on the desktop
I am a newbie in python programming. My script needs to have a rectangle with some text appear on the desktop but I can't figure out how to do this. Can someone help? -
Parsing a file, and matching numbers of a sequence (python)
I currently have a list of genes in a file. Each line has a chromosome with it's information. Such an entry appears as:
NM_198212 chr7 + **115926679** **115935830** 115927071 11593344 2 *115926679*,'11 5933260', *115927221*,'11 5935830',
The sequence for the chromosome starts at base **115926679** and continues up to(but not including) base **115935830**
If we want the spliced sequence, we use... -
Matching parts of lines in a file (python)
I currently have a list of genes in a file. Each line has a chromosome with it's information. Such an entry appears as:
NM_198212 chr7 + 115926679 115935830 115927071 11593344 2 115926679,'115933260', 115927221,'115935830',
The sequence for the chromosome starts at base 115926679 and continues up to(but not including) base 115935830
If we want the spliced sequence, we use the exons.The first extends from 11... -
ImportError: No module named Scientific_netcdf
I am using Ubuntu on server and on my local machine. I have written my python script which runs fine on my local machine but shows some problems on my server because of compatibility issues. The solution of this came in my mind is to make binary file of that script which is running fine on my local machine. I searched for pyinstaller and follow the instructions for how to make binary from python script. For this reason I firstly install pyinstaller... -
How to search for vector in list of input arguments
Hi guys,
I am trying to write a module transfering from MATLAB. In order to avoid unnecessary errors, I do some input arguments checkings before processing. The user is allowed to put in only 3 arguments, that's why the last argument is a list instead of a fixed variable. Nevertheless, user has only 2 possibilities either he gives 3 or 4 inputs.
The point is I'd like to check if there is any vector in the list (last... -
IndexError: narray: index out of range (While working with Ocropus)
I am working with ocropus for the purpose to binarize and segments the unsegmented images. I use command to binarize the image files by ocropus as
Code:ocropus-binarize -o book /home/images/*.tif
Code:File "/usr/local/bin/ocropus-binarize", line 151, in <module>