Search Results

Search found 14828 results on 594 pages for 'settings py'.

Page 26/594 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • setting permissions of python module (python setup install)

    - by SetJmp
    I am configuring a distutils-based setup.py for a python module that is to be installed on a heterogeneous set of resources. Due to the heterogeneity, the location where the module is installed is not the same on each host however disutils picks the host-specific location. I find that the module is installed without o+rx permissions using disutils (in spite of setting umask ahead of running setup.py). One solution is to manually correct this problem, however I would like an automated means that works on heterogeneous install targets. For example, is there a way to extract the ending location of the installation from within setup.py? Any other suggestions? Thanks! SetJmp

    Read the article

  • windows 7 security settings for non-admins

    - by Wasi
    I was recently modifying the security settings for my drive C. I did not notice that i was logged in as a user and changed the permissions for users to "read". Later i realized that there was no admin set up on the pc (when switching user). Now with the security settings changed I can't do anything on the computer. I can only read the files that previously existed. And this applies to every drive on my computer. Now the user accounts do not have the privileges to change the permissions. How can i allow users to have full control without having admin on my pc

    Read the article

  • Copying OS X account settings to new user account

    - by Donna Crain
    Hi I hope someone can help me... I accidentally renamed my own user name on my mac running OS X 10.4.11 and tried renaming back to what it was but now I have two accounts (the one I want to use which has all my preferences, applications, mail boxes, etc etc) is it possible to copy my settings from my original into this new user name? When I open my computer it defaults to this new account but everything is setting up from new and I just need to get access to all my work documents, mail settings etc. If there is anyone who could help out, I would be very grateful. Thank you in advance.

    Read the article

  • iPhone: UITableView with custom cells for settings

    - by Nic Hubbard
    I want to use a UITableView for my settings screen. So that my settings view will look like apple does it, with a group table view, and then the UI elements to let you change settings. So, it does not seem like the cells are loaded from an array, but seems like each one is customized. Ideas on how to do this?

    Read the article

  • Windows calibration settings persistance over reboots

    - by Dmatig
    I'm running Windows 7 64bit on a laptop (Samsung R560) using a cheap external CRT monitor. The screen is a littler dark for my liking, despite having the physical monitors settings up to the max for all the brightness-related settings. Windows 7 has a tool called "Calibrate display color" (search in the start menu). Running this tool, you have a slider that allows you to adjust the "Gamma", which sliding up gives me acceptable brightness levels. Unfortunately, upon reboot (and certain other activities such as running certain fullscreen games) this is reset to default. Is there a way to make this persistent? Some registry setting? Batch file to run at startup even (less preferable as I'd like games to run brighter too)?

    Read the article

  • Where can I find "system proxy settings"?

    - by Rookie
    Where are these system proxy settings? I noticed my connection has been slow for a while, then I checked the connection settings and was surprised there were set a proxy, but I cant see what exactly it is using. Where can I check which IP it was routing the connection for me ? Here is what I saw from Firefox (12.0) options: http://img12.imageshack.us/img12/4370/sysproxy.png As far as I can remember, it has always been "no proxy" and not "system proxy". Unless new firefox version has set that "system proxy" to default?

    Read the article

  • Migrate wireless settings from xp to windows 7

    - by Tgr
    I'm trying to migrate the settings of my old machine (Win XP Professional) to the new one (Win 7 Professional) and I would like to keep my saved passwords for various wireless networks. How can I export them from XP and import in Win7? A few things that are mentioned a lot in chat groups but don't work: netsh can export/import wlan profiles on Vista/Win7, but not on XP; the Wireless Network Setup Wizard can only export settings for networks created by me; the best method I found was via http://www.nirsoft.net/utils/wireless_wep_key_faq.html which can list hex keys, but cannot load them nor save them in a useful format; I would rather not copy them one-by-one by hand.

    Read the article

  • How to create chroot jail with ability to change some system settings

    - by Tadeck
    How to properly create chroot jail (on Ubuntu, or some some other Linux if not applicable) to make user able to edit system settings (eg. with ifconfig) and be able to communicate with external scripts? The use case would be to enable user to authenticate using SSH and then be able to perform very limited set of actions from command line. Unfortunately the tricky part is the access to system settings. I have considered multiple options and the alternative is to setup fake SSH server (eg. with Twisted), try to use restricted shell (however, I seem to need chroot still), or write a script on top of the shell (?).

    Read the article

  • How to enable printer settings over Jetdirect on HP 4100N

    - by zsero
    I have a HP 4100N printer and I am using it over network. Previously I was able to access the printer settings over internet, but now the only thing visible is Device Info and Networking. I can connect to the web server and I can set all the network related settings, but that's not what I want. There should be a supplies, config, print info, etc. page, what are not visible now. Can you tell me what setting should I set to enable this printer config page on the webserver? The printer is a HP 4100N and the network card is J4169A (Jetdirect 610n).

    Read the article

  • Installing router - failed to verify router settings

    - by Andi
    I'm trying to install a TP-Link wireless router. I am using a modem an have a PPPoE connection. I connected the router to the computer and the modem, but in the last step of the Easy Setup it says " Failed to verify router settings. 1. Please check the WAN connection type and parameters. 2. Please check your connectivity and retry." The internet works fine if i connect the modem directly to the computer. When I connect the computer to the router, the wireless network is detected by other devices, but cannot be accessed. I accessed the router settings, and everything seems normal, except that it just says "Connecting...". It never manages to connect to the internet. I tried restarting the router and several walkthroughs on the web, but I couldn't get it to work.

    Read the article

  • Automatically deleting pyc files when corresponding py is moved (Mercurial)

    - by Oddthinking
    (I foresaw this problem might happen 3 months ago, and was told to be diligent to avoid it. Yesterday, I was bitten by it, hard, and now that it has cost me real money, I am keen to fix it.) If I move one of my Python source files into another directory, I need to remember to tell Mercurial that it moved (hg move). When I deploy the new software to my server with Mercurial, it carefully deletes the old Python file and creates it in the new directory. However, Mercurial is unaware of the pyc file in the same directory, and leaves it behind. The old pyc is used preferentially over new python file by other modules in the same directory. What ensues is NOT hilarity. How can I persuade Mercurial to automatically delete my old pyc file when I move the python file? Is there another better practice? Trying to remember to delete the pyc file from all the Mercurial repositories isn't working.

    Read the article

  • Google App Engine + Form Validation

    - by Iwona
    Hi, I would like to do google app engine form validation but I dont know how to do it? I tried like this: from google.appengine.ext.db import djangoforms from django import newforms as forms class SurveyForm(forms.Form): occupations_choices = ( ('1', ""), ('2', "Undergraduate student"), ('3', "Postgraduate student (MSc)"), ('4', "Postgraduate student (PhD)"), ('5', "Lab assistant"), ('6', "Technician"), ('7', "Lecturer"), ('8', "Other" ) ) howreach_choices = ( ('1', ""), ('2', "Typed the URL directly"), ('3', "Site is bookmarked"), ('4', "A search engine"), ('5', "A link from another site"), ('6', "From a book"), ('7', "Other") ) boxes_choices = ( ("des", "Website Design"), ("svr", "Web Server Administration"), ("com", "Electronic Commerce"), ("mkt", "Web Marketing/Advertising"), ("edu", "Web-Related Education") ) name = forms.CharField(label='Name', max_length=100, required=True) email = forms.EmailField(label='Your Email Address:') occupations = forms.ChoiceField(choices=occupations_choices, label='What is your occupation?') howreach = forms.ChoiceField(choices=howreach_choices, label='How did you reach this site?') # radio buttons 1-5 rating = forms.ChoiceField(choices=range(1,6), label='What is your occupation?', widget=forms.RadioSelect) boxes = forms.ChoiceField(choices=boxes_choices, label='Are you involved in any of the following? (check all that apply):', widget=forms.CheckboxInput) comment = forms.CharField(widget=forms.Textarea, required=False) And I wanted to display it like this: template_values = { 'url' : url, 'url_linktext' : url_linktext, 'userName' : userName, 'item1' : SurveyForm() } And I have this error message: Traceback (most recent call last): File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp_init_.py", line 515, in call handler.get(*groups) File "C:\Program Files\Google\google_appengine\demos\b00213576\main.py", line 144, in get self.response.out.write(template.render(path, template_values)) File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\template.py", line 143, in render return t.render(Context(template_dict)) File "C:\Program Files\Google\google_appengine\google\appengine\ext\webapp\template.py", line 183, in wrap_render return orig_render(context) File "C:\Program Files\Google\google_appengine\lib\django\django\template_init_.py", line 168, in render return self.nodelist.render(context) File "C:\Program Files\Google\google_appengine\lib\django\django\template_init_.py", line 705, in render bits.append(self.render_node(node, context)) File "C:\Program Files\Google\google_appengine\lib\django\django\template_init_.py", line 718, in render_node return(node.render(context)) File "C:\Program Files\Google\google_appengine\lib\django\django\template\defaulttags.py", line 209, in render return self.nodelist_true.render(context) File "C:\Program Files\Google\google_appengine\lib\django\django\template_init_.py", line 705, in render bits.append(self.render_node(node, context)) File "C:\Program Files\Google\google_appengine\lib\django\django\template_init_.py", line 718, in render_node return(node.render(context)) File "C:\Program Files\Google\google_appengine\lib\django\django\template_init_.py", line 768, in render return self.encode_output(output) File "C:\Program Files\Google\google_appengine\lib\django\django\template_init_.py", line 757, in encode_output return str(output) File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\util.py", line 26, in str return self.unicode().encode(settings.DEFAULT_CHARSET) File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\forms.py", line 73, in unicode return self.as_table() File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\forms.py", line 144, in as_table return self._html_output(u'%(label)s%(errors)s%(field)s%(help_text)s', u'%s', '', u'%s', False) File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\forms.py", line 129, in _html_output output.append(normal_row % {'errors': bf_errors, 'label': label, 'field': unicode(bf), 'help_text': help_text}) File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\forms.py", line 232, in unicode value = value.str() File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\util.py", line 26, in str return self.unicode().encode(settings.DEFAULT_CHARSET) File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\widgets.py", line 246, in unicode return u'\n%s\n' % u'\n'.join([u'%s' % w for w in self]) File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\widgets.py", line 238, in iter yield RadioInput(self.name, self.value, self.attrs.copy(), choice, i) File "C:\Program Files\Google\google_appengine\lib\django\django\newforms\widgets.py", line 212, in init self.choice_value = smart_unicode(choice[0]) TypeError: 'int' object is unsubscriptable Do You have any idea how I can do this validation in different case? I have tried to do it using this kind of: class ItemUserAnswer(djangoforms.ModelForm): class Meta: model = UserAnswer But I dont know how to add extra labels to this form and it is displayed in one line. Do You have any suggestions? Thanks a lot as it making me crazy why it is still not working:/

    Read the article

  • Google SMTP settings not sending email

    - by Baboon
    I am having a hard time making the email sending in GitLab to work (changing email in profile settings). My server has exim4, I can tell its working because if I do simple mail() in PHP, it thus sends the email to the recipient. Now, in GitLab seems that it wasn't. So I modified productions.rb to have SMTP settings, and use Google SMTP: config.action_mailer.delivery_method = :smtp config.action_mailer.smtp_settings = { address: "smtp.gmail.com", port: 465, user_name: "[email protected]", password: "hashpassword", domain: "gmail.com", authentication: :plain, enable_starttls_auto: true } I even tried changing the port to 587 and 467 but still it doesn't work. Why is that? Can you please lead me to where I am missing?

    Read the article

  • eAccelerator settings for PHP/Centos/Apache

    - by bobbyh
    I have eAccelerator installed on a server running Wordpress using PHP/Apache on CentOS. I am occassionally getting persistent "white pages", which presumably are PHP Fatal Errors (although these errors don't appear in my error_log). These "white pages" are sprinkled here and there throughout the site. They persist until I go to my eAccelerator control.php page and clear/clean/purge my caches, which suggests to me that I've configured eAccelerator improperly. Here are my current /etc/php.ini settings: memory_limit = 128M; eaccelerator.shm_size="64", where shm.size is "the amount of shared memory eAccelerator should allocate to cache PHP scripts" (see http://eaccelerator.net/wiki/Settings) eaccelerator.shm_max="0", where shm_max is "the maximum size a user can put in shared memory with functions like eaccelerator_put ... The default value is "0" which disables the limit" eaccelerator.shm_ttl="0" - "When eAccelerator doesn't have enough free shared memory to cache a new script it will remove all scripts from shared memory cache that haven't been accessed in at least shm_ttl seconds. By default this value is set to "0" which means that eAccelerator won't try to remove any old scripts from shared memory." eaccelerator.shm_prune_period="0" - "When eAccelerator doesn't have enough free shared memory to cache a script it tries to remove old scripts if the previous try was made more then "shm_prune_period" seconds ago. Default value is "0" which means that eAccelerator won't try to remove any old script from shared memory." eaccelerator.keys = "shm_only" - "These settings control the places eAccelerator may cache user content. ... 'shm_only' cache[s] data in shared memory" On my phpinfo page, it says: memory_limit 128M Version 0.9.5.3 and Caching Enabled true On my eAccelerator control.php page, it says 64 MB of total RAM available Memory usage 77.70% (49.73MB/ 64.00MB) 27.6 MB is used by cached scripts in the PHP opcode cache (I added up the file sizes myself) 22.1 MB is used by the cache keys, which is populated by the Wordpress object cache. My questions are: Is it true that there is only 36.4 MB of room in the eAccelerator cache for total "cache keys" (64 MB of total RAM minus whatever is taken by cached scripts, which is 27.6 MB at the moment)? What happens if my app tries to write more than 22.1 MB of cache keys to the eAccelerator memory cache? Does this cause eAccelerator to go crazy, like I've seen? If I change eaccelerator.shm_max to be equal to (say) 32 MB, would that avoid this problem? Do I also need to change shm_ttl and shm_prune_period to make eAccelerator respect the MB limit set by shm_max? Thanks! :-)

    Read the article

  • Python __subclasses__() not listing subclasses

    - by Mridang Agarwalla
    I cant seem to list all derived classes using the __subclasses__() method. Here's my directory layout: import.py backends __init__.py --digger __init__.py base.py test.py --plugins plugina_plugin.py From import.py i'm calling test.py. test.py in turn iterates over all the files in the plugins directory and loads all of them. test.py looks like this: import os import sys import re sys.path.append(os.path.join(os.path.abspath(os.path.dirname(os.path.abspath( __file__ ))))) sys.path.append(os.path.join(os.path.abspath(os.path.dirname(os.path.abspath( __file__ ))), 'plugins')) from base import BasePlugin class TestImport: def __init__(self): print 'heeeeello' PLUGIN_DIRECTORY = os.path.join(os.path.abspath(os.path.dirname(os.path.abspath( __file__ ))), 'plugins') for filename in os.listdir (PLUGIN_DIRECTORY): # Ignore subfolders if os.path.isdir (os.path.join(PLUGIN_DIRECTORY, filename)): continue else: if re.match(r".*?_plugin\.py$", filename): print ('Initialising plugin : ' + filename) __import__(re.sub(r".py", r"", filename)) print ('Plugin system initialized') print BasePlugin.__subclasses__() The problem us that the __subclasses__() method doesn't show any derived classes. All plugins in the plugins directory derive from a base class in the base.py file. base.py looks like this: class BasePlugin(object): """ Base """ def __init__(self): pass plugina_plugin.py looks like this: from base import BasePlugin class PluginA(BasePlugin): """ Plugin A """ def __init__(self): pass Could anyone help me out with this? Whatm am i doing wrong? I've racked my brains over this but I cant seem to figure it out Thanks.

    Read the article

  • ByteFlow installation Error on Windows

    - by Patrick
    Hi Folks, When I try to install ByteFlow on my Windows development machine, I got the following MySQL error, and I don't know what to do, please give me some suggestion. Thank you so much!!! E:\byteflow-5b6d964917b5>manage.py syncdb !!! Read about DEBUG in settings_local.py and then remove me !!! !!! Read about DEBUG in settings_local.py and then remove me !!! J:\Program Files\Python26\lib\site-packages\MySQLdb\converters.py:37: DeprecationWarning: the sets module is deprecated from sets import BaseSet, Set Creating table auth_permission Creating table auth_group Creating table auth_user Creating table auth_message Creating table django_content_type Creating table django_session Creating table django_site Creating table django_admin_log Creating table django_flatpage Creating table actionrecord Creating table blog_post Traceback (most recent call last): File "E:\byteflow-5b6d964917b5\manage.py", line 11, in <module> execute_manager(settings) File "J:\Program Files\Python26\lib\site-packages\django\core\management\__init__.py", line 362, in execute_manager utility.execute() File "J:\Program Files\Python26\lib\site-packages\django\core\management\__init__.py", line 303, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "J:\Program Files\Python26\lib\site-packages\django\core\management\base.py", line 195, in run_from_argv self.execute(*args, **options.__dict__) File "J:\Program Files\Python26\lib\site-packages\django\core\management\base.py", line 222, in execute output = self.handle(*args, **options) File "J:\Program Files\Python26\lib\site-packages\django\core\management\base.py", line 351, in handle return self.handle_noargs(**options) File "J:\Program Files\Python26\lib\site-packages\django\core\management\commands\syncdb.py", line 78, in handle_noargs cursor.execute(statement) File "J:\Program Files\Python26\lib\site-packages\django\db\backends\util.py", line 19, in execute return self.cursor.execute(sql, params) File "J:\Program Files\Python26\lib\site-packages\django\db\backends\mysql\base.py", line 84, in execute return self.cursor.execute(query, args) File "J:\Program Files\Python26\lib\site-packages\MySQLdb\cursors.py", line 166, in execute self.errorhandler(self, exc, value) File "J:\Program Files\Python26\lib\site-packages\MySQLdb\connections.py", line 35, in defaulterrorhandler raise errorclass, errorvalue _mysql_exceptions.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes')

    Read the article

  • Ways for managing the installation and configuration of various software applications and settings i

    - by EmpireJones
    What are some ways for managing the installation and configuration of various software applications and settings in group of linux development and server computers? Is a set of basic scripts a good means of attack? I was thinking about just having a ton of scripts, such as: setup_dev_env [install|uninstall|reinstall] setup_nfs [...] setup_nfs_share [...] setup_http [...] setup_memcache_node [...] Is there any better method? It would be nice to be able to "upgrade" an installation script too, for example, to change common development settings.

    Read the article

  • Changing shared printer settings to default to greyscale

    - by Chris
    My company has about 60 employees all running Windows Vista or 7 and a gigantic Minolta printer hooked up to an EFI Fiery Image Processor. We're burning about $300 a month in printer supplies alone. I'm trying to find a way to cause the printer to default to grayscale in order to save money. So far I've tried: Changing settings on the image processor Changing settings on the print server Looking through the Group Policy editor to see if I can find anything useful Creating a new printer on the print server and setting it to be grayscale only Adding the printer to my computer directly (through a TCP/IP port) and setting it to be greyscale only Has anybody successfully done this before? If so, how was it gone about? I don't expect anybody to know the specifics of my environment, I just not sure what the right direction is.

    Read the article

  • Speeding up templates in GAE-Py by aggregating RPC calls

    - by Sudhir Jonathan
    Here's my problem: class City(Model): name = StringProperty() class Author(Model): name = StringProperty() city = ReferenceProperty(City) class Post(Model): author = ReferenceProperty(Author) content = StringProperty() The code isn't important... its this django template: {% for post in posts %} <div>{{post.content}}</div> <div>by {{post.author.name}} from {{post.author.city.name}}</div> {% endfor %} Now lets say I get the first 100 posts using Post.all().fetch(limit=100), and pass this list to the template - what happens? It makes 200 more datastore gets - 100 to get each author, 100 to get each author's city. This is perfectly understandable, actually, since the post only has a reference to the author, and the author only has a reference to the city. The __get__ accessor on the post.author and author.city objects transparently do a get and pull the data back (See this question). Some ways around this are Use Post.author.get_value_for_datastore(post) to collect the author keys (see the link above), and then do a batch get to get them all - the trouble here is that we need to re-construct a template data object... something which needs extra code and maintenance for each model and handler. Write an accessor, say cached_author, that checks memcache for the author first and returns that - the problem here is that post.cached_author is going to be called 100 times, which could probably mean 100 memcache calls. Hold a static key to object map (and refresh it maybe once in five minutes) if the data doesn't have to be very up to date. The cached_author accessor can then just refer to this map. All these ideas need extra code and maintenance, and they're not very transparent. What if we could do @prefetch def render_template(path, data) template.render(path, data) Turns out we can... hooks and Guido's instrumentation module both prove it. If the @prefetch method wraps a template render by capturing which keys are requested we can (atleast to one level of depth) capture which keys are being requested, return mock objects, and do a batch get on them. This could be repeated for all depth levels, till no new keys are being requested. The final render could intercept the gets and return the objects from a map. This would change a total of 200 gets into 3, transparently and without any extra code. Not to mention greatly cut down the need for memcache and help in situations where memcache can't be used. Trouble is I don't know how to do it (yet). Before I start trying, has anyone else done this? Or does anyone want to help? Or do you see a massive flaw in the plan?

    Read the article

  • Why do my proxy settings keep changing?

    - by tjrobinson
    I am running Windows 7 and a few times a day the "Use a proxy server for your LAN (These settings will not apply to dial-up of VPN connections)." under "Local Area Network (LAN) Settings" checkbox becomes checked seemingly on it's own. Am I pressing some kind of hidden keyboard shortcut accidentally? What sort of applications might alter this setting and why? Unfortunately as this is a developer box, there's a lot of stuff that could be interfering, e.g. Visual Studio 2010, Windows Azure SDK and various browsers. Has anyone else come across this?

    Read the article

  • Import Error when use templatetags in Django

    - by zmfantasy
    Well, when I'm trying to use 'inclusion' in Django, I met some confused problems that I can't solve it by myself. There is the structures for my project. MyProject--- App1--- __init__.py models.py test.py urls.py views.py App2--- ... template--- App1--- some htmls App2--- ... templatetags--- __init__.py inclusion_test.py manage.py urls.py __init__.py settings.py I have registered templatetags folder in the settings.py (Both in Installed APPS & TEMPLATE_DIRS). But when I want to use {% load inclusion_test %} in my html, it raise an exception like this: 'inclusion_cld_tags' is not a valid tag library: Could not load template library from django.templatetags.inclusion_cld_tags, No module named inclusion_cld_tags I think there is nothing wrong with my import work, how can I do with that? Thanks for help! My django version: 1.0+ My Python version: 2.6.4

    Read the article

  • importing CELERY* environment variables in django settings.py causes celeryd not to start

    - by Taras
    I just spent 2 hours trying to figure out why django celery stopped working. Celery would being to start, but would stop short of printing out the configuration items, implying that it wasn't starting correct. The log would only contain The celery.decorators module along with the magic keyword arguments, are deprecated, and will be removed in version 3.0. Please use the celery.task module instead of celery.decorators, and the task.request should be used instead of the magic keyword arguments: from celery.task import task See http://bit.ly/celery22major for more information. """)) It turns out that some celery env variables that I was importing to try and fix a different problem were causing celery not to start correctly: from celery.tests.config import CELERY_QUEUES, CELERY_DEFAULT_QUEUE, CELERY_DEFAULT_ROUTING_KEY Even though I wasn't using them anywhere. Does anyone know what was happening?

    Read the article

  • Loop colours from variables for graphics.py [Python 3.2]

    - by user1056548
    I am creating a graphics program that draws 100 x 100 squares next to each other depending on the user-specified grid size. The user also inputs 4 colours for the squares to be coloured (e.g. if they enter red,green,blue,yellow the squares will be coloured in that order, repeating the colours). Is it possible to loop the colours from the variables the user has given? Here is what I have so far: def main(): print ("Please enter four comma seperated colours e.g.: 'red,green,blue,yellow'\n\ Allowed colours are: red, green, blue, yellow and cyan") col1, col2, col3, col4 = input("Enter your four colours: ").split(',') win = GraphWin ("Squares", 500, 500) colours = [col1, col2, col3, col4] drawSquare (win, col1, col2, col3, col4, colours) win.getMouse() win.close() def drawSquare(win, col1, col2, col3, col4, colours): for i in range (4): for j in range (len(colours)): colour = colours[j] x = 50 + (i * 50) circle = Circle (Point (x,50), 20) circle.setFill(colour) circle.draw(win) I think I should be using a list in some way, but can't work out exactly how to do it. Can anybody help?

    Read the article

  • In what package should a "Settings" class be?

    - by Tom
    I've in the middle of building an application but found myself too easily creating new packages without keeping the project's structure in mind. Now, I'm trying to redo the whole project structure on paper first. I am using a Settings class with public properties, accessed as settings for several other classes around the project. Now, since this Settings class applies for the whole project, I am unsure if it should be packaged and if so, in what kind of package should it exist? Or should it be in the root (the default package) with the main application class? I've been thinking about putting it in my utils package, then again I don't think it really is an utlity. Any strategies on how to decide on such package structure for example for a Settings class?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >