Re: [Tutor] can't install

2013-12-31 Thread Lolo Lolo





On Sunday, December 29, 2013 9:11 PM, Tobias M. t...@tobix.eu wrote:
 

prefix/bin/pyvenv ~/my_venv
source ~/my_venv/bin/activate
wget python-distribute.org/distribute_setup.py
python distribute_setup.py


Hi, can i ask why the name ~/my_venv/  .. is that just to indicate ~ as the 
home directory?
so pyvenv already has access to virtualenv? i thought i would have needed pypi  
https://pypi.python.org/pypi/virtualenv  or easy_install before i got install 
it, but here you create the virtualenv before getting distribute_setup.py.

Everything seems fine now, at last! I really appreciate your help;)___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] can't install

2013-12-29 Thread Lolo Lolo
On Wed, Dec 25, 2013 at 2:16 AM, Tobias M. t...@tobix.eu wrote:

 ./configure --prefix=prefix

 where prefix is a custom path (e.g. in your home directory) where you want
 to install python. You can configure without the --prefix option, but if you
 just want to use this python installation for virtuelenvs I would install it
 separate from the rest of the system.

 Then you can build and install Python:


Hi Tobias can i just ask. As i already have Python 3.3, when i install this 
separate version of 3.3, will there be a conflict on the command line when i 
type python3.3? This install i want just for virtualenvs but i wonder if it 
would replace my other 3.3 as the default on the command line?



On Wednesday, December 25, 2013 1:46 PM, Lolo Lolo losermelo...@yahoo.com 
wrote:
 
 On Wed, Dec 25, 2013 at 2:16 AM, Tobias M. t...@tobix.eu wrote:
 Is this the error you get when executing distribute_setup.py?
 urllib.error.URLError: urlopen error unknown url type: https

Thank you so much Tobias. And yes, that was the exact error message 


 On Tue, Dec 24, 2013 at 11:36 PM, Steven D'Aprano st...@pearwood.info 
wrote:
 But the good news is that all this should become history from Python 3.4
 onwards, there are plans to include pip in 3.4.

also thanks Steven. I'll definately upgrade to Python 3.4___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] can't install

2013-12-25 Thread Lolo Lolo
 On Wed, Dec 25, 2013 at 2:16 AM, Tobias M. t...@tobix.eu wrote:
 Is this the error you get when executing distribute_setup.py?
 urllib.error.URLError: urlopen error unknown url type: https

Thank you so much Tobias. And yes, that was the exact error message 


 On Tue, Dec 24, 2013 at 11:36 PM, Steven D'Aprano st...@pearwood.info 
wrote:
 But the good news is that all this should become history from Python 3.4
 onwards, there are plans to include pip in 3.4.

also thanks Steven. I'll definately upgrade to Python 3.4___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] can't install

2013-12-24 Thread Lolo Lolo
ive struggled all day to install pip on ubuntu 12.04 for python 3.3 . The only 
pip in the apt-get cache is for python 2. i tried to download pip from source 
but setuptools is missing when it tries to import it. This made me download 
setuptools with apt-get but the version there is only for python 3.2 I've also 
download the distribute_setup.py file to get pip through easy_install but it 
returns errors when it uses urllib.request. Something to do with https, 
although the same distribute_setup.py worked perfectly when i used it on 
windows for 3.1 and 3.3.

This all started because i wanted to use virtualenv. After installing it i 
couldn't use it cos it needed zlib which i didn't have. apt-get only has zlib 
for python 2.7. 

I'm now at my wit's end. Life was great using windows. Everyone told me try 
ubuntu, now life is so stressful, even on christmas eve:( Any ideas on how to 
solve this issue would be appreciated:(___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] hello.

2013-06-12 Thread Lolo Lolo
http://pictmania.com/tez.php___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] cant autoincrement

2013-04-26 Thread Lolo Lolo
I'm doing a test database with sqlite and have run into some problems. in my 
1st table i have an id field: 
 
id INTERGER Primary Key
 
the database has a few more fields, but when i insert into it, i leave the id 
field empty as it should be done automatically, but sql complains with an error 
that i have left the field blank. If i manually put the ids in, everything 
works, but from my understanding this should be done automatically, aswell as 
it auto incrementing? 
 
i have two tables 
table1 (id, field 2, field 3, field 4)
table2 (id, field 2, field 3, FOREIGN KEY (field 3) REFERENCES table1(id))
 
i initially had a problem as foreign keys is not enabled by default but as my 
auto increment isnt working, can i just ask what does sql insert into field 3 
of table2 as its a foreign key. Does it automatically insert the correspond id 
of table1, or is it up to me to manually insert the correct data into table2 
that match with the keys on table1? I ask only because i havent had a chance to 
try it myself as i still have a problem with the keys, and strangely enough if 
i put random text into the foreign key of table 2 that didnt reference any ids 
on table1, sqlite still inserts them with no errors when they clearly ignore 
the instructions given.___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] cant autoincrement

2013-04-26 Thread Lolo Lolo
what does your insert statement look like? According to the documentation 
(http://www.sqlite.org/faq.html#q1):

 whenever you insert a NULL into that column of the table, the NULL
is automatically converted into (1 + the highest value). 

The insert statement should look like:
 
INSERT INTO t1 VALUES(NULL,123);

 i included the null, my results are: 
    
cursor.execute(INSERT into person VALUES(NULL, arg1, arg2))
 
my result is:
 
(None, value1, value2) #the key being None :(
 
also thanks for the link___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] cant autoincrement

2013-04-26 Thread Lolo Lolo

thanks so much for the code sample eryksun. its working perfectly now:)___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] trouble installing library

2013-04-24 Thread Lolo Lolo
Thanks for the help guys
 
 Scripts\activate.bat is a relative path, assuming your current working
 directory is that of the virtual environment.
 
your suggestion work. Initially i was doing Scripts/activate or 
Scripts/activate.bat. I guess it didnt like / and i didnt realise the 
difference. I have stumbled on a new error. The tutorial is aware i willl get 
an error because its explaining virtualenv. it wants me to type:
 
$ virtualenv --no-site-packages gmapenv 
$ cd gmapenv 
$ ls 
bin/  include/  lib/ 
$ . bin/activate 
$ python -c 'import googlemaps' 
Traceback (most recent call last):  
  File string, line 1, in module 
ImportError: No module named googlemaps    error line
 
so i get the import error, but when i type:
 
python -c 'import googlemaps' or py -3 -c 'import googlemaps' i get this error:
 
  File string, line 1
    'import
  ^
SyntaxError: EOL while scanning string literal
 
which i guess means my program didnt get up to trying to import the file___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] trouble installing library

2013-04-24 Thread Lolo Lolo
 Microsoft's C/C++ runtime only
 uses double quotes. So just change it to the following:

     python -c import googlemaps
 
Thanks this solved the issue, now another issue has been thrown. Just not my 
day. after the 1st module error happens, they show the correct way to install 
google maps, i will show there results, then mine.
 
$ pip install googlemaps 
Downloading/unpacking googlemaps 
  Downloading googlemaps-1.0.2.tar.gz (60Kb): 60Kb downloaded 
  Running setup.py egg_info for package googlemaps 
Installing collected packages: googlemaps 
  Running setup.py install for googlemaps 
Successfully installed googlemaps 
Cleaning up... 
 
 
Here is mine: 
 
 
(gmapenv) D:\Data\Files Data\virtualenv-1.9.1\scripts\gmapenvpip instal
l googlemaps

Downloading/unpacking googlemaps
  Downloading googlemaps-1.0.2.tar.gz (60kB): 60kB downloaded
  Running setup.py egg_info for package googlemaps
    Traceback (most recent call last):
  File string, line 16, in module
  File D:\Data\Files Data\virtualenv-1.9.1\scripts\gmapenv\build\go
oglemaps\setup.py, line 18, in module
    import googlemaps
  File googlemaps\googlemaps.py, line 471
    print main.__doc__
 ^
    SyntaxError: invalid syntax
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
  File string, line 16, in module
  File D:\Data\Files Data\virtualenv-1.9.1\scripts\gmapenv\build\google
maps\setup.py, line 18, in module
    import googlemaps
  File googlemaps\googlemaps.py, line 471
    print main.__doc__
 ^
SyntaxError: invalid syntax

Command python setup.py egg_info failed with error code 1 in D:\Data\Fil
es Data\virtualenv-1.9.1\scripts\gmapenv\build\googlemaps
Storing complete log in C:\Users\Lolo\pip\pip.log
 
 
The 2 syntax errors look like python 2 vs python 3 errors:
 
print main.__doc__ 
 
The googlemaps package was created but im just not comfortable with the error 
as it may be incomplete. and i dont know if its wise to go into the file i 
change it to  print(main.__doc__), will there be a lot more errors like these? 
was googlemaps meant only to be used with python 2 and not 3? If i do change 
the print statements that caused the errors, do i delete the created googlemaps 
directory and do it again as the previous one might be incomplete?? can anyone 
please offer help as to what i should do next
 
 
 Reference: Parsing C++ Command-Line Arguments
 http://msdn.microsoft.com/en-us/library/17w5ykft%28v=vs.100%29
 
C++ is behind the windows command line? ___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] trouble installing library

2013-04-23 Thread Lolo Lolo
im not sure if anyone is familiar with virtualenv but im tryng to follow a 
tutorial that has asked me to install virtualenv. i downloaded it in the form 
of a tar file and extracted it. There was no .exe file to install. The tutorial 
asks for me to type this code :

$ virtualenv --no-site-packages gmapenv 
$ cd gmapenv

but i get a few errors. 1st virtualenv isnt a know command, so i put python 
infront of it and get an import error:

ImportError: No module named virtualenv

Am i installing it correctly? can anyone offer any help? Im on Windows Vista, 
and i have both python 2 and 3 but i would prefer to use Python 3___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] trouble installing library

2013-04-23 Thread Lolo Lolo


Thanks for your response guys:
 
 what happens if you cd to the directory where you untarred the file, then 
 run python setup.py install
 
This seems to have done the trick!
 
 It's an honour to be communicating with the world's last Vista user ;-)))
 
lol And this was very uncalled for :((___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] trouble installing library

2013-04-23 Thread Lolo Lolo
guys having got the install to work, a part of the process fails me.. the full 
code instruction is:
 
$ virtualenv --no-site-packages gmapenv 
$ cd gmapenv 
$ ls 
bin/  include/  lib/ 
$ . bin/activate
 
since im on windows i used dir instead of ls, but this line:
 
$ . bin/activate
 
is not recognised as a command. If i try to open it wth python cmd says no such 
file or directory___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] trouble installing library

2013-04-23 Thread Lolo Lolo
 The dot (.) command is used to source a file, It executes Unix like commands 
 in bin/activate. Not relevant when  you're on windows.  Is there a .bat or 
 .cmd file instead?
 
oh i had no idea.. i found the activate file inside a folder name Scripts 
(instead of bin) and and tried the same command, but now i get this error:
 
  File Scripts/activate, line 4
    deactivate () {
  ^
SyntaxError: invalid syntax
 
i looked at the activate file which doesnt have an extension. the code is not 
in python so im trying to figure out code i have no clue where its from. that 
line where the error is contains the javascript like braces after functions {} 
maybe thats it but it seems this tutorial doesnt want me to study it:(
Here is some of the code:
 
deactivate () {
    unset pydoc
    # reset old environment variables
    if [ -n $_OLD_VIRTUAL_PATH ] ; then
    PATH=$_OLD_VIRTUAL_PATH
    export PATH
    unset _OLD_VIRTUAL_PATH
    fi
    if [ -n $_OLD_VIRTUAL_PYTHONHOME ] ; then
    PYTHONHOME=$_OLD_VIRTUAL_PYTHONHOME
    export PYTHONHOME
    unset _OLD_VIRTUAL_PYTHONHOME
 
what worries me is that it has comments, and on each comment this  is already 
there: 
 
# This should detect bash and zsh, which have a hash command that must
# be called to get it to forget past commands.  Without forgetting
# past commands the $PATH changes we made may not be respected
 
but it still doesnt explain the invalid syntax on line 4:(___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] trouble installing library

2013-04-23 Thread Lolo Lolo


 



 Run Scripts\activate.bat if your shell is cmd, or Scripts\activate.ps1
 if you're using PowerShell. These are shell scripts. Do not run them
 with Python.

I have to get some sleep but i believe i got the installation in the right 
version it also installed pip. I will go over your instructions just to make 
sure tomorrow. Also:

Scripts\activate.bat ... returns this error:

'Scripts' is not recognized as an internal or external command,
operable program or batch file.

it might want a program or command to run the bat fine___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Socket Programming

2013-04-08 Thread Lolo Lolo
on socket programming. if as a client or server, the information being sent has 
a buffer size on 2048, will this retrieve all data below 2KB? or can it be 
exceeded with say 2100? or does 2100 fall under 3KB?___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] send issue

2013-03-23 Thread Lolo Lolo
 Does this help?
 
THANKS!! Yes it definately helped. everything is so much clearer now. i always 
used to wonder about the u syntax in python 2___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] send issue

2013-03-22 Thread Lolo Lolo
using a socket im trying to send a message between connections. it was a string 
and my python complained:
 TypeError: must be bytes or buffer, not str .. so i put a b infront of the 
string. now this works fine but the problem is after recieving this message, i 
need to send it back with an int included, like:
message = 'Thankyou!, processed connection number %d' % connections    
connections being an int.
again this is a string, but puttng a b infront of that strong wont work, it 
returns:
TypeError: unsupported operand type(s) for %: 'bytes' and 'int'
 
i tried everything but i cant seem to get past this little obstacle. im using 
python 3 on windows vista___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] send issue

2013-03-22 Thread Lolo Lolo
You can use bytes() function:

 bytes('%d' % 3,  'utf-8')
b'3'

-m
 
thanks this has solved everything. can i ask if this is an issue only in python 
3 where sockets cant send strings? the docs state the argument is a string, but 
i believe that was for 2.7. I knew nothing about b'' or bytes() before today. 
thanks again___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] mysqlite

2013-03-08 Thread Lolo Lolo
I finished the tutorial and must say i am very happy. Ill probably go over it 
again while writing some test dbs. The SQL command line still troubles me
 
I'm not running it from Python I'm running it from the OS command line.
You need to open a CMD shell window and cd to your SQL database folder
(E:\PROJECTS\SQL in the example above) and then run sqlite3.
sqlite3 employee.db

 my main questions are it possible to use the command line
 without cursor() and connect() in python 3

No only from the sqlite command line.
 
I can only find an sqlite3 folder in my Python installation folder. 
Python\Lib\sqlite3
 
the command line command doesnt work from inside this folder, but i am guessing 
this isnt where im supposed to do it from. 
Is there a sqlite program i am supposed to install that is separate from the 
one that came with Python? Its the only reason i 
can come up with for my cmd not recognizing sqlite3 as a command, operable 
program or batch file, but i don't know which
SQL package to download/install.
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] mysqlite

2013-03-06 Thread Lolo Lolo
im working through alan's sql tutorial. i have a few questions from there but 
1st i wanted to try out an example in Core python's sql example.

 import sqlite3
 cxn = sqlite3.connect('sqlite_test/test')
 cur = cxn.cursor()

after this i created a table called users and inserted some data. then i did:

 cur.execute('SELECT * from users')
 for user in cur.fetchall():
    print(user)

i got the results of all data i gave the table. then did

 cur.close()
 cxn.commit()
 cxn.close()

i then closed this interactive IDLE session. i reopened another session and 
simply did 

 import sqlite3
 cxn = sqlite3.connect('sqlite_test/test')
 cur = cxn.cursor()
 for user in cur.fetchall():
    print(user)

 
but this time no data was printed back to me, even though the database file 
'test' already existed from the previous session. Why did this happen, cant i 
just connect and my data is still intact? or do i have to always re enter data 
from the previously saved session?

My questions about http://www.alan-g.me.uk/tutor/tutdbms.htm is to open a 
database it uses the command line directly and doesnt creat cursor() or 
connect() objects e.g.
 
E:\PROJECTS\SQL sqlite3 employee.db 
sqlite create table Employee
   ... (EmpID,Name,HireDate,Grade,ManagerID);
sqlite insert into Employee (EmpID, Name, HireDate, Grade, ManagerID)
   ... values ('1020304','John Brown','20030623','Foreman','1020311');
 
i tried this in my command line but got :
python.exe: can't open file 'sqlite': [Errno 2] No
 such file or directory
 
i tried creating the a folder called test and doing:  test employee.db 
but no test.db was created.
 
my main questions are it possible to use the command line without cursor() and 
connect() in python 3 or is it only for python 2. is it better from the command 
line or in a .py file. And also my previous question i had about having to re 
enter previously stored data 
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] mysqlite

2013-03-06 Thread Lolo Lolo

 You are missing cur.execute('SELECT * from users')


thanks:) this has fixed the 1st issue.
 
 guys i still cant use the command line. but i guess i dont really mind as i 
can just make a .py file... 
i am having a lot of fun reading through alan's tutorial, everything is 
becoming very clear but can someone please explain this to me.
 
update Employee
set ManagerID = (Select EmpID 
 from Employee 
   where Name = 'John Brown')
where Name = 'Fred Smith' OR 
  Name = 'Anne Jones';
 
 
this is saying set the managerID of 'Fred Smith' or 'Jane Brown' to the ID 
returned in the nested select statement?
 
and this:
 
drop table author;
create table author (
ID Integer PRIMARY KEY,
Name String NOT NULL
);

drop table book;
create table book (
ID Integer PRIMARY KEY,
Title String NOT NULL
);

drop table book_author;
create table book_author (
bookID Integer NOT NULL,
authorID Integer NOT NULL
);

 
sqlite SELECT title from book, book_author ... where book_author.bookID = 
book.ID ... and book_author.authorID = (select ID from author  ...
 where name = Jane Austin); 
 
maybe its simple but because its more complex im finding it hard to read. we 
want a title from book, 
which is the field that will be returned, but why is book_author also in the 
select statement when it isnt
being returned? or are we actually returning every single field from book 
author?
 
so if the author.bookID is equal to book.ID, also check that this ID from 
author matches the authorID from 
book_author.authorID ? after comprehending this im lost in my thoughts. can 
someone tell me how these are
linked. so the whole output is really dependent on the answer from the 2nd 
condition after the and?:
... and book_author.authorID = (select ID from author 
where name = Jane Austin);  
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] mysqlite

2013-03-06 Thread Lolo Lolo
I'm not running it from Python I'm running it from the OS command line.
You need to open a CMD shell window and cd to your SQL database folder
(E:\PROJECTS\SQL in the example above) and then run sqlite3.

thanks ill give this a try.
 
We can logically split it like this 
 
and putting them together:

update Employee
set ManagerID = JohnsID

where Name = 'Fred Smith' OR
Name = 'Anne Jones';


Hopefully that clarifies it a bit.
 
ok this is very clear now. i totally understand it
 
im starting to see the last one and how the filtering is working. i will go 
over it a few more times to 100% get it. I'll ask more questions if i get stuck
along the way:)
 
Because i find following your tutorials very easy i have looked at the other 
topics you have on your site. i notice they are not available in Python 3 
but doesnt this matter? or would i need to wait for a python 3 version? Also 
which could i read next network programming or writing web applications? 
or out of eevrything under Applications(excluding databases), which would be 
the easiest subject for a new programmer to understand ?
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] some web and python version questions

2013-03-05 Thread Lolo Lolo
  
due to the last 2 posts i was able to locate and delete the Iconcache.db 
through cmd. But after restarting, even though i have the refreshed cache, the 
icons are still not displaying properly. Will that website 
http://www.trishtech.com/winxp/rebuild_icon_cache_in_windows_xp.php provide an 
alternative solution or are the end results the same? I guess i can live with 
it, aslong as my scripts still run i dont mind. I do really appreciate the help 
you 2 are giving me.___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] some web and python version questions

2013-03-05 Thread Lolo Lolo
Check the output of the following command:

    reg query HKLM\Software\Classes\Python.File\DefaultIcon

For me the value is C:\Python33\DLLs\py.ico.
 
i get:  'reg' is not recognized as an internal or external command, operable 
program or batch file.___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] some web and python version questions

2013-03-05 Thread Lolo Lolo
System32 should be on the PATH, and reg.exe should be available in XP.
C'est la vie. Try %windir%\System32\reg.exe instead of reg. No
rush. It's just an icon.

sorry eryksun its my fault i havent been clear... im actually using windows 
vista not xp. i mixed your new command with the old but did it directly in the 
system32 directory. using: 
 
C:\Windows\System32%windir%\System32\reg.exe query 
HKLM\Software\Classes\Python.File\DefaultIcon
 
i got this returned:
 
HKEY_LOCAL_MACHINE\Software\Classes\Python.File\DefaultIcon
    (Default)    REG_SZ    D:\Data\Program Files Data\Python33\DLLs\py.ico___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] some web and python version questions

2013-03-04 Thread Lolo Lolo
Hey all, i am running python 3.0 but i realized a lot of modules that support 
version 3 do not support 3.0. now i want to install Python 3.3 but im worried 
the two versions (3.0 and 3.3) might confuse my machine. i don't want to lose 
my work in 3.0 and i installed some modules and saved some work in that 
version. Im on Windows, and my main worry is confusing my PC and making it get 
the versions mixed up. i also want to leave room to install version 2 if i ever 
need to but ill cross that bridge when i get there. For now i want to know if i 
have to delete version 3.0 before installing 3.3?
 
Also i want to learn web development and saw only a few modules support Python 
3. As i don't know anything about this subject i just wanted to ask which is a 
better bet, Bottle or Cherrypy? I am not creating/managing any websites this is 
just to learn. Also is Pyramid a lightweight framework as its description 
suggests or is it big/complex like Django? As a learner are my 1st two options 
a safer bet than the latter 2?___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] some web and python version questions

2013-03-04 Thread Lolo Lolo
Python 3.3 will definitely install independently of 3.0 on Windows. It's only 
the minor versions that happen in place, like going from 3.3 to 3.3.1

If you're running your scripts explicitly, by something like:
   python  myscript.py

then you should be able to say
    python3.3  myscript.py
or   python3.0  myscript.py
 
thanks it installed independently like you said. and those  python3.3 or  
python3.0 in the command line seems to do the trick!___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] some web and python version questions

2013-03-04 Thread Lolo Lolo



thanks for the recommendations. I think i will try a smaller framework first 
(haven't decided which) to learn how it all works without the additional 
features. Then probably will go for Django after i get comfortable working with 
the web    ___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] some web and python version questions

2013-03-04 Thread Lolo Lolo
I don't know how that's working. There are no executables or batch
files with those names in the default installations. It's always
python.exe. Plus the default install options don't muck with the
PATH environment variable. Did you rename (or NTFS symlink) the
executables and add the install directories to your PATH?

3.3 installs py.exe to the Windows directory, which you can use like this:

    py -3.3 myscript.py
    py -3.0 myscript.py

Or add a shebang to the first line of the script such as

#!/usr/bin/env python3.0

Then you can simply run myscipt.py. The 3.3 installer associates the
extension with py.exe, which parses the shebang line.
 
 
--
no sorry i made a mistake it didnt work. i cd into the particular python 
version directory that i named python3.0 and python3.3. sorry that was my 
mistake. Once i was in the correct directory i used the command: python 
filename.py in cmd and the correct version was opened. Since installing 3.3 my 
.py files have lost their python icon, like when there is no default program to 
open it, looks like this:
 
http://www.google.co.uk/imgres?imgurl=http://filext.com/images/icon_unknownassociation.gifimgrefurl=http://filext.com/faq/remove_filext_get_cknow.phph=48w=39sz=2tbnid=ARzowXfVVRzKFM:tbnh=48tbnw=39zoom=1usg=__aeaxTXEytmXEPgmJ-92PpGRrYho=docid=YuYbltBMCbahiMsa=Xei=21s1UbLjE8i0PLXqgXgved=0CFMQ9QEwAwdur=2179
 
 im not sure what to do because on double click they still open and work fine, 
so the right program is still opening them.
 
 
Also can i ask, only if you have tried both cherrypy and bottle. I know which i 
choose doesnt matter, and i will probably randomly select one, but i would like 
to hear an opinion of someone who has used the 2. since i will eventually go to 
django, the lighter one out of the two is the one i would favour.   ___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] some web and python version questions

2013-03-04 Thread Lolo Lolo


 (Please get the quoting right in your messages.  Either you've got a 
 brain-dead mail program, or you're trying to bypass it's methods.  
 On your last message you attributed Eryksun's comments as though they were 
 your own.)
 
sorry this is yahoo's fault, i have to manually insert the  in every message 
i reply to. i forgot to do it in my last message.

 No idea what you mean by work fine.  You mean that it runs 3.0 for some 
 scripts when you right click on the script, and 3.3 on other  
 scripts when you right click on them?  In that case, you must have the py.exe 
 associated with the .py directory, and you must have 
 shebang lines in your scripts.  
 
no if i double click the .py file, Python 3.3 opens all of my python 3 files. A 
lot of 3.0 files won't run but that's okay. Now on my command line if i enter 
the correct version's directory, and use: python myfile.py then the correct 
version's .exe opens the file. When i said it works fine, i was just suprised 
why my files lost their python icon but are still opened by python when i 
double click them___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] some web and python version questions

2013-03-04 Thread Lolo Lolo


Installing 3.3 associated .py files with %windir%\py.exe, but it seems
the icon cache wasn't refreshed. You can trigger a refresh by setting
any default in the Default Programs control panel applet. If that
fails, you can manually delete the cache from the cmd shell:

    del /a %localappdata%\IconCache.db

It will be rebuilt at your next login.

that last command returns The system cannot find the path specified. Any 
ideas which directory i should do that in?___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] confusing installation

2013-03-02 Thread Lolo Lolo
 Like everything in my tutorial the intention is to get you to the point where 
 you can do the basics yourself but also read and understand  the in depth 
 tutorials when you need to go there.
 
i read through some of your tutorial last night and its definately what i need. 
so i will complete it.. thanks___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] confusing installation

2013-03-01 Thread Lolo Lolo
Welcome to the world of software development. GUIs like Windows are great for 
doing simple things but they can't compete with command line tools for doing 
powerful things quickly. So pretty much every programmer has to get used to 
using the command line sooner or later.

If you are not used to using the Windowsc CMD program there are several short 
tutorials available to help you get started.
 
so CMD has features like linux when you can download/install/build files from 
the command line? i didnt think this was possible
 
 
easy install is a toolset for making the installation of Python modules easy. 
Again there are tutorials/manual pages available and the first time you use 
it you may want to read one of those.
 
on a google search for easy install, easy install python was auto completed. Is 
this what im after or is it easy install windows?


It sounds to me like finding a new tutorial that takes a slower pace might be 
your best option here. Do you know what you are trying to learn 
specifically? Or is it just the next topic in the tutorial? Do you have a 
specific need to use SQL Alchemy? If not maybe you can just jump over a 
chapter tor two...

i want to learn about how to use databases and this specific chapter is meant 
to introduce its readers to options available (not just SQLAlchemy). It's 
already at a beginner's level so i might run into the same problems else where. 
i will look for some easy install tutorials___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] confusing installation

2013-03-01 Thread Lolo Lolo
 This should be relevant: 
 http://www.voidspace.org.uk/python/articles/command_line.shtml 

in searching for command line tutorials i also came across Powershell and 
noticed commands that work in one don't work in the other. Would you recommend 
Powershell over CMD?___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] confusing installation

2013-03-01 Thread Lolo Lolo
 Since you use python 3 you will need to download the file: 
 distribute_setup.py.  To do so you will need a web browser or the  command 
 line tool curl.  I use Firefox and when I click on the url you give below it 
 immediately offers to download the required file.

thanks i tried it on firefox and it did the trick

 He is showing you what to expect.  Where ever you see a line starting with 
 C:\ that is what he typed into the command line session, 
 and the lines that follow is the program you are installing informing you 
 what it is doing. (Until you get to the next C:\ or the end)
 
thanks for this explanation, i will try and read that section a bit more 
carefully and do what he is typing
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] confusing installation

2013-03-01 Thread Lolo Lolo
 He is showing you what to expect.  Where ever you see a line starting with 
 C:\ that is what he typed into the command line session, and  the lines that 
 follow is the program you are installing informing you what it is doing. 
 (Until you get to the next C:\ or the end)
 
i managed to install that file but in the book it shows the file going into 
http://www.alchemy.org/ and installing it into site packages, my install 
unfortunately didnt do this very last step that involved adding sqlalchemy to 
easy-install.pth. not sure how to fix it

thanks to every that has helped___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] confusing installation

2013-03-01 Thread Lolo Lolo
 problems else where. i will look for some easy install tutorials

 If you just want to know about SQL databases you could try my tutorial topic 
 (only in the V2 version at the moment but it's nearly   identical on V3) It 
 uses SQLite which is part of standard Python, although you can also download 
 a Windows installer for standalone use.

 If nothing else it will give you a quick intro to the topic and doesn't cost 
 anything but time...

 It sounds like your book is covering a wider range of options than SQL but 
 you might still find mine useful.
 
i didnt see this Alan. my interests is only SQL but the book indicates things 
like ORMs are very important?.. but it doesnt cover SQL indepth, just simple 
examples of the same script in sqlite mysql postgresql and gadfly i think. Im 
definately after an indepth SQL tutorial. I'll have a look at yours now.___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] confusing installation

2013-02-28 Thread Lolo Lolo
Hi all. Im working through a database tutorial in a book called Core Python 
Applications. On page 290 it asks of me to install something though its not 
clear what it is. I think it has to do with SQLAlchemy. It says if you use 
Python 3 you'll need to get distribute first. You'll need a web browser (or the 
curl if you have it).
 
Mind you i havent a clue what it is on about.. then it goes on:
 
And to download the installation file (available at 
http://python-distribute.org/distribute_setup.py), and then get SQLAlchemy with 
easy install. Here is what this entire process might look like on a 
Windows-based PC... then it proceeds to  write a whole bunch of god know what. 
It looks similar to when you install something on linux.. Im a windows only 
user btw. 
 
That link i went there to download the file but if you look at that site i dont 
know what on earth im supposed to do to install/retrieve that file. I do not 
know what easy install is.What do they mean i need a web browser? doesnt every 
computer have a web-browser?? what is curl?? I can not proceed with this 
tutorial if i recieve no help... Please can anyone assist me on what i have to 
do to use the tools they are presenting. 
 
i use Python 3 and Windows___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor