Re: what gui designer is everyone using
I'm afraid that in my experience, doing things by hand has always ended up being quicker and simpler than relying on a GUI designer when it comes to building python GUI apps. That said, I've not tried any for the past few years so there may be a killer app out there that I've not tried :) But even then, it's likely that you'll still have to get your hands dirty in the code at some point. Also, it would help a little if you'd state which toolkit you were using (I'm assuming wxPython since you mention boa-constructor). On Jun 5, 3:10 pm, Mark R Rivet wrote: > I want a gui designer that writes the gui code for me. I don't want to > write gui code. what is the gui designer that is most popular? > I tried boa-constructor, and it works, but I am concerned about how > dated it seems to be with no updates in over six years. -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
Lisp and Clojure are functional languages. Learning one of those (or a similar language) will help by providing you with a fairly different perspective on how to approach programming problems. Personally I think learning Lisp or Clojure is good advice. However, if you're really adamant about going with Java or C# I'd probably go with Java. Not only can you play around on multiple platforms but should you decide to give Clojure a go in the future it'll come in handy :) (Clojure runs on the JVM so you can make use of Java libraries directly from it). On Jun 9, 11:44 pm, Yesterday Paid wrote: > I'm planning to learn one more language with my python. > Someone recommended to do Lisp or Clojure, but I don't think it's a > good idea(do you?) > So, I consider C# with ironpython or Java with Jython. > It's a hard choice...I like Visual studio(because my first lang is VB6 > so I'm familiar with that) > but maybe java would be more useful out of windows. > > what do you think? -- http://mail.python.org/mailman/listinfo/python-list
Re: which one do you prefer? python with C# or java?
My mistake about Lisp being purely functional (I have very little experience with common Lisp itself), though Clojure is. That doesn't change my point, to which you appear to agree, Lisp and Clojure teach folks a different way of approaching problems, which is always useful :) On Jun 10, 12:25 pm, Harald Hanche-Olsen wrote: > [becky_lewis ] > > > Lisp and Clojure are functional languages. > > No, they're not. > > But you can (and often will) do quite a bit of functional programming in > Lisp, as it lends itself quite naturally to that way of thinking. > > But in (Common) Lisp you also have CLOS, which is a rather different way > to do object oriented programming. It will widen your horizon in more > than one way. > > The advice to learn just one programming language at a time seems sound, > though. I would take it, if I were you. > > -- > * Harald Hanche-Olsen http://www.math.ntnu.no/~hanche/> > - It is undesirable to believe a proposition > when there is no ground whatsoever for supposing it is true. > -- Bertrand Russell -- http://mail.python.org/mailman/listinfo/python-list
Re: ipython installed in virtualenv seems not to use virtualenv
Hi, are you doing a pip install from within your virtualenv (sourcing the virtualenv and THEN installing ipython)? Becky Lewis On Aug 11, 9:59 am, Gelonida N wrote: > Hi, > > Short version > == > I have a system with ipython installed by my Ubuntu distribution > I created a virtualenv with> virtualenv ~/myenv > I installed ipython > > pip install ipython --upgrade > > When using ipython I notice, that it does import the modules from my > default python setup and not from my virtualenv. > > Why? > What could I have done differently? > > Long version > === > > I created a virtualenv with > > virtualenv ~/myenv > > THis inherits my machines site packages. > The reason I'm not using > > virutalenv --no-site-packages ~/myenv > > is that I would like to use some of the site packages, > in particular some, that I don't want to compile due to huge package > dependencies. > > Small problem is, that if I run ipython in a virtualenv > it will still call /usr/bin/ipython > > and if I check the modules, that I import I seem to import the modules > of my default environment and not the ones of my virtualenv. > > So I decided I will install my own version of ipython in my virtualenv > > The output if pip install ipython is a little confusing. > > > Requirement already satisfied (use --upgrade to upgrade): ipython in > > /usr/lib/pymodules/python2.6 > > As I am a normal user and I don't have permissions to overwrite /usr/lib > I decided to just give it a try and hope it will install in my > virtualenv path and not in /usr/lib/... > > After running > > > pip install ipython --upgrade > > I have my own version of ipython. > > However when calling and using it I notice it still imports the modules > from my default python and not from my virtualenv? > > Why does ipython ignore the virtualenv's settings? > > I know there are workarounds, but I wondered why it doesn't work out of > the box. -- http://mail.python.org/mailman/listinfo/python-list
Re: ipython installed in virtualenv seems not to use virtualenv
Just to add ... I ran through creating a virtualenv in the same manner as you: $ virtualenv SomeEnv $ source SomeEnv/bin/activate (SomeEnv)$ which pip /home/user/virtual/SomeEnv/bin/pip (SomeEnv)$ pip install ipython Requirement already satisfied (use --upgrade to upgrade): ipython in / usr/local/lib/python2.6/dist-packages Cleaning up... (SomeEnv)$ pip install ipython --upgrade ... pip installs ipython ... (SomeEnv)$ which ipython /home/user/virtual/SomeEnv/bin/ipython (SomeEnv)$ ipython Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15) Type "copyright", "credits" or "license" for more information. IPython 0.11 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In [1]: import os In [2]: os.__file__ Out[2]: '/home/user/virtual/SomeEnv/lib/python2.6/os.pyc' In [3]: import dbus In [4]: dbus.__file__ Out[4]: '/usr/lib/pymodules/python2.6/dbus/__init__.pyc' ipython is using the virtualenv when it can find them and the system wide packages when they are not in the virtualenv. Hope that helps you track down the problem :/ On Aug 11, 9:59 am, Gelonida N wrote: > Hi, > > Short version > == > I have a system with ipython installed by my Ubuntu distribution > I created a virtualenv with> virtualenv ~/myenv > I installed ipython > > pip install ipython --upgrade > > When using ipython I notice, that it does import the modules from my > default python setup and not from my virtualenv. > > Why? > What could I have done differently? > > Long version > === > > I created a virtualenv with > > virtualenv ~/myenv > > THis inherits my machines site packages. > The reason I'm not using > > virutalenv --no-site-packages ~/myenv > > is that I would like to use some of the site packages, > in particular some, that I don't want to compile due to huge package > dependencies. > > Small problem is, that if I run ipython in a virtualenv > it will still call /usr/bin/ipython > > and if I check the modules, that I import I seem to import the modules > of my default environment and not the ones of my virtualenv. > > So I decided I will install my own version of ipython in my virtualenv > > The output if pip install ipython is a little confusing. > > > Requirement already satisfied (use --upgrade to upgrade): ipython in > > /usr/lib/pymodules/python2.6 > > As I am a normal user and I don't have permissions to overwrite /usr/lib > I decided to just give it a try and hope it will install in my > virtualenv path and not in /usr/lib/... > > After running > > > pip install ipython --upgrade > > I have my own version of ipython. > > However when calling and using it I notice it still imports the modules > from my default python and not from my virtualenv? > > Why does ipython ignore the virtualenv's settings? > > I know there are workarounds, but I wondered why it doesn't work out of > the box. -- http://mail.python.org/mailman/listinfo/python-list
Re: Learning Python
http://diveintopython.org/ is where you can get an online version of the dive into python book. I found it useful when learning python :) Becky Lewis On Aug 24, 3:46 am, User wrote: > Hello all, > Does anyone have any good resources for learning Python? I know basic > Java and basic Python (loops, data types, if-then statements, etc), but > I want to delve into Python further. If anyone knows of any good books, > video tutorials, etc it would be greatly appreciated. > Thanks, > User -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing WebDAV server
On Sep 2, 1:19 pm, "Fokke Nauta" wrote: > "Dennis Lee Bieber" wrote in > messagenews:mailman.687.1314941410.27778.python-l...@python.org... > > > > > > > > > > > On Thu, 1 Sep 2011 12:30:43 +0200, "Fokke Nauta" > > declaimed the following in > > gmane.comp.python.general: > > >> "Dennis Lee Bieber" wrote in message > >>news:mailman.643.1314851358.27778.python-l...@python.org... > > >> > Next, if you'd read further and didn't take the comment as the > >> > instruction. set > >> > firstrun=1 > > >> I did > > >> > to tell the server this is the first time it is being run - IT WILL > >> > create the database table (after the first start, reset the flag to 0 > >> > to > >> > speed up later runs). > > >> It didn't create the table. The database kept empty. > > > Odd -- but then, I'm not running it myself, and wasn't up to reading > > all the code to see what path it takes. > > It's only for experimenting with calendar software, so authorization is not > a point. > So I forget about MySQL. > > > > > > > > > > > > >> > Later in the config file set > >> > mysql_auth=1 > >> > to enable the use of MySQL, and set the admin user/password to what you > >> > plan to have it use. > > >> I did > > >> > You probably want to set > >> > daemonize=1 > >> > (maybe after first run) > > >> I left this to 0. > > >> > Oh, and don't forget to set the main data directory and any > >> > port/host changes. > > >> I left host and port as they were. The main directory is e:\wwwroot > > >> > Start the server - it should connect to MySQL, create the table, and > >> > add the admin user to the table. > > >> I started the server with server.py (in > >> D:\Python27\WebDAV\PyWebDAV\DAVServer) -D e:/wwwroot -m -c config.ini > > > If the main directory is already in the config file, you probably > > don't need to specify it on the command line... > > OK > > > And... could there be > > something in the code where overriding the directory by command line > > changes where it looks for the config file? (Just guessing at this > > point). > > Possibly. > I tried this: > server.py -n -c config.ini > Once again, the server is up and running and when I am logging in with my > browser (10.0.0.140:8081) I can see information showing up at the command > prompt, showing somebody is logging is, but the same error: > "fshandler:get_data: \Webdav not found". During starting up the server > mentioned: "pywebdav:Serving data from \Webdav". > > In the config file it says: > "# main directory > directory = \Webdav" > > Perhaps my Python configuration is at fault. > > Fokke Is the path supposed to be absolute? In which case you'd need to have: directory=C:\path\to\Webdav instead of just directory=\Webdav Becky Lewis -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing WebDAV server
> > > Possibly. > > I tried this: > > server.py -n -c config.ini > > Once again, the server is up and running and when I am logging in with my > > browser (10.0.0.140:8081) I can see information showing up at the command > > prompt, showing somebody is logging is, but the same error: > > "fshandler:get_data: \Webdav not found". During starting up the server > > mentioned: "pywebdav:Serving data from \Webdav". > > > In the config file it says: > > "# main directory > > directory = \Webdav" > > > Perhaps my Python configuration is at fault. > > > Fokke > > Is the path supposed to be absolute? In which case you'd need to have: > directory=C:\path\to\Webdav > > instead of just > directory=\Webdav > > I tried: > directory=D:\Webdav > directory=D:/Webdav > > To no avail. > It didn.t make any difference. > > I surely believe my WebDAV installation is at fault. > > Fokke Interestingly, looking at the code that returns the "fshandler:get_data: \Webdav not found" message, it looks like it tests that the path given exists and then tries an os.path.isfile, then an os.path.isdir. If both fail you get the message that you see. This might be a bit of a shot in the dark but could you try the path with and without a trailing '/' or '\'? I don't currently have a windows box available to test on and figure out why it would be detected as existing but not test true for either a file or directory. Becky Lewis -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing WebDAV server
On Sep 5, 3:51 pm, "Fokke Nauta" wrote: > > Hi Becky, > > I tried it straight away: > directory=D:\Webdav\ > directory=D:/Webdav/ > > Didn't work, in both cases the same error "fshandler:get_data: \Webdav not > found". > > I have the opinion that my WebDAV installation is at fault. The database is > not created either. > To have set up Python, I used python-2.7.2.msi. > To install WebDAV, I used PyWebDAV-0.9.4.1 and PyXML-0.8.4 packages, both > Unix/Linux. > To install the, I used > " > > >> You dont install from "Python GUI", use normal cmd, navigate to the > >> folder > >> you downloaded PyXML and PyWebDAV and run "python setup.py install" > >> (python.exe has to be in your PATH). Then you have to find the > >> startup-script "davserver". Find your python installation directory and > >> look into/Tools/Scripts, in my computer this is > >> E:\python27\Tools\Scripts. PyXML and PyWebDAV get installed in the > >> site-packages folder i.e. E:\python27\Lib/site-packages. You might have > >> to > >> look for "davserver" there..." > > Shall I reïnstall the whole lot? Would it make a difference if in that case > I would use ActivePython-2.7.2.5-win32-x86.msi instead of python-2.7.2.msi? > > Fokke You could try that but I'd imagine you'll end up with the same issue. My best guess is that something is preventing os.path.isdir from detecting the path as a directory under windows. I can't reproduce it on my Linux system but may have a working windows installation later. If I were you I'd fire up a python shell (execute python and get the >>> prompt), import os.path and manually try os.path.isdir(path_name) to try and find out what the actualy problem is. -- http://mail.python.org/mailman/listinfo/python-list
Re: Running Python Demo on the Web?
On Sep 5, 11:00 pm, Python Fiddle Admin wrote: > Python has been ported to the web browser at pythonfiddle.com. Python > Fiddle can import snippets of code that you are reading on a web page > and run them in the browser. It supports a few popular libraries. > > Another common usage is to post code on the site to allow other people > to play around with it. Also, it can be used to demonstrate a working > program. Looks interesting but you don't appear to have support for most (any?) of the python core libs. Are you planning on adding more libraries? -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing WebDAV server
> I have re-installed Python and the setuptool, and tried the Python version > of Active, but it did not make a difference. > So now I use the "old" Python 2.7 again. Used easy_install to install > PyWebDAV. I now run davserver.exe from the Script directory. Still the same > problem. > What I found, however, was that if I specify the directory from the command > line (like davserver -D d:\Webdav -n) there is no error message as > "INFO:fshandler :get_data: D:\Webdav not found". The browser shows still the > 404 error. > The error "INFO:fshandler :get_data: D:\Webdav not found" only occurs when I > specify the "-c config.ini" in the command line. > > I didn't expect it to be this so tricky. It looked easy to set up an > experimental webdav server. > > Fokke How are you trying to access the webdav server? I've been hacking on the server for several days now (unrelated reasons) and have found that it's a little unforgiving when it comes to configuration errors. You need to be accessing the webdav server via the correct port (I think it's 8008 by default). If you're not doing this and something else is running on port 80 (which is where a webdav client will go to by default) then this would explain the 404 errors. -- http://mail.python.org/mailman/listinfo/python-list
Re: Multiplication error in python
I tried running your code in ipython: In [1]: l = [1,2,3,4,5] In [2]: i = 0 In [3]: for a in l: ...: p = 2 * a ...: t = p + i ...: i = t ...: In [4]: In [4]: t Out[4]: 30 The output from Python was 30, not 45. What Python version are you running? On Sep 27, 6:21 pm, sakthi wrote: > In the following code,>>> l=[1,2,3,4,5] > >>> i=0 > >>> for a in l: > > ... p=2*a > ... t=p+i > ... i=t > ...>>> t > > 45 > > Python gives an answer as 45. But i am getting 30 when i execute > manually. Is there any different multiplication pattern in python? > Thank yu. -- http://mail.python.org/mailman/listinfo/python-list
Re: Multiplication error in python
I think you may be doing something wrong. If I run: >>> l = [1, 2, 3, 4, 5] >>> i = 0 >>> for a in l: ...i += 2 * a ... >>> i 30 The result is 30 as expected. Nowhere near the 155 that you are getting. :/ Again, could you state which version of python are you using (and what OS) so that we can run the code in the same environment as you. Becky Lewis > > > > Python gives an answer as 45. But i am getting 30 when i execute > > > manually. Is there any different multiplication pattern in python? > > > Thank yu. > > > My Python gives 30; methinks perhaps you've elided some important part > > of your code. > > Also, I note that your loop body can be significantly simplified to > > just: i += 2*a > > > Cheers, > > Chris > > --http://rebertia.com > > if i put i += 2*a it returns 155. -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing Python 2.6.7 on Windows
On Sep 27, 9:54 pm, Wanderer wrote: > How do I install Python 2.6.7 on Windows? The Python 2.6.6 page says > > "Python 2.6.6 has been replaced by a newer security-fix only source > release of Python. Please download Python 2.6.7 instead." > > But there is no windows installer on the 2.6.7 page. Do I install > 2.6.6 first and then update to 2.6.7? > > Thanks Hi, is there any reason that you specifically need the 2.6 branch or would it be possible to update to 2.7? As someone else already pointed out, there's the ActivePython route if you really need 2.6.7. -- http://mail.python.org/mailman/listinfo/python-list
Re: (don't bash me too hard) Python interpreter in JavaScript
On Nov 15, 8:37 pm, Passiday wrote: > Hello, > > I am looking for a way how to bring Python interpreter to JavaScript, in > order to provide a web-based application with python scripting capabilities. > The app would have basic IDE for writing and debugging the python code, but > the interpretation, of course, would be done in JavaScript. I'd like to avoid > any client-server transactions, so all the interpretation should take place > on the client side. The purpose of all this would be to create educational > platform for learning the programming in python. > > I hoped somebody already had done something like this, but I couldn't google > up anything. I've found some crazy project emulating PC in JavaScript (and > even running Linux on top of it), but not a python interpreter. > > Of course, I could take the python source and brutally recode it in > JavaScript, but that seems like awful lot of work to do. Any ideas how I > should proceed with this project? I think you may find it a little time consuming to reimpliment python in javascript. I'm inclined to say "go for it" though since you may create something awesome in the process ;) If you want to take an easier route, may I point out pythonanywhere.com? It doesn't run in the browser but does give safe access to multiple python interpreters and from my own use I can say that it works pretty well. You can even set up web apps using it. For educational purposes it might be helpful to you. -- http://mail.python.org/mailman/listinfo/python-list
Re: Can't install pycrypto
My best guess from the error and a quick look at the setup.py file is that during setup "chmod 0755 configure" is trying to run but failing. I'm guessing that you're on windows and don't actually have chmod, hence the error. The project on github looks active so you could go and ask for a windows friendly setup.py file and install using: python setup.py install or you could attempt to edit it yourself. I'd suggest asking for a windows friendly file on github as they will either give you a reason for it not being possible or will make the fix and everybody can benefit :) Hope that helps, Becky Lewis On Dec 5, 8:20 am, Alec Taylor wrote: > Good afternoon, > > Unfortunately my pycrpto install fails (tried with pip, easy_install > and pip -e git+) > > Error:http://pastebin.com/wjjfTZvd > > How do I get this working? > > Thanks for all suggestions, > > Alec Taylor -- http://mail.python.org/mailman/listinfo/python-list
Re: IPython 0.12 is out!
Thanks and congratulations! Installed via pip --upgrade and everything seems to be working just fine (python 2.7.0+ on Linux) I look forward to investigating all of the new features! Becky Lewis On Dec 19, 9:49 am, Fernando Perez wrote: > Hi all, > > on behalf of the IPython development team, I'm thrilled to announce, after > an intense 4 1/2 months of work, the official release of IPython 0.12. > ... snip ... -- http://mail.python.org/mailman/listinfo/python-list
Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error
On Dec 22, 2:40 pm, Νικόλαος Κούρας wrote: > Hello when i try to visit my webpage i get the error it displays. Iam > not posting it since you can see it by visiting my webpage > athttp://superhost.gr > > Please if you can tell me what might be wrong. It doesn't seem entirely clear but if I had to guess I'd think that for some reason os.environ['REMOTE_ADDR'] is not returning a good value (os.environ is a dictionary holding all of the os evironment variables). According to the socket docs, this error gets raised for address related errors. -- http://mail.python.org/mailman/listinfo/python-list
Re: socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error
Is there any possibility that you can tell us what the script actually is or provide a code listing (use pastebin if it's big)? -- http://mail.python.org/mailman/listinfo/python-list
Re: Python in web development
1) Python is absolutely fine for web development. It's just as good, if not better than PHP or Perl for this sort of work (that's my opinion anyway). 2) I've used Django quite extensively and it can certainly handle your requirements. You might want to have a look at Flask (http://flask.pocoo.org/) as it's not quite as heavy as Django so would possibly suit your needs a little better. On Sunday, March 3, 2013 2:18:00 PM UTC, Sarbjit singh wrote: > Hello All, > > > > I have been using Python as a scripting language for my office tasks. Now I > have been thinking of using (and learning as well) for web development. For > my tasks, I need to perform some tasks and report on the web. Now I have no > experience of web development with Python. So, I want to conform first > whether Python is best for web development. Python is my personal choice for > my automation works and I want to extend it for web development. > > > > REQUIREMENT: > > I need to develop a html form which would take user input and perform some > operations (generate intermediate files) and report result on web. > > > > >> Some guys in my organization are using Perl for this purpose and thus I > >> could get the setup for free.But I want to learn and use Python as > >> substitute for Perl. (PHP could also be an option. I have worked on PHP > >> once for handling the form data.) > > > > So my questions are:- > > > > 1. Can I use Python (I want to use personally :)) over PHP/Perl? > > > > 2. If Yes, I want to know the modules that I should learn for achieving my > requirement. I searched internet and found Python provides CGI, Django etc. > > > > I don't much about Django/CGI, please suggest which module I should learn and > use. > > > > Thanks > > Sarbjit -- http://mail.python.org/mailman/listinfo/python-list